summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/bin
diff options
context:
space:
mode:
authorRosen Penev <rosenp@gmail.com>2026-07-29 10:46:45 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2026-07-31 14:15:53 +0200
commitfde46579cf8872138b296349c2bd8a3cd3f132e2 (patch)
treec8c2e2a9985cc4e5d6c22721b7e9de1b46e1d654 /tools/perf/scripts/python/bin
parent1ae37d355114a94eb88c418e22e3e9a9e241b393 (diff)
nvmem: brcm_nvram: reject empty NVRAM partition
If the partition is completely erased (all padding bytes), the trimming loop reduces data_len to 0. devm_kzalloc(dev, 0, GFP_KERNEL) returns ZERO_SIZE_PTR ((void *)16), which is non-NULL and bypasses the NULL check. The subsequent cast of priv->data to struct brcm_nvram_header * and dereference of header->magic causes a page fault on address 0x10. Reject data_len smaller than the header before allocating. Assisted-by: opencode:big-pickle Signed-off-by: Rosen Penev <rosenp@gmail.com> Signed-off-by: Srinivas Kandagatla <srini@kernel.org> Link: https://patch.msgid.link/20260729094647.111468-13-srini@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools/perf/scripts/python/bin')
0 files changed, 0 insertions, 0 deletions