In the Linux kernel, the following vulnerability has been resolved: ARM: 9491/1: alignment: restore uaccess state on emulation fault The alignment handlers enable access to user memory while emulating unaligned instructions. If a checked access faults, its exception table fixup jumps to the handler's fault label and bypasses uaccess_restore(). This leaves DOMAIN_USER as DOMAIN_CLIENT with SW domain PAN, or leaves TTBR0 page table walks enabled with TTBR0 PAN, while the fault is handled. An ARM926 QEMU test using LDMIA across an unmapped page boundary reports DOMAIN_USER=1 at TYPE_FAULT before this change and DOMAIN_USER=0 after it. SW domain PAN is the default on ARMv5, ARMv6, and non-LPAE ARMv7 builds. Keep the saved uaccess state at function scope and track whether it was saved. Restore it at the fault label only when needed. Paths that did not enable user access continue to skip the restore.
https://git.kernel.org/stable/c/80dafbcb705cead6d25cb821cf29c47da8860c8c
https://git.kernel.org/stable/c/69e837526d62c738290d624c79c8ee11cd4d8459
https://git.kernel.org/stable/c/5928e61bc92140d235fe531b5d9554397b90bd84
https://git.kernel.org/stable/c/44d29cd88e81ac4a972913dc660bc93671574a2f
https://git.kernel.org/stable/c/30b6f208dca0dc55bfdf160dca7555507470df55
https://git.kernel.org/stable/c/20b0685790775cd5152288405226bc8282a5f756
https://git.kernel.org/stable/c/06d167658ab538cfc9653fda92405b651e1c095c
https://git.kernel.org/stable/c/00ff2aeae91f74559a5464a0ae26b4b3fc2f8e54