Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 11 additions & 4 deletions crates/lz4_flex/RUSTSEC-2026-0041.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,14 @@ cvss = "CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N"
[affected.functions]
"lz4_flex::block::decompress_into" = ["<= 0.11.5", "= 0.12.0"]
"lz4_flex::block::decompress_into_with_dict" = ["<= 0.11.5", "= 0.12.0"]
"lz4_flex::block::decompress" = ["<= 0.11.5", "= 0.12.0"]
"lz4_flex::block::decompress_with_dict" = ["<= 0.11.5", "= 0.12.0"]
"lz4_flex::block::decompress_size_prepended" = ["<= 0.11.5", "= 0.12.0"]
"lz4_flex::block::decompress_size_prepended_with_dict" = ["<= 0.11.5", "= 0.12.0"]
# Deprecated re-exports
"lz4_flex::decompress" = ["<= 0.11.5", "= 0.12.0"]
"lz4_flex::decompress_into" = ["<= 0.11.5", "= 0.12.0"]
"lz4_flex::decompress_size_prepended" = ["<= 0.11.5", "= 0.12.0"]
Comment on lines +14 to +21
Copy link
Copy Markdown
Author

@Marcono1234 Marcono1234 Mar 17, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I hope I did not overlook something here. If possible please double-check.


[versions]
patched = [">= 0.11.6, < 0.12.0", ">= 0.12.1"]
Expand All @@ -28,13 +36,12 @@ the initialized portion of the output buffer.

Two scenarios are affected:

- Decompressing with the `unsafe` implementation (`safe-decode` feature flag disabled, which
is the default): can leak content of uninitialized memory as part of the decompressed result.
- Decompressing with the `unsafe` implementation (`safe-decode` feature flag disabled; flag is
enabled by default): can leak content of uninitialized memory as part of the decompressed result.
Comment on lines -31 to +40
Copy link
Copy Markdown
Author

@Marcono1234 Marcono1234 Mar 17, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reworded this to make it (hopefully) clearer; "which is the default" might have been ambiguous, e.g. whether it means "the flag is enabled by default" or "the flag being disabled is the default".

I hope that is ok.

- Decompressing into a reused, user-supplied output buffer (also affects `safe-decode`): can
leak the previous contents of the output buffer as part of the decompressed result.

Only the block-based API is affected: `lz4_flex::block::decompress_into` and
`lz4_flex::block::decompress_into_with_dict`. All frame APIs are unaffected.
Only the block-based API is affected. All frame APIs are unaffected.

The flaw was corrected in versions 0.11.6 and 0.12.1 by properly validating offset values
during decompression.
Expand Down