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:	Fri, 19 Jun 2009 08:54:12 -0400
From:	Robin Getz <rgetz@...ckfin.uclinux.org>
To:	"Rusty Russell" <rusty@...tcorp.com.au>
CC:	"Mike Frysinger" <vapier.adi@...il.com>,
	"Linux kernel mailing list" <linux-kernel@...r.kernel.org>
Subject: Re: module version magic and arches with symbol prefixes

On Fri 19 Jun 2009 01:38, Rusty Russell pondered:
> On Fri, 19 Jun 2009 12:54:44 am Mike Frysinger wrote:
> > the current check_modstruct_version() does this:
> > {
> >     const unsigned long *crc;
> >
> >     if (!find_symbol("module_layout", NULL, &crc, true, false))
> >         BUG();
> >     return check_version(sechdrs, versindex, "module_layout", mod, crc);
> > }
> > the trouble here is that it looks for a literal "module_layout" symbol
> > and for ports that have symbol prefixes (a quick check shows Blackfin
> > & h8300), this aint going to work.
> 
> MODULE_SYMBOL_PREFIX is the fix for this, ie:
> 
> 	if (!find_symbol(MODULE_SYMBOL_PREFIX "module_layout), ...
> 
> > also, using BUG() here seems pretty damn harsh.  wouldnt it make more
> > sense to do something like:
> >     if (WARN_ON(!find_symbol("module_layout", NULL, &crc, true, false)))
> >         return 0;
> > this way the module is simply not loaded rather than killing the kernel
> 
> No, it means the kernel didn't build properly.

Or a module didn't build properly.

> Better to fail spectacularly:  
> ideally we'd do this find in an init routine and guarantee a boot crash.

But this isn't an init routine - this is something that runs when a module is 
loaded...

Anyone who can load a module can crash the kernel? I would expect the module 
not to load - but I agree with Mike - it seems a little harsh for someone who 
screwed up their module makefile....

-Robin
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ