{"id":"CVE-2026-105418","sourceIdentifier":"vulnerabilities@zephyrproject.org","published":"2026-12-02T06:17:21.537","lastModified":"2026-12-02T06:17:24.140","vulnStatus":"Awaiting Analysis","cveTags":[],"descriptions":[{"lang":"en","value":"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.\n\nAny 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.\n\nThe 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."}],"affected":[{"source":"vulnerabilities@zephyrproject.org","affectedData":[{"vendor":"zephyrproject","product":"zephyr","defaultStatus":"unaffected","collectionURL":"https://github.com/zephyrproject-rtos/zephyr","packageName":"zephyr","programFiles":["subsys/net/lib/sockets/sockets_can.c"],"programRoutines":[{"name":"can_sock_getsockopt_vmeth"},{"name":"can_sock_setsockopt_vmeth"}],"versions":[{"version":"2.0.0","lessThan":"4.3.2","versionType":"semver","status":"affected"},{"version":"4.4.0","lessThan":"4.5.0","versionType":"semver","status":"affected"}]}]}],"metrics":{"cvssMetricV31":[{"source":"vulnerabilities@zephyrproject.org","type":"Secondary","cvssData":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","baseScore":5.5,"baseSeverity":"MEDIUM","attackVector":"LOCAL","attackComplexity":"LOW","privilegesRequired":"LOW","userInteraction":"NONE","scope":"UNCHANGED","confidentialityImpact":"NONE","integrityImpact":"NONE","availabilityImpact":"HIGH"},"exploitabilityScore":1.8,"impactScore":3.6}]},"weaknesses":[{"source":"vulnerabilities@zephyrproject.org","type":"Secondary","description":[{"lang":"en","value":"CWE-476"}]}],"references":[{"url":"https://github.com/zephyrproject-rtos/zephyr/commit/c7bb91ec09ed58dac9b04e4fb03a8b767f17aed0","source":"vulnerabilities@zephyrproject.org"},{"url":"https://github.com/zephyrproject-rtos/zephyr/security/advisories/GHSA-r5vr-3m56-grq2","source":"vulnerabilities@zephyrproject.org"}]}