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 for Android: free password hash cracker in your pocket
[<prev] [next>] [day] [month] [year] [list]
Date:	Wed, 20 Aug 2008 19:12:20 +0300
From:	Paulius Zaleckas <paulius.zaleckas@...tonika.lt>
To:	Denis Joseph Barrow 
	<D.Barow-x9gZzRpC1QbQT0dZR+AlfA@...lic.gmane.org>
CC:	Linux USB kernel mailing list 
	<public-linux-usb-u79uwXL29TY76Z2rM5mHXA-z5DuStaUktnZ+VzJOa5vwg@...lic.gmane.org>,
	Greg Kroah-Hartman 
	<public-gregkh-l3A5Bk7waGM-z5DuStaUktnZ+VzJOa5vwg@...lic.gmane.org>,
	netdev <netdev@...r.kernel.org>
Subject: Re: [PATCH] hso.c hso_net_open bugfix

Denis Joseph Barrow wrote:
> 
> 
> Hi Paulus & others,
> Sorry I nearly completely agree with you the code can be left as is
> However netdev_priv check is superflous from my understanding of the code,
> admittedly if they changed the netdev_priv function the check might
> become valid.

I agree with you that odev checks in hso_net_open and hso_net_tx_timeout
are pointless and should be removed.

Please add netdev@...r.kernel.org mailing list also.

> Admittedly dev_open would crash if dev!=NULL so I agree with you it
> must be checked further up the stack.
> 
> 
> Paulius Zaleckas wrote:
>>
>> Denis Joseph Barrow wrote:
>>> netdev_priv will return a non NULL pointer even if the net_device
>>> is NULL & cause a crash without this fix.
>> Wrong. If net_device will be NULL hso_net_open won't get called.
>>
>>> Signed-off-by: Denis Joseph Barrow
>>> <D.Barow-x9gZzRpC1QbQT0dZR+AlfA-XMD5yJDbdMReXY1tMh2IBg@...lic.gmane.org>
>>> ---
>>> Index: linux-2.6.27-rc3.patch/drivers/net/usb/hso.c
>>> ===================================================================
>>> --- linux-2.6.27-rc3.patch.orig/drivers/net/usb/hso.c    2008-08-20
>>> 12:12:28.000000000 +0200
>>> +++ linux-2.6.27-rc3.patch/drivers/net/usb/hso.c    2008-08-20
>>> 12:26:35.000000000 +0200
>>> @@ -611,14 +611,12 @@
>>>  /* called when net interface is brought up by ifconfig */
>>>  static int hso_net_open(struct net_device *net)
>>>  {
>>> -    struct hso_net *odev = netdev_priv(net);
>>> +    struct hso_net *odev;
>>>      unsigned long flags = 0;
>>>  
>>> -    if (!odev) {
>>> -        dev_err(&net->dev, "No net device !\n");
>>> +    if (!net)
>>>          return -ENODEV;
>>> -    }
> 
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-usb" in
> the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@...lic.gmane.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ