Skip to content

zephyr

NULL pointer dereference in SocketCAN getsockopt/setsockopt on an unbound socket

CVE-2026-105418Published 2 Dec 2026, 05:20 UTC

Real-world risk

1.7/ 10Low

Routine

PreliminaryFrom the CVSS vector only · confidence low

CVSS

5.5

scored by the vendor (CNA), CVSS 3.1

In plain words

No plain-language summary yet. The original description is below.

Original description (from zephyr)

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.

Am I affected?

ProductAffected versions (from the sources)Fixed in
zephyrNiche>= 2.0.0, < 4.3.2; >= 4.4.0, < 4.5.04.3.2, 4.5.0

What to do

Update to a fixed version: 4.3.2, 4.5.0.

Why this score

FactorValueEvidence×
ImpactDenial of serviceCrash or resource exhaustion onlyFrom the CVSS vector0.40
Attacker positionLocalMust already run code or have a shell on the machineFrom the CVSS vector0.50
Privileges neededLowA real low-privileged accountFrom the CVSS vector1.00
Victim interactionNoneNothingFrom the CVSS vector1.00
ConfigurationDefaultOut-of-the-box installs are vulnerableFrom the CVSS vector1.00
ReliabilityReliableDeterministic: injection, logic bug, path traversalFrom the CVSS vector1.00

Threat level T1: Nothing known (× 0.85)

The default for a new disclosure

EPSS 0.1% chance of exploitation in 30 days (percentile 4), as of 2026-12-02.

The arithmetic
  1. Prerequisites multiplied together0.500
  2. Threat T1: Nothing known0.850
  3. 10 × impact 0.4 × prerequisites 0.5 × threat 0.851.700
  4. Rounded to one decimal between 0.1 and 101.7

How the score works

Exploitation and evidence timeline

  1. 2 Dec 2026 Published
  2. 2 Dec 2026 Risk 1.7 (cvss fallback)

Weakness

CWE-476

References

Get alerts for zephyr

Free email or text alerts when a vulnerability in zephyr reaches risk 8 or higher. Nothing else.