forked from rpms/glibc
Sync CVE-2013-4788 patch again (no NVR bump again).
This commit is contained in:
parent
593edbc2d5
commit
1a343f85fe
@ -462,3 +462,33 @@ index d7fedb3..1948800 100644
|
|||||||
+ ({ uintptr_t x; \
|
+ ({ uintptr_t x; \
|
||||||
+ asm ("mov %%fs:%c1, %0" : "=r" (x) \
|
+ asm ("mov %%fs:%c1, %0" : "=r" (x) \
|
||||||
+ : "i" (offsetof (tcbhead_t, pointer_guard))); x; })
|
+ : "i" (offsetof (tcbhead_t, pointer_guard))); x; })
|
||||||
|
diff --git a/elf/Makefile b/elf/Makefile
|
||||||
|
index cb8da93..27d249b 100644
|
||||||
|
--- a/elf/Makefile
|
||||||
|
+++ b/elf/Makefile
|
||||||
|
@@ -1019,6 +1019,9 @@ tst-stackguard1-ARGS = --command "$(host-test-program-cmd) --child"
|
||||||
|
tst-stackguard1-static-ARGS = --command "$(objpfx)tst-stackguard1-static --child"
|
||||||
|
|
||||||
|
tst-ptrguard1-ARGS = --command "$(host-test-program-cmd) --child"
|
||||||
|
+# When built statically, the pointer guard interface uses
|
||||||
|
+# __pointer_chk_guard_local.
|
||||||
|
+CFLAGS-tst-ptrguard1-static.c = -DPTRGUARD_LOCAL
|
||||||
|
tst-ptrguard1-static-ARGS = --command "$(objpfx)tst-ptrguard1-static --child"
|
||||||
|
|
||||||
|
$(objpfx)tst-leaks1: $(libdl)
|
||||||
|
diff --git a/sysdeps/generic/stackguard-macros.h b/sysdeps/generic/stackguard-macros.h
|
||||||
|
index 4fa3d96..b4a6b23 100644
|
||||||
|
--- a/sysdeps/generic/stackguard-macros.h
|
||||||
|
+++ b/sysdeps/generic/stackguard-macros.h
|
||||||
|
@@ -3,5 +3,10 @@
|
||||||
|
extern uintptr_t __stack_chk_guard;
|
||||||
|
#define STACK_CHK_GUARD __stack_chk_guard
|
||||||
|
|
||||||
|
+#ifdef PTRGUARD_LOCAL
|
||||||
|
extern uintptr_t __pointer_chk_guard_local;
|
||||||
|
-#define POINTER_CHK_GUARD __pointer_chk_guard_local
|
||||||
|
+# define POINTER_CHK_GUARD __pointer_chk_guard_local
|
||||||
|
+#else
|
||||||
|
+extern uintptr_t __pointer_chk_guard;
|
||||||
|
+# define POINTER_CHK_GUARD __pointer_chk_guard
|
||||||
|
+#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user