ARM: 9475/1: entry: use byte load for KASAN VMAP stack shadow
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 44e9a3bb76e5f2eecd374c8176b2c5163c8bb2e2 · < 77a1f6883dc6e837bb2cb30b9b02e2f94338e2c6| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
ARM: 9475/1: entry: use byte load for KASAN VMAP stack shadow
Commit 44e9a3bb76e5 ("ARM: 9430/1: entry: Do a dummy read from VMAP shadow") added a dummy read from the KASAN VMAP stack shadow in __switch_to(). The read uses ldr, but the KASAN shadow address is byte-granular and is not guaranteed to be word aligned.
ARMv5 faults unaligned word loads. With CONFIG_KASAN_VMALLOC and CONFIG_VMAP_STACK enabled, ARM926/VersatilePB crashes in __switch_to() with an alignment exception before reaching init.
Use ldrb for the dummy shadow access. The code only needs to fault in the shadow mapping if the stack shadow is missing, so a byte load is sufficient and matches the granularity of KASAN shadow memory.
From the CVE record · Linux
The Linux kernel’s ARM context-switch code can make an unaligned word load from KASAN VMAP stack shadow memory. With CONFIG_KASAN_VMALLOC and CONFIG_VMAP_STACK enabled, ARM926/VersatilePB crashes with an alignment exception before reaching init. The input does not describe an attacker path, authentication requirement, or user interaction.
Engineers running Linux kernels on ARM926/VersatilePB with CONFIG_KASAN_VMALLOC and CONFIG_VMAP_STACK enabled should check their builds; affected versions are not specified.