Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F174213981
D58543.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
509 B
Referenced Files
None
Subscribers
None
D58543.diff
View Options
diff --git a/stand/common/load_elf.c b/stand/common/load_elf.c
--- a/stand/common/load_elf.c
+++ b/stand/common/load_elf.c
@@ -636,6 +636,12 @@
if (phdr[i].p_type != PT_LOAD)
continue;
+ if (phdr[i].p_memsz < phdr[i].p_filesz) {
+ printf("elf" __XSTRING(__ELF_WORD_SIZE)
+ "_loadimage: invalid PT_LOAD segment\n");
+ goto out;
+ }
+
if (module_verbose >= MODULE_VERBOSE_FULL) {
printf("Segment: 0x%lx@0x%lx -> 0x%lx-0x%lx",
(long)phdr[i].p_filesz, (long)phdr[i].p_offset,
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Oct 2, 10:16 AM (7 h, 36 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
35753418
Default Alt Text
D58543.diff (509 B)
Attached To
Mode
D58543: stand: Reject ELF files with PT_LOAD segments where filesz > memsz
Attached
Detach File
Event Timeline
Log In to Comment