Vulnerability · Published Jul 4, 2025 · Assigned by Linux

CVE-2025-38224can: kvaser_pciefd: refine error prone echo_skb_max handling logic

High 7.8

In plain English

A high-severity security flaw in Linux from Linux. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.2% (higher than 7% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.1)7.8High
Exploit odds (30 days)0.2%top 93.1% of all CVEs
Exploited in the wildNo reportsnot in CISA KEV
Attack toolingNoneno public tooling known

Official description

In the Linux kernel, the following vulnerability has been resolved: can: kvaser_pciefd: refine error prone echo_skb_max handling logic echo_skb_max should define the supported upper limit of echo_skb[] allocated inside the netdevice's priv. The corresponding size value provided by this driver to alloc_candev() is KVASER_PCIEFD_CAN_TX_MAX_COUNT which is 17. But later echo_skb_max is rounded up to the nearest power of two (for the max case, that would be 32) and the tx/ack indices calculated further during tx/rx may exceed the upper array boundary. Kasan reported this for the ack case inside kvaser_pciefd_handle_ack_packet(), though the xmit function has actually caught the same thing earlier. BUG: KASAN: slab-out-of-bounds in kvaser_pciefd_handle_ack_packet+0x2d7/0x92a drivers/net/can/kvaser_pciefd.c:1528 Read of size 8 at addr ffff888105e4f078 by task swapper/4/0 CPU: 4 UID: 0 PID: 0 Comm: swapper/4 Not tainted 6.15.0 #12 PREEMPT(voluntary) Call Trace: <IRQ> dump_stack_lvl lib/dump_stack.c:122 print_report mm/kasan/report.c:521 kasan_report mm/kasan/report.c:634 kvaser_pciefd_handle_ack_packet drivers/net/can/kvaser_pciefd.c:1528 kvaser_pciefd_read_packet drivers/net/can/kvaser_pciefd.c:1605 kvaser_pciefd_read_buffer drivers/net/can/kvaser_pciefd.c:1656 kvaser_pciefd_receive_irq drivers/net/can/kvaser_pciefd.c:1684 kvaser_pciefd_irq_handler drivers/net/can/kvaser_pciefd.c:1733 __handle_irq_event_percpu kernel/irq/handle.c:158 handle_irq_event kernel/irq/handle.c:210 handle_edge_irq kernel/irq/chip.c:833 __common_interrupt arch/x86/kernel/irq.c:296 common_interrupt arch/x86/kernel/irq.c:286 </IRQ> Tx max count definitely matters for kvaser_pciefd_tx_avail(), but for seq numbers' generation that's not the case - we're free to calculate them as would be more convenient, not taking tx max count into account. The only downside is that the size of echo_skb[] should correspond to the max seq number (not tx max count), so in some situations a bit more memory would be consumed than could be. Thus make the size of the underlying echo_skb[] sufficient for the rounded max tx value. Found by Linux Verification Center (linuxtesting.org) with Syzkaller.

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
Debian:13linux6.12.35-1DEBIAN-CVE-2025-38224
Debian:14linux6.12.35-1DEBIAN-CVE-2025-38224
Ubuntu:22.04:LTSlinux-allwinner-5.19no fix listedUBUNTU-CVE-2025-38224
Ubuntu:22.04:LTSlinux-aws-5.19no fix listedUBUNTU-CVE-2025-38224
Ubuntu:24.04:LTSlinux-aws-6.146.14.0-1015.15~24.04.1USN-7833-3
Ubuntu:24.04:LTSlinux-aws-6.146.14.0-1015.15~24.04.1UBUNTU-CVE-2025-38224
Ubuntu:22.04:LTSlinux-aws-6.2no fix listedUBUNTU-CVE-2025-38224
Ubuntu:22.04:LTSlinux-aws-6.5no fix listedUBUNTU-CVE-2025-38224
Ubuntu:22.04:LTSlinux-azure-5.19no fix listedUBUNTU-CVE-2025-38224
Ubuntu:24.04:LTSlinux-azure-6.11no fix listedUBUNTU-CVE-2025-38224
Ubuntu:24.04:LTSlinux-azure-6.146.14.0-1014.14~24.04.1USN-7834-1
Ubuntu:24.04:LTSlinux-azure-6.146.14.0-1014.14~24.04.1UBUNTU-CVE-2025-38224
Ubuntu:22.04:LTSlinux-azure-6.2no fix listedUBUNTU-CVE-2025-38224
Ubuntu:22.04:LTSlinux-azure-6.5no fix listedUBUNTU-CVE-2025-38224
Ubuntu:22.04:LTSlinux-azure-fde-5.19no fix listedUBUNTU-CVE-2025-38224
Ubuntu:22.04:LTSlinux-azure-fde-6.2no fix listedUBUNTU-CVE-2025-38224
Ubuntu:24.04:LTSlinux-azure-nvidia-6.146.14.0-1007.7USN-7834-1
Ubuntu:22.04:LTSlinux-gcp-5.19no fix listedUBUNTU-CVE-2025-38224
Ubuntu:24.04:LTSlinux-gcp-6.11no fix listedUBUNTU-CVE-2025-38224
Ubuntu:24.04:LTSlinux-gcp-6.146.14.0-1018.19~24.04.1USN-7833-4
Ubuntu:24.04:LTSlinux-gcp-6.146.14.0-1018.19~24.04.1UBUNTU-CVE-2025-38224
Ubuntu:22.04:LTSlinux-gcp-6.2no fix listedUBUNTU-CVE-2025-38224
Ubuntu:22.04:LTSlinux-gcp-6.5no fix listedUBUNTU-CVE-2025-38224
Ubuntu:22.04:LTSlinux-hwe-5.19no fix listedUBUNTU-CVE-2025-38224
Ubuntu:24.04:LTSlinux-hwe-6.11no fix listedUBUNTU-CVE-2025-38224
Ubuntu:24.04:LTSlinux-hwe-6.146.14.0-34.34~24.04.1USN-7856-1
Ubuntu:22.04:LTSlinux-hwe-6.2no fix listedUBUNTU-CVE-2025-38224
Ubuntu:22.04:LTSlinux-hwe-6.5no fix listedUBUNTU-CVE-2025-38224
Ubuntu:22.04:LTSlinux-intel-iot-realtimeno fix listedUBUNTU-CVE-2025-38224
Ubuntu:22.04:LTSlinux-lowlatency-hwe-5.19no fix listedUBUNTU-CVE-2025-38224
Ubuntu:24.04:LTSlinux-lowlatency-hwe-6.11no fix listedUBUNTU-CVE-2025-38224
Ubuntu:22.04:LTSlinux-lowlatency-hwe-6.2no fix listedUBUNTU-CVE-2025-38224
Ubuntu:22.04:LTSlinux-lowlatency-hwe-6.5no fix listedUBUNTU-CVE-2025-38224
Ubuntu:22.04:LTSlinux-nvidia-6.2no fix listedUBUNTU-CVE-2025-38224
Ubuntu:22.04:LTSlinux-nvidia-6.5no fix listedUBUNTU-CVE-2025-38224
Ubuntu:22.04:LTSlinux-oem-5.17no fix listedUBUNTU-CVE-2025-38224
Ubuntu:22.04:LTSlinux-oem-6.0no fix listedUBUNTU-CVE-2025-38224
Ubuntu:22.04:LTSlinux-oem-6.1no fix listedUBUNTU-CVE-2025-38224
Ubuntu:24.04:LTSlinux-oem-6.146.14.0-1014.14UBUNTU-CVE-2025-38224
Ubuntu:24.04:LTSlinux-oem-6.146.14.0-1014.14USN-7833-1
Ubuntu:22.04:LTSlinux-oem-6.5no fix listedUBUNTU-CVE-2025-38224
Ubuntu:24.04:LTSlinux-oracle-6.146.14.0-1015.15~24.04.1UBUNTU-CVE-2025-38224
Ubuntu:24.04:LTSlinux-oracle-6.146.14.0-1015.15~24.04.1USN-7833-1
Ubuntu:22.04:LTSlinux-oracle-6.5no fix listedUBUNTU-CVE-2025-38224
Ubuntu:24.04:LTSlinux-raspi-realtimeno fix listedUBUNTU-CVE-2025-38224
Ubuntu:22.04:LTSlinux-realtimeno fix listedUBUNTU-CVE-2025-38224
Ubuntu:24.04:LTSlinux-realtimeno fix listedUBUNTU-CVE-2025-38224
Ubuntu:22.04:LTSlinux-riscvno fix listedUBUNTU-CVE-2025-38224
Ubuntu:24.04:LTSlinux-riscvno fix listedUBUNTU-CVE-2025-38224
Ubuntu:22.04:LTSlinux-riscv-5.19no fix listedUBUNTU-CVE-2025-38224
Ubuntu:24.04:LTSlinux-riscv-6.146.14.0-34.34.1~24.04.1UBUNTU-CVE-2025-38224
Ubuntu:22.04:LTSlinux-riscv-6.5no fix listedUBUNTU-CVE-2025-38224
Ubuntu:22.04:LTSlinux-starfive-5.19no fix listedUBUNTU-CVE-2025-38224
Ubuntu:22.04:LTSlinux-starfive-6.2no fix listedUBUNTU-CVE-2025-38224
Ubuntu:22.04:LTSlinux-starfive-6.5no fix listedUBUNTU-CVE-2025-38224

Affected products (as reported)

VendorProductVersions
Linux Linux 352fbde14177d608a54120b6ff559ce5b3cf6238 – before d8a054b6e6824a8b52c3977ebd38c9583a63efac8256e0ca601051933e9395746817f3801fa9a6bf – before a6550c9aa11e2f57f9cdaa6249cdd44d446be8748256e0ca601051933e9395746817f3801fa9a6bf – before 54ec8b08216f3be2cc98b33633d3c8ea79749895f14512f3ee09cda986191c8dd7f54972afa2c7636.12.31 – before 6.12.356.14.9 – before 6.15
Linux Linux 6.15

References