CVE-2026-105418: NULL pointer dereference in SocketCAN getsockopt/setsockopt on an unbound socket

Published Dec 2, 2026
·
Updated

The SocketCAN socket layer in subsys/net/lib/sockets/socketscan.c dereferences a NULL device pointer when a NETSOLCANRAW socket option is read or written on a CAN socket that has not yet been bound. A freshly created CAN socket has interface index -1. netcontextgetiface() therefore returns NULL, netifgetdevice() returns NULL, and cansocksetsockoptvmeth() / cansockgetsockoptvmeth() read dev->api without a check and then call through the resulting pointer.

Any thread that can create a CAN socket can trigger the dereference by calling setsockopt() or getsockopt() at level SOLCANRAW before bind(). That ordering is common in code ported from Linux. Because zsocksocket, zsocksetsockopt and zsockgetsockopt are system calls, an unprivileged user-mode thread on a CONFIGUSERSPACE build with CONFIGNETSOCKETSCAN enabled can make the kernel perform the faulting access in supervisor mode.

The result is a kernel fatal error that halts or resets the system: a local denial of service across the user/kernel boundary. On targets without NULL-pointer fault detection, the kernel instead makes an indirect call through a value read from low memory, which the attacker does not control. Builds without CONFIGUSERSPACE gain no privilege boundary from this defect. The fix makes both socket-option handlers fail with ENODEV until the socket is bound to a CAN interface.

Affected Software

1 affected component
Zephyr Project Zephyr

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Compensating control

    In both CAN socket-option handlers, return ENODEV when the socket is unbound, before dereferencing the device pointer.

Event History

Dec 2, 2026
CVE Published
via MITRE·05:20 AM
Data Sourced
via MITRE·05:20 AM
DescriptionSeverityWeakness

Frequently Asked Questions

1

Which deployments have an unprivileged user/kernel-boundary denial-of-service risk?

The described cross-boundary risk applies to CONFIG_USERSPACE builds with CONFIG_NET_SOCKETS_CAN enabled, where an unprivileged user-mode thread can create and operate on CAN sockets. More generally, any thread able to create a CAN socket can trigger the fault.

2

What operation triggers the failure?

An attacker creates a CAN socket and calls getsockopt() or setsockopt() at the SOL_CAN_RAW level before binding the socket. A newly created socket has no associated interface, causing the device pointer used by the socket-option handlers to be NULL.

3

What can be done if patching is not immediately possible?

Ensure applications bind CAN sockets before reading or writing SOL_CAN_RAW socket options. Where CAN sockets are not required, disabling CONFIG_NET_SOCKETS_CAN removes the configuration identified as exposing this path.

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