Page MenuHomeFreeBSD

D35867.diff
No OneTemporary

D35867.diff

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

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)

Event Timeline