CVE-2025-57632
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.
What to do
Fixed builds are available from Debian: see the table below for the fixed version per release.
Ubuntu has not shipped a fix for every release yet.
Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.
curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \ -H "Content-Type: text/plain" --data-binary @inventory.txt
Vendor status at a glance
Status by vendor and release
From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.
| Release | Package | Status | Fixed version | Advisory |
|---|---|---|---|---|
| Ubuntu 26.10 | libsmb2 | Fix pending | UBUNTU-CVE-2025-57632 | |
| Ubuntu 26.04 | libsmb2 | Under investigation | UBUNTU-CVE-2025-57632 | |
| Ubuntu 25.10 | libsmb2 | Will not fix Ubuntu decided not to fix this in this release | UBUNTU-CVE-2025-57632 | |
| Debian 14 | libsmb2 | Fixed | 6.2+dfsg-3 | DEBIAN-CVE-2025-57632 |
| Debian 13 | libsmb2 | Fixed | 6.2+dfsg-2+deb13u1 | DEBIAN-CVE-2025-57632 |
References
- https://github.com/sahlberg/libsmb2
- https://github.com/sahlberg/libsmb2/blob/master/lib/compat.c#L569
- https://gist.github.com/ZjW1nd/0b95b63307ceee7890e88e4abc6f041e
- https://github.com/sahlberg/libsmb2/commit/5e75eebf922b338cdb548d60cffb3b997d2a12e8
About this page
Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.