lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YIbwn6D1EykhhMPJ@kroah.com>
Date:   Mon, 26 Apr 2021 18:55:59 +0200
From:   Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To:     Krzysztof Kozlowski <krzysztof.kozlowski@...onical.com>
Cc:     linux-kernel@...r.kernel.org, Aditya Pakki <pakki001@....edu>,
        "David S . Miller" <davem@...emloft.net>
Subject: Re: [PATCH 064/190] Revert "nfc: s3fwrn5: replace the assertion with
 a WARN_ON"

On Fri, Apr 23, 2021 at 09:29:57AM +0200, Krzysztof Kozlowski wrote:
> On 21/04/2021 14:58, Greg Kroah-Hartman wrote:
> > This reverts commit 615f22f58029aa747b12768985e7f91cd053daa2.
> > 
> > Commits from @umn.edu addresses have been found to be submitted in "bad
> > faith" to try to test the kernel community's ability to review "known
> > malicious" changes.  The result of these submissions can be found in a
> > paper published at the 42nd IEEE Symposium on Security and Privacy
> > entitled, "Open Source Insecurity: Stealthily Introducing
> > Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University
> > of Minnesota) and Kangjie Lu (University of Minnesota).
> > 
> > Because of this, all submissions from this group must be reverted from
> > the kernel tree and will need to be re-reviewed again to determine if
> > they actually are a valid fix.  Until that work is complete, remove this
> > change to ensure that no problems are being introduced into the
> > codebase.
> > 
> > Cc: Aditya Pakki <pakki001@....edu>
> > Cc: David S. Miller <davem@...emloft.net>
> > Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
> > ---
> >  drivers/nfc/s3fwrn5/firmware.c | 5 +----
> >  1 file changed, 1 insertion(+), 4 deletions(-)
> > 
> > diff --git a/drivers/nfc/s3fwrn5/firmware.c b/drivers/nfc/s3fwrn5/firmware.c
> > index eb5d7a5beac7..f77f183c9bd0 100644
> > --- a/drivers/nfc/s3fwrn5/firmware.c
> > +++ b/drivers/nfc/s3fwrn5/firmware.c
> > @@ -492,10 +492,7 @@ int s3fwrn5_fw_recv_frame(struct nci_dev *ndev, struct sk_buff *skb)
> >  	struct s3fwrn5_info *info = nci_get_drvdata(ndev);
> >  	struct s3fwrn5_fw_info *fw_info = &info->fw_info;
> >  
> > -	if (WARN_ON(fw_info->rsp)) {
> > -		kfree_skb(skb);
> > -		return -EINVAL;
> > -	}
> > +	BUG_ON(fw_info->rsp);
> 
> It took me some time to understand this but the original commit looks
> correct. The recv_frame functions s3fwrn5_recv_frame() or
> nci_recv_frame() should free the skb buffer on errors.  Here, the
> s3fwrn5_fw_recv_frame() should be called only after sending a FW msg and
> is expected to have fw_info->rsp=NULL. Otherwise it could mean that
> frame came twice or it came when we did not ask for it.
> 
> Original code looks good, please drop the revert.

Thanks for the review, I've dropped the revert now.

greg k-h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ