diff options
author | Keir Fraser <keirf@google.com> | 2025-03-26 14:04:47 +0300 |
---|---|---|
committer | Catalin Marinas <catalin.marinas@arm.com> | 2025-03-28 22:19:31 +0300 |
commit | a13bfa4fe0d6949cea14718df2d1fe84c38cd113 (patch) | |
tree | 7ee1832ece88111fb1275631fa6116e174ac880a /scripts/generate_rust_target.rs | |
parent | 89f43e1ce6f60d4f44399059595ac47f7a90a393 (diff) | |
download | linux-a13bfa4fe0d6949cea14718df2d1fe84c38cd113.tar.xz |
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.
Fixes: 2de451a329cf ("KVM: arm64: Add handler for MOPS exceptions")
Cc: <stable@vger.kernel.org> # 6.12.x
Cc: Kristina Martsenko <kristina.martsenko@arm.com>
Cc: Will Deacon <will@kernel.org>
Cc: stable@vger.kernel.org
Reviewed-by: Marc Zyngier <maz@kernel.org>
Signed-off-by: Keir Fraser <keirf@google.com>
Reviewed-by: Kristina Martšenko <kristina.martsenko@arm.com>
Acked-by: Mark Rutland <mark.rutland@arm.com>
Link: https://lore.kernel.org/r/20250326110448.3792396-1-keirf@google.com
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Diffstat (limited to 'scripts/generate_rust_target.rs')
0 files changed, 0 insertions, 0 deletions