public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [Patch 0/8] Port of -fstack-protector to the kernel
@ 2006-03-17 16:10 Arjan van de Ven
  2006-03-17 16:11 ` [Patch 1 of 8] Pack the x86-64 PDA structure Arjan van de Ven
                   ` (9 more replies)
  0 siblings, 10 replies; 17+ messages in thread
From: Arjan van de Ven @ 2006-03-17 16:10 UTC (permalink / raw)
  To: linux-kernel

This patch series adds support for the gcc 4.1 -fstack-protector feature to
the kernel. Unfortunately this needs a gcc patch before it can work, so at
this point these patches are just for comment, not for merging.

-fstack-protector is a security feature in gcc that causes "selected" functions
to store a special "canary" value at the start of the function, just below
the return address. At the end of the function, just before using this
return address with the "ret" instruction, this canary value is compared to
the reference value again. If the value of the stack canary has changed, it is a sign
that there has been some stack corruption (most likely due to a buffer overflow) that
has compromised the integrity of the return address.

Standard, the "selected" functions are those that actually have stack
buffers of at least 8 bytes, this selection is done to limit the overhead to
only those functions with the highest risk potential. There is an override to enable this
for all functions.

On first sight this would not be needed for the kernel, because the kernel
is "perfect" and "has no buffer overflows on the stack". I thought that too
for a long time, but the last year has shown a few cases where that would
have been overly naive.


^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2006-03-19 19:06 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-03-17 16:10 [Patch 0/8] Port of -fstack-protector to the kernel Arjan van de Ven
2006-03-17 16:11 ` [Patch 1 of 8] Pack the x86-64 PDA structure Arjan van de Ven
2006-03-17 16:13 ` [Patch 3 of 8] Introduce a config option for stack-protector Arjan van de Ven
2006-03-17 16:13 ` [Patch 2 of 8] annotate the PDA structure with offsets Arjan van de Ven
2006-03-18  9:38   ` Ingo Molnar
2006-03-18  9:46     ` Arjan van de Ven
2006-03-17 16:14 ` [Patch 4 of 8] Add the cookie field Arjan van de Ven
2006-03-17 16:14 ` [Patch 5 of 8] Add the __stack_chk_fail() function Arjan van de Ven
2006-03-19 17:57   ` Nix
2006-03-19 18:06     ` Arjan van de Ven
2006-03-19 19:06       ` Nix
2006-03-17 16:15 ` [Patch 6 of 8] Implement the CFLAGs side Arjan van de Ven
2006-03-17 16:16 ` [Patch 7 of 8] Finish PDA offset annotations Arjan van de Ven
2006-03-17 16:17 ` [Patch 8 of 8] GCC 4.1 patch for kernel stack-protector Arjan van de Ven
2006-03-17 16:50 ` [Patch 0/8] Port of -fstack-protector to the kernel Michal Piotrowski
2006-03-17 16:53   ` Arjan van de Ven
2006-03-18  9:41 ` Ingo Molnar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox