{"id":"CVE-2026-99877","summary":"LoongArch: Only send SIGTRAP signal if necessary in do_watch()","details":"In the Linux kernel, the following vulnerability has been resolved:\n\nLoongArch: Only send SIGTRAP signal if necessary in do_watch()\n\nIn do_watch(), the kernel unconditionally forces a SIGTRAP signal at the\nend of the handler via force_sig(SIGTRAP). This is essential for ptrace\noperations, but it severely disrupts standard perf_event usage.\n\nUnder normal perf usage, it is not necessary to force a SIGTRAP signal\non every hit. Forcing it unnecessarily aborts the target process if no\nuser-space signal handler is registered, which violates performance\nmonitoring behaviors and injects context switch overheads.\n\nHowever, a conditional check using only 'current-\u003eptrace' would block\nlegitimate user-requested signals when a perf_event is configured with\n'attr.sigtrap = 1' for asynchronous user-space tracking.\n\nFix this by refactoring breakpoint_handler() and watchpoint_handler()\nto return a boolean status indicating whether any triggered breakpoint\nexplicitly requires a signal notification. Update do_watch() to enforce\nthe SIGTRAP signal only when the process is actively being debugged via\nptrace, or when the underlying perf_event infrastructure specifically\ndemands it via 'attr.sigtrap'.","modified":"2026-11-30T15:02:32.064441529Z","published":"2026-11-30T13:17:53.580Z","database_specific":{"cna_assigner":"Linux","osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/99xxx/CVE-2026-99877.json"},"references":[{"type":"PACKAGE","url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"},{"type":"WEB","url":"https://git.kernel.org/stable/c/44346dd182cfac7e32575295ba0c2aa01d27566e"},{"type":"WEB","url":"https://git.kernel.org/stable/c/7e56651033584f16c019ff2a223c0f9417230f39"},{"type":"WEB","url":"https://git.kernel.org/stable/c/815c31e67f3feb82926b823469c953af8d3b84f7"},{"type":"WEB","url":"https://git.kernel.org/stable/c/ab0fb9ea282f5e2a8a15cefd6ad7b6652da7e95a"},{"type":"WEB","url":"https://git.kernel.org/stable/c/f087903018e35d38b8932e18b010ee2e8699d1a1"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/99xxx/CVE-2026-99877.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-99877"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"424421a7f34c1222d20a6c279f13b9caa71ecc83"},{"fixed":"44346dd182cfac7e32575295ba0c2aa01d27566e"},{"fixed":"7e56651033584f16c019ff2a223c0f9417230f39"},{"fixed":"815c31e67f3feb82926b823469c953af8d3b84f7"},{"fixed":"ab0fb9ea282f5e2a8a15cefd6ad7b6652da7e95a"},{"fixed":"f087903018e35d38b8932e18b010ee2e8699d1a1"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-99877.json"}},{"package":{"name":"Kernel","ecosystem":"Linux"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"6.3.0"},{"fixed":"6.6.163"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.7.0"},{"fixed":"6.12.117"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.13.0"},{"fixed":"6.18.63"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.19.0"},{"fixed":"7.3.4"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-99877.json"}}],"schema_version":"1.9.2"}