sst-linux/security/landlock
Mickaël Salaün 7d61212289 landlock: Handle weird files
[ Upstream commit 49440290a0935f428a1e43a5ac8dc275a647ff80 ]

A corrupted filesystem (e.g. bcachefs) might return weird files.
Instead of throwing a warning and allowing access to such file, treat
them as regular files.

Cc: Dave Chinner <david@fromorbit.com>
Cc: Kent Overstreet <kent.overstreet@linux.dev>
Cc: Paul Moore <paul@paul-moore.com>
Reported-by: syzbot+34b68f850391452207df@syzkaller.appspotmail.com
Closes: https://lore.kernel.org/r/000000000000a65b35061cffca61@google.com
Reported-by: syzbot+360866a59e3c80510a62@syzkaller.appspotmail.com
Closes: https://lore.kernel.org/r/67379b3f.050a0220.85a0.0001.GAE@google.com
Reported-by: Ubisectech Sirius <bugreport@ubisectech.com>
Closes: https://lore.kernel.org/r/c426821d-8380-46c4-a494-7008bbd7dd13.bugreport@ubisectech.com
Fixes: cb2c7d1a17 ("landlock: Support filesystem access-control")
Reviewed-by: Günther Noack <gnoack3000@gmail.com>
Link: https://lore.kernel.org/r/20250110153918.241810-1-mic@digikod.net
Signed-off-by: Mickaël Salaün <mic@digikod.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-02-21 13:49:04 +01:00
..
common.h landlock: Set up the security framework and manage credentials 2021-04-22 12:22:10 -07:00
cred.c landlock: Don't lose track of restrictions on cred_transfer 2024-08-03 08:49:29 +02:00
cred.h landlock: Format with clang-format 2022-05-09 12:31:10 +02:00
fs.c landlock: Handle weird files 2025-02-21 13:49:04 +01:00
fs.h landlock: Define access_mask_t to enforce a consistent access mask size 2022-05-23 13:27:55 +02:00
Kconfig landlock: Support filesystem access-control 2021-04-22 12:22:11 -07:00
limits.h landlock: Add support for file reparenting with LANDLOCK_ACCESS_FS_REFER 2022-05-23 13:27:59 +02:00
Makefile
object.c landlock: Format with clang-format 2022-05-09 12:31:10 +02:00
object.h landlock: Format with clang-format 2022-05-09 12:31:10 +02:00
ptrace.c landlock: Format with clang-format 2022-05-09 12:31:10 +02:00
ptrace.h landlock: Add ptrace restrictions 2021-04-22 12:22:10 -07:00
ruleset.c landlock: Define access_mask_t to enforce a consistent access mask size 2022-05-23 13:27:55 +02:00
ruleset.h landlock: Fix same-layer rule unions 2022-05-23 13:27:57 +02:00
setup.c landlock: Support filesystem access-control 2021-04-22 12:22:11 -07:00
setup.h landlock: Support filesystem access-control 2021-04-22 12:22:11 -07:00
syscalls.c