Received: by 2002:a05:6520:4211:b029:f4:110d:56bc with SMTP id o17csp2105407lkv; Thu, 20 May 2021 03:32:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyXpwEJp8AxzjtV28jGAZy/b60Qd/yClzePXRfgTHHSQV6zNE8OY/7gKcf89VVlKu+6jcBw X-Received: by 2002:a17:906:161b:: with SMTP id m27mr3932984ejd.89.1621506731137; Thu, 20 May 2021 03:32:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621506731; cv=none; d=google.com; s=arc-20160816; b=zKmj7aj2ozfZvR0X5zBT86ZrzvGojODacDoflhHtiEtfwpMW70F1t5zqzBy7zW1As7 jJU0LtGZszm/KZtRSGY8DWtF7iKJCGEOSlh69OEGM6+ZxyaW42/LoZq0x5J9hiL/yUl9 chm9lymX+kI+Fhl//HxI/uoFLL6yL3K1qF54YMK5uy0ZO8gaxzJYepOzB8WQ7uvB8NUY z2VdlqSMxAxIO9DZ5jBVdUGKTNPTf+J6kFpkFYMCjXXAwn+hjBsXiO1dnyiErlSt1PYB YaqNS4cr4/BbySvJgZ4+QkIdVbtHy+bP6QYB1FUF9bw/VYReEp5yjM++i6IbvvzRSXe5 b4NQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=aEJm/kq94feV5DOfByWZs931Z6pPzQIFnOGqHy7DNZs=; b=a8oOJ+T47tHH/dOnWw2cmINoiCFNTLIzi/BHzI2C6BJNczCNwsvvwbMPcLDvnR2Djp 4Dxko5tPEGEkyCcqlkemDLXvEaqpr0txW0nV0gwkBcWgpgBy/MwiJ/gy6tf/BAHv5Pzc sCDpxPqfO9tQQ4U07lm83tf+AKeRrNEvx6Iz89Ql4SSj2ngLp0u2KTN/9hs9jGDMl+oZ ouIwWwrSU3FKIOZRlWbvPEJuUf6e48wzUsiCPBxmcwuCRybGPIJQ9cIuA3zrJ84LZ2xY Y/UuuHlBLnemchVXXV0i7gn1ZBkz0vHchS3WTkpcP2dVwnK9m3Zz/Jpci4YlNQt3+KMP Wy/A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=ObGRNG71; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bi6si2270622ejb.405.2021.05.20.03.31.40; Thu, 20 May 2021 03:32:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=ObGRNG71; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236711AbhETKbQ (ORCPT + 99 others); Thu, 20 May 2021 06:31:16 -0400 Received: from mail.kernel.org ([198.145.29.99]:51820 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235176AbhETKTG (ORCPT ); Thu, 20 May 2021 06:19:06 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 5909A6145B; Thu, 20 May 2021 09:46:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1621504009; bh=3OxGgxMHiEXmqEzUZbmOg23yCaocc4iQEm0HrmYm2EQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ObGRNG71WoKJQu+P64kQ9Oom/ihhitfRSmOcyMBwtLjSibie0iiXR86Pgd09I9D1k dW8cL6qCY+M4TnAEuNMy1tvqlpIo4mYvFNgq8Mw18lEeVb8BooEtUvR80wplw3p0vl BnOFVPS6rbgCS72KUcJkk4l3RVdh7CVJLucABkRg= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Hans Verkuil , syzbot+a4e309017a5f3a24c7b3@syzkaller.appspotmail.com, Mauro Carvalho Chehab , Sasha Levin Subject: [PATCH 4.14 052/323] media: gspca/sq905.c: fix uninitialized variable Date: Thu, 20 May 2021 11:19:04 +0200 Message-Id: <20210520092121.887357237@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210520092120.115153432@linuxfoundation.org> References: <20210520092120.115153432@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Hans Verkuil [ Upstream commit eaaea4681984c79d2b2b160387b297477f0c1aab ] act_len can be uninitialized if usb_bulk_msg() returns an error. Set it to 0 to avoid a KMSAN error. Signed-off-by: Hans Verkuil Reported-by: syzbot+a4e309017a5f3a24c7b3@syzkaller.appspotmail.com Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Sasha Levin --- drivers/media/usb/gspca/sq905.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/usb/gspca/sq905.c b/drivers/media/usb/gspca/sq905.c index f1da34a10ce8..ec03d18e057f 100644 --- a/drivers/media/usb/gspca/sq905.c +++ b/drivers/media/usb/gspca/sq905.c @@ -167,7 +167,7 @@ static int sq905_read_data(struct gspca_dev *gspca_dev, u8 *data, int size, int need_lock) { int ret; - int act_len; + int act_len = 0; gspca_dev->usb_buf[0] = '\0'; if (need_lock) -- 2.30.2