{"id":"CVE-2026-90171","revision":null,"records":[{"revision":"e8dd85b90bcc463c8f46d9d9f7fe0356","observedAt":"2026-10-23T15:48:27.903+00:00","statement":{"source":"cve-program","id":"CVE-2026-90171","aliases":[],"title":"smb: smbdirect: release pending child sockets outside the handler lock","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nsmb: smbdirect: release pending child sockets outside the handler lock\n\nsmbdirect_socket_destroy() releases the listener's pending/ready child\nsockets while still holding the listener's handler lock, the\n&id_priv->handler_mutex taken via rdma_lock_handler(), not\nsc->listen.lock, and before the listener's own rdma_destroy_id().\nThat ordering has one real consequence and one cosmetic one.\n\nThe real one: smbdirect_socket_release() drops the child's last\nreference, which destroys the child's cm_id.  Doing that before the\nlistener's rdma_destroy_id() lets _cma_cancel_listens(), running from\nthe listener's _destroy_id(), walk an already freed child id_priv,\nwhich KASAN catches as a slab-use-after-free during listener shutdown:\n\n[ 4758.909130] BUG: KASAN: slab-use-after-free in __mutex_lock+0x1469/0x1560\n[ 4758.911450] Read of size 1 at addr ffff88821c381db4 by task ksmbd.control/1652\n[ 4758.913262] Call Trace:\n[ 4758.913267]  <TASK>\n[ 4758.913299]  __mutex_lock+0x1469/0x1560\n[ 4758.913408]  _cma_cancel_listens+0x312/0x3b0\n[ 4758.913413]  _destroy_id+0x363/0xee0\n[ 4758.913417]  smbdirect_socket_destroy_sync+0x17d5/0x2440\n[ 4758.913443]  smbdirect_socket_release+0x124/0x230\n[ 4758.913451]  ksmbd_rdma_stop_listening+0x9f/0x190\n[ 4758.913457]  ksmbd_conn_transport_destroy+0x65/0x3c0\n[ 4758.913463]  kill_server_store+0x1fb/0x2b0\n[ 4758.913501]  kernfs_fop_write_iter+0x349/0x4d0\n[ 4758.913507]  vfs_write+0x5e7/0xc70\n[ 4758.913528]  ksys_write+0x12a/0x210\n[ 4758.913541]  do_syscall_64+0x135/0x460\n[ 4758.913555]  entry_SYSCALL_64_after_hwframe+0x77/0x7f\n\nThe cosmetic one: releasing a child recurses into\nsmbdirect_socket_destroy(), which takes the child's own\nrdma_lock_handler() lock nested under the listener's.  The listener's\nand the child's cm_id are always different instances, so this cannot\ndeadlock for real; the CM core itself nests a new connection id's\nhandler_mutex under the listening id's in cma_ib_req_handler().  But\nlockdep only sees one lock class, reports possible recursive locking,\nand then disables itself, hiding real locking bugs for the rest of the\nrun:\n\n[ 2424.579653] WARNING: possible recursive locking detected\n[ 2424.581180] 7.1.0-next-20260623+ #89 Not tainted\n[ 2424.582548] --------------------------------------------\n[ 2424.584500] ksmbd.control/8854 is trying to acquire lock:\n[ 2424.586817] ffff888102303c20 (&id_priv->handler_mutex){+.+.}-{4:4}, at: smbdirect_socket_destroy_sync+0xc39/0x2440\n[ 2424.590590]\n[ 2424.590590] but task is already holding lock:\n[ 2424.591601] ffff888102046c20 (&id_priv->handler_mutex){+.+.}-{4:4}, at: smbdirect_socket_destroy_sync+0xc39/0x2440\n[ 2424.594178]\n[ 2424.594178] other info that might help us debug this:\n[ 2424.596634]  Possible unsafe locking scenario:\n[ 2424.596634]\n[ 2424.598841]        CPU0\n[ 2424.599765]        ----\n[ 2424.600695]   lock(&id_priv->handler_mutex);\n[ 2424.601836]   lock(&id_priv->handler_mutex);\n[ 2424.602590]\n[ 2424.602590]  *** DEADLOCK ***\n[ 2424.602590]\n[ 2424.604512]  May be due to missing lock nesting notation\n\nSplice the pending/ready children onto a local list under the\nlistener's listen.lock, while the handler lock is held so a concurrent\nCM CONNECT_REQUEST cannot add more, but defer the actual\nsmbdirect_socket_release() calls until after the listener's cm_id has\nbeen destroyed and its handler lock dropped.  The children are\nindependent sockets whose teardown needs neither the listener's\nhandler lock nor its cm_id.\n\nFound with ksmbdzzer [2], a KSMBD fuzzer that drives libFuzzer with a\nkcov-dataflow [1] coverage vector: it folds each instrumented\ncomparison/argument's runtime operand value together with its PC (the\ndefault arm mixes them as pc⊕val) so that a new operand value at a known\nsite counts as new coverage.\n\n[1] https://lwn.net/Articles/1077606/\n[2] https://github.com/yskzalloc/kcov-dataflow","state":0,"publishedAt":"2026-09-17T16:06:59.15+00:00","modifiedAt":"2026-10-19T08:59:08.551+00:00","affected":[{"ecosystem":"Vendor product","name":"Linux","ranges":[],"versions":[],"rawVersionEvidence":"{\n                    \"product\": \"Linux\",\n                    \"vendor\": \"Linux\",\n                    \"defaultStatus\": \"unaffected\",\n                    \"repo\": \"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git\",\n                    \"programFiles\": [\n                        \"fs/smb/smbdirect/socket.c\"\n                    ],\n                    \"versions\": [\n                        {\n                            \"version\": \"dc691b91ad1677def14582a279e56fd943b52f94\",\n                            \"lessThan\": \"8ea83ef0c40ec4463695e22bc9ae43e29bcfede7\",\n                            \"status\": \"affected\",\n                            \"versionType\": \"git\"\n                        },\n                        {\n                            \"version\": \"dc691b91ad1677def14582a279e56fd943b52f94\",\n                            \"lessThan\": \"db82fbe4bb68e68e4aef00ef5b79f92991d8ef8e\",\n                            \"status\": \"affected\",\n                            \"versionType\": \"git\"\n                        }\n                    ]\n                }"},{"ecosystem":"Vendor product","name":"Linux","ranges":[],"versions":[],"rawVersionEvidence":"{\n                    \"product\": \"Linux\",\n                    \"vendor\": \"Linux\",\n                    \"defaultStatus\": \"affected\",\n                    \"repo\": \"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git\",\n                    \"programFiles\": [\n                        \"fs/smb/smbdirect/socket.c\"\n                    ],\n                    \"versions\": [\n                        {\n                            \"version\": \"7.1\",\n                            \"status\": \"affected\"\n                        },\n                        {\n                            \"version\": \"0\",\n                            \"lessThan\": \"7.1\",\n                            \"status\": \"unaffected\",\n                            \"versionType\": \"semver\"\n                        },\n                        {\n                            \"version\": \"7.2.6\",\n                            \"lessThanOrEqual\": \"7.2.*\",\n                            \"status\": \"unaffected\",\n                            \"versionType\": \"semver\"\n                        },\n                        {\n                            \"version\": \"7.3\",\n                            \"lessThanOrEqual\": \"*\",\n                            \"status\": \"unaffected\",\n                            \"versionType\": \"original_commit_for_fix\"\n                        }\n                    ]\n                }"}],"metrics":[],"references":["https://git.kernel.org/stable/c/8ea83ef0c40ec4463695e22bc9ae43e29bcfede7","https://git.kernel.org/stable/c/db82fbe4bb68e68e4aef00ef5b79f92991d8ef8e"],"sourceUrl":"https://www.cve.org/CVERecord?id=CVE-2026-90171","license":"CVE Program Terms of Use","key":"cve-program:CVE-2026-90171","identifiers":["CVE-2026-90171"]},"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-09T03:04:09.5264463+00:00","complete":true,"records":1769,"lastAttemptAt":"2026-11-09T03:04:09.5264463+00:00","lastSuccessAt":"2026-11-09T03:04:09.687719+00:00","error":null,"lastVerifiedAt":"2026-11-09T03:04:09.687725+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-24e6fde7b744113daefb8f6135035fb8a5c69c9617c9c0d40574a0376532ffd3-147e40e6bacaf605c8b8b91790303c2161fe161e986dcab4007ffaf615b27ea0","complete":true,"records":421280,"lastAttemptAt":"2026-11-09T03:02:14.7184665+00:00","lastSuccessAt":"2026-11-09T03:02:14.7023872+00:00","error":null,"lastVerifiedAt":"2026-11-09T03:02:14.7184665+00:00","snapshotPublishedAt":"2026-11-09T02:22:19+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-5923d59598fe46c98ec384fbfaf44bc7","complete":false,"records":13654,"lastAttemptAt":"2026-11-09T03:16:18.1412099+00:00","lastSuccessAt":"2026-11-09T03:16:18.138+00:00","error":"6 identifier lookups failed; latest failures include HTTP 403. Other identifiers were checked independently.","lastVerifiedAt":"2026-11-09T03:16:18.138+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":13655,"expectedIdentifiers":13706,"failedIdentifiers":6},{"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-09T03:04:09.5264463+00:00","complete":true,"records":1096,"lastAttemptAt":"2026-11-09T03:04:09.5264463+00:00","lastSuccessAt":"2026-11-09T03:04:09.6884561+00:00","error":null,"lastVerifiedAt":"2026-11-09T03:04:09.6884561+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-5a44a451442747cb81d83104fe1e7771","complete":true,"records":13666,"lastAttemptAt":"2026-11-09T03:04:10.1662574+00:00","lastSuccessAt":"2026-11-09T02:08:52.274+00:00","error":null,"lastVerifiedAt":"2026-11-09T02:08:52.274+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":13706,"expectedIdentifiers":13706,"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-980593e6977a6d1b4fb1eed5a1ffe88a468736f89f0a06f710924ad59132c023","complete":true,"records":9914,"lastAttemptAt":"2026-11-09T03:04:09.4835743+00:00","lastSuccessAt":"2026-11-08T11:07:07.068788+00:00","error":null,"lastVerifiedAt":"2026-11-09T03:04:09.4835743+00:00","snapshotPublishedAt":"2026-11-08T11:02: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-fde804134ecdda0ddd5ff5c26ee1fff5a6fa659311f7ef2e51c6ad54964db0e2","complete":true,"records":1971,"lastAttemptAt":"2026-11-09T03:02:14.8618119+00:00","lastSuccessAt":"2026-11-06T19:03:17.0399903+00:00","error":null,"lastVerifiedAt":"2026-11-09T03:02:14.8618119+00:00","snapshotPublishedAt":"2026-11-06T18:17:57+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-3b1150af6d7ada2c07356cbab4ead5224c1485027890f71c71d0742cddf0b9e8","complete":true,"records":3055,"lastAttemptAt":"2026-11-09T03:04:09.4954044+00:00","lastSuccessAt":"2026-11-09T00:02:23.4330288+00:00","error":null,"lastVerifiedAt":"2026-11-09T03:04:09.4954044+00:00","snapshotPublishedAt":"2026-11-08T23:17:54+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-d847477990cd62b1d95e922f40ca328269fbc268a0aa72bfe5bee28e656d8ce7","complete":true,"records":231296,"lastAttemptAt":"2026-11-09T03:04:09.3500258+00:00","lastSuccessAt":"2026-11-09T03:04:07.965371+00:00","error":null,"lastVerifiedAt":"2026-11-09T03:04:09.3500258+00:00","snapshotPublishedAt":"2026-11-09T02:33:09+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null}]}