smb: client: fix possible double free in smb2_set_ea()
In the Linux kernel, the following vulnerability has been resolved: smb: client: fix possible double free in smb2_set_ea() Clang static checker(scan-build) warning: fs/smb/client/smb2ops.c:1304:2: Attempt to free released memory. 1304 | kfree(ea); | ^~~~~~~~~ There is a double free in such case: 'ea is initialized to NULL' -> 'first successful memory allocation for ea' -> 'something failed, goto sea_exit' -> 'first memory release for ea' -> 'goto replay_again' -> 'second goto sea_exit before allocate memory for ea' -> 'second memory release for ea resulted in double free'. Re-initialie 'ea' to NULL near to the replay_again label, it can fix this double free problem.
- Products
- Kernel
- Affected versions
- Not specified
- Fixed versions
- 6.11.6, 6.6.59
- CVEs
- CVE-2024-50152
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 4 Nov 2026, 16:58 UTC · Revision 1
Source evidence
smb: client: fix possible double free in smb2_set_ea()
core-osv · Original sourcePublished 7 Nov 2024, 09:31 UTC
In the Linux kernel, the following vulnerability has been resolved: smb: client: fix possible double free in smb2_set_ea() Clang static checker(scan-build) warning: fs/smb/client/smb2ops.c:1304:2: Attempt to free released memory. 1304 | kfree(ea); | ^~~~~~~~~ There is a double free in such case: 'ea is initialized to NULL' -> 'first successful memory allocation for ea' -> 'something failed, goto sea_exit' -> 'first memory release for ea' -> 'goto replay_again' -> 'second goto sea_exit before allocate memory for ea' -> 'second memory release for ea resulted in double free'. Re-initialie 'ea' to NULL near to the replay_again label, it can fix this double free problem.
osv:CVE-2024-50152
Kernel
Fixed versions: 6.6.59, 6.11.6
Complete source record
{
"id": "9c7909204a453ab3d20e8db41625a36d0e0161c86cb309edc02748ccc15ba7e1",
"url": "https://osv.dev/vulnerability/CVE-2024-50152",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "smb: client: fix possible double free in smb2_set_ea()",
"summary": "In the Linux kernel, the following vulnerability has been resolved: smb: client: fix possible double free in smb2_set_ea() Clang static checker(scan-build) warning: fs/smb/client/smb2ops.c:1304:2: Attempt to free released memory. 1304 | kfree(ea); | ^~~~~~~~~ There is a double free in such case: 'ea is initialized to NULL' -> 'first successful memory allocation for ea' -> 'something failed, goto sea_exit' -> 'first memory release for ea' -> 'goto replay_again' -> 'second goto sea_exit before allocate memory for ea' -> 'second memory release for ea resulted in double free'. Re-initialie 'ea' to NULL near to the replay_again label, it can fix this double free problem.",
"evidence": "osv:CVE-2024-50152",
"products": [
{
"name": {
"value": "Kernel",
"evidence": "/affected/1/package/name"
},
"prerequisites": [],
"fixed_versions": [
{
"value": "6.6.59",
"evidence": "/affected/1/ranges"
},
{
"value": "6.11.6",
"evidence": "/affected/1/ranges"
}
],
"affected_versions": []
}
],
"severity": "critical",
"structured": {
"id": "CVE-2024-50152",
"aliases": [
"CVE-2024-50152"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
}
],
"affected": [
{
"ranges": [
{
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"type": "GIT",
"events": [
{
"introduced": "433042a91f9373241307725b52de573933ffedbf"
},
{
"fixed": "b1813c220b76f60b1727984794377c4aa849d4c1"
}
]
},
{
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"type": "GIT",
"events": [
{
"introduced": "4f1fffa2376922f3d1d506e49c0fd445b023a28e"
},
{
"fixed": "c9f758ecf2562dfdd4adf12c22921b5de8366123"
},
{
"fixed": "19ebc1e6cab334a8193398d4152deb76019b5d34"
}
]
},
{
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"type": "GIT",
"events": [
{
"introduced": "6.6.32"
},
{
"fixed": "6.6.59"
}
]
}
],
"versions": [
"v6.6.58",
"v6.6.57",
"v6.6.56",
"v6.6.55",
"v6.6.54",
"v6.6.53",
"v6.6.52",
"v6.6.51",
"v6.6.50",
"v6.6.49",
"v6.6.48",
"v6.6.47",
"v6.6.46",
"v6.6.45",
"v6.6.44",
"v6.6.43",
"v6.6.42",
"v6.6.41",
"v6.6.40",
"v6.6.39",
"v6.6.38",
"v6.6.37",
"v6.6.36",
"v6.6.35",
"v6.6.34",
"v6.6.33",
"v6.6.32"
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-50152.json"
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
},
{
"fixed": "6.6.59"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "6.7.0"
},
{
"fixed": "6.11.6"
}
]
}
],
"package": {
"name": "Kernel",
"ecosystem": "Linux"
},
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-50152.json"
}
}
],
"modified": "2026-10-28T02:30:37.671636217Z",
"provider": "osv",
"references": [
"https://git.kernel.org/stable/c/19ebc1e6cab334a8193398d4152deb76019b5d34",
"https://git.kernel.org/stable/c/b1813c220b76f60b1727984794377c4aa849d4c1",
"https://git.kernel.org/stable/c/c9f758ecf2562dfdd4adf12c22921b5de8366123",
"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/50xxx/CVE-2024-50152.json",
"https://nvd.nist.gov/vuln/detail/CVE-2024-50152",
"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"
],
"provider_metadata": {
"cna_assigner": "Linux",
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/50xxx/CVE-2024-50152.json"
}
},
"related_cves": [
{
"value": "CVE-2024-50152",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 505009,
"published_at": "2024-11-07T09:31:28.733+00:00"
}