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>] [day] [month] [year] [list]
Date:   Fri, 1 May 2020 20:15:04 +0200
From:   Markus Elfring <Markus.Elfring@....de>
To:     Colin Ian King <colin.king@...onical.com>,
        linux-wireless@...r.kernel.org, netdev@...r.kernel.org
Cc:     kernel-janitors@...r.kernel.org, linux-kernel@...r.kernel.org,
        "David S. Miller" <davem@...emloft.net>,
        Kalle Valo <kvalo@...eaurora.org>,
        Lubomir Rintel <lkundrak@...sk>,
        Steve deRosier <derosier@...-sierra.com>
Subject: Re: [PATCH] libertas_tf: Avoid a null pointer dereference in
 if_usb_disconnect()

> Currently there is a check if priv is null when calling lbtf_remove_card
> but not in a previous call to if_usb_reset_dev that can also dereference
> priv.  Fix this by also only calling lbtf_remove_card if priv is null.

I suggest to recheck this description (and the corresponding patch subject).


…
> +++ b/drivers/net/wireless/marvell/libertas_tf/if_usb.c
> @@ -247,10 +247,10 @@ static void if_usb_disconnect(struct usb_interface *intf)
>
>  	lbtf_deb_enter(LBTF_DEB_MAIN);
>
> -	if_usb_reset_device(priv);
> -
> -	if (priv)
> +	if (priv) {
> +		if_usb_reset_device(priv);
>  		lbtf_remove_card(priv);
> +	}
>
>  	/* Unlink and free urb */
>  	if_usb_free(cardp);

The patch code proposes to move a specific function call into an if branch
according to a null pointer check.

Regards,
Markus

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ