Received: by 2002:a05:6a10:6006:0:0:0:0 with SMTP id w6csp488826pxa; Thu, 27 Aug 2020 07:45:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw447kYw3zoyc5bEX2eFE2E9Y5LUjLsrBPmOA0z6gPx6CvxlKxKmmi8vAu6bYO4lW1UDJzA X-Received: by 2002:a05:6402:16:: with SMTP id d22mr20865555edu.175.1598539551243; Thu, 27 Aug 2020 07:45:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598539551; cv=none; d=google.com; s=arc-20160816; b=RP0WtQQuC9TdBA19aHsNTcUfG4v6NpZ8D30DjeRu58gM5Ka88CIgNl3gRUVnBlU7ow 5I5IJImP9eQ8eyfouX6fKswBiw/ZYFZBB+LO+yKpXHYIeN+mqtaATFi1flZ+qseiOvS+ wA5VEUJvdyzHCT6Z/0t2PV9S8w3PqkmaOTFfOAKZlNlLtIvF/Ref6CL3sHdMT1XRQWbd wNJ9QDy9VzQIPQdrJBXs4Sn0Qd6FIKtIjKRCyZ7LKS6CHRj3xOF/cvq0WJmxdXYBONLq gKsSLF1SWuatGgXAEikhSvxT+CMdv9h1A3R/OvdFF7greG533iK14BatYzXXPQQDyjFF 7VPA== 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 :references:in-reply-to:from:subject:cc:to:message-id:date; bh=A/Rf/ZQm7yOqTHy7J2Sucnq83UX/MFDbM3xNfOO7N90=; b=ehIzB4sdGWaFaYtJPSJv+OZ2f4QcuAnoz3WpBXZXy6WowIyLwdwDJjcIgrRsyfMlBY +FaXP+2hukVkFYEqambgLExUAVvHUSzZlxw04af90z4holXmBh/DIt0wVZDYbNdNk7H8 s1gKDqj0uqdAC8FD+LzREHx0WL901Cmfsk3H7du2Qp+i9KUHyPSTTzzlw6nIC+yZKhyt EFVpwDWRkJzAgdsg7WguCgazetirYm+6lrn3KDDpdMX/KC7V16sTUhIj4+EwgBe5QuM7 3dGzTizjx5HPIHUYXIJjYFDx4cbvtJqe3d5xDde08Ro8FjDRM0Lerrv6+cYDX3pgxO8L y7kg== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d20si1450485ejz.445.2020.08.27.07.45.28; Thu, 27 Aug 2020 07:45:51 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728043AbgH0OoY (ORCPT + 99 others); Thu, 27 Aug 2020 10:44:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59330 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728053AbgH0Ohg (ORCPT ); Thu, 27 Aug 2020 10:37:36 -0400 Received: from shards.monkeyblade.net (shards.monkeyblade.net [IPv6:2620:137:e000::1:9]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 98D88C061264; Thu, 27 Aug 2020 07:37:35 -0700 (PDT) Received: from localhost (unknown [IPv6:2601:601:9f00:477::3d5]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) (Authenticated sender: davem-davemloft) by shards.monkeyblade.net (Postfix) with ESMTPSA id CADEC127504A2; Thu, 27 Aug 2020 07:20:47 -0700 (PDT) Date: Thu, 27 Aug 2020 07:37:33 -0700 (PDT) Message-Id: <20200827.073733.1876161431562899494.davem@davemloft.net> To: himadrispandya@gmail.com Cc: kuba@kernel.org, linux-usb@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com, linux-kernel-mentees@lists.linuxfoundation.org, gregkh@linuxfoundation.org Subject: Re: [PATCH] net: usb: Fix uninit-was-stored issue in asix_read_phy_addr() From: David Miller In-Reply-To: <20200827065355.15177-1-himadrispandya@gmail.com> References: <20200827065355.15177-1-himadrispandya@gmail.com> X-Mailer: Mew version 6.8 on Emacs 26.3 Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Thu, 27 Aug 2020 07:20:48 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Himadri Pandya Date: Thu, 27 Aug 2020 12:23:55 +0530 > The buffer size is 2 Bytes and we expect to receive the same amount of > data. But sometimes we receive less data and run into uninit-was-stored > issue upon read. Hence modify the error check on the return value to match > with the buffer size as a prevention. > > Reported-and-tested by: syzbot+a7e220df5a81d1ab400e@syzkaller.appspotmail.com > Signed-off-by: Himadri Pandya Applied, thanks.