smb: client: Handle kstrdup failures for passwords
In the Linux kernel, the following vulnerability has been resolved: smb: client: Handle kstrdup failures for passwords In smb3_reconfigure(), after duplicating ctx->password and ctx->password2 with kstrdup(), we need to check for allocation failures. If ses->password allocation fails, return -ENOMEM. If ses->password2 allocation fails, free ses->password, set it to NULL, and return -ENOMEM.
- Products
- Kernel
- Affected versions
- Not specified
- Fixed versions
- 6.11.6, 6.6.59
- CVEs
- CVE-2024-50120
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 3 Nov 2026, 08:14 UTC · Revision 1
Source evidence
smb: client: Handle kstrdup failures for passwords
core-osv · Original sourcePublished 5 Nov 2024, 17:10 UTC
In the Linux kernel, the following vulnerability has been resolved: smb: client: Handle kstrdup failures for passwords In smb3_reconfigure(), after duplicating ctx->password and ctx->password2 with kstrdup(), we need to check for allocation failures. If ses->password allocation fails, return -ENOMEM. If ses->password2 allocation fails, free ses->password, set it to NULL, and return -ENOMEM.
osv:CVE-2024-50120
Kernel
Fixed versions: 6.6.59, 6.11.6
Complete source record
{
"id": "43b8a84b1469d6922ec3d7608c53452bef8850a03187c3d0970a7888b7b94a63",
"url": "https://osv.dev/vulnerability/CVE-2024-50120",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "smb: client: Handle kstrdup failures for passwords",
"summary": "In the Linux kernel, the following vulnerability has been resolved: smb: client: Handle kstrdup failures for passwords In smb3_reconfigure(), after duplicating ctx->password and ctx->password2 with kstrdup(), we need to check for allocation failures. If ses->password allocation fails, return -ENOMEM. If ses->password2 allocation fails, free ses->password, set it to NULL, and return -ENOMEM.",
"evidence": "osv:CVE-2024-50120",
"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": "unknown",
"structured": {
"id": "CVE-2024-50120",
"aliases": [
"CVE-2024-50120"
],
"affected": [
{
"ranges": [
{
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"type": "GIT",
"events": [
{
"introduced": "7e8cffa4f85e6839335d75e6b47f918d90c1d194"
},
{
"fixed": "35dbac8c328d6afe937cd45ecd41d209d0b9f8b8"
}
]
},
{
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"type": "GIT",
"events": [
{
"introduced": "c1eb537bf4560b3ad4df606c266c665624f3b502"
},
{
"fixed": "35488799b0ab6e4327f82e1d9209a60805665b37"
},
{
"fixed": "9a5dd61151399ad5a5d69aad28ab164734c1e3bc"
}
]
},
{
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"type": "GIT",
"events": [
{
"introduced": "6.6.24"
},
{
"fixed": "6.6.59"
}
]
},
{
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"type": "GIT",
"events": [
{
"introduced": "6.7.12"
},
{
"fixed": "6.8"
}
]
},
{
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"type": "GIT",
"events": [
{
"introduced": "6.8.3"
},
{
"fixed": "6.9"
}
]
},
{
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"type": "GIT",
"events": [
{
"introduced": "e78308a6dcab1e53b38b8dd952e69c515cd324d7"
}
]
},
{
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"type": "GIT",
"events": [
{
"introduced": "2a0fc63f1f4fccfeb367d0c57b8a243cec60c26c"
}
]
}
],
"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",
"v6.6.31",
"v6.6.30",
"v6.6.29",
"v6.6.28",
"v6.6.27",
"v6.6.26",
"v6.6.25",
"v6.6.24",
"v6.7.12",
"v6.8.12",
"v6.8.11",
"v6.8.10",
"v6.8.9",
"v6.8.8",
"v6.8.7",
"v6.8.6",
"v6.8.5",
"v6.8.4",
"v6.8.3"
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-50120.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-50120.json"
}
}
],
"modified": "2026-10-28T02:30:27.268115767Z",
"provider": "osv",
"references": [
"https://git.kernel.org/stable/c/35488799b0ab6e4327f82e1d9209a60805665b37",
"https://git.kernel.org/stable/c/35dbac8c328d6afe937cd45ecd41d209d0b9f8b8",
"https://git.kernel.org/stable/c/9a5dd61151399ad5a5d69aad28ab164734c1e3bc",
"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/50xxx/CVE-2024-50120.json",
"https://nvd.nist.gov/vuln/detail/CVE-2024-50120",
"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-50120.json"
}
},
"related_cves": [
{
"value": "CVE-2024-50120",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": null
},
"source_id": "core-osv",
"document_id": 493678,
"published_at": "2024-11-05T17:10:49.887+00:00"
}