CVE-2026-25541 Bytes is vulnerable to integer overflow in BytesMut::reserve
- Published
- Updated
- Exploit status
- No public exploit known
- CISA SSVC
- Proof of concept public · automatable: no · technical impact: partial
- Technology
- UbuntuDebian
Description
Bytes is a utility library for working with bytes. From version 1.2.1 to before 1.11.1, Bytes is vulnerable to integer overflow in BytesMut::reserve. In the unique reclaim path of BytesMut::reserve, if the condition "v_capacity >= new_cap + offset" uses an unchecked addition. When new_cap + offset overflows usize in release builds, this condition may incorrectly pass, causing self.cap to be set to a value that exceeds the actual allocated capacity. Subsequent APIs such as spare_capacity_mut() then trust this corrupted cap value and may create out-of-bounds slices, leading to UB. This behavior is observable in release builds (integer overflow wraps), whereas debug builds panic due to overflow checks. This issue has been patched in version 1.11.1.
Upgrade path
10 packages: 5 fixed, 5 with no fix yet.
| Package | Affected | Fixed in | Status |
|---|---|---|---|
| debian/rust-bytes(Debian 12) | = 1.2.1-1; = 1.4.0-1; = 1.5.0-1; = 1.7.2-1 +7 more | No fix listed | No fix yet |
| debian/rust-bytes(Debian 13) | = 1.9.0-1; = 1.10.1-1; = 1.11.0-1; = 1.11.1-1 +2 more | No fix listed | No fix yet |
| ubuntu/rust-bytes(Ubuntu 22.04) | All versions | No fix listed | No fix yet |
| ubuntu/rust-bytes(Ubuntu 24.04) | All versions | No fix listed | No fix yet |
| ubuntu/rust-bytes(Ubuntu 26.04) | All versions | No fix listed | No fix yet |
| azure linux rust-afterburn(Azure Linux 3.0) | < 5.8.2-2 | 5.8.2-2 | Fixed |
| azure linux trident(Azure Linux 3.0) | < 0.22.0-1 | 0.22.0-1 | Fixed |
| crates.io bytes(crates.io) | >= 1.2.1, < 1.11.1 | 1.11.1 | Fixed |
| debian/rust-bytes(Debian 14) | < 1.11.1-1; = 1.9.0-1; = 1.10.1-1; = 1.11.0-1 | 1.11.1-1 | Fixed |
| tokio-rs bytes | = >= 1.2.1, < 1.11.1; >= 1.2.1, < 1.11.1 | 1.11.1 | Fixed |
Affected products
| Product | Affected versions | Fixed in |
|---|---|---|
| azure linux trident(Azure Linux:3.0) | < 0.22.0-1 | 0.22.0-1 |
| azure linux rust-afterburn(Azure Linux:3.0) | < 5.8.2-2 | 5.8.2-2 |
| crates.io bytes(crates.io) | >= 1.2.1, < 1.11.1 | 1.11.1 |
| tokio-rs bytes | = >= 1.2.1, < 1.11.1 | No fix listed |
| debian/rust-bytes(Debian:12) | All versions | No fix listed |
| debian/rust-bytes(Debian:12) | = 1.10.1-1 | No fix listed |
| debian/rust-bytes(Debian:12) | = 1.11.0-1 | No fix listed |
| debian/rust-bytes(Debian:12) | = 1.11.1-1 | No fix listed |
| debian/rust-bytes(Debian:12) | = 1.12.1-1 | No fix listed |
| debian/rust-bytes(Debian:12) | = 1.2.1-1 | No fix listed |
| debian/rust-bytes(Debian:12) | = 1.4.0-1 | No fix listed |
| debian/rust-bytes(Debian:12) | = 1.5.0-1 | No fix listed |
| debian/rust-bytes(Debian:12) | = 1.7.2-1 | No fix listed |
| debian/rust-bytes(Debian:12) | = 1.8.0-1 | No fix listed |
| debian/rust-bytes(Debian:12) | = 1.9.0-1 | No fix listed |
| debian/rust-bytes(Debian:13) | All versions | No fix listed |
| debian/rust-bytes(Debian:13) | = 1.10.1-1 | No fix listed |
| debian/rust-bytes(Debian:13) | = 1.11.0-1 | No fix listed |
| debian/rust-bytes(Debian:13) | = 1.11.1-1 | No fix listed |
| debian/rust-bytes(Debian:13) | = 1.12.1-1 | No fix listed |
| debian/rust-bytes(Debian:13) | = 1.9.0-1 | No fix listed |
| debian/rust-bytes(Debian:14) | < 1.11.1-1 | 1.11.1-1 |
| debian/rust-bytes(Debian:14) | = 1.10.1-1 | No fix listed |
| debian/rust-bytes(Debian:14) | = 1.11.0-1 | No fix listed |
| debian/rust-bytes(Debian:14) | = 1.9.0-1 | No fix listed |
Show 4 more
| Product | Affected versions | Fixed in |
|---|---|---|
| ubuntu/rust-bytes(Ubuntu:22.04) | All versions | No fix listed |
| ubuntu/rust-bytes(Ubuntu:24.04) | All versions | No fix listed |
| ubuntu/rust-bytes(Ubuntu:26.04) | All versions | No fix listed |
| tokio-rs bytes | >= 1.2.1, < 1.11.1 | 1.11.1 |
References
- MSRC Security Update Guide vendor-advisory
- CBL-Mariner Releases vendor-advisory
- https://github.com/tokio-rs/bytes/security/advisories/GHSA-434x-w66g-qw3r exploit vendor-advisory
- nvd.nist.gov third-party-advisory vendor-advisory
- https://github.com/tokio-rs/bytes/commit/d0293b0e35838123c51ca5dfdf468ecafee4398f patch
- github.com product
- https://github.com/tokio-rs/bytes/releases/tag/v1.11.1 product release-notes
- https://rustsec.org/advisories/RUSTSEC-2026-0007.html exploit third-party-advisory vendor-advisory
- crates.io product
- github.com
- Debian Security Tracker CVE-2026-25541 vendor-advisory
- Ubuntu CVE tracker vendor-advisory
- www.cve.org