summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorThiƩbaud Weksteen <tweek@google.com>2026-07-08 11:21:07 +1000
committerPetr Pavlu <petr.pavlu@suse.com>2026-08-06 16:44:45 +0200
commit9a5ff45689329835f874cefe5174e577d141d423 (patch)
tree2b799dc3105c7072f09666b4ce9441f6bf2c89d5 /scripts
parent2a7ecc5fbde76fd48f37c2878e52c50ae8928e0a (diff)
downloadlinux-9a5ff45689329835f874cefe5174e577d141d423.tar.gz
linux-9a5ff45689329835f874cefe5174e577d141d423.zip
module: validate string table section types
In elf_validity_cache_sechdrs, section sizes and offsets are validated, unless the section type is SHT_NULL or SHT_NOBITS. Later, elf_validity_cache_secstrings and elf_validity_cache_index_str access the section name table (.shstrtab) and symbol string table (.strtab) headers without first ensuring that their types are SHT_STRTAB. If a section type is SHT_NULL or SHT_NOBITS, sh_offset has not been validated and may reference out-of-bounds memory when dereferenced in elf_validity_cache_secstrings or elf_validity_cache_strtab. Validate that both string section headers are of type SHT_STRTAB before caching them. Cc: stable@vger.kernel.org Signed-off-by: ThiƩbaud Weksteen <tweek@google.com> Reviewed-by: Aaron Tomlin <atomlin@atomlin.com> Reviewed-by: Petr Pavlu <petr.pavlu@suse.com> Signed-off-by: Petr Pavlu <petr.pavlu@suse.com>
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions