Thread View: linux.debian.bugs.dist
1 messages
1 total messages
Started by Martin Petricek
Fri, 30 Oct 2026 23:20
Bug#1152652: slay: User can resist being killed by "slay"
Author: Martin Petricek
Date: Fri, 30 Oct 2026 23:20
Date: Fri, 30 Oct 2026 23:20
53 lines
4037 bytes
4037 bytes
Package: slay
Version: 3.0.2
Severity: important
X-Debbugs-Cc: martin.petricek@cint.com
Dear Maintainer,
Slay does not send signals as root, slay runs `kill` as the slayee:
su -m $slayee -c "kill $SIGNAL -1"
That `kill` therefore runs with env su sets up for that user, including any AppArmor confinement attached to the user's sessions (i.e. via pam_apparmor).
If you set up pam_apparmor properly, then running:
su -m user -c 'cat /proc/self/attr/current'
will print a profile in enforce mode rather than "unconfined", and the `kill -1` is then confined by that profile.
Running kill with pid -1 sends the signal only to processes the caller is allowed to signal and silently skips the rest.
Based on the used apparmor profile, ability to kill "own" processes thus may be severely limited,
especially if some of those processes have either changed hat, or changed to a different profile that cannot be signalled from the original profile.
If the user running inside the restricted apparmod profile can find a way to abuse capability to change hat or profile, this can be used to evade slay.
Another way the slayee can easily use to avoid being slain is abusing fork bomb - if the user exhausts limit on number of processes (ulimit -u), execve in su's child fail and slay will be unable to kill any of that user's processes.
I suspect there may be more ways to become "immune" to slay (set shell to some exotic one that does not understand or can override "kill" command?)
although I have not found any additional ways than those two described during my brief experimentation.
Suggested fix: kill the user's processes as root instead of as the slayee.
Unconfined root is not subject to the slayee's AppArmor confinement and is not affected by the slayee's limits.
-- System Information:
Debian Release: forky/sid
APT prefers stable-security
APT policy: (500, 'stable-security'), (500, 'stable')
Architecture: amd64 (x86_64)
Kernel: Linux 6.12.107+deb13-amd64 (SMP w/16 CPU threads; PREEMPT)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=C, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
Versions of packages slay depends on:
ii debconf [debconf-2.0] 1.5.92
slay recommends no packages.
slay suggests no packages.
-- debconf information:
slay/butthead: false
slay/punish: false
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads