diff options
| author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2026-06-07 21:01:43 -0300 |
|---|---|---|
| committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2026-06-10 18:56:01 -0300 |
| commit | 836455e6dbd34eb3d12eeab5e2d2b9a7f1512459 (patch) | |
| tree | d7435b3a99cddf3f0b239e0e894f2ff3207619c0 /Documentation/gpu/intel-display/git@git.tavy.me:linux.git | |
| parent | 2f4e244b5968b1f7392d7de31dc961ef80f2e42e (diff) | |
perf pmu: Fix pmu_id() heap underwrite on empty identifier file
pmu_id() calls filename__read_str() then strips the trailing newline
via str[len - 1] = 0. If the PMU identifier file is empty,
filename__read_str() succeeds with len = 0. len - 1 underflows
size_t to SIZE_MAX, writing a null byte before the heap allocation.
Add a len == 0 check before the newline stripping.
Fixes: 51d548471510843e ("perf pmu: Add pmu_id()")
Reported-by: sashiko-bot <sashiko-bot@kernel.org>
Cc: John Garry <john.g.garry@oracle.com>
Assisted-by: Claude:claude-opus-4.6
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'Documentation/gpu/intel-display/git@git.tavy.me:linux.git')
0 files changed, 0 insertions, 0 deletions
