# CVE-2026-99877: LoongArch: Only send SIGTRAP signal if necessary in do_watch()

- Severity: not scored yet
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.21%, higher than 11% of CVEs (2026-12-01)
- Published: 2026-11-30T13:17:53.580Z
- Modified: 2026-11-30T14:20:22.100Z
- Assigned by: Linux

## Description

In the Linux kernel, the following vulnerability has been resolved:

LoongArch: Only send SIGTRAP signal if necessary in do_watch()

In do_watch(), the kernel unconditionally forces a SIGTRAP signal at the
end of the handler via force_sig(SIGTRAP). This is essential for ptrace
operations, but it severely disrupts standard perf_event 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 perf_event is configured with
'attr.sigtrap = 1' for asynchronous user-space tracking.

Fix this by refactoring breakpoint_handler() and watchpoint_handler()
to return a boolean status indicating whether any triggered breakpoint
explicitly requires a signal notification. Update do_watch() to enforce
the SIGTRAP signal only when the process is actively being debugged via
ptrace, or when the underlying perf_event infrastructure specifically
demands it via 'attr.sigtrap'.

(As written by CVE List.)

## Affected

- Linux Linux: from 424421a7f34c1222d20a6c279f13b9caa71ecc83 before 44346dd182cfac7e32575295ba0c2aa01d27566e; from 424421a7f34c1222d20a6c279f13b9caa71ecc83 before 7e56651033584f16c019ff2a223c0f9417230f39; from 424421a7f34c1222d20a6c279f13b9caa71ecc83 before 815c31e67f3feb82926b823469c953af8d3b84f7; from 424421a7f34c1222d20a6c279f13b9caa71ecc83 before ab0fb9ea282f5e2a8a15cefd6ad7b6652da7e95a; from 424421a7f34c1222d20a6c279f13b9caa71ecc83 before f087903018e35d38b8932e18b010ee2e8699d1a1; 6.3 (not affected: before 6.3; from 6.6.163 up to 6.6.*; from 6.12.117 up to 6.12.*; from 6.18.63 up to 6.18.*; from 7.3.4 up to 7.3.*; from 7.4-rc1 up to *)

## References

- <https://git.kernel.org/stable/c/44346dd182cfac7e32575295ba0c2aa01d27566e>
- <https://git.kernel.org/stable/c/7e56651033584f16c019ff2a223c0f9417230f39>
- <https://git.kernel.org/stable/c/815c31e67f3feb82926b823469c953af8d3b84f7>
- <https://git.kernel.org/stable/c/ab0fb9ea282f5e2a8a15cefd6ad7b6652da7e95a>
- <https://git.kernel.org/stable/c/f087903018e35d38b8932e18b010ee2e8699d1a1>

## Sources

- CVE List: [CVE-2026-99877](https://www.cve.org/CVERecord?id=CVE-2026-99877), CVE Terms of Use, modified 2026-11-30
- NVD: [CVE-2026-99877](https://nvd.nist.gov/vuln/detail/CVE-2026-99877), Public domain, modified 2026-11-30

---

Page: https://cve.day/CVE-2026-99877 · Whole record: https://cve.day/CVE-2026-99877.json · Rebuilt by cve.day 2026-11-30T14:33:32.917Z
