AZL-117373: CVE-2026-99877 affecting package kernel 6.6.161.1-1
In the Linux kernel, the following vulnerability has been resolved:
LoongArch: Only send SIGTRAP signal if necessary in dowatch()
In dowatch(), the kernel unconditionally forces a SIGTRAP signal at the end of the handler via forcesig(SIGTRAP). This is essential for ptrace operations, but it severely disrupts standard perfevent usage.
Under normal perf usage, it is not necessary to force a SIGTRAP signal on every hit. Forcing it unnecessarily aborts the target process if no user-space signal handler is registered, which violates performance monitoring behaviors and injects context switch overheads.
However, a conditional check using only 'current->ptrace' would block legitimate user-requested signals when a perfevent is configured with 'attr.sigtrap = 1' for asynchronous user-space tracking.
Fix this by refactoring breakpointhandler() and watchpointhandler() to return a boolean status indicating whether any triggered breakpoint explicitly requires a signal notification. Update dowatch() to enforce the SIGTRAP signal only when the process is actively being debugged via ptrace, or when the underlying perfevent infrastructure specifically demands it via 'attr.sigtrap'.
Affected Software
Event History
Frequently Asked Questions
Which systems and workloads are most likely to be affected?
The issue is specific to the Linux kernel's LoongArch watchpoint handling. Standard perf_event users that trigger watchpoints are affected because the kernel can force SIGTRAP on every hit, potentially aborting a monitored process that has no user-space SIGTRAP handler.
What conditions cause a process to receive the unwanted signal?
A watchpoint must be hit through normal perf_event usage, and the process must not have a user-space handler registered for SIGTRAP. The vulnerable behavior unconditionally forces SIGTRAP at the end of the watchpoint handler rather than limiting it to ptrace debugging or perf events explicitly configured with attr.sigtrap.
Are ptrace debugging and perf events configured for SIGTRAP supposed to keep receiving SIGTRAP?
Yes. SIGTRAP remains necessary when the process is actively debugged through ptrace and when the relevant perf_event explicitly requests signal notification with attr.sigtrap set to 1.