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:	Thu, 4 Sep 2014 08:33:05 +0000
From:	David Laight <David.Laight@...LAB.COM>
To:	'Stephen Hemminger' <stephen@...workplumber.org>,
	Cong Wang <cwang@...pensource.com>
CC:	Linux Netdev List <netdev@...r.kernel.org>,
	David Miller <davem@...emloft.net>
Subject: RE: [PATCH net] core: Don't attempt to load the "" driver.

From: Stephen Hemminger
> Cong Wang <cwang@...pensource.com> wrote:
> 
> > On Wed, Sep 3, 2014 at 2:02 AM, David Laight <David.Laight@...lab.com> wrote:
> > >> On Tue, Sep 2, 2014 at 6:48 AM, David Laight <David.Laight@...lab.com> wrote:
> > >> > While the applications shouldn't be calling an SIOCxxx ioctl with ifr_name[0] == 0
> > >> > the kernel shouldn't be tracing the error either.
> > >> >
> > >>
> > >> Why don't we reject this empty string? It doesn't look like a valid one.
> > >> I assume this is for compatibility?
> > >
> > > The ioctl code will error it later on - the module load is 'speculative'.
> > > Analysing whether all the ioctls need dev_load() to succeed is another issue.
> > >
> > > Indeed I'm not sure anything stops the module being unloaded before the
> > > ioctl action tries to take a real reference on the interface.
> > >
> > > Whether request_module("") should be an error is a different question,
> > > probably much harder to analyse.
> > >
> >
> > If an empty string is an invalid name, we definitely should reject it from
> > the very beginning, so that you would not need to worry about the above
> > issues.
> >
> > Something like the attached patch.
> 
> This will break for many things where the code randomly tries
> to load something based on name, but the module is already there.

Or the interface isn't generated buy a module etc.

Also ISTR seeing dev_load() being used as an initialiser for something.
So it isn't easy to change the prototype - otherwise I'd have suggested
tracing the failing ioctl cmd to make it easier to determine where the
invalid request was coming from.

	David



--
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