Skip to content

KAFKA-20528: Verify LZ4 frame content checksum on the read path#22162

Open
radmirnovii wants to merge 1 commit intoapache:trunkfrom
radmirnovii:KAFKA-20528
Open

KAFKA-20528: Verify LZ4 frame content checksum on the read path#22162
radmirnovii wants to merge 1 commit intoapache:trunkfrom
radmirnovii:KAFKA-20528

Conversation

@radmirnovii
Copy link
Copy Markdown

Lz4BlockInputStream consumed the 4-byte XXH32 content-checksum trailer when the FLG bit was set but never compared it against the decoded payload, so non-Kafka producers' frames passed through unverified. (Kafka's own writer hardcodes the bit to 0, so Kafka-to-Kafka frames are unaffected.)

Fix: hash decoded blocks via Checksums.update on a
StreamingXXHash32 and verify at the endmark

@github-actions github-actions Bot added triage PRs from the community clients small Small PRs labels Apr 28, 2026
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 5, 2026

A label of 'needs-attention' was automatically added to this PR in order to raise the
attention of the committers. Once this issue has been triaged, the triage label
should be removed to prevent this automation from happening again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

clients needs-attention small Small PRs triage PRs from the community

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant