Debian Patches

Status for needrestart/3.6-4+deb12u4

Patch Description Author Forwarded Bugs Origin Last update
01-use-invoke-rc-d.diff # Use invoke-rc.d instead of service command.
# Closes: #850948

diff -Naur needrestart-2.11.orig/needrestart needrestart-2.11/needrestart
no
02-bash-term-in-posix-shell.diff # Workaround needrestart: bash-term-in-posix-shell '& read -p' [etc/needrestart/restart.d/dbus.service:65]

diff -Naur needrestart-3.6.orig/ex/restart.d/dbus.service needrestart-3.6/ex/restart.d/dbus.service
no
03-ignore-serial-getty.diff do not restart serial-getty@*.service Helmut Grohne <helmut@subdivi.de> no
04-vm-detection.diff Fix VM detection regression introduced in f54d85c zxyrepf <53189615+zxyrepf@users.noreply.github.com> no 2022-07-24
05-fix-AMD-ucode-checking-in-non-debug-mode.patch fix AMD ucode checking in non-debug mode
It looks like the assignment when the ucode exist was not
done *unless* `debug` (`-v`) was set. Therefore, all AMD microcode
checks were returning UNKNOWN, including in Nagios checks, unless the
`-v` ("verbose", but actually `debug`) was passed.
Antoine Beaupré <anarcat@debian.org> no 2023-11-15
06-uCode-fix-uninitialized-value-in-logging-of-processo.patch [uCode] fix uninitialized value in logging of processor index
This got broken in f8c2609f8d5a0e10bd988497b8ea9815a7bb2fa8.

Before that it would have effectively logged
`$processors{$pid}->{processor}`, but the `processor` entry
is also the key in `%processors`, i.e. equals `$pid`.
Stefan Bühler <source@stbuehler.de> no 2023-05-28
CVE-2026-124757/02-7874c08.patch needrestart: anchor the systemd cgroup matches
needrestart files a process under a user session, a user manager or a user service by matching the path in /proc/PID/cgroup. Those matches were not anchored at the start, so a directory with the right name created inside a user's own delegated user@UID.service cgroup could give a process a different uid. A process started by one user could be filed under root's session, and the notification hook then ran su as root with that process name.

The session, user manager and user service matches now only accept paths that begin with systemd's slice components before the user-N.slice, user@N.service or session scope. Paths that match the systemd layout are classified as before, and paths that only contain the same text inside a user-owned subtree no longer match.

This was tested against systemd layouts only. Hosts whose cgroup paths have a different prefix, such as some container setups, may classify those processes differently.

Found and reported privately by Armaan Sandhu.
Armaan Sandhu <armaan.sandhu0504@gmail.com> yes upstream https://github.com/liske/needrestart/commit/7874c082c86f041512b01a02860a89b463524684 2026-10-23
07-mark-unavailable-firmware-as-CURRENT.patch mark unavailable firmware as CURRENT
This changes the policy of reporting missing firmware updates as
"UNKNOWN". Now, if there's no available firmware, we report
"current". That fixes needrestart on platforms that do not have
firmware support (#220) or platforms that *are* supported but for
which a CPU is to new to have an updated firmware available (#149).

It does *not* create a new "unavailable" status (#274) as this maps
poorly in Nagios reporting, but that is an option that was considered
here as well.
Antoine Beaupré <anarcat@debian.org> no 2023-11-21
core-prevent-race-condition-on-proc-PID-exec-evaluat.patch [PATCH 1/5] core: prevent race condition on /proc/$PID/exec evaluation Thomas Liske <thomas@fiasko-nw.net> no 2024-10-12
interp-do-not-set-PYTHONPATH-environment-variable-to.patch [PATCH 2/5] interp: do not set PYTHONPATH environment variable to prevent a LPE Thomas Liske <thomas@fiasko-nw.net> no 2024-10-12
interp-do-not-set-RUBYLIB-environment-variable-to-pr.patch [PATCH 3/5] interp: do not set RUBYLIB environment variable to prevent a LPE Thomas Liske <thomas@fiasko-nw.net> no 2024-11-03
interp-chdir-into-empty-directory-to-prevent-python-.patch [PATCH 4/5] interp: chdir into empty directory to prevent python parsing arbitrary files Thomas Liske <thomas@fiasko-nw.net> no 2024-11-03
interp-drop-usage-of-Module-ScanDeps-to-prevent-LPE.patch [PATCH 5/5] interp: drop usage of Module::ScanDeps to prevent LPE Thomas Liske <thomas@fiasko-nw.net> no 2024-11-04
core-fix-regression-of-false-positives-for-processes.patch core: fix regression of false positives for processes running in chroot or mountns (#317) Thomas Liske <thomas@fiasko-nw.net> yes debian upstream https://github.com/liske/needrestart/commit/e17b5644aff0f9eaeb422af7013b9c88ffc44423 2024-11-27
CVE-2026-124757/01-b1996a1.patch notify.d: pass the notification text to su through the environment
The 400-notify-send hook built the su -c command string from the notification title and body. The body contains the process names that needrestart reports, and a process sets its own 15 byte comm name with prctl(PR_SET_NAME). A name that closes the quote and adds shell syntax was therefore executed by the shell that su starts, instead of being shown as text.

The title and body are now stored in NR_NOTIFY_TITLE and NR_NOTIFY_BODY, exported, and expanded by the inner shell as quoted data, so the command string no longer contains any notification text. The existing MSGTITLE and MSGBODY variables are renamed instead of being copied into new ones, so there is no second copy of the text to keep in sync.

Found and reported privately by Armaan Sandhu.
Armaan Sandhu <armaan.sandhu0504@gmail.com> yes upstream https://github.com/liske/needrestart/commit/b1996a1a6e2b22fbfdf3062d06712b0a49a99d73 2026-10-23
CVE-2026-124757/03-e8ae1f2.patch needrestart: replace non-ASCII and control characters in process names

Process names come from /proc and can contain escape sequences and newlines. They were printed to the terminal unchanged, which allowed terminal escape injection in the process list shown to the administrator. A newline in a name could also split a line of the machine readable NEEDRESTART-PID output.

Only printable ASCII characters (0x20 to 0x7e) are now kept in the displayed copies and in the text passed to notification hooks. Every other byte is replaced with ?, so control characters and the bytes of UTF-8 encoded names are covered by one simple rule. A name with non-ASCII letters therefore shows one ? per byte. That is a deliberate trade-off: the rule is easy to read and cannot miss an escape that is encoded as UTF-8. The stored process names are not changed.

Found and reported privately by Armaan Sandhu.
Armaan Sandhu <armaan.sandhu0504@gmail.com> yes upstream https://github.com/liske/needrestart/commit/e8ae1f22f16b0b6023f86af0bcfdd88277f8ecec 2026-10-23

All known versions for source package 'needrestart'

Links