libsmb2 — security advisory
libsmb2 6.2+ is vulnerable to Buffer Overflow. When processing SMB2 chained PDUs (NextCommand), libsmb2 repeatedly calls smb2_add_iovector() to append to a fixed-size iovec array without checking the upper bound of v->niov (SMB2_MAX_VECTORS=256). An attacker can craft responses with many chained PDUs to overflow v->niov and perform heap out-of-bounds writes, causing memory corruption, crashes, and potentially arbitrary code execution. The SMB2_OPLOCK_BREAK path bypasses message ID validation.
- Products
- libsmb2
- Affected versions
- 6.2+dfsg-2, 6.2+dfsg-3, 6.2+dfsg-4
- Fixed versions
- Not specified
- CVEs
- CVE-2025-57632
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 31 Oct 2026, 01:34 UTC · Revision 1
Source evidence
libsmb2 6.2+ is vulnerable to Buffer Overflow. When processing SMB2 chained PDUs (NextCommand), libsmb2 repeatedly calls smb2_add_iovector() to append to a fixed-size iovec array without checking the upper bound of v->niov (SMB2_MAX_VECTORS=256). An attacker can craft responses with many chained PDUs to overflow v->niov and perform heap out-of-bounds writes, causing memory corruption, crashes, and potentially arbitrary code execution. The SMB2_OPLOCK_BREAK path bypasses message ID validation.
osv:UBUNTU-CVE-2025-57632
libsmb2
Fixed versions: Not specified
libsmb2
Fixed versions: Not specified
libsmb2
Fixed versions: Not specified
Complete source record
{
"id": "1e57ce824d095cc585d4b40c2bcf7491f681143bbdf241288f22ee4f4e5af8b3",
"url": "https://osv.dev/vulnerability/UBUNTU-CVE-2025-57632",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "UBUNTU-CVE-2025-57632",
"summary": "libsmb2 6.2+ is vulnerable to Buffer Overflow. When processing SMB2 chained PDUs (NextCommand), libsmb2 repeatedly calls smb2_add_iovector() to append to a fixed-size iovec array without checking the upper bound of v->niov (SMB2_MAX_VECTORS=256). An attacker can craft responses with many chained PDUs to overflow v->niov and perform heap out-of-bounds writes, causing memory corruption, crashes, and potentially arbitrary code execution. The SMB2_OPLOCK_BREAK path bypasses message ID validation.",
"evidence": "osv:UBUNTU-CVE-2025-57632",
"products": [
{
"name": {
"value": "libsmb2",
"evidence": "/affected/0/package/name"
},
"prerequisites": [],
"fixed_versions": [],
"affected_versions": [
{
"value": "6.2+dfsg-2",
"evidence": "/affected/0/versions"
}
]
},
{
"name": {
"value": "libsmb2",
"evidence": "/affected/1/package/name"
},
"prerequisites": [],
"fixed_versions": [],
"affected_versions": [
{
"value": "6.2+dfsg-3",
"evidence": "/affected/1/versions"
},
{
"value": "6.2+dfsg-4",
"evidence": "/affected/1/versions"
}
]
},
{
"name": {
"value": "libsmb2",
"evidence": "/affected/2/package/name"
},
"prerequisites": [],
"fixed_versions": [],
"affected_versions": [
{
"value": "6.2+dfsg-2",
"evidence": "/affected/2/versions"
},
{
"value": "6.2+dfsg-3",
"evidence": "/affected/2/versions"
}
]
}
],
"severity": "high",
"structured": {
"id": "UBUNTU-CVE-2025-57632",
"aliases": [
"UBUNTU-CVE-2025-57632"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
},
{
"type": "Ubuntu",
"score": "medium"
}
],
"affected": [
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
}
]
}
],
"package": {
"name": "libsmb2",
"purl": "pkg:deb/ubuntu/libsmb2?arch=source&distro=questing",
"ecosystem": "Ubuntu:25.10"
},
"versions": [
"6.2+dfsg-2"
],
"database_specific": {
"source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2025/UBUNTU-CVE-2025-57632.json"
},
"ecosystem_specific": {
"binaries": [
{
"binary_name": "libsmb2-6",
"binary_version": "6.2+dfsg-2"
}
]
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
}
]
}
],
"package": {
"name": "libsmb2",
"purl": "pkg:deb/ubuntu/libsmb2?arch=source&distro=stonking",
"ecosystem": "Ubuntu:26.10"
},
"versions": [
"6.2+dfsg-3",
"6.2+dfsg-4"
],
"database_specific": {
"source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2025/UBUNTU-CVE-2025-57632.json"
},
"ecosystem_specific": {
"binaries": [
{
"binary_name": "libsmb2-6",
"binary_version": "6.2+dfsg-4"
}
]
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
}
]
}
],
"package": {
"name": "libsmb2",
"purl": "pkg:deb/ubuntu/libsmb2?arch=source&distro=resolute",
"ecosystem": "Ubuntu:26.04:LTS"
},
"versions": [
"6.2+dfsg-2",
"6.2+dfsg-3"
],
"database_specific": {
"source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2025/UBUNTU-CVE-2025-57632.json"
},
"ecosystem_specific": {
"binaries": [
{
"binary_name": "libsmb2-6",
"binary_version": "6.2+dfsg-3"
}
]
}
}
],
"modified": "2026-10-17T12:57:09.082853178Z",
"provider": "osv",
"upstream": [
"CVE-2025-57632"
],
"references": [
"https://ubuntu.com/security/CVE-2025-57632",
"https://www.cve.org/CVERecord?id=CVE-2025-57632",
"https://gist.github.com/ZjW1nd/0b95b63307ceee7890e88e4abc6f041e",
"https://github.com/sahlberg/libsmb2",
"https://github.com/sahlberg/libsmb2/blob/master/lib/compat.c#L569"
]
},
"related_cves": [
{
"value": "CVE-2025-57632",
"evidence": "/upstream"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 356799,
"published_at": "2025-09-25T20:15:00+00:00"
}