{"id":"CVE-2025-40168","state":"PUBLISHED","title":"smc: Use __sk_dst_get() and dst_dev_rcu() in smc_clc_prfx_match().","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nsmc: Use __sk_dst_get() and dst_dev_rcu() in smc_clc_prfx_match().\n\nsmc_clc_prfx_match() is called from smc_listen_work() and\nnot under RCU nor RTNL.\n\nUsing sk_dst_get(sk)->dev could trigger UAF.\n\nLet's use __sk_dst_get() and dst_dev_rcu().\n\nNote that the returned value of smc_clc_prfx_match() is not\nused in the caller.","publishedAt":"2025-11-12T10:46:51.422Z","updatedAt":"2026-09-02T12:49:28.040Z","severity":{"score":8.1,"label":"High","version":"3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H","source":"Linux"},"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"a046d57da19f812216f393e7c535f5858f793ac3","status":"affected","lessThan":"3f119c37aa293af41400cccb3d89fab8dcf774b0","versionType":"git"},{"version":"a046d57da19f812216f393e7c535f5858f793ac3","status":"affected","lessThan":"4f5f52a5842937f945582a93cb9daed9ea526fee","versionType":"git"},{"version":"a046d57da19f812216f393e7c535f5858f793ac3","status":"affected","lessThan":"326e5cf301d0bec0a672aa834d8254c4f9df6255","versionType":"git"},{"version":"a046d57da19f812216f393e7c535f5858f793ac3","status":"affected","lessThan":"d26e80f7fb62d77757b67a1b94e4ac756bc9c658","versionType":"git"},{"version":"a046d57da19f812216f393e7c535f5858f793ac3","status":"affected","lessThan":"235f81045c008169cc4e1955b4a64e118eebe61b","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["net/smc/smc_clc.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"4.11","status":"affected"},{"version":"0","status":"unaffected","lessThan":"4.11","versionType":"semver"},{"version":"6.1.187","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.156","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.12.108","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.17.3","status":"unaffected","lessThanOrEqual":"6.17.*","versionType":"semver"},{"version":"6.18","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["net/smc/smc_clc.c"]}],"references":["https://git.kernel.org/stable/c/3f119c37aa293af41400cccb3d89fab8dcf774b0","https://git.kernel.org/stable/c/4f5f52a5842937f945582a93cb9daed9ea526fee","https://git.kernel.org/stable/c/326e5cf301d0bec0a672aa834d8254c4f9df6255","https://git.kernel.org/stable/c/d26e80f7fb62d77757b67a1b94e4ac756bc9c658","https://git.kernel.org/stable/c/235f81045c008169cc4e1955b4a64e118eebe61b"],"weaknesses":[],"ingestedAt":"2026-10-29T20:09:09.358Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2025/40xxx/CVE-2025-40168.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2025-40168","state":"PUBLISHED","datePublished":"2025-11-12T10:46:51.422Z","dateUpdated":"2026-09-02T12:49:28.040Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2025-04-16T07:20:57.176Z"},"containers":{"cna":{"title":"smc: Use __sk_dst_get() and dst_dev_rcu() in smc_clc_prfx_match().","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nsmc: Use __sk_dst_get() and dst_dev_rcu() in smc_clc_prfx_match().\n\nsmc_clc_prfx_match() is called from smc_listen_work() and\nnot under RCU nor RTNL.\n\nUsing sk_dst_get(sk)->dev could trigger UAF.\n\nLet's use __sk_dst_get() and dst_dev_rcu().\n\nNote that the returned value of smc_clc_prfx_match() is not\nused in the caller."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"a046d57da19f812216f393e7c535f5858f793ac3","status":"affected","lessThan":"3f119c37aa293af41400cccb3d89fab8dcf774b0","versionType":"git"},{"version":"a046d57da19f812216f393e7c535f5858f793ac3","status":"affected","lessThan":"4f5f52a5842937f945582a93cb9daed9ea526fee","versionType":"git"},{"version":"a046d57da19f812216f393e7c535f5858f793ac3","status":"affected","lessThan":"326e5cf301d0bec0a672aa834d8254c4f9df6255","versionType":"git"},{"version":"a046d57da19f812216f393e7c535f5858f793ac3","status":"affected","lessThan":"d26e80f7fb62d77757b67a1b94e4ac756bc9c658","versionType":"git"},{"version":"a046d57da19f812216f393e7c535f5858f793ac3","status":"affected","lessThan":"235f81045c008169cc4e1955b4a64e118eebe61b","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["net/smc/smc_clc.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"4.11","status":"affected"},{"version":"0","status":"unaffected","lessThan":"4.11","versionType":"semver"},{"version":"6.1.187","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.156","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.12.108","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.17.3","status":"unaffected","lessThanOrEqual":"6.17.*","versionType":"semver"},{"version":"6.18","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["net/smc/smc_clc.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/3f119c37aa293af41400cccb3d89fab8dcf774b0"},{"url":"https://git.kernel.org/stable/c/4f5f52a5842937f945582a93cb9daed9ea526fee"},{"url":"https://git.kernel.org/stable/c/326e5cf301d0bec0a672aa834d8254c4f9df6255"},{"url":"https://git.kernel.org/stable/c/d26e80f7fb62d77757b67a1b94e4ac756bc9c658"},{"url":"https://git.kernel.org/stable/c/235f81045c008169cc4e1955b4a64e118eebe61b"}],"metrics":[{"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H","baseScore":8.1,"baseSeverity":"HIGH"},"scenarios":[{"lang":"en","value":"AV:N - The vulnerable read is performed by the SMC listen worker while parsing a CLC Proposal message received over TCP from a remote peer (smc_listen_work → smc_listen_find_device → smc_listen_prfx_check → smc_clc_prfx_match), and the peer controls the fields that select and drive the code path. Any host running an AF_SMC listener is exposed to unauthenticated remote connections.\nAC:H - The attacker fully controls one side of the race (when the CLC Proposal arrives and thus when the stale dst->dev is dereferenced), but the other side requires the route's net_device to be concurrently torn down via dst_dev_put()/free_netdev(), which a remote attacker cannot induce or time.\nPR:N - The CLC handshake is the first exchange on the connection and SMC performs no authentication before smc_clc_prfx_match() runs, so an unauthenticated remote attacker reaches the bug with no credentials of any kind.\nUI:N - Triggering requires only that the attacker complete a TCP handshake with the SMC option and send a CLC Proposal; no action by any local user or administrator is needed.\nS:U - The use-after-free is confined to kernel memory (the net_device slab and the in_dev/inet6_dev structures it points at) within the kernel's own security authority; no VM, IOMMU, or sandbox boundary is crossed.\nC:H - The freed net_device is dereferenced and its ifa_list/addr_list walked, and since a reclaimed slab can be groomed with attacker-controlled data this yields an arbitrary kernel-memory read primitive; the match/no-match outcome is additionally returned to the peer as SMC_CLC_DECL_DIFFPREFIX, forming a remotely observable oracle on freed memory contents.\nI:H - A use-after-free of a net_device is a heap-corruption primitive: the reclaimed object's contents are attacker-influencable via heap spraying and the code follows pointers out of it, which can be groomed into an arbitrary write and control-flow hijack.\nA:H - Dereferencing the freed net_device and walking a bogus in_dev/inet6_dev address list reliably produces a kernel oops, panic, or an unbounded list walk, crashing the system."}]}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-09-02T12:49:28.040Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.11","versionEndExcluding":"6.1.187"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.11","versionEndExcluding":"6.6.156"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.11","versionEndExcluding":"6.12.108"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.11","versionEndExcluding":"6.17.3"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.11","versionEndExcluding":"6.18"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}},"adp":[{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"timestamp":"2026-06-16T19:59:59.004592Z","id":"CVE-2025-40168","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"partial"}],"role":"CISA Coordinator","version":"2.0.3"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2026-06-16T20:00:14.873Z"}}]}}}