ublk_drv: don't probe partitions if the ubq daemon isn't trusted
authorMing Lei <ming.lei@redhat.com>
Fri, 6 Jan 2023 04:17:07 +0000 (12:17 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 10 Mar 2023 08:32:41 +0000 (09:32 +0100)
commite6829910b93f33abf639a42ca37adae0fa15c921
tree1b07c2acb19b5c4a59df6fe6f575c658e667ea4f
parent23e79f75e61b6f56fba53dc4f7d275d1a58f79d7
ublk_drv: don't probe partitions if the ubq daemon isn't trusted

[ Upstream commit 73a166d9749230d598320fdae3b687cdc0e2e205 ]

If any ubq daemon is unprivileged, the ublk char device is allowed
for unprivileged user actually, and we can't trust the current user,
so not probe partitions.

Fixes: 71f28f3136af ("ublk_drv: add io_uring based userspace block driver")
Reviewed-by: ZiyangZhang <ZiyangZhang@linux.alibaba.com>
Signed-off-by: Ming Lei <ming.lei@redhat.com>
Link: https://lore.kernel.org/r/20230106041711.914434-3-ming.lei@redhat.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/block/ublk_drv.c