]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
coredump: fix core_pattern input validation
authorChristian Brauner <brauner@kernel.org>
Tue, 7 Oct 2025 09:32:42 +0000 (11:32 +0200)
committerChristian Brauner <brauner@kernel.org>
Tue, 7 Oct 2025 11:12:46 +0000 (13:12 +0200)
commita779e27f24aeb679969ddd1fdd7f636e22ddbc1e
treea022bc55b3aa626e419785d91a5d6e95fb40a6a6
parent56094ad3eaa21e6621396cc33811d8f72847a834
coredump: fix core_pattern input validation

In be1e0283021e ("coredump: don't pointlessly check and spew warnings")
we tried to fix input validation so it only happens during a write to
core_pattern. This would avoid needlessly logging a lot of warnings
during a read operation. However the logic accidently got inverted in
this commit. Fix it so the input validation only happens on write and is
skipped on read.

Fixes: be1e0283021e ("coredump: don't pointlessly check and spew warnings")
Fixes: 16195d2c7dd2 ("coredump: validate socket name as it is written")
Reviewed-by: Jan Kara <jack@suse.cz>
Reported-by: Yu Watanabe <watanabe.yu@gmail.com>
Signed-off-by: Christian Brauner <brauner@kernel.org>
fs/coredump.c
fs/exec.c