Skip to content

stack canaries don't work with user mode threads #13642

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
andrewboie opened this issue Feb 21, 2019 · 0 comments
Closed

stack canaries don't work with user mode threads #13642

andrewboie opened this issue Feb 21, 2019 · 0 comments
Assignees
Labels
area: Memory Protection bug The issue is a bug, or the PR is fixing a bug priority: medium Medium impact/importance bug

Comments

@andrewboie
Copy link
Contributor

Enabling CONFIG_STACK_CANARIES breaks user mode threads. Entering any function will result in a memory protection error, for example on x86:

***** CPU Page Fault (error code 0x00000004)
User thread read address 0x00413000
PDE: 0x027 Present, Writable, User, Execute Enabled
PTE: 0x800000002 Non-present, Writable, Supervisor, Execute Disable
Current thread ID = 0x004021c0
eax: 0x00001398, ebx: 0x00400033, ecx: 0x00000ffc, edx: 0x00409000
esi: 0x00407000, edi: 0x00409fe8, ebp: 0x00409fe4, esp: 0x00409fd0
eflags: 0x00000246 cs: 0x002b
call trace:
eip: 0x0000253f
Fatal fault in thread 0x004021c0! Aborting.

The memory address 0x00413000 points to __stack_chk_guard:

(gdb) x/fx 0x00413000
0x413000 <__stack_chk_guard>:	0x589a24a0
@andrewboie andrewboie added bug The issue is a bug, or the PR is fixing a bug area: Memory Protection labels Feb 21, 2019
@andrewboie andrewboie self-assigned this Feb 21, 2019
@nashif nashif added the priority: medium Medium impact/importance bug label Feb 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Memory Protection bug The issue is a bug, or the PR is fixing a bug priority: medium Medium impact/importance bug
Projects
None yet
Development

No branches or pull requests

2 participants