mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-11-27 01:11:31 +00:00
Factor out the validation of section names. There are two behavioral changes: 1. Previously, we did not validate non-SHF_ALLOC sections. This may have once been safe, as find_sec skips non-SHF_ALLOC sections, but find_any_sec, which will be used to load BTF if that is enabled, ignores the SHF_ALLOC flag. Since there's no need to support invalid section names, validate all of them, not just SHF_ALLOC sections. 2. Section names were validated *after* accessing them for the purposes of detecting ".modinfo" and ".gnu.linkonce.this_module". They are now checked prior to the access, which could avoid bad accesses with malformed modules. Signed-off-by: Matthew Maurer <mmaurer@google.com> Reviewed-by: Sami Tolvanen <samitolvanen@google.com> Signed-off-by: Luis Chamberlain <mcgrof@kernel.org> |
||
|---|---|---|
| .. | ||
| debug_kmemleak.c | ||
| decompress.c | ||
| dups.c | ||
| internal.h | ||
| kallsyms.c | ||
| Kconfig | ||
| kdb.c | ||
| kmod.c | ||
| livepatch.c | ||
| main.c | ||
| Makefile | ||
| procfs.c | ||
| signing.c | ||
| stats.c | ||
| strict_rwx.c | ||
| sysfs.c | ||
| tracking.c | ||
| tree_lookup.c | ||
| version.c | ||