summaryrefslogtreecommitdiff
path: root/io_uring
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2022-12-13 16:13:38 +0100
committerChristoph Hellwig <hch@lst.de>2022-12-28 06:26:31 -1000
commit6f99ac04c469b5d0a180a4ccea99d25d5dc9d21c (patch)
treec1f058709af3082050c3219bfd1d06ba686d11ac /io_uring
parent831ed60c2aca2d7c517b2da22897a90224a97d27 (diff)
nvme: consult the CSE log page for unprivileged passthrough
Commands like Write Zeros can change the contents of a namespaces without actually transferring data. To protect against this, check the Commands Supported and Effects log is supported by the controller for any unprivileg command passthrough and refuse unprivileged passthrough if the command has any effects that can change data or metadata. Note: While the Commands Support and Effects log page has only been mandatory since NVMe 2.0, it is widely supported because Windows requires it for any command passthrough from userspace. Fixes: e4fbcf32c860 ("nvme: identify-namespace without CAP_SYS_ADMIN") Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Keith Busch <kbusch@kernel.org> Reviewed-by: Sagi Grimberg <sagi@grimberg.me> Reviewed-by: Kanchan Joshi <joshi.k@samsung.com>
Diffstat (limited to 'io_uring')
0 files changed, 0 insertions, 0 deletions