summaryrefslogtreecommitdiff
path: root/scripts/patch-kernel
diff options
context:
space:
mode:
authorTanushree Shah <tshah@linux.ibm.com>2026-07-26 00:19:50 +0530
committerNamhyung Kim <namhyung@kernel.org>2026-08-07 09:40:15 -0700
commitc108c1391be0826920991d24532fbae8f6373ddc (patch)
treea0034e6a5185e2cacc37f6003342d066d190f3c5 /scripts/patch-kernel
parent1121a7af1833f8b5723f1e32685b461614353d5d (diff)
downloadlinux-c108c1391be0826920991d24532fbae8f6373ddc.tar.gz
linux-c108c1391be0826920991d24532fbae8f6373ddc.zip
perf trace-event: Fix integer truncation in do_read() and skip()
The do_read() and skip() functions use 'int' for size parameters, truncating 64-bit sizes from callers. This causes two issues: 1. Uninitialized memory dump: do_read() reads fewer bytes than allocated, leaving uninitialized heap memory that gets written to output files. 2. Out-of-bounds read: Parsing functions process the full 64-bit size while only partial data was read into the buffer. Change do_read(), __do_read(), and skip() to use size_t for size parameters and ssize_t for return values (where applicable), matching read()/write() system calls. Update callers to use ssize_t for storing return values. Fixes: 4a31e56599d4 ("perf tools: Get rid of read_or_die() in trace-event-read.c") Signed-off-by: Tanushree Shah <tshah@linux.ibm.com> Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Diffstat (limited to 'scripts/patch-kernel')
0 files changed, 0 insertions, 0 deletions