Received: by 2002:a05:6500:2018:b0:1fb:9675:f89d with SMTP id t24csp310056lqh; Fri, 31 May 2024 01:54:02 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVl14fG15QLs8qeWcMON8qr/2wm+vt+hbusAfUdUO4TJ23Ra4oxLJcbMvoXTdEPxP47Ty2SVn805lz+TtmIdfrVJteFNx6cQ9HZql+Dig== X-Google-Smtp-Source: AGHT+IGzYjfTp9Sglxv5Hkut/cZ/fTd8i8XWonf6dSzC4mApqAidD5+sFra9vg64ucQpk4o09D/i X-Received: by 2002:a05:620a:88f:b0:792:c473:f645 with SMTP id af79cd13be357-794f5ccc86cmr107239985a.54.1717145641905; Fri, 31 May 2024 01:54:01 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717145641; cv=pass; d=google.com; s=arc-20160816; b=lhnJMZr4YS3YHAJ9k9Cvn1phdaCzPe1BTqOwiOAMVDI32Odjs51BVn/DOca+hY91dG 0goocEYgPxCDX1eKB5OgzsUrEdDD1t2G1tAX2CCz7tszQNUNSH5sW5b3o3+Ci2h69YA4 5C9TwLpqgsIMPBS53bFN999DteakkiVvFQrzsulVgh6APYeO7fXDO2zkM2GPtVriN2qP CTPxQ+BJl+hRpdO/e1HE6DxVHoKSR6ooFTiqXJKSiNNct1KZOCsaJogNh1yL12+hDibp QxmejzPs+bte/+zyyyJjMD1aK9UjtMPQEth3K1yY0kYW/Eb8EZ3Im0hfNeFaL6BxOSDK VpVg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=PLysO7NeGsNXqaNuKCZ49ISqQA88jU3o40hSAdkel0w=; fh=7I6k8Ou+xgZO2uxnq0yIsuTp5dY5MI8LrbLBvrxj6gs=; b=NyRSRDhxMzeJrhk769Upy8baFa1XhUnkIyW+ZwvsSvUKGyM74A/WDdRraRubKMTLR8 m9oDBuy+DA5b5G+0F8Nw0iDJXFVEbFxsM4049OTosXPgHR9uO2HaR26lWnCM2kENHrdK USpjsZdpISLGCE/BdMtPQfEjNGJpRle+r3TH1vgluW91SJA9iSDxPA83bvXTQBAjjZoA Msed6yNP3eyy6Ng/LLXvh+5gtHmE9WZJlSUUqBikr96JZ4WYzE7Mrl4+dbMqI0hdOcN8 YJgthwm4HgbqqIYyFHACB550V/MXF3RtevKtdXWGnFmbnpOAit0a8ziCIk4M8fjXAafq IU0A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=D6UlgJr0; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-196510-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-196510-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id d75a77b69052e-43ff25b9668si15103721cf.782.2024.05.31.01.54.01 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 May 2024 01:54:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-196510-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=D6UlgJr0; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-196510-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-196510-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 522051C23FC2 for ; Fri, 31 May 2024 08:53:53 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1EDD9155C82; Fri, 31 May 2024 08:53:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="D6UlgJr0" Received: from mail-lf1-f49.google.com (mail-lf1-f49.google.com [209.85.167.49]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8AC2A155758 for ; Fri, 31 May 2024 08:53:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.49 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717145618; cv=none; b=oF0+tEKkjZaMVNyM2VgVsGobpnoxOEOwA8SE9AJRA9io/9mB9s7hzFjWeNjfllXlVzM3miansmw8Y/QibNhmSghdhgJFyzQ6j6RGDawdqHQJndSRsUWl/LinjMNPKYoyFVvK5vimXRnmAtJx7e/f3fgchwLfcRkMXqRtxCIE+Pc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717145618; c=relaxed/simple; bh=NovAGQAJDKQTMTAI+az5GHF58LXNrOVqVoPHaefwx2A=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=CYoc4eXHvAjiBhx/BUxupOX7kZtUmBlMv4gVFf9hMMPu8zqIvyYOC5giamo748AdZG/gq9PVyJwDvtg6PP1p5G8VXafDzjNnhjWK5C1SRssT4jauNbitolsPJGhY4HTNQZkolT0sb/nYok5NKYmRAEvgEDemx9muZcpZ8EnAzsw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=D6UlgJr0; arc=none smtp.client-ip=209.85.167.49 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-lf1-f49.google.com with SMTP id 2adb3069b0e04-52b8b638437so300779e87.3 for ; Fri, 31 May 2024 01:53:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1717145614; x=1717750414; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=PLysO7NeGsNXqaNuKCZ49ISqQA88jU3o40hSAdkel0w=; b=D6UlgJr0B7sWc+/jdtfuQTaCEFI6ij4Vtfkx3FX6r7kj9EMFeFbL42TH8i2tqSOTYn XG2gmvuYOBwJROIDIcroCdDCW9MyS/ZzEGvlaKkej3//pfqzDy0o5BK6QQ5Ew0BJf8C9 WSZtdsJatfQq71+fuHo/vqStQ2JwREjW/azYSSKV72wnqbJVQgX9pYX4swTI4EEpk4BL 0t2zCnPCte1c453Uj9h2L7/HqBgPMz/1pwHkcns1xDAqlLJvdFzrnEwHkmXGVJMbnTUm yAYj0di+MucAvgfA9iIV6+23X6LvVdzs+o3hW0Omzjct1M4MuSyPnFI/9pEZqbku0wcT EDig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717145615; x=1717750415; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=PLysO7NeGsNXqaNuKCZ49ISqQA88jU3o40hSAdkel0w=; b=MYAa2d3+Tk1lZxyF1/LIEO9YO47Z6tfi+7nwbnJICPL2WBiFZ80xlOibKpP+lIZwjT FMIEwET9/W8T4D7lILcogUnySWNKOazisCmELfFZWV9kOhs2K4g7n1c6imOPIBFM/vQ2 iOxC8hL3p2sVyIq0qkYmmCQCvAJDsFiM6EoSXH7cHavlv6vl6FCukRsc+TR12ZiekgQz Nib7ffRJmZZIf/NGwl8WPEgZ0V7Chkmub7xZZTjlcVR4MW4OvKFwM03oIOp4a0Qpz1v6 iSf2/YK0kn5oVrjAXj/Zx8JCzgUaCR5B7KWjL0P8EOSALvG/6QDlK5gvEWMOscBycURq uFHg== X-Forwarded-Encrypted: i=1; AJvYcCWAXds+puGNGB3efEzOmba3yUsZmO5/9rNW28bggukywn0w/iERZNuMnpg+tN7My+U4QOqlQd7wxx7IXVRgXJazFIdjk2VXWCM7UUJ0 X-Gm-Message-State: AOJu0YzuEvXzblGP/DqNG5zYFWeeGuRqWSva5LlQ1MpjGqdaLzZiD3HL 5W9jtdyWwzdRoQ6oruPXKrvxWReltzm4RMla4xjwderm1SGAqlLW6yRXJCYrnsE= X-Received: by 2002:ac2:4e93:0:b0:52b:7bde:896b with SMTP id 2adb3069b0e04-52b8958b992mr604317e87.14.1717145614446; Fri, 31 May 2024 01:53:34 -0700 (PDT) Received: from localhost ([102.222.70.76]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a67ea5869ddsm63483966b.105.2024.05.31.01.53.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 May 2024 01:53:33 -0700 (PDT) Date: Fri, 31 May 2024 11:53:29 +0300 From: Dan Carpenter To: Harshit Mogalapalli Cc: Edward Adam Davis , syzbot+07762f019fd03d01f04c@syzkaller.appspotmail.com, linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com, Dan Carpenter Subject: Re: [syzbot] [input?] [usb?] KMSAN: uninit-value in asus_report_fixup Message-ID: References: <000000000000915d550619389e8a@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Thu, May 30, 2024 at 08:16:59PM +0530, Harshit Mogalapalli wrote: > > diff --git a/drivers/hid/usbhid/hid-core.c b/drivers/hid/usbhid/hid-core.c > > index a90ed2ceae84..9f0e09f667b1 100644 > > --- a/drivers/hid/usbhid/hid-core.c > > +++ b/drivers/hid/usbhid/hid-core.c > > @@ -1029,7 +1029,7 @@ static int usbhid_parse(struct hid_device *hid) > > return -EINVAL; > > } > > - rdesc = kmalloc(rsize, GFP_KERNEL); > > + rdesc = kzalloc(rsize, GFP_KERNEL); This kzalloc() is unnecessary because hid_get_class_descriptor() has a memset() built in: memset(buf, 0, size); I'm not a huge fan of how if hid_get_class_descriptor() runs out of retries, we return the number of bytes in a partial read. Then the caller pretends it was a success instead of using the result. But that's a different issue. regards, dan carpenter