summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorDaehyeon Ko <4ncienth@gmail.com>2026-09-15 11:19:56 +0900
committerKeith Busch <kbusch@kernel.org>2026-09-25 08:06:20 -0700
commit63fa2d9c9c37020bd2703fe2a6a38027b5abeb15 (patch)
tree32a772e518439ca2572aa699a497f666a02be3ea /tools/perf/scripts/python
parent7f4d0c359bbac4ba8691bf9b4213bf9ab07cd2a4 (diff)
downloadlinux-next-63fa2d9c9c37020bd2703fe2a6a38027b5abeb15.tar.gz
linux-next-63fa2d9c9c37020bd2703fe2a6a38027b5abeb15.zip
nvme-multipath: fix underflow in ANA log bounds checks
The number of ANA groups advertised through Identify Controller sizes the ANA log buffer. The ANA log header and group descriptors independently supply the number of groups and namespace IDs to parse. Both bounds checks subtract an untrusted object size from ana_log_size before comparing the current offset. If the object is larger than the buffer, the size_t subtraction underflows and lets the parser read beyond ana_log_buf. Check the current offset before the first subtraction and compare each object size with the remaining buffer instead. This rejects inconsistent ANA data before dereferencing a truncated group descriptor or walking an oversized namespace ID array. Fixes: 0d0b660f214d ("nvme: add ANA support") Cc: stable@vger.kernel.org Assisted-by: LLM Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Daehyeon Ko <4ncienth@gmail.com> Signed-off-by: Keith Busch <kbusch@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions