]> www.infradead.org Git - users/jedix/linux-maple.git/commit
module: Additional validation in elf_validity_cache_strtab
authorMatthew Maurer <mmaurer@google.com>
Tue, 15 Oct 2024 23:16:45 +0000 (23:16 +0000)
committerLuis Chamberlain <mcgrof@kernel.org>
Sat, 19 Oct 2024 21:35:07 +0000 (14:35 -0700)
commitd979e3dffa93c9284f244ef64f7a68042c2f8b80
treee264d3c6e50bd1d7dfca1495594ebd40947605e6
parent837031e052af32c747906238fb1feb87778e4fe0
module: Additional validation in elf_validity_cache_strtab

Validate properties of the strtab that are depended on elsewhere, but
were previously unchecked:
* String table nonempty (offset 0 is valid)
* String table has a leading NUL (offset 0 corresponds to "")
* String table is NUL terminated (strfoo functions won't run out of the
  table while reading).
* All symbols names are inbounds of the string table.

Signed-off-by: Matthew Maurer <mmaurer@google.com>
Reviewed-by: Sami Tolvanen <samitolvanen@google.com>
Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
kernel/module/main.c