[PATCH RFC v2 37/42] target: fileio: refuse files on pseudo filesystems as backing files

sashiko-bot at kernel.org sashiko-bot at kernel.org
Sat Nov 14 13:22:31 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
> 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/20261114-work-loop-pseudo-v2-0-98639a2286fb@kernel.org?part=37




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