CVE-2025-71195: dmaengine: xilinx: xdma: Fix regmap max_register
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
dmaengine: xilinx: xdma: Fix regmap max_register
The max_register field is assigned the size of the register memory region instead of the offset of the last register.
The result is that reading from the regmap via debugfs can cause a segmentation fault:
tail /sys/kernel/debug/regmap/xdma.1.auto/registers
Unable to handle kernel paging request at virtual address ffff800082f70000
Mem abort info:
ESR = 0x0000000096000007
EC = 0x25: DABT (current EL), IL = 32 bits
SET = 0, FnV = 0
EA = 0, S1PTW = 0
FSC = 0x07: level 3 translation fault
[...]
Call trace: regmap_mmio_read32le+0x10/0x30 _regmap_bus_reg_read+0x74/0xc0 _regmap_read+0x68/0x198 regmap_read+0x54/0x88 regmap_read_debugfs+0x140/0x380 regmap_map_read_file+0x30/0x48 full_proxy_read+0x68/0xc8 vfs_read+0xcc/0x310 ksys_read+0x7c/0x120 __arm64_sys_read+0x24/0x40 invoke_syscall.constprop.0+0x64/0x108 do_el0_svc+0xb0/0xd8 el0_svc+0x38/0x130 el0t_64_sync_handler+0x120/0x138 el0t_64_sync+0x194/0x198 Code: aa1e03e9 d503201f f9400000 8b214000 (b9400000) ---[ end trace 0000000000000000 ]---
note: tail[1217] exited with irqs disabled
note: tail[1217] exited with preempt_count 1
Segmentation fault
The Linux kernel CVE team has assigned CVE-2025-71195 to this issue.
Affected and fixed versions
===========================
Issue introduced in 6.3 with commit 17ce252266c7f016ece026492c45838f852ddc79 and fixed in 6.6.122 with commit df8a131a41ff6202d47f59452735787f2b71dd2d Issue introduced in 6.3 with commit 17ce252266c7f016ece026492c45838f852ddc79 and fixed in 6.12.67 with commit 606ea969e78295407f4bf06aa0e272fe59897184 Issue introduced in 6.3 with commit 17ce252266c7f016ece026492c45838f852ddc79 and fixed in 6.18.7 with commit 5e7ad329d259cf5bed7530d6d2525bcf7cb487a1 Issue introduced in 6.3 with commit 17ce252266c7f016ece026492c45838f852ddc79 and fixed in 6.19-rc6 with commit c7d436a6c1a274c1ac28d5fb3b8eb8f03b6d0e10
Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community.
Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at
https://cve.org/CVERecord/?id=CVE-2025-71195
will be updated if fixes are backported, please check that for the most up to date information about this issue.
Affected files
==============
The file(s) affected by this issue are:
drivers/dma/xilinx/xdma-regs.h
drivers/dma/xilinx/xdma.c
Mitigation
==========
The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits:
https://git.kernel.org/stable/c/df8a131a41ff6202d47f59452735787f2b71dd2d https://git.kernel.org/stable/c/606ea969e78295407f4bf06aa0e272fe59897184 https://git.kernel.org/stable/c/5e7ad329d259cf5bed7530d6d2525bcf7cb487a1 https://git.kernel.org/stable/c/c7d436a6c1a274c1ac28d5fb3b8eb8f03b6d0e10