[PATCH RFC v3 39/44] target: fileio: refuse files on pseudo filesystems as backing files

sashiko-bot at kernel.org sashiko-bot at kernel.org
Mon Nov 16 11:23:14 UTC 2026


> fd_dev_name can name any file including files on procfs or sysfs. The
> initiator then gets to read and write kernel interfaces through the LUN
> with kernel credentials. Refuse files on pseudo filesystems just like
> loop does by switching to file_check_backing().
> 
> Do the same for the protection file. With DIF protection enabled the
> fileio backend keeps the protection information in a second file. It is
> named like the backing file with ".protection" appended and
> fd_init_prot() opens it by path. Whatever that path leads to was taken
> without any checks.
> 
> Note that the helper only accepts regular files and block devices as
> backing file and only regular files as protection file. So far the
> backing file could be anything with ->read_iter() and ->write_iter()
> including character devices and FIFOs.
> 
> Reported-by: Sashiko <sashiko-bot at kernel.org>
> Closes: https://lore.kernel.org/all/sashiko-outbox-206765@kernel.org
> Reviewed-by: Chris Down <chris at chrisdown.name>
> Tested-by: Chris Down <chris at chrisdown.name>
> Signed-off-by: Christian Brauner (Amutable) <brauner at kernel.org>

Sashiko has reviewed this patch and found no issues.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261116-work-loop-pseudo-v3-0-8cbbea1cf34f@kernel.org?part=39




More information about the Linux-security-module-archive mailing list