{"id":"CVE-2024-35861","state":"PUBLISHED","title":"smb: client: fix potential UAF in cifs_signal_cifsd_for_reconnect()","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nsmb: client: fix potential UAF in cifs_signal_cifsd_for_reconnect()\n\nSkip sessions that are being teared down (status == SES_EXITING) to\navoid UAF.","publishedAt":"2024-05-19T08:34:20.364Z","updatedAt":"2026-08-05T11:30:25.104Z","severity":{"score":9.8,"label":"Critical","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/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":"dca65818c80cf06e0f08ba2cf94060a5236e73c2","status":"affected","lessThan":"7e8360ac8774e19b0b25f44fff84a105bb2417e4","versionType":"git"},{"version":"dca65818c80cf06e0f08ba2cf94060a5236e73c2","status":"affected","lessThan":"2cfff21732132e363b4cc275d63ea98f1af726c1","versionType":"git"},{"version":"dca65818c80cf06e0f08ba2cf94060a5236e73c2","status":"affected","lessThan":"f9a96a7ad1e8d25dc6662bc7552e0752de74a20d","versionType":"git"},{"version":"dca65818c80cf06e0f08ba2cf94060a5236e73c2","status":"affected","lessThan":"e0e50401cc3921c9eaf1b0e667db174519ea939f","versionType":"git"},{"version":"dd9ccff8c8980bf9ea7f25e83eeb28154f902920","status":"affected","versionType":"git"},{"version":"5.17.2","status":"affected","lessThan":"5.18","versionType":"semver"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/smb/client/connect.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.18","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.18","versionType":"semver"},{"version":"6.1.85","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.26","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.8.5","status":"unaffected","lessThanOrEqual":"6.8.*","versionType":"semver"},{"version":"6.9","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/smb/client/connect.c"]}],"references":["https://git.kernel.org/stable/c/7e8360ac8774e19b0b25f44fff84a105bb2417e4","https://git.kernel.org/stable/c/2cfff21732132e363b4cc275d63ea98f1af726c1","https://git.kernel.org/stable/c/f9a96a7ad1e8d25dc6662bc7552e0752de74a20d","https://git.kernel.org/stable/c/e0e50401cc3921c9eaf1b0e667db174519ea939f"],"weaknesses":[],"ingestedAt":"2026-10-29T20:07:30.303Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2024/35xxx/CVE-2024-35861.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2024-35861","state":"PUBLISHED","datePublished":"2024-05-19T08:34:20.364Z","dateUpdated":"2026-08-05T11:30:25.104Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2024-05-17T13:50:33.107Z"},"containers":{"cna":{"title":"smb: client: fix potential UAF in cifs_signal_cifsd_for_reconnect()","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nsmb: client: fix potential UAF in cifs_signal_cifsd_for_reconnect()\n\nSkip sessions that are being teared down (status == SES_EXITING) to\navoid UAF."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"dca65818c80cf06e0f08ba2cf94060a5236e73c2","status":"affected","lessThan":"7e8360ac8774e19b0b25f44fff84a105bb2417e4","versionType":"git"},{"version":"dca65818c80cf06e0f08ba2cf94060a5236e73c2","status":"affected","lessThan":"2cfff21732132e363b4cc275d63ea98f1af726c1","versionType":"git"},{"version":"dca65818c80cf06e0f08ba2cf94060a5236e73c2","status":"affected","lessThan":"f9a96a7ad1e8d25dc6662bc7552e0752de74a20d","versionType":"git"},{"version":"dca65818c80cf06e0f08ba2cf94060a5236e73c2","status":"affected","lessThan":"e0e50401cc3921c9eaf1b0e667db174519ea939f","versionType":"git"},{"version":"dd9ccff8c8980bf9ea7f25e83eeb28154f902920","status":"affected","versionType":"git"},{"version":"5.17.2","status":"affected","lessThan":"5.18","versionType":"semver"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/smb/client/connect.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.18","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.18","versionType":"semver"},{"version":"6.1.85","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.26","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.8.5","status":"unaffected","lessThanOrEqual":"6.8.*","versionType":"semver"},{"version":"6.9","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/smb/client/connect.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/7e8360ac8774e19b0b25f44fff84a105bb2417e4"},{"url":"https://git.kernel.org/stable/c/2cfff21732132e363b4cc275d63ea98f1af726c1"},{"url":"https://git.kernel.org/stable/c/f9a96a7ad1e8d25dc6662bc7552e0752de74a20d"},{"url":"https://git.kernel.org/stable/c/e0e50401cc3921c9eaf1b0e667db174519ea939f"}],"metrics":[{"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","baseScore":9.8,"baseSeverity":"CRITICAL"},"scenarios":[{"lang":"en","value":"AV:N - The vulnerable list walk is entered directly from data supplied by the remote SMB server — `mark_for_reconnect_if_needed()` fires when the server's DFS referral targets change, and `tree_connect_dfs_target()` fires from `smb2_reconnect()` when server-driven tree connects fail with a changed `leaf_fullpath`. The same remote peer also controls the width of the race window by stalling its SMB2 LOGOFF/TREE_DISCONNECT reply.\nAC:L - The attacker drives both sides of the race: the SES_EXITING-while-still-linked window spans blocking SMB round-trips that a malicious server can hold open until the SMB timeout, while referral churn or repeated forced reconnects re-enter the walk at unbounded rate. No condition depends on state outside the attacker's influence.\nPR:N - A malicious or compromised SMB server holds no privilege on the victim client — the client authenticates to the server, not the reverse — so no credentials on the vulnerable component are needed. The alternate local path via `CIFS_GENL_CMD_SWN_NOTIFY` also carries no `GENL_ADMIN_PERM` and is usable by any unprivileged user.\nUI:N - On an already-mounted enterprise SMB share (the normal automounted/persistent case), the DFS refresh worker and reconnect paths run on their own and session teardowns occur automatically via `cifs_prune_tlinks` and DFS failover. No victim action is required at exploitation time.\nS:U - The use-after-free corrupts kernel heap memory within the same kernel security authority; no VM, IOMMU, or sandbox boundary is crossed.\nC:H - The walk reads `ses->chan_count` and `ses->chans[i].server` plus `server->tcpStatus` out of a freed/reallocated `cifs_ses`, and a use-after-free on this object gives control over freed-slab contents, which is leverageable into an arbitrary kernel read primitive against `cifs_ses` state including session and encryption keys.\nI:H - The walk writes into the stale objects — acquiring `ses->chan_lock` and `ses->chans[i].server->srv_lock`, then storing `CifsNeedReconnect` into `tcpStatus`. Since the teardown path NULLs `chans[i].server` without `chan_lock` and never lowers `chan_count`, a sprayed replacement object yields a spinlock acquire plus a store at an attacker-chosen address, i.e. a write primitive usable for control-flow hijack.\nA:H - Dereferencing a freed `TCP_Server_Info` and taking `srv_lock` on reclaimed memory reliably produces slab corruption, a spinlock lockup, or an oops/panic, and the trigger can be repeated indefinitely by the remote server."}]}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-08-05T11:30:25.104Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.18","versionEndExcluding":"6.1.85"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.18","versionEndExcluding":"6.6.26"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.18","versionEndExcluding":"6.8.5"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.18","versionEndExcluding":"6.9"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.17.2"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}},"adp":[{"title":"CVE Program Container","references":[{"url":"https://git.kernel.org/stable/c/7e8360ac8774e19b0b25f44fff84a105bb2417e4","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/2cfff21732132e363b4cc275d63ea98f1af726c1","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/f9a96a7ad1e8d25dc6662bc7552e0752de74a20d","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/e0e50401cc3921c9eaf1b0e667db174519ea939f","tags":["x_transferred"]}],"providerMetadata":{"shortName":"CVE","orgId":"af854a3a-2127-422b-91ae-364da2661108","dateUpdated":"2024-08-02T03:21:48.592Z"}},{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"id":"CVE-2024-35861","role":"CISA Coordinator","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"partial"}],"version":"2.0.3","timestamp":"2024-09-10T15:41:30.759863Z"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2024-09-11T17:33:17.503Z"}}]}}}