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

Published Jul 4, 2025
·
Updated

In the Linux kernel, the following vulnerability has been resolved:

can: kvaserpciefd: refine error prone echoskbmax handling logic

echoskbmax should define the supported upper limit of echoskb[] allocated inside the netdevice's priv. The corresponding size value provided by this driver to alloccandev() is KVASERPCIEFDCANTXMAXCOUNT which is 17.

But later echoskbmax 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 kvaserpciefdhandleackpacket(), though the xmit function has actually caught the same thing earlier.

BUG: KASAN: slab-out-of-bounds in kvaserpciefdhandleackpacket+0x2d7/0x92a drivers/net/can/kvaserpciefd.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> dumpstacklvl lib/dumpstack.c:122 printreport mm/kasan/report.c:521 kasanreport mm/kasan/report.c:634 kvaserpciefdhandleackpacket drivers/net/can/kvaserpciefd.c:1528 kvaserpciefdreadpacket drivers/net/can/kvaserpciefd.c:1605 kvaserpciefdreadbuffer drivers/net/can/kvaserpciefd.c:1656 kvaserpciefdreceiveirq drivers/net/can/kvaserpciefd.c:1684 kvaserpciefdirqhandler drivers/net/can/kvaserpciefd.c:1733 handleirqeventpercpu kernel/irq/handle.c:158 handleirqevent kernel/irq/handle.c:210 handleedgeirq kernel/irq/chip.c:833 commoninterrupt arch/x86/kernel/irq.c:296 commoninterrupt arch/x86/kernel/irq.c:286 </IRQ>

Tx max count definitely matters for kvaserpciefdtxavail(), 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 echoskb[] 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 echoskb[] sufficient for the rounded max tx value.

Found by Linux Verification Center (linuxtesting.org) with Syzkaller.

Affected Software

5 affected components
Linux Kernel
Linux Linux kernel>=6.12.31<6.12.35
Linux Linux kernel>=6.14.9<6.15
Linux Linux kernel>=6.15.1<6.15.4
Linux Linux kernel=6.15

Event History

Jul 4, 2025
CVE Published
via MITRE·01:37 PM
Data Sourced
via MITRE·01:37 PM
DescriptionSeverity
Data Sourced
via NVD·02:15 PM
RemedyDescriptionSeverityWeaknessAffected Software

Frequently Asked Questions

1

What is the severity of CVE-2025-38224?

CVE-2025-38224 is considered to have a moderate severity due to potential impacts on kernel performance.

2

How do I fix CVE-2025-38224?

To resolve CVE-2025-38224, upgrade to the latest version of the Linux kernel where the vulnerability has been addressed.

3

Which versions of the Linux kernel are affected by CVE-2025-38224?

CVE-2025-38224 affects specific versions of the Linux kernel prior to its patch; users should check their kernel version for vulnerabilities.

4

What are the potential impacts of CVE-2025-38224?

The potential impacts of CVE-2025-38224 may include degraded system performance and increased error rates in the affected network operations.

5

Is there a workaround for CVE-2025-38224?

There are no specific workarounds for CVE-2025-38224; updating the kernel is the recommended solution.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203