LoongArch: Enable exception fixup for specific ADE subcode
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
LoongArch: Enable exception fixup for specific ADE subcode
This patch allows the LoongArch BPF JIT to handle recoverable memory access errors generated by BPF_PROBE_MEM* instructions.
When a BPF program performs memory access operations, the instructions it executes may trigger ADEM exceptions. The kernel’s built-in BPF exception table mechanism (EX_TYPE_BPF) will generate corresponding exception fixup entries in the JIT compilation phase; however, the architecture-specific trap handling function needs to proactively call the common fixup routine to achieve exception recovery.
do_ade(): fix EX_TYPE_BPF memory access exceptions for BPF programs, ensure safe execution.
Relevant test cases: illegal address access tests in module_attach and subprogs_extable of selftests/bpf.
From the CVE record · Linux
The LoongArch BPF JIT does not properly recover from certain memory access exceptions triggered by BPF_PROBE_MEM* instructions. A BPF program accessing an illegal address can trigger an exception that is not fixed up. The input does not specify whether an attacker needs authentication, network access, or user interaction.
Engineers running Linux kernels on LoongArch should check whether their kernel includes the fix; affected versions are not specified.