I'm wondering about the security of UNIX signals.
SIGKILL
will kill the process. So, what happens when a non root user's process sends a signal to a root user's process? Does the process still carry out the signal handler?
I follow the accepted answer (gollum's), and I type man capabilites
, and I find a lot of things about the Linux kernel. From man capabilities
:
NAME
capabilities - overview of Linux capabilities
DESCRIPTION
For the purpose of performing permission checks, traditional UNIX
implementations distinguish two categories of processes: privileged
processes (whose effective user ID is 0, referred to as superuser or
root), and unprivileged processes (whose effective UID is nonzero).
Privileged processes bypass all kernel permission checks, while
unprivileged processes are subject to full permission checking based
on the process's credentials (usually: effective UID, effective GID,
and supplementary group list).
Starting with kernel 2.2, Linux divides the privileges traditionally
associated with superuser into distinct units, known as capabilities,
which can be independently enabled and disabled. Capabilities are a
per-thread attribute.
SIGKILL
, which is a special case and managed completely by the kernel, signals are merely a request. The receiving process can do anything they want with them.SIGKILL
andSIGSTOP
...SIGKILL
would. InitiallySIGINT
,SIGKILL
, andSIGTERM
will have the exact same effect, the only difference is that the receiving process can change this default for some of them.