arm64: probes: Fix uprobes for big-endian kernels
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 9842ceae9fa8deae141533d52a6ead7666962c09 · < 8165bf83b8a64be801d59cd2532b0d1ffed74d00| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
arm64: probes: Fix uprobes for big-endian kernels
The arm64 uprobes code is broken for big-endian kernels as it doesn't convert the in-memory instruction encoding (which is always little-endian) into the kernel's native endianness before analyzing and simulating instructions. This may result in a few distinct problems:
* The kernel may may erroneously reject probing an instruction which can safely be probed.
* The kernel may erroneously erroneously permit stepping an instruction out-of-line when that instruction cannot be stepped out-of-line safely.
* The kernel may erroneously simulate instruction incorrectly dur to interpretting the byte-swapped encoding.
The endianness mismatch isn't caught by the compiler or sparse because:
* The arch_uprobe::{insn,ixol} fields are encoded as arrays of u8, so the compiler and sparse have no idea these contain a little-endian 32-bit value. The core uprobes code populates these with a memcpy() which similarly does not handle endianness.
From the CVE record · Linux
On big-endian arm64 kernels, uprobes interprets instruction bytes without converting them to the kernel’s native endianness. When a uprobe is placed on an affected instruction, the kernel may reject a safe probe, permit unsafe out-of-line stepping, or simulate the instruction incorrectly. The input does not establish whether an unprivileged user can configure the required probe.
Operators running Linux kernels on big-endian arm64 systems should check their kernel vendor’s advisory for affected versions.