diff options
| author | Christian Brauner <brauner@kernel.org> | 2026-06-01 15:56:51 +0200 |
|---|---|---|
| committer | Christian Brauner <brauner@kernel.org> | 2026-06-29 10:53:32 +0200 |
| commit | 09eca26e7ee497eef94b3dd7fa5fdefa77bce684 (patch) | |
| tree | fd7eb38f55a7761c21c7bb613fe7c60172cd95d4 /init | |
| parent | d0f102fce372e57970bd1debbee1dbdd0152cf6d (diff) | |
af_unix: use scoped_with_init_fs() for coredump socket lookup
Use scoped_with_init_fs() to temporarily override current->fs for the
coredump unix socket path resolution. This replaces the init_root() +
vfs_path_lookup() pattern with scoped_with_init_fs() + kern_path().
The old code used LOOKUP_BENEATH to confine the lookup beneath init's
root. This is dropped because the coredump socket path is absolute and
resolved from root (where ".." is a no-op), and LOOKUP_NO_SYMLINKS
already blocks any symlink-based escape. LOOKUP_BENEATH was redundant
in this context.
unix_find_bsd(SOCK_COREDUMP) ← coredump_sock_connect() ← do_coredump() —
same crashing userspace process
Same security rationale as coredump.
Link: https://patch.msgid.link/20260601-work-kthread-nullfs-v4-18-77ee053060e0@kernel.org
Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>
Diffstat (limited to 'init')
0 files changed, 0 insertions, 0 deletions
