arm64: mops: Do not dereference src reg for a set operation
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:
arm64: mops: Do not dereference src reg for a set operation
The source register is not used for SET* and reading it can result in a UBSAN out-of-bounds array access error, specifically when the MOPS exception is taken from a SET* sequence with XZR (reg 31) as the source. Architecturally this is the only case where a src/dst/size field in the ESR can be reported as 31.
Prior to 2de451a329cf662b the code in do_el0_mops() was benign as the use of pt_regs_read_reg() prevented the out-of-bounds access.
From the CVE record · Linux
The Linux kernel’s arm64 MOPS exception handler can read past an array when a SET* sequence uses XZR as its source register. This can trigger a UBSAN out-of-bounds access error when the exception is taken from that sequence. The input does not specify authentication requirements or further impact.
Engineers running Linux kernels with arm64 MOPS support should check their kernel; affected versions are not specified.