Description
In the Linux kernel, the following vulnerability has been resolved: pid_namespace: prevent TIF_NOTIFY_SIGNAL from interrupting the reaper Since commit 7fea700e04bd ("zap_pid_ns_processes: clear TIF_NOTIFY_SIGNAL along with TIF_SIGPENDING") zap_pid_ns_processes() clears TIF_NOTIFY_SIGNAL before every kernel_wait4() call. Otherwise kernel_wait4() doesn't sleep and returns -ERESTARTSYS if signal_pending() is true and the reaper busy-waits. But clearing TIF_NOTIFY_SIGNAL doesn't fix it. It can get raised again. For example, klp_send_signals() sets it raw against any task that hasn't transitioned yet. And it keeps sending it until the livepatch finishes. The sleep loop waiting for pid_allocated to drop has the same problem and it doesn't even clear anything. So a schedule() in TASK_INTERRUPTIBLE returns immediately. Use a no_notify_signal guard. signal_pending() will ignore TIF_NOTIFY_SIGNAL and the pid namespace reaper sleeps until a child exits or free_pid() wakes it.
Affected products
Version statuses are supplied by the assigning organization. Consult the original record for detailed ranges and platform conditions.
Linux Linux
Default version status: unaffected
edd2754a62bee8d97b4808a15de024f66a1ddccf to < 2c20ace1698d03a23467351be1d281e89b36ade3affected3466abafa9f4f81a869da828e52a12f693175ec2 to < 9ab0324f4868eeb20c63f063a1e5bc01d5539212affected7fea700e04bd3f424c2d836e98425782f97b494e to < 30b274508c743f243c82904954c4e416d7143d4caffected7fea700e04bd3f424c2d836e98425782f97b494e to < 70178691c467c8f9f722765299fd8524c3121a35affected7fea700e04bd3f424c2d836e98425782f97b494e to < 3d15ac36ce174477efa5365e424dbd47950fd2b9affected7fea700e04bd3f424c2d836e98425782f97b494e to < f46cd8241d9b83f2279cc0db3e9d3e181b548a59affected7fea700e04bd3f424c2d836e98425782f97b494e to < 5c0985dd3c32fc2bbd0e8beaf13cf52cd97376a2affected82c7acf9a12c9b4e4b0aba531de82b4e39a345c8affected8e69e589f233ca2c9631f5af2b94f95dfc2ba804affected09ab5b424b17cfe633db58bb2f9edbaf9484cf20affected6.1.95 to < 6.1.191affected6.6.35 to < 6.6.161affected5.10.221 to < 5.11affected5.15.162 to < 5.16affected6.9.6 to < 6.10affected
Linux Linux
Default version status: affected
6.10affected0 to < 6.10unaffected6.1.191 to ≤ 6.1.*unaffected6.6.161 to ≤ 6.6.*unaffected6.12.115 to ≤ 6.12.*unaffected6.18.60 to ≤ 6.18.*unaffected7.2.14 to ≤ 7.2.*unaffected7.3.1 to ≤ 7.3.*unaffected7.4-rc1 to ≤ *unaffected
References
- https://git.kernel.org/stable/c/2c20ace1698d03a23467351be1d281e89b36ade3 ↗
- https://git.kernel.org/stable/c/9ab0324f4868eeb20c63f063a1e5bc01d5539212 ↗
- https://git.kernel.org/stable/c/30b274508c743f243c82904954c4e416d7143d4c ↗
- https://git.kernel.org/stable/c/70178691c467c8f9f722765299fd8524c3121a35 ↗
- https://git.kernel.org/stable/c/3d15ac36ce174477efa5365e424dbd47950fd2b9 ↗
- https://git.kernel.org/stable/c/f46cd8241d9b83f2279cc0db3e9d3e181b548a59 ↗
- https://git.kernel.org/stable/c/5c0985dd3c32fc2bbd0e8beaf13cf52cd97376a2 ↗