Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp5109683pxb; Wed, 19 Jan 2022 11:12:49 -0800 (PST) X-Google-Smtp-Source: ABdhPJyDG2MMdqpTEx8L8272YR+yIiGNCKWKiRaLQlXznvBu5GizHyq4iu7WkHomTNgzLwX/jLpp X-Received: by 2002:aa7:8889:0:b0:4c2:287d:2f88 with SMTP id z9-20020aa78889000000b004c2287d2f88mr28441299pfe.12.1642619569423; Wed, 19 Jan 2022 11:12:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1642619569; cv=none; d=google.com; s=arc-20160816; b=rPYiQc3cJGqjY3O9uM9P6AMrPzBSg4VQCq5yS0ttoasLfYqEEmp/Au+NW7XBj//ltv p+o/YGgx4YWMxlZbPm9A16cGu40zTKUq/tQllppa4Ls//SxIkd2CvsC2lXhdVDGlIG3G WZVroz65GpGkQyfYLjWTiow6og3B3mx5bpUXWYc8SwC0fWgpVVoXx1BBGAcjn7pQCbfz ZprS7/iKr7LzwUR26Xe9Q9mY4HL5/xneHSW0XzjePkuIqwQwFiGDk9PYhn4aVD3IYbyE bLeAb9Slc3fbGzix6k1saTCT9iK1K2j7dm+AHLWXrVvGtQWlW3ri957vQbU7wn3F6b0C 6VqA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=MRB+6QCDSe7gFn3hMQrtMdCtdZIdlvgdkQPaWP2e7Ug=; b=0p+dVJOwT78jlPqq7qv+xhBzwrmY4C2nhjb9JTkI1KbOUf6wuNLcgi7iuVChqPO23c +LnNOcyXbfpgdo/It9nfKTl5VwS28Jakiw9dDlHd/cssBWpEicW8DMDfTmO1xGd46guy 1oYz1rHWmo1sChXhW2lkvfcheZFch+8abBopjrW7cgpEIWRGeE5EZRHi5E6lN2Bc1HIV AXHFzJgng1min17UcYm1IHrYmVUSTHYnl3kdRRTA31cWytJfzziPJ7FxHuWUj7QvLLpq Z9Q2n9HEDvHHy/WB8dRh/C2StakAP6UWIFdBZjSIDJF2OzjxMtA6QrYSVpkLdiVUWoJD 8jew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=tR2+zoaB; 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 u14si682688ple.11.2022.01.19.11.12.37; Wed, 19 Jan 2022 11:12:49 -0800 (PST) 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=tR2+zoaB; 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 S241419AbiARGS7 (ORCPT + 99 others); Tue, 18 Jan 2022 01:18:59 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56732 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229574AbiARGS6 (ORCPT ); Tue, 18 Jan 2022 01:18:58 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E4EACC061574; Mon, 17 Jan 2022 22:18:57 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 26A85B81239; Tue, 18 Jan 2022 06:18:56 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3A35AC00446; Tue, 18 Jan 2022 06:18:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1642486735; bh=/Kg/V15qvD9097UjeHQH9T/5bs3t+YX4FfEIQpJUP74=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=tR2+zoaB2EOti3ougjTtT7EZA5S9cUo5ar4gEczEtXfSw9DPLy/qdsvC9Ub47ljT8 equF1hBvXhKmuaODBbO45zF+dkWuSQC/H2w110iabdHzBTvn0lDU+W7kUYM7zn8o16 k1GXwviBwDFCtZsASWrsOXZzOhZObXaUD5W+Nbas= Date: Tue, 18 Jan 2022 07:18:52 +0100 From: Greg KH To: Pavel Skripkin Cc: davem@davemloft.net, kuba@kernel.org, linux@rempel-privat.de, andrew@lunn.ch, oneukum@suse.com, robert.foss@collabora.com, freddy@asix.com.tw, linux-usb@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, syzbot+6ca9f7867b77c2d316ac@syzkaller.appspotmail.com Subject: Re: [PATCH RFT] net: asix: add proper error handling of usb read errors Message-ID: References: <20220105131952.15693-1-paskripkin@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jan 17, 2022 at 10:31:21PM +0300, Pavel Skripkin wrote: > On 1/5/22 16:19, Pavel Skripkin wrote: > > Syzbot once again hit uninit value in asix driver. The problem still the > > same -- asix_read_cmd() reads less bytes, than was requested by caller. > > > > Since all read requests are performed via asix_read_cmd() let's catch > > usb related error there and add __must_check notation to be sure all > > callers actually check return value. > > > > So, this patch adds sanity check inside asix_read_cmd(), that simply > > checks if bytes read are not less, than was requested and adds missing > > error handling of asix_read_cmd() all across the driver code. > > > > Fixes: d9fe64e51114 ("net: asix: Add in_pm parameter") > > Reported-and-tested-by: syzbot+6ca9f7867b77c2d316ac@syzkaller.appspotmail.com > > Signed-off-by: Pavel Skripkin > > --- > > gentle ping :) It's the middle of a merge window, and you ask for testing before it can be applied? confused, greg k-h