Skip to content

[CP] Fix leak on ACK encryption-level mismatch in loss detection (#6232) - #6269

Merged
Gaurav Singh (gaurav2699) merged 1 commit into
release/2.6from
gaurasingh/cp_ack_level_leak_2_6_copilot
Aug 26, 2026
Merged

[CP] Fix leak on ACK encryption-level mismatch in loss detection (#6232)#6269
Gaurav Singh (gaurav2699) merged 1 commit into
release/2.6from
gaurasingh/cp_ack_level_leak_2_6_copilot

Conversation

@gaurav2699

Copy link
Copy Markdown
Contributor

Description

QuicLossDetectionProcessAckBlocks moves acknowledged packets out of the
SentPackets/LostPackets lists into a local AckedPackets list before
validating that each packet's encryption level matches the ACK frame's level.
On a mismatch it returned early without returning the already-unlinked packets
to the pool, leaking their metadata and the resources held by their frames.

Fixes: https://microsoft.visualstudio.com/OS/_workitems/edit/62826410

Testing

NA

Documentation

NA

## Description
`QuicLossDetectionProcessAckBlocks` moves acknowledged packets out of
the
`SentPackets`/`LostPackets` lists into a local `AckedPackets` list
*before*
validating that each packet's encryption level matches the ACK frame's
level.
On a mismatch it returned early without returning the already-unlinked
packets
to the pool, leaking their metadata and the resources held by their
frames.

Fixes: https://microsoft.visualstudio.com/OS/_workitems/edit/62826410

## Testing

NA
## Documentation

NA

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 0f374866-40d2-4c87-bd7d-2f5199ac33b3
@gaurav2699
Gaurav Singh (gaurav2699) requested a review from a team as a code owner August 26, 2026 19:40
@gaurav2699
Gaurav Singh (gaurav2699) merged commit bd96bed into release/2.6 Aug 26, 2026
483 of 484 checks passed
@gaurav2699
Gaurav Singh (gaurav2699) deleted the gaurasingh/cp_ack_level_leak_2_6_copilot branch August 26, 2026 19:52
Gaurav Singh (gaurav2699) added a commit that referenced this pull request Aug 26, 2026
…) (#6268)

## Description
`QuicLossDetectionProcessAckBlocks` moves acknowledged packets out of
the
`SentPackets`/`LostPackets` lists into a local `AckedPackets` list
*before*
validating that each packet's encryption level matches the ACK frame's
level.
On a mismatch it returned early without returning the already-unlinked
packets
to the pool, leaking their metadata and the resources held by their
frames.

Fixes: https://microsoft.visualstudio.com/OS/_workitems/edit/62826410

## Testing

NA
## Documentation

NA


<!-- Companion PR for release/2.6: #6269 -->

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 0f374866-40d2-4c87-bd7d-2f5199ac33b3
@codecov

codecov Bot commented Aug 26, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 45.45455% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 85.53%. Comparing base (bba5f07) to head (c99523f).
⚠️ Report is 1 commits behind head on release/2.6.

Files with missing lines Patch % Lines
src/core/loss_detection.c 45.45% 6 Missing ⚠️
Additional details and impacted files
@@               Coverage Diff               @@
##           release/2.6    #6269      +/-   ##
===============================================
+ Coverage        84.45%   85.53%   +1.07%     
===============================================
  Files               60       60              
  Lines            18968    18972       +4     
===============================================
+ Hits             16020    16227     +207     
+ Misses            2948     2745     -203     

☔ View full report in Codecov by Harness.
📢 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.

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.

2 participants