Skip to content

Commit

Permalink
arm64: signal: Force SIGKILL for unknown signals in force_signal_inject
Browse files Browse the repository at this point in the history
For signals other than SIGKILL or those with siginfo_layout(signal, code)
== SIL_FAULT then force_signal_inject does not initialise the siginfo_t
properly. Since the signal number is determined solely by the caller,
simply WARN on unknown signals and force to SIGKILL.

Reported-by: Dave Martin <[email protected]>
Signed-off-by: Will Deacon <[email protected]>
  • Loading branch information
wildea01 committed Mar 6, 2018
1 parent 2c9120f commit a7e6f1c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions arch/arm64/kernel/traps.c
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,12 @@ void force_signal_inject(int signal, int code, unsigned long address)
break;
}

/* Force signals we don't understand to SIGKILL */
if (WARN_ON(signal != SIGKILL ||
siginfo_layout(signal, code) != SIL_FAULT)) {
signal = SIGKILL;
}

if (unhandled_signal(current, signal) &&
show_unhandled_signals_ratelimited()) {
pr_info("%s[%d]: %s: pc=%08llx\n",
Expand Down

0 comments on commit a7e6f1c

Please sign in to comment.