{"id":"CVE-2026-99877","aliases":["CVE-2026-99877"],"related":[],"kind":"vulnerability","state":"published","title":"LoongArch: Only send SIGTRAP signal if necessary in do_watch()","summary":"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->ptrace' 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'.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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->ptrace' 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'.","source":"cvelist"}],"published":"2026-11-30T13:17:53.580Z","modified":"2026-11-30T14:20:22.100Z","severities":[],"cwes":[],"affected":[{"ranges":[{"type":"git","introduced":"424421a7f34c1222d20a6c279f13b9caa71ecc83","fixed":"44346dd182cfac7e32575295ba0c2aa01d27566e","status":"affected"},{"type":"git","introduced":"424421a7f34c1222d20a6c279f13b9caa71ecc83","fixed":"7e56651033584f16c019ff2a223c0f9417230f39","status":"affected"},{"type":"git","introduced":"424421a7f34c1222d20a6c279f13b9caa71ecc83","fixed":"815c31e67f3feb82926b823469c953af8d3b84f7","status":"affected"},{"type":"git","introduced":"424421a7f34c1222d20a6c279f13b9caa71ecc83","fixed":"ab0fb9ea282f5e2a8a15cefd6ad7b6652da7e95a","status":"affected"},{"type":"git","introduced":"424421a7f34c1222d20a6c279f13b9caa71ecc83","fixed":"f087903018e35d38b8932e18b010ee2e8699d1a1","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"6.3","status":"affected"},{"type":"semver","introduced":"0","fixed":"6.3","status":"unaffected"},{"type":"semver","introduced":"6.6.163","lastAffected":"6.6.*","status":"unaffected"},{"type":"semver","introduced":"6.12.117","lastAffected":"6.12.*","status":"unaffected"},{"type":"semver","introduced":"6.18.63","lastAffected":"6.18.*","status":"unaffected"},{"type":"semver","introduced":"7.3.4","lastAffected":"7.3.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"7.4-rc1","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"}],"references":[{"url":"https://git.kernel.org/stable/c/44346dd182cfac7e32575295ba0c2aa01d27566e","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/7e56651033584f16c019ff2a223c0f9417230f39","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/815c31e67f3feb82926b823469c953af8d3b84f7","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/ab0fb9ea282f5e2a8a15cefd6ad7b6652da7e95a","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/f087903018e35d38b8932e18b010ee2e8699d1a1","tags":[],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-99877","url":"https://www.cve.org/CVERecord?id=CVE-2026-99877","licence":"CVE Terms of Use","modified":"2026-11-30T13:17:53.580Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-99877","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-99877","licence":"Public domain","modified":"2026-11-30T14:20:22.100Z"}],"updatedAt":"2026-11-30T14:33:32.917Z","epss":{"score":0.00209,"percentile":0.11658,"date":"2026-12-01T12:00:22.000Z"}}