{"id":"CVE-2024-35864","state":"PUBLISHED","title":"smb: client: fix potential UAF in smb2_is_valid_lease_break()","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nsmb: client: fix potential UAF in smb2_is_valid_lease_break()\n\nSkip sessions that are being teared down (status == SES_EXITING) to\navoid UAF.","publishedAt":"2024-05-19T08:34:22.936Z","updatedAt":"2026-08-05T11:30:28.316Z","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":"7f48558e6489d032b1584b0cc9ac4bb11072c034","status":"affected","lessThan":"c868cabdf6fdd61bea54532271f4708254e57fc5","versionType":"git"},{"version":"7f48558e6489d032b1584b0cc9ac4bb11072c034","status":"affected","lessThan":"f92739fdd4522c4291277136399353d7c341fae4","versionType":"git"},{"version":"7f48558e6489d032b1584b0cc9ac4bb11072c034","status":"affected","lessThan":"a8344e2b69bde63f713b0aa796d70dbeadffddfb","versionType":"git"},{"version":"7f48558e6489d032b1584b0cc9ac4bb11072c034","status":"affected","lessThan":"705c76fbf726c7a2f6ff9143d4013b18daaaebf1","versionType":"git"},{"version":"a67172a013953664b1dad03c648200c70b90506c","status":"affected","versionType":"git"},{"version":"3.12.48","status":"affected","lessThan":"3.13","versionType":"semver"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/smb/client/smb2misc.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"3.13","status":"affected"},{"version":"0","status":"unaffected","lessThan":"3.13","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/smb2misc.c"]}],"references":["https://git.kernel.org/stable/c/c868cabdf6fdd61bea54532271f4708254e57fc5","https://git.kernel.org/stable/c/f92739fdd4522c4291277136399353d7c341fae4","https://git.kernel.org/stable/c/a8344e2b69bde63f713b0aa796d70dbeadffddfb","https://git.kernel.org/stable/c/705c76fbf726c7a2f6ff9143d4013b18daaaebf1"],"weaknesses":[],"ingestedAt":"2026-10-29T20:07:30.303Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2024/35xxx/CVE-2024-35864.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2024-35864","state":"PUBLISHED","datePublished":"2024-05-19T08:34:22.936Z","dateUpdated":"2026-08-05T11:30:28.316Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2024-05-17T13:50:33.107Z"},"containers":{"cna":{"title":"smb: client: fix potential UAF in smb2_is_valid_lease_break()","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nsmb: client: fix potential UAF in smb2_is_valid_lease_break()\n\nSkip sessions that are being teared down (status == SES_EXITING) to\navoid UAF."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"7f48558e6489d032b1584b0cc9ac4bb11072c034","status":"affected","lessThan":"c868cabdf6fdd61bea54532271f4708254e57fc5","versionType":"git"},{"version":"7f48558e6489d032b1584b0cc9ac4bb11072c034","status":"affected","lessThan":"f92739fdd4522c4291277136399353d7c341fae4","versionType":"git"},{"version":"7f48558e6489d032b1584b0cc9ac4bb11072c034","status":"affected","lessThan":"a8344e2b69bde63f713b0aa796d70dbeadffddfb","versionType":"git"},{"version":"7f48558e6489d032b1584b0cc9ac4bb11072c034","status":"affected","lessThan":"705c76fbf726c7a2f6ff9143d4013b18daaaebf1","versionType":"git"},{"version":"a67172a013953664b1dad03c648200c70b90506c","status":"affected","versionType":"git"},{"version":"3.12.48","status":"affected","lessThan":"3.13","versionType":"semver"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/smb/client/smb2misc.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"3.13","status":"affected"},{"version":"0","status":"unaffected","lessThan":"3.13","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/smb2misc.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/c868cabdf6fdd61bea54532271f4708254e57fc5"},{"url":"https://git.kernel.org/stable/c/f92739fdd4522c4291277136399353d7c341fae4"},{"url":"https://git.kernel.org/stable/c/a8344e2b69bde63f713b0aa796d70dbeadffddfb"},{"url":"https://git.kernel.org/stable/c/705c76fbf726c7a2f6ff9143d4013b18daaaebf1"}],"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 loop is entered only from `cifs_demultiplex_thread()` processing an unsolicited SMB2 lease-break frame received from the remote SMB server over TCP/445, which routinely traverses the internet (e.g. Azure Files and other cloud SMB shares). A malicious or compromised server, or an on-path attacker injecting into the stream, delivers the trigger entirely as network data.\nAC:L - The attacker controls both sides of the race — it forces session teardown (session-expired/user-session-deleted status codes, TCP reset driving reconnect, DFS IPC churn) and then floods lease-break notifications — and it can stall the SMB2 LOGOFF reply so the session lingers in SES_EXITING on `smb_ses_list` for the entire request timeout, making the window arbitrarily wide and repeatable.\nPR:N - Unsolicited oplock/lease-break frames bypass `smb2_verify_signature()` entirely and the handler ignores SessionId/TreeId, matching only on the attacker-supplied LeaseKey, so no credentials on the client and no authenticated SMB session are needed to reach the vulnerable traversal.\nUI:N - In the realistic deployment — a persistent cifs mount from fstab, autofs, or a container volume — the connection already exists, and the compromised server or on-path injector triggers the code path with no action from any local user.\nS:U - The use-after-free corrupts kernel heap memory belonging to the same kernel security authority; no VM, IOMMU, or sandbox boundary is crossed.\nC:H - Walking a torn-down session's `tcon_list` and `pending_opens` dereferences freed slab objects whose contents the attacker can groom via heap spraying, turning `tcon->cfids`, `open->tlink`, and `open->lease_key` into attacker-influenced pointers that yield a kernel memory read primitive.\nI:H - The path writes into the freed memory — `spin_lock(&tcon->open_file_lock)`, `cifs_stats_inc()` counter increments, and `cifs_get_tlink()` refcount bumps — and later frees/queues work (`queue_work(cifsiod_wq, &cfid->lease_break)`) through sprayed pointers, giving heap corruption and control-flow hijacking potential.\nA:H - Dereferencing freed `cifs_ses`/`cifs_tcon` state from the demultiplex kernel thread readily produces an oops or panic, and because the trigger is a repeatable unauthenticated network frame the attacker can crash the client at will."}]}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-08-05T11:30:28.316Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"3.13","versionEndExcluding":"6.1.85"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"3.13","versionEndExcluding":"6.6.26"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"3.13","versionEndExcluding":"6.8.5"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"3.13","versionEndExcluding":"6.9"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"3.12.48"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}},"adp":[{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"id":"CVE-2024-35864","role":"CISA Coordinator","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"total"}],"version":"2.0.3","timestamp":"2024-05-29T18:32:19.453857Z"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2024-06-04T17:34:05.415Z"}},{"title":"CVE Program Container","references":[{"url":"https://git.kernel.org/stable/c/c868cabdf6fdd61bea54532271f4708254e57fc5","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/f92739fdd4522c4291277136399353d7c341fae4","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/a8344e2b69bde63f713b0aa796d70dbeadffddfb","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/705c76fbf726c7a2f6ff9143d4013b18daaaebf1","tags":["x_transferred"]}],"providerMetadata":{"shortName":"CVE","orgId":"af854a3a-2127-422b-91ae-364da2661108","dateUpdated":"2024-08-02T03:21:48.471Z"}}]}}}