You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
decdn-bao-range: encode_verified_range should reject overlong range_data #1055
encode_verified_range (pre-existing #823 origin-range-import code, moved verbatim into the new decdn-bao-range leaf crate) wraps range_data in an OffsetReadAt that only exposes [aligned.fetch_start, aligned.fetch_end). If a caller passes range_data longer than aligned.fetch_len() (e.g. an origin 206 with a corrupt/extra tail), the extra bytes are silently ignored.
No integrity impact — the bytes that are imported are still bao-verified against the root, and the extra tail is never imported — but a defensive guard would surface malformed input instead of silently dropping it:
if u64::try_from(range_data.len()).ok() != Some(aligned.fetch_len()){returnErr(RangeVerifyError::RangeDataSize{expected: aligned.fetch_len(),got: range_data.len(), blob_size });}
Deferred from #1052 (out of #915 scope; pre-existing behavior, no integrity impact).
Activity
fix(bao-range): reject overlong range_data in encode_verified_range (#…