summaryrefslogtreecommitdiff
path: root/scripts/gdb/linux/proc.py
diff options
context:
space:
mode:
authorAndrii Nakryiko <andrii@kernel.org>2024-08-29 20:42:23 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-10-10 13:03:54 +0300
commit768d731b8a0d76b13f1ee1bb041b53e7370237f7 (patch)
treef8d45065556aca846bded83ac8648bec107485c9 /scripts/gdb/linux/proc.py
parent927abc5b7d6d2c2e936bec5a2f71d9512c5e72f7 (diff)
downloadlinux-768d731b8a0d76b13f1ee1bb041b53e7370237f7.tar.xz
lib/buildid: harden build ID parsing logic
commit 905415ff3ffb1d7e5afa62bacabd79776bd24606 upstream. Harden build ID parsing logic, adding explicit READ_ONCE() where it's important to have a consistent value read and validated just once. Also, as pointed out by Andi Kleen, we need to make sure that entire ELF note is within a page bounds, so move the overflow check up and add an extra note_size boundaries validation. Fixes tag below points to the code that moved this code into lib/buildid.c, and then subsequently was used in perf subsystem, making this code exposed to perf_event_open() users in v5.12+. Cc: stable@vger.kernel.org Reviewed-by: Eduard Zingerman <eddyz87@gmail.com> Reviewed-by: Jann Horn <jannh@google.com> Suggested-by: Andi Kleen <ak@linux.intel.com> Fixes: bd7525dacd7e ("bpf: Move stack_map_get_build_id into lib") Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Link: https://lore.kernel.org/r/20240829174232.3133883-2-andrii@kernel.org Signed-off-by: Alexei Starovoitov <ast@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'scripts/gdb/linux/proc.py')
0 files changed, 0 insertions, 0 deletions