Author: jtl
Date: Thu Jan 7 15:37:17 2016
New Revision: 293318
URL: https://svnweb.freebsd.org/changeset/base/293318
Log:
MFC r292676:
Only allow one PT_INTERP ELF program header. This also fixes a potential
memory leak for interp_buf.
Modified:
stable/10/sys/kern/imgact_elf.c
Directory Properties:
stable/10/ (props changed)
Modified: stable/10/sys/kern/imgact_elf.c
==============================================================================
--- stable/10/sys/kern/imgact_elf.c Thu Jan 7 14:52:32 2016
(r293317)
+++ stable/10/sys/kern/imgact_elf.c Thu Jan 7 15:37:17 2016
(r293318)
@@ -783,6 +783,11 @@ __CONCAT(exec_, __elfN(imgact))(struct i
error = ENOEXEC;
goto ret;
}
+ if (interp != NULL) {
+ uprintf("Multiple PT_INTERP headers\n");
+ error = ENOEXEC;
+ goto ret;
+ }
interp_name_len = phdr[i].p_filesz;
if (phdr[i].p_offset > PAGE_SIZE ||
interp_name_len > PAGE_SIZE - phdr[i].p_offset) {
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-stable-10
To unsubscribe, send any mail to "[email protected]"