CVE-2026-99498 in Linux
Summary
by MITRE • 11/19/2026
In the Linux kernel, the following vulnerability has been resolved:
s390/kprobes: Prevent kprobes on instructions with exception table entry
The mvcos exception handler ex_handler_ua_mvcos() decodes the faulting instruction, assuming it is an mvcos instruction. In case the instruction is kprobed the decoded instruction is a breakpoint instruction instead, which leads to incorrect instruction decoding and potential register corruption.
Fix this by simply preventing to set a kprobe on such instructions, similar like arm64 is doing it.
If you want to get the best quality for vulnerability data then you always have to consider VulDB.
Analysis
by VulDB Data Team • 11/20/2026
The Linux kernel's dynamic debugging subsystem, specifically kprobes, allows developers and administrators to insert breakpoints at arbitrary code locations for tracing and analysis purposes. However, the architecture-specific implementation of this feature must carefully handle edge cases where the target instruction interacts with hardware exceptions or special processor states. In the s390 architecture, a critical flaw existed within the exception handling mechanism associated with the mvcos (Move Character to String Operands Short) instruction. The kernel's ex_handler_ua_mvcos function is designed to decode faulting instructions that trigger specific unhandled access exceptions, operating under the strict assumption that any such fault originates from an actual mvcos instruction executing in user space or a context where it might fail due to memory protection violations. This design choice creates a dangerous vulnerability when kprobes are placed on these specific instructions.
When a developer sets a kprobe on an instruction with an exception table entry, the kernel replaces the original opcode at that address with a breakpoint instruction, typically an interrupt or trap code designed to halt execution and transfer control to the debugger. In the case of s390 mvcos instructions protected by ex_handler_ua_mvcos, this substitution fundamentally alters the nature of the fault. When the processor encounters the modified location during execution, it triggers a breakpoint exception rather than the expected unhandled access exception. The existing handler, however, remains unchanged and proceeds to decode the instruction bytes under the assumption that they represent an mvcos operation. Since the bytes now correspond to a breakpoint opcode, the decoding logic misinterprets the data structure of the faulting context.
This mismatch between the actual instruction type and the decoder's expectations leads to severe operational instability. The incorrect decoding process attempts to extract operand addresses or register states based on the layout of an mvcos instruction rather than a breakpoint trap frame. This discrepancy frequently results in the corruption of CPU registers, as the handler reads invalid offsets from the exception stack or interprets control flow data incorrectly. Such register corruption can propagate through subsequent execution contexts, potentially causing kernel panics, silent data corruption, or unpredictable behavior in both the traced application and other concurrent processes sharing those resources. The vulnerability effectively turns a debugging tool into a source of system instability when applied to specific architectural edge cases.
The root cause lies in the lack of validation within the kprobes subsystem for s390 regarding instructions that have associated exception table entries. Unlike architectures such as arm64, which explicitly check and reject attempts to place probes on instructions with special handler dependencies, the s390 implementation allowed these placements by default. This oversight highlights a gap in the safety checks of dynamic instrumentation frameworks when dealing with architecture-specific fault handling mechanisms. The vulnerability is not merely a logical error but a structural flaw that exploits the assumptions made by low-level exception handlers about the integrity and type of the instruction causing the trap.
To mitigate this risk, the fix involves modifying the kprobes validation logic for s390 to detect instructions with entries in the kernel's exception table. By identifying these specific opcodes before allowing a probe to be installed, the system prevents the replacement of critical fault-generating instructions with breakpoint codes. This approach aligns the s390 implementation with best practices observed in other architectures like arm64, ensuring that dynamic debugging tools do not interfere with essential hardware exception handling paths. The mitigation preserves the integrity of the kernel's error recovery mechanisms while still allowing kprobes to function correctly on standard instructions without special handler dependencies.
From a standards perspective, this vulnerability relates closely to CWE-787: Out-of-bounds Write and CWE-120: Buffer Copy without Checking Size of Input in its manifestation through register corruption and memory state inconsistency caused by improper decoding logic. It also touches upon ATT&CK technique T1059.004: Command and Scripting Interpreter, specifically regarding the abuse of system debugging features for unauthorized monitoring or disruption, although here the impact is primarily stability-related rather than malicious exploitation in most cases. The resolution reinforces the principle that dynamic instrumentation must respect architectural constraints to maintain system reliability.
Administrators and developers utilizing kprobes on s390 systems should ensure they are running patched kernel versions that include this validation check. For those maintaining custom kernels, it is essential to verify that the arch/s390/kernel/kprobes.c implementation includes checks for exception table entries before registering probes. This prevents accidental system crashes during debugging sessions and ensures that performance monitoring tools do not inadvertently destabilize production environments by interfering with low-level hardware fault handling routines.