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: <20200225102809.GA2591@amd>
Date:   Tue, 25 Feb 2020 11:28:09 +0100
From:   Pavel Machek <pavel@...x.de>
To:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc:     linux-kernel@...r.kernel.org, stable@...r.kernel.org,
        Aditya Pakki <pakki001@....edu>,
        Kalle Valo <kvalo@...eaurora.org>,
        Sasha Levin <sashal@...nel.org>
Subject: Re: [PATCH 4.19 079/191] orinoco: avoid assertion in case of NULL
 pointer

Hi!

> From: Aditya Pakki <pakki001@....edu>
> 
> [ Upstream commit c705f9fc6a1736dcf6ec01f8206707c108dca824 ]
> 
> In ezusb_init, if upriv is NULL, the code crashes. However, the caller
> in ezusb_probe can handle the error and print the failure message.
> The patch replaces the BUG_ON call to error return.

The caller already checked that upriv is not NULL, AFAICT.

    priv = alloc_orinocodev(sizeof(*upriv), &udev->dev,
    	                         ezusb_hard_reset, NULL);
    if (!priv) {
        err("Couldn't allocate orinocodev");
        retval = -ENOMEM;
        goto exit;
    }
				 
I don't see this as an improvement.

Best regards,
							Pavel
							

> +++ b/drivers/net/wireless/intersil/orinoco/orinoco_usb.c
> @@ -1364,7 +1364,8 @@ static int ezusb_init(struct hermes *hw)
>  	int retval;
>  
>  	BUG_ON(in_interrupt());
> -	BUG_ON(!upriv);
> +	if (!upriv)
> +		return -EINVAL;
>  
>  	upriv->reply_count = 0;
>  	/* Write the MAGIC number on the simulated registers to keep

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

Download attachment "signature.asc" of type "application/pgp-signature" (182 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ