{ "dataType": "CVE_RECORD", "dataVersion": "5.2", "cveMetadata": { "cveId": "CVE-2024-50152", "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67", "state": "PUBLISHED", "assignerShortName": "Linux", "dateReserved": "2024-10-21T19:36:19.959Z", "datePublished": "2024-11-07T09:31:28.733Z", "dateUpdated": "2026-08-05T11:42:06.009Z" }, "containers": { "cna": { "providerMetadata": { "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67", "shortName": "Linux", "dateUpdated": "2026-08-05T11:42:06.009Z" }, "descriptions": [ { "lang": "en", "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nsmb: client: fix possible double free in smb2_set_ea()\n\nClang static checker(scan-build) warning:\nfs/smb/client/smb2ops.c:1304:2: Attempt to free released memory.\n 1304 | kfree(ea);\n | ^~~~~~~~~\n\nThere is a double free in such case:\n'ea is initialized to NULL' -> 'first successful memory allocation for\nea' -> 'something failed, goto sea_exit' -> 'first memory release for ea'\n-> 'goto replay_again' -> 'second goto sea_exit before allocate memory\nfor ea' -> 'second memory release for ea resulted in double free'.\n\nRe-initialie 'ea' to NULL near to the replay_again label, it can fix this\ndouble free problem." } ], "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 bug is driven entirely by data from a remote SMB peer over TCP/445 — the server induces the replay by resetting the connection (`-EAGAIN`) and then returns `STATUS_NO_EAS_ON_FILE`/an oversized `OutputBufferLength` to force the early `sea_exit` on the retry. A compromised file server or an on-path attacker spoofing SMB responses reaches it with no local access.\nAC:L - The malicious server deterministically controls both halves of the sequence — dropping the TCP connection mid-request and crafting the QUERY_INFO reply on the replay — needing only two round trips, with no race or memory-layout condition outside its control. Mounted shares see routine xattr traffic from backup, archive, and desktop-metadata tooling.\nPR:N - A malicious or compromised SMB server holds no privileges whatsoever on the victim client, and nothing on the code path checks server trust. Even in a purely local framing, only ordinary write access to a file on the share is needed.\nUI:N - No victim action is required at exploitation time — the mount is already established via fstab/autofs/systemd, and the setxattr/removexattr that enters `smb2_set_ea()` is generated by ordinary background activity such as `rsync -X`, `cp -a`, `tar --xattrs`, or indexing daemons.\nS:U - The double free corrupts the kernel slab allocator within the same security authority as the vulnerable code; no VM, IOMMU, or sandbox boundary is crossed.\nC:H - The second `kfree()` releases a chunk that has almost certainly been reallocated to another live kernel object, producing a use-after-free with two owners; the attacker-chosen allocation size enables grooming into a targeted kmalloc cache and reading back arbitrary kernel data.\nI:H - Double-free/UAF of an attacker-sized slab object is the canonical primitive for heap spraying and controlled overwrite of an adjacent or aliased structure, giving arbitrary write and control-flow hijack potential.\nA:H - Even unexploited, the double free triggers slab freelist corruption or an immediate `BUG()` under `CONFIG_SLAB_FREELIST_HARDENED`, causing a kernel oops/panic that is remotely and repeatably inducible by the server." } ] } ], "affected": [ { "product": "Linux", "vendor": "Linux", "defaultStatus": "unaffected", "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git", "programFiles": [ "fs/smb/client/smb2ops.c" ], "versions": [ { "version": "433042a91f9373241307725b52de573933ffedbf", "lessThan": "b1813c220b76f60b1727984794377c4aa849d4c1", "status": "affected", "versionType": "git" }, { "version": "4f1fffa2376922f3d1d506e49c0fd445b023a28e", "lessThan": "c9f758ecf2562dfdd4adf12c22921b5de8366123", "status": "affected", "versionType": "git" }, { "version": "4f1fffa2376922f3d1d506e49c0fd445b023a28e", "lessThan": "19ebc1e6cab334a8193398d4152deb76019b5d34", "status": "affected", "versionType": "git" }, { "version": "6.6.32", "lessThan": "6.6.59", "status": "affected", "versionType": "semver" } ] }, { "product": "Linux", "vendor": "Linux", "defaultStatus": "affected", "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git", "programFiles": [ "fs/smb/client/smb2ops.c" ], "versions": [ { "version": "6.8", "status": "affected" }, { "version": "0", "lessThan": "6.8", "status": "unaffected", "versionType": "semver" }, { "version": "6.6.59", "lessThanOrEqual": "6.6.*", "status": "unaffected", "versionType": "semver" }, { "version": "6.11.6", "lessThanOrEqual": "6.11.*", "status": "unaffected", "versionType": "semver" }, { "version": "6.12", "lessThanOrEqual": "*", "status": "unaffected", "versionType": "original_commit_for_fix" } ] } ], "cpeApplicability": [ { "nodes": [ { "operator": "OR", "negate": false, "cpeMatch": [ { "vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "6.6.32", "versionEndExcluding": "6.6.59" }, { "vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "6.8", "versionEndExcluding": "6.11.6" }, { "vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "6.8", "versionEndExcluding": "6.12" } ] } ] } ], "references": [ { "url": "https://git.kernel.org/stable/c/b1813c220b76f60b1727984794377c4aa849d4c1" }, { "url": "https://git.kernel.org/stable/c/c9f758ecf2562dfdd4adf12c22921b5de8366123" }, { "url": "https://git.kernel.org/stable/c/19ebc1e6cab334a8193398d4152deb76019b5d34" } ], "title": "smb: client: fix possible double free in smb2_set_ea()", "x_generator": { "engine": "bippy-1.2.0" } } } }