{"schemaVersion":4,"id":"CVE-2026-105418","aliases":[],"status":"published","duplicateOf":null,"title":"NULL pointer dereference in SocketCAN getsockopt/setsockopt on an unbound socket","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.\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.","dates":{"published":"2026-12-02T05:20:32.362Z","modified":"2026-12-02T05:20:32.362Z","reserved":null,"kevAdded":[],"kevDue":[]},"cvss":{"headline":{"score":5.5,"severity":"medium","version":"3.1","versionLabel":"v3.1","source":"CVE.org","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","computed":false,"selection":"backend-summary"},"metrics":[{"version":"3.1","versionLabel":"v3.1","source":"CVE.org","score":5.5,"severity":"medium","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","exploitability":null,"impact":null,"computed":false},{"version":"3.1","versionLabel":"v3.1","source":"NVD","score":5.5,"severity":"medium","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","exploitability":null,"impact":null,"computed":false}]},"epss":{"probability":0.0015,"percentile":0.04365,"severity":"low","asOf":"2026-12-04T00:00:00.000Z","change":{"pp":null,"baselineDate":null,"baselineScore":null},"history":[{"date":"2026-12-02T00:00:00.000Z","score":0.0015,"percentile":null},{"date":"2026-12-03T00:00:00.000Z","score":0.0015,"percentile":null},{"date":"2026-12-04T00:00:00.000Z","score":0.0015,"percentile":0.04365}],"last30":[{"date":"2026-12-02T00:00:00.000Z","score":0.0015,"percentile":null},{"date":"2026-12-03T00:00:00.000Z","score":0.0015,"percentile":null},{"date":"2026-12-04T00:00:00.000Z","score":0.0015,"percentile":0.04365}]},"kev":{"state":"not-listed","entries":[],"listedCount":0,"totalCatalogs":3,"catalogs":[{"source":"cisa","label":"CISA","listed":false,"entry":null},{"source":"enisa","label":"ENISA","listed":false,"entry":null},{"source":"circl","label":"CIRCL","listed":false,"entry":null}]},"ransomware":{"state":"none-recorded","sources":[]},"exploits":[],"exploitCount":0,"weaknesses":[{"id":"CWE-476","name":"NULL Pointer Dereference","description":"The product dereferences a pointer that it expects to be valid but is NULL.","type":"weakness","status":"Stable","abstraction":"Base","likelihoodOfExploit":"Medium","url":"https://cwe.mitre.org/data/definitions/476.html"}],"affected":[{"vendor":"zephyrproject","product":"zephyr","name":"zephyr","label":"zephyr","ecosystem":null,"cpePart":"a","purl":null,"purlType":null,"versions":[{"text":"≥ 2.0.0, < 4.3.2","noFixRecorded":false,"fixedIn":null,"bounds":{"kind":"range","start":"2.0.0","startInclusive":true,"end":"4.3.2","endInclusive":false}},{"text":"≥ 4.4.0, < 4.5.0","noFixRecorded":false,"fixedIn":null,"bounds":{"kind":"range","start":"4.4.0","startInclusive":true,"end":"4.5.0","endInclusive":false}}],"versionsText":"≥ 2.0.0, < 4.3.2 | ≥ 4.4.0, < 4.5.0","eol":null,"hubHref":"/vendor/zephyrproject/zephyr"}],"affectedCount":1,"eol":{"hasEol":false,"count":0},"references":[{"url":"https://github.com/zephyrproject-rtos/zephyr/commit/c7bb91ec09ed58dac9b04e4fb03a8b767f17aed0","label":"github.com/zephyrproject-rtos/zephyr/commit/c7bb91ec09ed58dac9b04e4fb03a8b767f17aed0","hostname":"github.com","tags":["Patch"]},{"url":"https://github.com/zephyrproject-rtos/zephyr/security/advisories/GHSA-r5vr-3m56-grq2","label":"github.com/zephyrproject-rtos/zephyr/security/advisories/GHSA-r5vr-3m56-grq2","hostname":"github.com","tags":[]}],"lineage":{"upstream":[],"downstream":[],"duplicates":[],"related":[]},"timeline":[{"kind":"published","date":"2026-12-02T05:20:32.362Z","label":"Published","detail":"Vulnerability first disclosed.","source":null}],"priority":{"label":"routine","tag":null,"reason":"Not severe (CVSS 5.5, local access); no exploitation reported by the 5 checked sources","nextStep":"Fix in the normal cadence","rank":[0,0,0,0,0,55],"checkedSources":["cisa","enisa","circl","shadowserver","cisa-adp"],"evidence":[{"type":"epss","source":"FIRST","date":"2026-12-04T00:00:00.000Z","status":"valid","statusDate":null,"statusSource":null,"disputes":[],"value":0.0015,"stale":false,"promoted":null},{"type":"cvss","source":"cve.org","date":"2026-12-02T05:20:32.362Z","status":"valid","statusDate":null,"statusSource":null,"disputes":[],"score":5.5,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","version":"3.1","headline":true},{"type":"cvss","source":"nvd","date":"2026-12-02T05:20:32.362Z","status":"valid","statusDate":null,"statusSource":null,"disputes":[],"score":5.5,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","version":"3.1"}],"epss":{"value":0.0015,"date":"2026-12-04T00:00:00.000Z","stale":false,"promoted":null},"sources":[{"id":"cisa","lastSuccessfulSync":"2026-12-05T07:02:00.704Z","state":"fresh"},{"id":"enisa","lastSuccessfulSync":"2026-12-05T07:02:01.187Z","state":"fresh"},{"id":"circl","lastSuccessfulSync":"2026-12-05T07:02:01.389Z","state":"fresh"},{"id":"shadowserver","lastSuccessfulSync":null,"state":"unavailable"},{"id":"cisa-adp","lastSuccessfulSync":"2026-12-05T07:01:05.155Z","state":"fresh"},{"id":"epss","lastSuccessfulSync":"2026-12-05T07:01:59.185Z","state":"fresh"},{"id":"osv","lastSuccessfulSync":"2026-12-05T07:01:58.234Z","state":"fresh"}],"feedEvent":null},"meta":{"dataAsOf":"2026-12-05T08:03:51.292Z","stale":false,"partial":false}}