Skip to content

Conversation

@carsonip
Copy link
Contributor

@carsonip carsonip commented Oct 9, 2025

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

@carsonip carsonip requested a review from a team as a code owner October 9, 2025 11:10
@carsonip carsonip requested a review from evan-bradley October 9, 2025 11:10
@codecov
Copy link

codecov bot commented Oct 9, 2025

Codecov Report

❌ Patch coverage is 70.00000% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 91.67%. Comparing base (0cdc78b) to head (e1cbcf3).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
config/confighttp/compression.go 70.00% 2 Missing and 1 partial ⚠️

❌ 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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Member

@lahsivjar lahsivjar left a 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.

}
}

func TestPooledZstdReadCloserReadAfterClose(t *testing.T) {
Copy link
Contributor Author

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.

@carsonip carsonip requested review from dmathieu and lahsivjar October 9, 2025 12:09
Copy link
Contributor

@codeboten codeboten left a comment

Choose a reason for hiding this comment

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

Thanks @carsonip

@codeboten codeboten added this pull request to the merge queue Oct 9, 2025
Merged via the queue into open-telemetry:main with commit 995bea5 Oct 9, 2025
60 of 61 checks passed
@github-actions github-actions bot added this to the next release milestone Oct 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

confighttp zstd decoder pooling causing data corruption

5 participants