{"id":"CVE-2024-35998","state":"PUBLISHED","title":"smb3: fix lock ordering potential deadlock in cifs_sync_mid_result","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nsmb3: fix lock ordering potential deadlock in cifs_sync_mid_result\n\nCoverity spotted that the cifs_sync_mid_result function could deadlock\n\n\"Thread deadlock (ORDER_REVERSAL) lock_order: Calling spin_lock acquires\nlock TCP_Server_Info.srv_lock while holding lock TCP_Server_Info.mid_lock\"\n\nAddresses-Coverity: 1590401 (\"Thread deadlock (ORDER_REVERSAL)\")","publishedAt":"2024-05-20T09:48:01.009Z","updatedAt":"2026-08-05T11:31:29.368Z","severity":{"score":7.5,"label":"High","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","source":"Linux"},"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"64d62ac6d6514cba1305bd08e271ec1843bdd612","status":"affected","lessThan":"c7a4bca289e50bb4b2650f845c41bb3e453f4c66","versionType":"git"},{"version":"90c49fce1c43e1cc152695e20363ff5087897c09","status":"affected","lessThan":"699f8958dece132709c0bff6a9700999a2a63b75","versionType":"git"},{"version":"90c49fce1c43e1cc152695e20363ff5087897c09","status":"affected","lessThan":"8248224ab5b8ca7559b671917c224296a4d671fc","versionType":"git"},{"version":"90c49fce1c43e1cc152695e20363ff5087897c09","status":"affected","lessThan":"8861fd5180476f45f9e8853db154600469a0284f","versionType":"git"},{"version":"c511954bf142fe1995aec3c739a9f1a76990283a","status":"affected","versionType":"git"},{"version":"0b08c4c499200be67d54c439d56e5ea866869945","status":"affected","versionType":"git"},{"version":"6.1.28","status":"affected","lessThan":"6.1.90","versionType":"semver"},{"version":"6.2.15","status":"affected","lessThan":"6.3","versionType":"semver"},{"version":"6.3.2","status":"affected","lessThan":"6.4","versionType":"semver"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/smb/client/transport.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.4","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.4","versionType":"semver"},{"version":"6.1.90","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.30","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.8.9","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/transport.c"]}],"references":["https://git.kernel.org/stable/c/c7a4bca289e50bb4b2650f845c41bb3e453f4c66","https://git.kernel.org/stable/c/699f8958dece132709c0bff6a9700999a2a63b75","https://git.kernel.org/stable/c/8248224ab5b8ca7559b671917c224296a4d671fc","https://git.kernel.org/stable/c/8861fd5180476f45f9e8853db154600469a0284f"],"weaknesses":[],"ingestedAt":"2026-10-29T20:07:30.303Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2024/35xxx/CVE-2024-35998.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2024-35998","state":"PUBLISHED","datePublished":"2024-05-20T09:48:01.009Z","dateUpdated":"2026-08-05T11:31:29.368Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2024-05-17T13:50:33.148Z"},"containers":{"cna":{"title":"smb3: fix lock ordering potential deadlock in cifs_sync_mid_result","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nsmb3: fix lock ordering potential deadlock in cifs_sync_mid_result\n\nCoverity spotted that the cifs_sync_mid_result function could deadlock\n\n\"Thread deadlock (ORDER_REVERSAL) lock_order: Calling spin_lock acquires\nlock TCP_Server_Info.srv_lock while holding lock TCP_Server_Info.mid_lock\"\n\nAddresses-Coverity: 1590401 (\"Thread deadlock (ORDER_REVERSAL)\")"}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"64d62ac6d6514cba1305bd08e271ec1843bdd612","status":"affected","lessThan":"c7a4bca289e50bb4b2650f845c41bb3e453f4c66","versionType":"git"},{"version":"90c49fce1c43e1cc152695e20363ff5087897c09","status":"affected","lessThan":"699f8958dece132709c0bff6a9700999a2a63b75","versionType":"git"},{"version":"90c49fce1c43e1cc152695e20363ff5087897c09","status":"affected","lessThan":"8248224ab5b8ca7559b671917c224296a4d671fc","versionType":"git"},{"version":"90c49fce1c43e1cc152695e20363ff5087897c09","status":"affected","lessThan":"8861fd5180476f45f9e8853db154600469a0284f","versionType":"git"},{"version":"c511954bf142fe1995aec3c739a9f1a76990283a","status":"affected","versionType":"git"},{"version":"0b08c4c499200be67d54c439d56e5ea866869945","status":"affected","versionType":"git"},{"version":"6.1.28","status":"affected","lessThan":"6.1.90","versionType":"semver"},{"version":"6.2.15","status":"affected","lessThan":"6.3","versionType":"semver"},{"version":"6.3.2","status":"affected","lessThan":"6.4","versionType":"semver"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/smb/client/transport.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.4","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.4","versionType":"semver"},{"version":"6.1.90","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.30","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.8.9","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/transport.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/c7a4bca289e50bb4b2650f845c41bb3e453f4c66"},{"url":"https://git.kernel.org/stable/c/699f8958dece132709c0bff6a9700999a2a63b75"},{"url":"https://git.kernel.org/stable/c/8248224ab5b8ca7559b671917c224296a4d671fc"},{"url":"https://git.kernel.org/stable/c/8861fd5180476f45f9e8853db154600469a0284f"}],"metrics":[{"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","baseScore":7.5,"baseSeverity":"HIGH"},"scenarios":[{"lang":"en","value":"AV:N - Both halves of the lock-order reversal are driven by SMB3 response frames received from the remote server — `smb2_decrypt_offload()` runs on server-supplied encrypted read payloads, and the mid states examined in `cifs_sync_mid_result()` are set solely by response parsing (`dequeue_mid()`, `handle_read_data()`). A malicious, compromised, or MITM'd SMB server reaches the code purely over the network, matching this CNA's AV:N treatment of other cifs-client bugs (CVE-2024-39468, CVE-2024-42256).\nAC:L - The remote server controls both sides of the race — it chooses response size, encryption, timing, and error status, so it can drive `smb2_decrypt_offload()` into its `srv_lock`→`mid_lock` branch on one CPU while forcing an unexpected mid state into `cifs_sync_mid_result()`'s `mid_lock`→`srv_lock` path on another, and it can repeat this indefinitely. Where the attacker creates the race, AC is Low.\nPR:N - The attacker is the remote SMB peer (or a network attacker able to spoof/hijack the SMB connection); no account, credential, or local privilege on the victim host is required to send the responses that trigger the deadlock.\nUI:N - Exploitation needs no victim action — the CIFS share is already mounted as a normal deployment condition (fstab/automount), and ordinary background I/O supplies the requests whose responses the attacker manipulates.\nS:U - The deadlock is confined to the kernel of the affected client machine; no VM, IOMMU, or sandbox boundary is crossed.\nC:N - The bug is purely a lock acquisition-order violation — no memory is read out of bounds, no freed object is accessed, and no data is disclosed.\nI:N - No memory corruption, out-of-bounds write, or data modification occurs; the flaw only affects the order in which two spinlocks are taken.\nA:H - An ABBA deadlock on `srv_lock`/`mid_lock` permanently wedges two CPUs spinning with preemption disabled while holding both locks, hanging all CIFS I/O and every subsequent taker of either lock, resulting in a hard lockup/panic."}]}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-08-05T11:31:29.368Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.1.28","versionEndExcluding":"6.1.90"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.4","versionEndExcluding":"6.6.30"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.4","versionEndExcluding":"6.8.9"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.4","versionEndExcluding":"6.9"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.2.15"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.3.2"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}},"adp":[{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"id":"CVE-2024-35998","role":"CISA Coordinator","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"partial"}],"version":"2.0.3","timestamp":"2024-05-20T15:02:37.597444Z"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2024-06-04T17:33:59.159Z"}},{"title":"CVE Program Container","references":[{"url":"https://git.kernel.org/stable/c/c7a4bca289e50bb4b2650f845c41bb3e453f4c66","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/699f8958dece132709c0bff6a9700999a2a63b75","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/8248224ab5b8ca7559b671917c224296a4d671fc","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/8861fd5180476f45f9e8853db154600469a0284f","tags":["x_transferred"]}],"providerMetadata":{"shortName":"CVE","orgId":"af854a3a-2127-422b-91ae-364da2661108","dateUpdated":"2024-08-02T03:30:11.585Z"}}]}}}