{"id":"CVE-2024-35865","state":"PUBLISHED","title":"smb: client: fix potential UAF in smb2_is_valid_oplock_break()","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nsmb: client: fix potential UAF in smb2_is_valid_oplock_break()\n\nSkip sessions that are being teared down (status == SES_EXITING) to\navoid UAF.","publishedAt":"2024-05-19T08:34:23.853Z","updatedAt":"2026-08-05T11:30:29.384Z","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":"a710ef9e974f18232d2b9b19c90eda1a1167b2d4","versionType":"git"},{"version":"7f48558e6489d032b1584b0cc9ac4bb11072c034","status":"affected","lessThan":"84488466b7a69570bdbf76dd9576847ab97d54e7","versionType":"git"},{"version":"7f48558e6489d032b1584b0cc9ac4bb11072c034","status":"affected","lessThan":"21fed37d2bdcde33453faf61d3d4d96c355f04bd","versionType":"git"},{"version":"7f48558e6489d032b1584b0cc9ac4bb11072c034","status":"affected","lessThan":"3dba0e5276f131e36d6d8043191d856f49238628","versionType":"git"},{"version":"7f48558e6489d032b1584b0cc9ac4bb11072c034","status":"affected","lessThan":"22863485a4626ec6ecf297f4cc0aef709bc862e4","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":"5.15.209","status":"unaffected","lessThanOrEqual":"5.15.*","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/a710ef9e974f18232d2b9b19c90eda1a1167b2d4","https://git.kernel.org/stable/c/84488466b7a69570bdbf76dd9576847ab97d54e7","https://git.kernel.org/stable/c/21fed37d2bdcde33453faf61d3d4d96c355f04bd","https://git.kernel.org/stable/c/3dba0e5276f131e36d6d8043191d856f49238628","https://git.kernel.org/stable/c/22863485a4626ec6ecf297f4cc0aef709bc862e4"],"weaknesses":[],"ingestedAt":"2026-10-29T20:07:30.303Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2024/35xxx/CVE-2024-35865.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2024-35865","state":"PUBLISHED","datePublished":"2024-05-19T08:34:23.853Z","dateUpdated":"2026-08-05T11:30:29.384Z","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_oplock_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_oplock_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":"a710ef9e974f18232d2b9b19c90eda1a1167b2d4","versionType":"git"},{"version":"7f48558e6489d032b1584b0cc9ac4bb11072c034","status":"affected","lessThan":"84488466b7a69570bdbf76dd9576847ab97d54e7","versionType":"git"},{"version":"7f48558e6489d032b1584b0cc9ac4bb11072c034","status":"affected","lessThan":"21fed37d2bdcde33453faf61d3d4d96c355f04bd","versionType":"git"},{"version":"7f48558e6489d032b1584b0cc9ac4bb11072c034","status":"affected","lessThan":"3dba0e5276f131e36d6d8043191d856f49238628","versionType":"git"},{"version":"7f48558e6489d032b1584b0cc9ac4bb11072c034","status":"affected","lessThan":"22863485a4626ec6ecf297f4cc0aef709bc862e4","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":"5.15.209","status":"unaffected","lessThanOrEqual":"5.15.*","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/a710ef9e974f18232d2b9b19c90eda1a1167b2d4"},{"url":"https://git.kernel.org/stable/c/84488466b7a69570bdbf76dd9576847ab97d54e7"},{"url":"https://git.kernel.org/stable/c/21fed37d2bdcde33453faf61d3d4d96c355f04bd"},{"url":"https://git.kernel.org/stable/c/3dba0e5276f131e36d6d8043191d856f49238628"},{"url":"https://git.kernel.org/stable/c/22863485a4626ec6ecf297f4cc0aef709bc862e4"}],"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 function is invoked directly by the CIFS client's demultiplex thread on unsolicited SMB2 frames received from the remote server over TCP/445, with no signature verification and no SessionId validation on that path. A malicious/compromised SMB server or an attacker able to inject into the established TCP stream reaches it remotely.\nAC:L - The attacker controls both sides of the race: it can induce session teardown (DFS referral churn, failed session setup/tree connect, multiuser tlink expiry) and then hold the session in SES_EXITING for up to the ~180 s SMB response timeout by simply withholding the SMB2 LOGOFF reply, while flooding OPLOCK_BREAK frames into that window. The resulting window is enormous and entirely attacker-timed.\nPR:N - The remote peer needs no credentials or privileges on the victim client; the oplock-break handler runs before any MID match, signature check, or SessionId validation, so even an unauthenticated packet injector on the connection triggers it.\nUI:N - Against a client with an existing SMB mount, no victim action is required — the malicious server or MITM drives both the teardown and the oplock-break frames on its own. The mount is pre-existing system configuration, not an in-attack user action.\nS:U - The use-after-free corrupts kernel heap objects within the same kernel security authority; no VM, IOMMU, or sandbox boundary is crossed.\nC:H - A use-after-free on session/tcon-reachable objects lets the attacker reclaim the freed slab object and steer the list traversal into attacker-influenced data, disclosing kernel memory and kernel pointers.\nI:H - The handler writes remote-controlled values (rsp->OplockLevel, oplock_epoch, PENDING_OPLOCK_BREAK bit) into the object it locates and then does cifsFileInfo_get() plus queue_work() on it, giving refcount-manipulation and workqueue-dispatch primitives on freed memory that are leverageable for control-flow hijack.\nA:H - Use-after-free in the demultiplex thread reliably produces kernel oops/panic, taking down the whole system even when full exploitation is not achieved."}]}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-08-05T11:30:29.384Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"3.13","versionEndExcluding":"5.15.209"},{"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":[{"cvssV3_1":{"scope":"UNCHANGED","version":"3.1","baseScore":5.5,"attackVector":"LOCAL","baseSeverity":"MEDIUM","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","integrityImpact":"NONE","userInteraction":"NONE","attackComplexity":"LOW","availabilityImpact":"HIGH","privilegesRequired":"LOW","confidentialityImpact":"NONE"}},{"other":{"type":"ssvc","content":{"timestamp":"2024-06-18T16:57:58.906769Z","id":"CVE-2024-35865","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"partial"}],"role":"CISA Coordinator","version":"2.0.3"}}}],"problemTypes":[{"descriptions":[{"type":"CWE","lang":"en","description":"CWE-noinfo Not enough information"}]}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2024-11-01T15:44:35.957Z"}},{"title":"CVE Program Container","references":[{"url":"https://git.kernel.org/stable/c/84488466b7a69570bdbf76dd9576847ab97d54e7","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/21fed37d2bdcde33453faf61d3d4d96c355f04bd","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/3dba0e5276f131e36d6d8043191d856f49238628","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/22863485a4626ec6ecf297f4cc0aef709bc862e4","tags":["x_transferred"]}],"providerMetadata":{"shortName":"CVE","orgId":"af854a3a-2127-422b-91ae-364da2661108","dateUpdated":"2024-08-02T03:21:48.469Z"}}]}}}