diff options
| author | Shao Mingyin <shao.mingyin@zte.com.cn> | 2026-11-12 22:01:06 +0800 |
|---|---|---|
| committer | Keith Busch <kbusch@kernel.org> | 2026-11-16 07:42:44 -0800 |
| commit | bcd5316e708d418f03707c183571549ad878cfff (patch) | |
| tree | d13d383c6d6cfce09df0031e397ccb72373056d4 /tools/perf/scripts/python | |
| parent | 1738de07a79b9abdcffe03571c442033b80e7fed (diff) | |
nvmet: use overflow-safe range checks in the file backend
The file backend shifts a host-supplied SLBA to form a byte offset
before checking it against the namespace size. The shift can discard
high bits: with a 4 KiB block size, SLBA 2^52 + 1 becomes offset 4096.
The range check then accepts a command aimed outside the namespace and
the backend accesses data at the wrapped offset.
Reject overflowing LBA-to-byte conversions and check the transfer
length against the remaining namespace size without adding it to the
offset. Apply the checks to reads, writes, discard and write zeroes.
Fixes: 9c891c139894 ("nvmet: check fileio lba range access boundaries")
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
