{"id":"CVE-2026-18417","revision":null,"records":[{"revision":"446ce155c98d4da3b5323bfa60b20cf5","observedAt":"2026-10-23T15:48:27.903+00:00","statement":{"source":"cve-program","id":"CVE-2026-18417","aliases":[],"title":"Wild pointer dereference in Zephyr BSD sockets when a TCP listening socket reports an asynchronous error","description":"The native BSD-socket layer recorded a pending asynchronous socket error by type-punning it into struct net_context's void user_data field (ctx->user_data = INT_TO_POINTER(-status) in zsock_accepted_cb(), zsock_received_cb(), zsock_connected_cb() and zsock_close_ctx() in subsys/net/lib/sockets/sockets_inet.c), reading it back with POINTER_TO_INT(). That same field is owned by the network stack for listening TCP contexts: net_tcp_accept() stores the parent context pointer there and the TCP core passes it back to the registered accept callback. A failed accept therefore left a small integer (an errno value) where the stack expected a struct net_context .\n\nWhen the network interface carrying a listening TCP socket goes down, close_tcp_conn() in subsys/net/ip/tcp.c invokes the accept callback with -ENETDOWN and the context's user_data. In v4.3.0 the callback was not disarmed afterwards, so a second interface-down event forwarded the previously stored errno to zsock_accepted_cb(), which dereferenced it as the parent context and performed several stores through it (sock_set_error()'s read-modify-write of socket_data, k_fifo_cancel_wait(&parent->recv_q)) — the crash described in the fix's commit message. v4.3.1 and v4.4.x carry a later change clearing conn->accept_cb after the error callback (269cb8823d3 on the v4.3 branch, 913fae5169425550f2364655298fceb79b320066 on main), which closes that repeat path; on those releases the poisoned cookie remains reachable only by a narrower race, a handshake completing alongside the interface-down still passing the stale cookie to k_fifo_put(&parent->accept_q, ...), and by getsockopt(SO_ERROR), which reads the field back unconditionally.\n\nOn v4.3.0 an application that keeps a listening TCP socket open across repeated link-down events is sufficient to reach the defect; the triggering condition is a network-interface state change, not attacker-supplied packet data, so the practical attacker is one able to force the link down repeatedly (for example an adjacent attacker disrupting a wireless link) or one with local/physical access. Because both the faulting address and the stored data are fixed small constants derived from the errno value, the outcome is a wild-pointer access leading to a kernel fatal error — a denial of service (device crash or reset) rather than an attacker-directed memory corruption.\n\nThe fix stores the pending error in a dedicated net_context.sock_error field and converts every producer and consumer to sock_set_error()/sock_get_error(), leaving user_data untouched. As a side effect it also stops getsockopt(SO_ERROR) — which is evaluated unconditionally — from returning the kernel address held in user_data to a userspace application.","state":0,"publishedAt":"2026-09-28T23:25:23.903+00:00","modifiedAt":"2026-09-30T13:43:48.703+00:00","affected":[{"ecosystem":"https://github.com/zephyrproject-rtos/zephyr","name":"zephyr","ranges":[],"versions":[],"rawVersionEvidence":"{\n                    \"vendor\": \"zephyrproject\",\n                    \"product\": \"zephyr\",\n                    \"collectionURL\": \"https://github.com/zephyrproject-rtos/zephyr\",\n                    \"packageName\": \"zephyr\",\n                    \"defaultStatus\": \"unaffected\",\n                    \"programFiles\": [\n                        \"include/zephyr/net/net_context.h\",\n                        \"subsys/net/lib/sockets/sockets_inet.c\",\n                        \"subsys/net/lib/sockets/sockets_internal.h\"\n                    ],\n                    \"programRoutines\": [\n                        {\n                            \"name\": \"close_tcp_conn\"\n                        },\n                        {\n                            \"name\": \"zsock_accepted_cb\"\n                        }\n                    ],\n                    \"versions\": [\n                        {\n                            \"version\": \"4.3.0\",\n                            \"status\": \"affected\",\n                            \"versionType\": \"semver\",\n                            \"lessThan\": \"4.4.2\"\n                        }\n                    ]\n                }"}],"metrics":[{"system":"CVSS 3.1","vector":"CVSS:3.1/AV:A/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":6.5,"severity":"MEDIUM"}],"references":["https://github.com/zephyrproject-rtos/zephyr/commit/ef370a57d07637aaee8cec7b0bcebf4002ac8f54","https://github.com/zephyrproject-rtos/zephyr/security/advisories/GHSA-p8r8-8mw8-3wf9"],"sourceUrl":"https://www.cve.org/CVERecord?id=CVE-2026-18417","license":"CVE Program Terms of Use","key":"cve-program:CVE-2026-18417","identifiers":["CVE-2026-18417"]},"retained":false,"historicalAffected":[]}],"coverage":[{"source":"cisa-kev:global","scope":"Complete CISA KEV catalog; all vendors. Missing entries do not establish absence of exploitation.","generation":"2026-11-12T04:59:02.1392693+00:00","complete":true,"records":1779,"lastAttemptAt":"2026-11-12T04:59:02.1392693+00:00","lastSuccessAt":"2026-11-12T04:59:02.3201564+00:00","error":null,"lastVerifiedAt":"2026-11-12T04:59:02.3201571+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"cve-program","scope":"Official CVE Program baseline and cumulative hourly delta; all vendors, published and rejected records","generation":"cve-64752486c567b55b31fb0d7225f5222bcd0019564ac0ac5f0649e242c7b19299-ef591e4f0e76c3b422ff0b88d5784af14d3e351e9edea517ce7d635ea6edee46","complete":true,"records":424594,"lastAttemptAt":"2026-11-12T04:56:44.8167998+00:00","lastSuccessAt":"2026-11-12T04:56:44.7933175+00:00","error":null,"lastVerifiedAt":"2026-11-12T04:56:44.8167998+00:00","snapshotPublishedAt":"2026-11-12T04:29:08+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"euvd","scope":"Rolling EUVD lookups of CVE aliases in current public OSV archives; 500 identifiers per refresh, rechecked after 48 hours. Not a global EUVD catalog. Successful not-found lookups count as checked; they do not imply withdrawal or safety. No reader inventory is sent.","generation":"enrichment-32ec73cf05a5442f9d2d112591e338a7","complete":false,"records":13760,"lastAttemptAt":"2026-11-12T05:04:27.1398238+00:00","lastSuccessAt":"2026-11-12T05:04:27.2070301+00:00","error":null,"lastVerifiedAt":"2026-11-12T05:04:27.2070301+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"first-epss:nuget","scope":"FIRST EPSS for explicit CVE aliases in the collected public NuGet archive. Not a global EPSS backfill.","generation":"2026-11-12T04:59:02.1392693+00:00","complete":true,"records":1097,"lastAttemptAt":"2026-11-12T04:59:02.1392693+00:00","lastSuccessAt":"2026-11-12T04:59:02.3208823+00:00","error":null,"lastVerifiedAt":"2026-11-12T04:59:02.3208825+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"nvd","scope":"Rolling NVD lookups of CVE aliases in current public OSV archives; 500 identifiers per refresh, rechecked after 48 hours. Not a global NVD catalog. Successful not-found lookups count as checked; they do not imply withdrawal or safety. No reader inventory is sent.","generation":"enrichment-80af9ca000ef483a88b41952aab63f47","complete":true,"records":13760,"lastAttemptAt":"2026-11-12T04:59:27.4436031+00:00","lastSuccessAt":"2026-11-12T04:59:27.44+00:00","error":null,"lastVerifiedAt":"2026-11-12T04:59:27.44+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":13813,"expectedIdentifiers":13813,"failedIdentifiers":0},{"source":"osv:Go","scope":"Complete OSV Go ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"go-3562b6c78fd1bd0f0b55daf66a0926ae24f65e462df7f6d928caad458fc696bf","complete":true,"records":9947,"lastAttemptAt":"2026-11-12T04:59:01.6490656+00:00","lastSuccessAt":"2026-11-11T04:27:43.6877707+00:00","error":null,"lastVerifiedAt":"2026-11-12T04:59:01.6490656+00:00","snapshotPublishedAt":"2026-11-11T03:32:46+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:NuGet","scope":"Complete OSV NuGet ecosystem archive, including GitHub Advisory Database records; NuGet version matching only","generation":"nuget-456002455e0ab94bb92c95476d4e6d175c104cd594749982afd96c893728ecbc","complete":true,"records":2010,"lastAttemptAt":"2026-11-12T04:56:44.9519384+00:00","lastSuccessAt":"2026-11-11T02:36:58.1276999+00:00","error":null,"lastVerifiedAt":"2026-11-12T04:56:44.9519384+00:00","snapshotPublishedAt":"2026-11-11T01:17:51+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:crates.io","scope":"Complete OSV crates.io ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"crates.io-baa8362b4daf9e5f39d5563775a55935e7b442c0735d33274a921579ce4a0d66","complete":true,"records":3093,"lastAttemptAt":"2026-11-12T04:59:02.0419805+00:00","lastSuccessAt":"2026-11-11T13:00:02.5446881+00:00","error":null,"lastVerifiedAt":"2026-11-12T04:59:02.0419805+00:00","snapshotPublishedAt":"2026-11-11T12:47:47+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:npm","scope":"Complete OSV npm ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"npm-fda6475739002437b659ab0b5b310aa7608c40371b1aa4c3777924ea9bcf2169","complete":true,"records":231696,"lastAttemptAt":"2026-11-12T04:59:01.5212948+00:00","lastSuccessAt":"2026-11-12T04:58:59.9809674+00:00","error":null,"lastVerifiedAt":"2026-11-12T04:59:01.5212948+00:00","snapshotPublishedAt":"2026-11-12T04:33:21+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null}]}