Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F102659019
D35867.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
568 B
Referenced Files
None
Subscribers
None
D35867.diff
View Options
diff --git a/sys/kern/imgact_elf.c b/sys/kern/imgact_elf.c
--- a/sys/kern/imgact_elf.c
+++ b/sys/kern/imgact_elf.c
@@ -1221,9 +1221,16 @@
goto ret;
break;
case PT_GNU_STACK:
- if (__elfN(nxstack))
+ if (__elfN(nxstack)) {
imgp->stack_prot =
__elfN(trans_prot)(phdr[i].p_flags);
+ if ((imgp->stack_prot & VM_PROT_RW) !=
+ VM_PROT_RW) {
+ uprintf("Invalid PT_GNU_STACK\n");
+ error = ENOEXEC;
+ goto ret;
+ }
+ }
imgp->stack_sz = phdr[i].p_memsz;
break;
case PT_PHDR: /* Program header table info */
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Nov 16, 11:36 AM (21 h, 3 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14658003
Default Alt Text
D35867.diff (568 B)
Attached To
Mode
D35867: Disallow invalid PT_GNU_STACK
Attached
Detach File
Event Timeline
Log In to Comment