-
Notifications
You must be signed in to change notification settings - Fork 1.8k
[confighttp] Fix zstd decoder data corruption due to decoder pooling #13955
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Codecov Report❌ Patch coverage is
❌ Your patch status has failed because the patch coverage (70.00%) is below the target coverage (95.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## main #13955 +/- ##
==========================================
- Coverage 91.67% 91.67% -0.01%
==========================================
Files 653 653
Lines 42554 42559 +5
==========================================
+ Hits 39013 39014 +1
- Misses 2733 2736 +3
- Partials 808 809 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
lahsivjar
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! A minor comment. Thanks a lot for fixing this major bug.
Co-authored-by: Damien Mathieu <[email protected]>
| } | ||
| } | ||
|
|
||
| func TestPooledZstdReadCloserReadAfterClose(t *testing.T) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[to reviewer] intentionally only testing zstd but not other compressions, because the behavior is highly implementation dependent. And there is no point asserting behavior of code implemented elsewhere.
codeboten
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @carsonip
995bea5
Description
See bug description in #13954
Fix zstd decoder pool and data corruption by guarding against multiple reader Close.
As this is a security issue, ideally the change goes out in an emergency bugfix release
Link to tracking issue
Fixes #13954
Testing
Confirmed it does not fail test in #13954
Documentation