Page MenuHomeFreeBSD

D60937.1793468280.diff
No OneTemporary

Authored By
Unknown
Size
980 B
Referenced Files
None
Subscribers
None

D60937.1793468280.diff

Index: sys/kern/link_elf_obj.c
===================================================================
--- sys/kern/link_elf_obj.c
+++ sys/kern/link_elf_obj.c
@@ -397,6 +397,14 @@
symtabindex = -1;
symstrindex = -1;
for (i = 0; i < hdr->e_shnum; i++) {
+ if ((shdr[i].sh_type == SHT_REL ||
+ shdr[i].sh_type == SHT_RELA) &&
+ shdr[i].sh_info >= hdr->e_shnum) {
+ link_elf_error(filename,
+ "file has an invalid relocation section");
+ error = ENOEXEC;
+ goto out;
+ }
switch (shdr[i].sh_type) {
case SHT_PROGBITS:
case SHT_NOBITS:
@@ -836,6 +844,14 @@
for (i = 0; i < hdr->e_shnum; i++) {
if (shdr[i].sh_size == 0)
continue;
+ if ((shdr[i].sh_type == SHT_REL ||
+ shdr[i].sh_type == SHT_RELA) &&
+ shdr[i].sh_info >= hdr->e_shnum) {
+ link_elf_error(filename,
+ "file has an invalid relocation section");
+ error = ENOEXEC;
+ goto out;
+ }
switch (shdr[i].sh_type) {
case SHT_PROGBITS:
case SHT_NOBITS:

File Metadata

Mime Type
text/plain
Expires
Sat, Oct 31, 5:38 PM (10 h, 25 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
41267833
Default Alt Text
D60937.1793468280.diff (980 B)

Event Timeline