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: <48A746E1.90703@fr.ibm.com>
Date:	Sat, 16 Aug 2008 23:30:09 +0200
From:	Daniel Lezcano <dlezcano@...ibm.com>
To:	Brian Haley <brian.haley@...com>
CC:	David Miller <davem@...emloft.net>,
	containers <containers@...ts.osdl.org>, netdev@...r.kernel.org
Subject: Re: [PATCH 1/2] netns: fix NULL-dereference in dev_net()

Brian Haley wrote:
> Change dev_net() to handle a NULL argument - return &init_net instead.
> 
> -Brian
> 
> Signed-off-by: Brian Haley <brian.haley@...com>

Did you fall into the case where the argument was NULL ?

If it is the case, I think it is not the proper way to handle that. 
IMHO, this is the symptom the code which calls this function has a 
problem with the network namespace and it should be changed to be 
correct. eg, the code is assuming the network device is never null and 
so the network namespace can be retrieved from it, a correct fix may be 
to pass the network namespace as parameter of the function.

Returning &init_net if the network device is null will gracefully avoid 
the kernel oopsing but will lead to some inconsistent behaviour and 
confusion with what is happening with the namespace.

IMO, we should be radical and let the kernel oopsing, giving us only one 
action which is to fix asap the bug correctly.

Thanks.
   -- Daniel
--
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