Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp3702251ybv; Mon, 10 Feb 2020 05:00:36 -0800 (PST) X-Google-Smtp-Source: APXvYqzsK53cmSMSVxzORpPFB36uIKhp+WSo1KMzJjOuMgAFUIlSxsYqbrzziQkoYL8bisJFDuDX X-Received: by 2002:a9d:518b:: with SMTP id y11mr883997otg.349.1581339636680; Mon, 10 Feb 2020 05:00:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581339636; cv=none; d=google.com; s=arc-20160816; b=fuXYs8utjenFBF4fa//lRQXNP/KSmpFZQ/IgOlHwt27lmDq6BeBIgHr0Uekj9vCJFE kiLvXfw2FGXA9XU7Ufe3Rwr9hpEfx5aBIP0U3Fp6ac2jodtXtbOagGNh/1QoePpODg9R Oi5EYKUiJKnOM3g4O1QEsw9W1j0EGYStpN7uJUvd954TP2ObhWeXybYEte7tN8R0JpOt /uA8HOlYG5heFkERSqgRFdmn2zNSP88SIjcJ5wCWpPN+Ag92sh4OvpuLRLN9SMr0AxS7 u8fI0nEf0I3kiVmXSJDd4gA9LLbN2TkTL7NyMaMxfRnnLGYn0lo/MLwGGvTx7OPg822D EF3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=yR1TAhKSk1gBbtLsWnEuQJtpONuslqXb9ES6Pbe6Z8o=; b=U4RHZF6/rVoOneVkZ8XsKxe71egwjm/tBVbt1va+XVeNoaQcarj9hLTOa9ZCrM+obh +kHp3ZLERXI41DBVXak1FYm3BDfnicvHlslerc0hoJhuCLrlx8LG05PbF99QU09TFhUD yqaKocmEA6ogMo6OyzPbrr3J2LlQQHvfwO9+zIJHqu/FDNuqrDem/mt1am8ykAMzKSJz j5zTHr8rln1kTCnRdQwg9S97Rkj43yfDaJMsswszXsyGfHnsGVAcH/YEe7MgH2rUbqI8 p5WcHAY4MHiZxNjcojpu9YYckljIEG91QtcN2F6f00FxO7q4ocjC1uwr0OuDkXDF6vmt XxxQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=EyYduVHE; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k15si143962oij.134.2020.02.10.05.00.23; Mon, 10 Feb 2020 05:00:36 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=EyYduVHE; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730211AbgBJNAV (ORCPT + 99 others); Mon, 10 Feb 2020 08:00:21 -0500 Received: from mail.kernel.org ([198.145.29.99]:42044 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729858AbgBJMlA (ORCPT ); Mon, 10 Feb 2020 07:41:00 -0500 Received: from localhost (unknown [209.37.97.194]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 1F5D720733; Mon, 10 Feb 2020 12:41:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1581338460; bh=fQAz3IvNxpOZZlPxtQGQqgPRu0k0bCDbi1STD+6Z5M8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=EyYduVHE0lXla+soBmOSKhDln6GBNB8LJnz1G6bRXGicWRAusC16huXhi3UkNt6z+ 51FGlIfEnXYJPZONGugt0f3Eku1GayiiGtDayfwbF+N2wDJzvHVqmhFBe7byptUJmo c8HSCGhLJMyvTdjqiZ7aEgAkUkHSYCv6+RNaS5w0= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Oliver Neukum , Johan Hovold , Sean Young , Mauro Carvalho Chehab Subject: [PATCH 5.5 216/367] media: iguanair: fix endpoint sanity check Date: Mon, 10 Feb 2020 04:32:09 -0800 Message-Id: <20200210122444.151490713@linuxfoundation.org> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200210122423.695146547@linuxfoundation.org> References: <20200210122423.695146547@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Johan Hovold commit 1b257870a78b0a9ce98fdfb052c58542022ffb5b upstream. Make sure to use the current alternate setting, which need not be the first one by index, when verifying the endpoint descriptors and initialising the URBs. Failing to do so could cause the driver to misbehave or trigger a WARN() in usb_submit_urb() that kernels with panic_on_warn set would choke on. Fixes: 26ff63137c45 ("[media] Add support for the IguanaWorks USB IR Transceiver") Fixes: ab1cbdf159be ("media: iguanair: add sanity checks") Cc: stable # 3.6 Cc: Oliver Neukum Signed-off-by: Johan Hovold Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Greg Kroah-Hartman --- drivers/media/rc/iguanair.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/media/rc/iguanair.c +++ b/drivers/media/rc/iguanair.c @@ -413,7 +413,7 @@ static int iguanair_probe(struct usb_int int ret, pipein, pipeout; struct usb_host_interface *idesc; - idesc = intf->altsetting; + idesc = intf->cur_altsetting; if (idesc->desc.bNumEndpoints < 2) return -ENODEV;