diff options
| author | Yao Sang <sangyao@kylinos.cn> | 2026-10-13 15:53:24 +0800 |
|---|---|---|
| committer | Keith Busch <kbusch@kernel.org> | 2026-10-13 08:34:28 -0700 |
| commit | 6908a702955929b0876baac9fdc57070780a76f0 (patch) | |
| tree | 3b029b3f3d6d71b8c2ddc0113b19adab79733525 /rust/kernel/alloc/kvec/errors.rs | |
| parent | c9359401036e8294c007a10e8c8d8da7030fcc76 (diff) | |
nvme: pass partition flags to passthrough checks
nvme_user_cmd() handles NVME_IOCTL_IO_CMD on namespace block devices,
including partitions. It receives flags identifying a partition, but
passes 0 to nvme_cmd_allowed(), bypassing the partition guard and
allowing unprivileged passthrough commands to access sectors outside
the partition.
Pass flags to the permission check, rejecting unprivileged commands on
partitions.
Fixes: 313c08c72ee7 ("nvme: don't allow unprivileged passthrough on partitions")
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Yao Sang <sangyao@kylinos.cn>
Reviewed-by: Kanchan Joshi <joshi.k@samsung.com>
Signed-off-by: Keith Busch <kbusch@kernel.org>
Diffstat (limited to 'rust/kernel/alloc/kvec/errors.rs')
0 files changed, 0 insertions, 0 deletions
