fs/coredump: rate limit the unsafe core_pattern warning
Subsystems (2)
PATCH 1/1 fs/coredump: rate limit the unsafe core_pattern warning
It is possible to spam the kernel log with many invalid attempts to set the core_pattern. Rate limit the warning message to make it less spammy.
Signed-off-by Colin Ian King <[email protected]>
--- fs/coredump.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/coredump.c +1 -1
@@ -898,7 +898,7 @@ void validate_coredump_safety(void) {if (suid_dumpable ==SUID_DUMP_ROOT && core_pattern[0 ] !='/' && core_pattern[0 ] !='|' ) { -pr_warn ( +pr_warn_ratelimited ("Unsafe core_pattern used with fs.suid_dumpable=2.\n" "Pipe handler or fully qualified core dump path required.\n" "Set kernel.core_pattern before fs.suid_dumpable.\n"
Signature · 1 line
2.33.1
Quoted 6 lines · Colin Ian King
It is possible to spam the kernel log with many invalid attempts to set the
core_pattern. Rate limit the warning message to make it less spammy.Signed-off-by Colin Ian King <[email protected]>---