Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp403896pxj; Thu, 20 May 2021 12:02:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxUr/L10kozpmWZN27xL2NPZ9t1Qm33sKeIjaybUxIpUQFUTfPRQC9ov5aJ2Im5QM2Jy2kf X-Received: by 2002:a5d:9f01:: with SMTP id q1mr7419377iot.7.1621537320202; Thu, 20 May 2021 12:02:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621537320; cv=none; d=google.com; s=arc-20160816; b=wsQyQEbxQvy/hZSkTE9Hxyvvlklea4LjzilykqmcuuzAWv6TRME2tVrWHfpEh0w8HE USJQyRjdO7v8xw61IVzCqjbng6ncf+Auhe5A7UHSK7gBai7jkjGcyYpgP39NU3gnC9Gg QUq/Nx1wcGjJe1LMrt3LMrkUbl+qbU8pYAatVn6zHPA72KsM19gpKyBLvu6M1x7u6VaB DuRWxjNQCkfiWtTLCtaiugAqbDKrQWI3bsSF+89VwL2PF+353q6USsPsK0fVmvzkU+dO BODgQOQtuh8ZXcgoFTbmgeyb5ZSTP3iMU7BjW0jp64rICa0llf6umkLQkMxG5unmajw6 BLUw== 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=jLibxynv9EHzfx+qU5HMbd47Ws3iV7Oj+z13wNSvmEkUyCooKLy3GeWRRinZSfikX+ Yi30o8w3wwduHYPDczsHeCTTBlRPmNNygdUoFnpcnauull37e/34levv9NN4z4RWaNjM arz92WfISLPy0tdtMOLkh26chQ1Ho3x2CQOEUALp5deVXsZbs9oMcHhkMX3p43GBynX4 GWQlfiHJfB0BN2lE6TTXrO987LkuQsnVE0mxIM2S8L1TZtkZq3ZSRBZ0NgUmvCkAFkDj 35s9UbXXXb5vh5Zl9m9lL77PeSdembn0Ap61rj6BCzJv++3BpUF5XsMLzhc/peChtRLA ZV5w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=rUmti35D; 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 i127si2028822iof.95.2021.05.20.12.01.46; Thu, 20 May 2021 12:02:00 -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=rUmti35D; 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 S236556AbhETK2S (ORCPT + 99 others); Thu, 20 May 2021 06:28:18 -0400 Received: from mail.kernel.org ([198.145.29.99]:47742 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236475AbhETKPU (ORCPT ); Thu, 20 May 2021 06:15:20 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 678B661996; Thu, 20 May 2021 09:45:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1621503936; bh=IR59B1/Wcfn5Ssfa6oOZhUSeq5lF1vIKGuJmgzsVMPo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rUmti35Dt+3gpKgPQLWEw9BdsV4OgpChhAB7b5aQNxu+mQVoBnwLp7gpgo53oo2p5 zk31UXGS/Yh3lBBd1O2UtbR3cdj6PAE+mDD7yV1cmwd17DuP3p7a6dm60Xadvrh1U6 7i7RtZliFPjR3pt6PXBGz7fQPMzxBksEFlQT33j8= 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.14 006/323] net: usb: ax88179_178a: initialize local variables before use Date: Thu, 20 May 2021 11:18:18 +0200 Message-Id: <20210520092120.341992403@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: 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;