Update Rust crate bytes to v1.11.1 [SECURITY]#453
Open
renovate[bot] wants to merge 1 commit intomainfrom
Open
Conversation
Contributor
Author
|
auto-merge was automatically disabled
March 27, 2026 00:57
Pull request was closed
eb435a6 to
7c0a0b3
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
1.5.0→1.11.1bytes has integer overflow in BytesMut::reserve
CVE-2026-25541 / GHSA-434x-w66g-qw3r
More information
Details
Details
In the unique reclaim path of
BytesMut::reserve, the conditionif v_capacity >= new_cap + offsetuses an unchecked addition. When
new_cap + offsetoverflowsusizein release builds, this condition may incorrectly pass, causingself.capto be set to a value that exceeds the actual allocated capacity. Subsequent APIs such asspare_capacity_mut()then trust this corruptedcapvalue 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.
PoC
Workarounds
Users of
BytesMut::reserveare only affected if integer overflow checks are configured to wrap. When integer overflow is configured to panic, this issue does not apply.This vulnerability is also known as RUSTSEC-2026-0007.
Severity
CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N/E:PReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
Release Notes
tokio-rs/bytes (bytes)
v1.11.1Compare Source
BytesMut::reservev1.11.0Compare Source
Fixed
BytesMutonly reuse if src has remaining (#803)BytesMut::put::<Bytes>(#793)BytesMut::put(#794)BytesMut::remaining_mutto useisize::MAXinstead ofusize::MAX(#795)Internal changes
slice()for empty slices. (#780)Vtable::to_*->Vtable::into_*(#776)BytesMut::freezedoctest on wasm (#790)drop_fnoffrom_ownerinto vtable (#801)v1.10.1Compare Source
Fixed
to_vecwithBytes::from_owner(#773)v1.10.0Compare Source
Added
try_get_*methods forBuftrait (#753)Buf::chunks_vectoredforTake(#617)Buf::chunks_vectoredforVecDeque<u8>(#708)Fixed
chunks_vectored(#754)panic=abort(#749)v1.9.0Compare Source
Added
Bytes::from_ownerto enable externally-allocated memory (#742)Documented
Internal changes
v1.8.0Compare Source
split_off/split_tofor empty slices (#740)v1.7.2Compare Source
Fixed
Buf::{get_int, get_int_le}(#732)Documented
Internal changes
v1.7.1Compare Source
This release reverts the following change due to a regression:
<BytesMut as Buf>::advanceimpl (#698)The revert can be found at #726.
v1.7.0Compare Source
Added
BytestoBytesMut(#695, #710)Documented
BytesMut::zeroedworks (#714)Buf::chunk(#717)Changed
BytesMut::truncate<BytesMut as Buf>::advanceimpl (#698)must_usesuggestion ofBytesMut::split(#699)Internal changes
ManuallyDropinstead ofmem::forget(#678)leninBytesMut::reserve(#682)Bytes::copy_to_bytes(#688)BytesMut::truncate(#694)BytesMut::resize(#696)Bytes::split_to,Bytes::split_off(#689, #693)offset_fromin more places (#705)IntoIter(#707)v1.6.1Compare Source
This release fixes a bug where
Bytes::is_uniquereturns incorrect values whenthe
Bytesoriginates from a sharedBytesMut. (#718)v1.6.0Compare Source
Added
Bytes::is_unique(#643)Documented
Internal changes
UninitSlice::as_uninit_slice_mut()logic (#644)self.instead ofSelf::(#642)BytesMut: Assert alignment ofShared(#652)From<Vec>(#667)subinstead ofoffset(#668)set_vec_posdoes not need a second parameter (#672)get_vec_pos: use&selfinstead of&mut self(#670)split_at/split_to(#663)Iteratorfrom the prelude (#673)copy_to_bytes: Add panic section to docs (#676)ManuallyDropinstead ofmem::forget(#675)Configuration
📅 Schedule: (UTC)
🚦 Automerge: Enabled.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about these updates again.
This PR was generated by Mend Renovate. View the repository job log.