Skip to main content

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

CVE ID :CVE-2026-105418
Published : Dec. 2, 2026, 6:17 a.m. | 21 minutes ago
Description :The SocketCAN socket layer in subsys/net/lib/sockets/sockets_can.c dereferences a NULL device pointer when a NET_SOL_CAN_RAW 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. net_context_get_iface() therefore returns NULL, net_if_get_device() returns NULL, and can_sock_setsockopt_vmeth() / can_sock_getsockopt_vmeth() 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 SOL_CAN_RAW before bind(). That ordering is common in code ported from Linux. Because zsock_socket, zsock_setsockopt and zsock_getsockopt are system calls, an unprivileged user-mode thread on a CONFIG_USERSPACE build with CONFIG_NET_SOCKETS_CAN 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 CONFIG_USERSPACE 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.
Severity: 5.5 | MEDIUM
Visit the link for more details, such as CVSS details, affected products, timeline, and more...

About

Kenya Education Network CERT(KENET-CERT) is a Cybersecurity Emergency Response Team and Co-ordination Center operated by the National Research and Education Network of Kenya. KENET-CERT coordination center promotes awareness on cybersecurity incidences as well as coordinates and assists member institutions in responding effectively to cyber security threats and incidences. KENET-CERT works closely with Kenya's National CIRT coordination center (CIRT/CC) as a sector CIRT for the academic institutions. KENET promotes use of ICT in Teaching, Learning and Research in Higher Education Institutions in Kenya. KENET aims to interconnect all the Universities, Tertiary and Research Institutions in Kenya by setting up a cost effective and sustainable private network with high speed access to the global Internet. KENET also facilitates electronic communication among students and faculties in member institutions, share learning and teaching resources by collaboration in Research and Development of Educational content.