Description
libsmb2 before 6.3 contains integer overflow vulnerabilities in the DCE/RPC NDR decoder in lib/dcerpc.c that allow heap out-of-bounds reads and writes. A malicious SMB server or machine-in-the-middle on unsigned connections can send crafted NetrShareEnum replies with wrapping actual_count or max_count values when clients call smb2_share_enum_async(), corrupting heap memory.
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| sahlberg | libsmb2 | < 6.3 | 6.3 |
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 14 | libsmb2 | No fix yet | — |
| Debian 13 | libsmb2 | No fix yet | — |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 26.10 | libsmb2 | No fix yet | — |
| Ubuntu 26.04 LTS | libsmb2 | No fix yet | — |
References
- https://hackmd.io/@haindpwn/libsmb2-dcerpc-ndr-count-overflow-oob technical-description exploit
- https://github.com/sahlberg/libsmb2/issues/496 issue-tracking
- https://github.com/sahlberg/libsmb2/commit/a79f6914cb5ed3f74293d15cdea901261ce179ff patch
- libsmb2 libsmb2-6.3 Release Notes release-notes
- https://github.com/sahlberg/libsmb2 product
- VulnCheck Advisory: libsmb2 before 6.3 Integer Overflow in DCE/RPC NDR Decoder via NetrShareEnum third-party-advisory