Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp562842pxj; Thu, 20 May 2021 16:18:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx2HD8Pq52E1TXjegnEiOZzGxXlfxLs3sz1GS6O7H+pzROB1ccFbyiKItSUqNnCF1yU9dWj X-Received: by 2002:aa7:c9cb:: with SMTP id i11mr7534194edt.331.1621552722385; Thu, 20 May 2021 16:18:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621552722; cv=none; d=google.com; s=arc-20160816; b=mua/60t0OE+xqL4F6VKmeI0Ml6h4FL/uPKh8mr5ESCoBpIViKR1B7Cg8Q3byPFkFmn QrivnS5aXKHG4GuTgOQXLLL4dGcJk5BQG/Rzht6d67BCeWoY4JLdqczG4RFS6mwW/YA7 CRkwUbdWQIbmeF+xhclmW2mDc9dlRcYg1zPi34Syd3K+tWqDcLUq1ho/pxEgcJe2uxOY yqRK+DiGKSY6w2GeN+jJ2n2dNBSCHrPLNEg4SSwHeL0v6rKVFIZ3kW3kbI0KGOuXZU0q PcItw0ux4228gRbKXrO53zx2bP+qGhGaKN49HSiE788Bmc5/P8I7NTxCk2/82fGEFqz+ 2V1g== 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=uDO6ENr8pvCvAFIHifWERGMqM5Jr6oJ+rOukUjNjEp8=; b=AfRQiigA8WNOqoVT1iinqGIWYjsonHzgHejWxTG9Tltt01gmu7GUbTxGeSr7fXAPQv k8l4FyLn3GS5yq7zKDO6Tod4oWDcXaAFG4pjipfVOLsODjjZSsiQ+bhFpvKDCNPBNT2/ fQWZ4dET1NkgF9dH/uuEHq/3s62dufsQ6FBcFyS7qcLaTjjPswJPSVPPn4KbkD64Mus/ fZdW8c3gcuV9vDlOYH4RpGmvAWKJ3aVR8kpMGpNeFwhgOgHhHqkvXaHbl6v40+W5Bc5b XRWeUWxc7HPP8Vkxs6hJH/qgWvPi0IsAxmkT2b+FdKXht3dB6kg9WylKtIOjqWZnw/5H dRjQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=RITk76VW; 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 a15si1712911edr.48.2021.05.20.16.18.18; Thu, 20 May 2021 16:18:42 -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=RITk76VW; 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 S239695AbhETL2k (ORCPT + 99 others); Thu, 20 May 2021 07:28:40 -0400 Received: from mail.kernel.org ([198.145.29.99]:40974 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239325AbhETLIf (ORCPT ); Thu, 20 May 2021 07:08:35 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 26F9F6193A; Thu, 20 May 2021 10:06:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1621505183; bh=IR59B1/Wcfn5Ssfa6oOZhUSeq5lF1vIKGuJmgzsVMPo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RITk76VWHSFUKUNSRBEG2y7ttvR6CNY58xFvAX9tcF9A/b1O/XvyEL96vAptbC52o ylZeV9pwEEWhdM9HO0OEasfiWKQqVWFU0qwiqmW5S4HJmRy3c4dVScv/VCKtkw4HOn +bT4p5h9bhTYiu/uhWkMVGZTnRtw1KxqP1u2ThvQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, syzbot+4993e4a0e237f1b53747@syzkaller.appspotmail.com, Phillip Potter , "David S. Miller" Subject: [PATCH 4.4 002/190] net: usb: ax88179_178a: initialize local variables before use Date: Thu, 20 May 2021 11:21:06 +0200 Message-Id: <20210520092102.237161757@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210520092102.149300807@linuxfoundation.org> References: <20210520092102.149300807@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: Phillip Potter commit bd78980be1a68d14524c51c4b4170782fada622b upstream. Use memset to initialize local array in drivers/net/usb/ax88179_178a.c, and also set a local u16 and u32 variable to 0. Fixes a KMSAN found uninit-value bug reported by syzbot at: https://syzkaller.appspot.com/bug?id=00371c73c72f72487c1d0bfe0cc9d00de339d5aa Reported-by: syzbot+4993e4a0e237f1b53747@syzkaller.appspotmail.com Signed-off-by: Phillip Potter Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- drivers/net/usb/ax88179_178a.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/drivers/net/usb/ax88179_178a.c +++ b/drivers/net/usb/ax88179_178a.c @@ -307,12 +307,12 @@ static int ax88179_read_cmd(struct usbne int ret; if (2 == size) { - u16 buf; + u16 buf = 0; ret = __ax88179_read_cmd(dev, cmd, value, index, size, &buf, 0); le16_to_cpus(&buf); *((u16 *)data) = buf; } else if (4 == size) { - u32 buf; + u32 buf = 0; ret = __ax88179_read_cmd(dev, cmd, value, index, size, &buf, 0); le32_to_cpus(&buf); *((u32 *)data) = buf;