https://bugs.kde.org/show_bug.cgi?id=506930
Bug ID: 506930
Summary: valgrind allows SIGKILL being reset to SIG_DFL
Classification: Developer tools
Product: valgrind
Version First 3.25.0
Reported In:
Platform: Other
OS: Linux
Status: REPORTED
Severity: normal
Priority: NOR
Component: general
Assignee: [email protected]
Reporter: [email protected]
Target Milestone: ---
LTP signal01 testcase fails with:
signal01.c:56: TFAIL: (long)signal(SIGKILL, tc->sighandler) succeeded
Should fail with EINVAL (SIGKILL can not be reset to default)
Seems that do_sys_sigaction explicitly allows that.
Not sure why, fix might be as simple as:
diff --git a/coregrind/m_signals.c b/coregrind/m_signals.c
index f0e6b8e7cf2e..67893d473603 100644
--- a/coregrind/m_signals.c
+++ b/coregrind/m_signals.c
@@ -1319,8 +1319,7 @@ SysRes VG_(do_sys_sigaction) ( Int signo,
/* Reject attempts to set a handler (or set ignore) for SIGKILL. */
if ( (signo == VKI_SIGKILL || signo == VKI_SIGSTOP)
- && new_act
- && new_act->ksa_handler != VKI_SIG_DFL)
+ && new_act )
goto bad_sigkill_or_sigstop;
/* If the client supplied non-NULL old_act, copy the relevant SCSS
--
You are receiving this mail because:
You are watching all bug changes.