[PATCH RESEND] nvme: pass partition flags to passthrough checks

Kanchan Joshi joshi.k at samsung.com
Mon Oct 12 22:51:49 PDT 2026


On 10/12/2026 12:58 PM, Yao Sang wrote:
> 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: 1161be71d1ec ("nvme: reject passthrough of driver-managed Set Features")

The fix looks correct, but tag seems misplaced. It should rather be

313c08c72ee7 ("nvme: don't allow unprivileged passthrough on partitions")

With that
Reviewed-by: Kanchan Joshi <joshi.k at samsung.com>



More information about the Linux-nvme mailing list