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]
Date:   Wed, 28 Apr 2021 09:08:31 +0200
From:   Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To:     linux-kernel@...r.kernel.org
Cc:     Kangjie Lu <kjlu@....edu>,
        Shannon Nelson <shannon.lee.nelson@...il.com>,
        "David S . Miller" <davem@...emloft.net>
Subject: Re: [PATCH 173/190] Revert "niu: fix missing checks of
 niu_pci_eeprom_read"

On Wed, Apr 21, 2021 at 03:00:48PM +0200, Greg Kroah-Hartman wrote:
> This reverts commit 26fd962bde0b15e54234fe762d86bc0349df1de4.
> 
> 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: Kangjie Lu <kjlu@....edu>
> Cc: Shannon Nelson <shannon.lee.nelson@...il.com>
> Cc: David S. Miller <davem@...emloft.net>
> Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
> ---
>  drivers/net/ethernet/sun/niu.c | 10 ++--------
>  1 file changed, 2 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/net/ethernet/sun/niu.c b/drivers/net/ethernet/sun/niu.c
> index 707ccdd03b19..d70cdea756d1 100644
> --- a/drivers/net/ethernet/sun/niu.c
> +++ b/drivers/net/ethernet/sun/niu.c
> @@ -8097,8 +8097,6 @@ static int niu_pci_vpd_scan_props(struct niu *np, u32 start, u32 end)
>  		start += 3;
>  
>  		prop_len = niu_pci_eeprom_read(np, start + 4);
> -		if (prop_len < 0)
> -			return prop_len;
>  		err = niu_pci_vpd_get_propname(np, start + 5, namebuf, 64);
>  		if (err < 0)
>  			return err;
> @@ -8143,12 +8141,8 @@ static int niu_pci_vpd_scan_props(struct niu *np, u32 start, u32 end)
>  			netif_printk(np, probe, KERN_DEBUG, np->dev,
>  				     "VPD_SCAN: Reading in property [%s] len[%d]\n",
>  				     namebuf, prop_len);
> -			for (i = 0; i < prop_len; i++) {
> -				err = niu_pci_eeprom_read(np, off + i);
> -				if (err >= 0)
> -					*prop_buf = err;
> -				++prop_buf;
> -			}
> +			for (i = 0; i < prop_len; i++)
> +				*prop_buf++ = niu_pci_eeprom_read(np, off + i);
>  		}
>  
>  		start += len;
> -- 
> 2.31.1
> 

The commit here was incorrect, while it is nice to check if
niu_pci_eeprom_read() succeeded or not when using the data, any error
that might have happened was not propagated upwards properly, causing
the kernel to assume that these reads were successful, which results in
invalid data in the buffer that was to contain the successfully read
data.

I will keep the revert and fix this up properly in a latter submission.

greg k-h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ