Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
exec shield kernel patch for 2.4.21-rc1
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
binkley
n00b
n00b


Joined: 17 Dec 2002
Posts: 37
Location: Houston, TX

PostPosted: Wed May 21, 2003 2:51 pm    Post subject: exec shield kernel patch for 2.4.21-rc1 Reply with quote

From http://kt.zork.net/kernel-traffic/kt20030520_216.html#9:
Quote:
The exec-shield feature provides protection against stack, buffer or function pointer overflows, and against other types of exploits that rely on overwriting data structures and/or putting code into those structures. The patch also makes it harder to pass in and execute the so-called 'shell-code' of exploits. The patch works transparently, ie. no application recompilation is necessary.

The patch is against 2.4.21-rc1.

How does one suggest patches to the stock Gentoo kernel? This would be a very nice feature to have.
Back to top
View user's profile Send private message
jondkent
Apprentice
Apprentice


Joined: 26 Jul 2002
Posts: 289
Location: London

PostPosted: Wed May 21, 2003 3:55 pm    Post subject: Reply with quote

I'd hope that you could apply this patch to the Gentoo kernel sources, but that depends upon what patches have been applied. I think there is a summary in the Kernel documentation.

Of course if you really want it you could download the vanilla kernel sources and patch that, plus any other patches you feel are useful.
Back to top
View user's profile Send private message
MathFreak
Apprentice
Apprentice


Joined: 07 Jul 2002
Posts: 217
Location: Bethlehem, PA

PostPosted: Wed May 21, 2003 4:53 pm    Post subject: Reply with quote

I'm not certain, but it looks like all of that (and more) is done by the GRSecurity patch, which is part of the Gentoo kernel and has been around for quite a while.
Back to top
View user's profile Send private message
binkley
n00b
n00b


Joined: 17 Dec 2002
Posts: 37
Location: Houston, TX

PostPosted: Wed May 21, 2003 5:01 pm    Post subject: Reply with quote

MathFreak wrote:
I'm not certain, but it looks like all of that (and more) is done by the GRSecurity patch, which is part of the Gentoo kernel and has been around for quite a while.
It is true grsec covers a lot, but the execshield patch is different in that it handles the permission bits pages relying on CPU support. Ingo Molnar explains this better than I can:
Ingo Molnar wrote:
It is commonly known that x86 pagetables do not support the so-called executable bit in the pagetable entries - PROT_EXEC and PROT_READ are merged into a single 'read or execute' flag. This means that even if an application marks a certain memory area non-executable (by not providing the PROT_EXEC flag upon mapping it) under x86, that area is still executable, if the area is PROT_READ.

Furthermore, the x86 ELF ABI marks the process stack executable, which requires that the stack is marked executable even on CPUs that support an executable bit in the pagetables.

This problem has been addressed in the past by various kernel patches, such as Solar Designer's excellent "non-exec stack patch". These patches mostly operate by using the x86 segmentation feature to set the code segment 'limit' value to a certain fixed value that points right below the stack frame. The exec-shield tries to cover as much virtual memory via the code segment limit as possible - not just the stack.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum