1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-11-02 09:33:31 +03:00
Commit Graph

4 Commits

Author SHA1 Message Date
Uros Bizjak
e47728a77c x86: Simplify stack and pointer guard macros
Replace manual casts with a direct `(__tcbhead_t __seg_gs *)0`
dereferences for `stack_guard` and `pointer_guard`.  This makes
the macros more straightforward and removes the dependency on
<stdint.h>.

Signed-off-by: Uros Bizjak <ubizjak@gmail.com>
Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
2025-10-08 09:35:15 +02:00
Uros Bizjak
1a076b5c21 i386: Use __seg_gs qualifiers in {STACK, POINTER}_CHK_GUARD macros
Use the __seg_gs named address space qualifiers to cast reads of
the guard values in the TCB as %gs: prefixed addresses.

Signed-off-by: Uros Bizjak <ubizjak@gmail.com>
Cc: H.J.Lu <hjl.tools@gmail.com>
Cc: Florian Weimer <fweimer@redhat.com>
Cc: Carlos O'Donell <carlos@redhat.com>
Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
2025-09-10 05:32:40 -07:00
Carlos O'Donell
c61b4d41c9 BZ #15754: CVE-2013-4788
The pointer guard used for pointer mangling was not initialized for
static applications resulting in the security feature being disabled.
The pointer guard is now correctly initialized to a random value for
static applications. Existing static applications need to be
recompiled to take advantage of the fix.

The test tst-ptrguard1-static and tst-ptrguard1 add regression
coverage to ensure the pointer guards are sufficiently random
and initialized to a default value.
2013-09-23 00:52:09 -04:00
Joseph Myers
a9538892ad Split up stackguard-macros.h into sysdeps directories. 2012-05-15 23:34:30 +00:00