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] [day] [month] [year] [list]
Message-ID: <c8d6b89093bc4d82bda15aa9d9fe6f88@AcuMS.aculab.com>
Date: Sat, 9 Nov 2024 09:14:32 +0000
From: David Laight <David.Laight@...LAB.COM>
To: 'Peter Zijlstra' <peterz@...radead.org>, Christoph Hellwig
	<hch@...radead.org>
CC: "x86@...nel.org" <x86@...nel.org>, "linux-kernel@...r.kernel.org"
	<linux-kernel@...r.kernel.org>, "alyssa.milburn@...el.com"
	<alyssa.milburn@...el.com>, "scott.d.constable@...el.com"
	<scott.d.constable@...el.com>, "joao@...rdrivepizza.com"
	<joao@...rdrivepizza.com>, "andrew.cooper3@...rix.com"
	<andrew.cooper3@...rix.com>, "jpoimboe@...nel.org" <jpoimboe@...nel.org>,
	"alexei.starovoitov@...il.com" <alexei.starovoitov@...il.com>,
	"ebiggers@...nel.org" <ebiggers@...nel.org>, "samitolvanen@...gle.com"
	<samitolvanen@...gle.com>, "kees@...nel.org" <kees@...nel.org>
Subject: RE: [PATCH 1/8] x86,kcfi: Fix EXPORT_SYMBOL vs kCFI

From: Peter Zijlstra
> Sent: 05 November 2024 14:59
> 
> On Tue, Nov 05, 2024 at 06:32:12AM -0800, Christoph Hellwig wrote:
> > On Tue, Nov 05, 2024 at 03:27:20PM +0100, Peter Zijlstra wrote:
> > > > I don't think that is the case at all.  The is a relatively small number
> > > > of exported symbols that are called indirectly.  I'd much rather mark
> > > > those explicitly.
> > >
> > > I'm not claiming they have their address taken -- just saying that
> > > traditionally this has always been a valid thing to do.
> > >
> > > Anyway, I raised this point last time, and I think back then the
> > > consensus was to explicitly mark those you should not be able to call.
> >
> > Who came to that consensus?  There really is just a relatively well
> 
> The people who found that thread.
> 
> > bounded number of functions that are used as either default methods
> > or as ready made callbacks.  Everything else has no business being
> > called indirectly.  While disallowing this might be a bit of work,
> > I think it would be a great security improvement.
> 
> Well, we don't disagree. But since most of the EXPORT'ed functions are
> done in C, we need something that works there too.
> 
> I think the idea was that we add EXPORT_SYMBOL{,_GPL}_SEALED() and go
> convert everything over to that.

Don't you really need a compiler attribute that makes a function
indirectly callable?
(Instead of the compiler trying to sort it out itself?)
With the default being 'not indirectly callable' unless the function
address is taken in the same compilation unit as its definition.

If added to the declaration (in the .h file) the compiler would be
able to error code that takes the address of such functions.

	David

-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ