summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorShao Mingyin <shao.mingyin@zte.com.cn>2026-11-09 22:59:21 +0800
committerKeith Busch <kbusch@kernel.org>2026-11-16 07:42:46 -0800
commit62dae895f986f7459fea1deebd89a0bce76a886f (patch)
treed8244a96d28f29f0784ce9f3c65b818a9fbc2101 /tools/perf/scripts/python
parent687e743e4089b2a854982b321cb2d681ae5d6136 (diff)
nvmet-auth: store the DH-CHAP key offset instead of hardcoding it
nvmet_auth_set_key() accepts variable-width hash identifiers, but nvmet_setup_auth() always skips ten bytes before extracting the key. For "DHHC-1:1:" this starts one byte past the allocated string's NUL terminator, causing an out-of-bounds read in nvme_auth_extract_key(). Other nonstandard prefix widths also select the wrong key bytes. Use %n to validate the complete prefix and record its actual length for both host and controller secrets. Keep the offsets as int, matching the scan result, so whitespace or leading zeroes in the hash identifier do not truncate the saved offset. Fixes: db1312dd9548 ("nvmet: implement basic In-Band Authentication") Cc: stable@vger.kernel.org Signed-off-by: Shao Mingyin <shao.mingyin@zte.com.cn> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Keith Busch <kbusch@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions