Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F163270914
D15173.id41773.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
979 B
Referenced Files
None
Subscribers
None
D15173.id41773.diff
View Options
Index: lib/libc/secure/stack_protector.c
===================================================================
--- lib/libc/secure/stack_protector.c
+++ lib/libc/secure/stack_protector.c
@@ -56,13 +56,19 @@
static const int mib[2] = { CTL_KERN, KERN_ARND };
size_t len;
int error;
+ long tmp_stack_chk_guard[sizeof(__stack_chk_guard) / sizeof(__stack_chk_guard[0])];
if (__stack_chk_guard[0] != 0)
return;
- error = _elf_aux_info(AT_CANARY, __stack_chk_guard,
- sizeof(__stack_chk_guard));
- if (error == 0 && __stack_chk_guard[0] != 0)
+ error = _elf_aux_info(AT_CANARY, tmp_stack_chk_guard,
+ sizeof(tmp_stack_chk_guard));
+ if (error == 0 && tmp_stack_chk_guard[0] != 0) {
+ int idx;
+ for (idx = 0; idx < sizeof(__stack_chk_guard) / sizeof(__stack_chk_guard[0]); idx++) {
+ __stack_chk_guard[idx] = tmp_stack_chk_guard[idx];
+ }
return;
+ }
len = sizeof(__stack_chk_guard);
if (__sysctl(mib, nitems(mib), __stack_chk_guard, &len, NULL, 0) ==
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Jul 22, 3:12 PM (7 h, 31 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
35368872
Default Alt Text
D15173.id41773.diff (979 B)
Attached To
Mode
D15173: udpate stack guard bytes inside __guard_setup()
Attached
Detach File
Event Timeline
Log In to Comment