chore(deps): update rust crate bytes to v1.11.1 [security] #362
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.6.0→1.11.1GitHub Vulnerability Alerts
CVE-2026-25541
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.
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)Configuration
📅 Schedule: Branch creation - "" (UTC), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.