Skip to content

[CP] Fix uint32 overflow in receive buffer growth (#6226) - #6246

Merged
Gaurav Singh (gaurav2699) merged 1 commit into
release/2.5from
gaurasingh/cp_recv_buffer_overflow_2_5_copilot
Aug 24, 2026
Merged

[CP] Fix uint32 overflow in receive buffer growth (#6226)#6246
Gaurav Singh (gaurav2699) merged 1 commit into
release/2.5from
gaurasingh/cp_recv_buffer_overflow_2_5_copilot

Conversation

@gaurav2699

@gaurav2699 Gaurav Singh (gaurav2699) commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Description

Cap internally-managed stream receive buffers at 0x80000000 during
auto-tuning and compute buffer growth in 64-bit, rejecting sizes above
UINT32_MAX. This prevents a uint32 wrap that could spin the growth loop
forever when a very large ConnFlowControlWindow is configured. App-owned
mode behavior is unchanged.

Fixes https://dev.azure.com/microsoft/OS/_workitems/edit/62826267/

Testing

Added RecvBufferGrowthTest.WriteGrowthOverflow to cover the overflow
boundary. Existing recv buffer tests pass.

Documentation

NA

@guhetier

Copy link
Copy Markdown
Collaborator

Please re-generate CLOG

## Description

Cap internally-managed stream receive buffers at 0x80000000 during
auto-tuning and compute buffer growth in 64-bit, rejecting sizes above
UINT32_MAX. This prevents a uint32 wrap that could spin the growth loop
forever when a very large ConnFlowControlWindow is configured. App-owned
mode behavior is unchanged.

Fixes https://dev.azure.com/microsoft/OS/_workitems/edit/62826267/

## Testing

Added RecvBufferGrowthTest.WriteGrowthOverflow to cover the overflow
boundary. Existing recv buffer tests pass.

## Documentation

NA
Gaurav Singh (gaurav2699) added a commit that referenced this pull request Aug 24, 2026
## Description

Cap internally-managed stream receive buffers at 0x80000000 during
auto-tuning and compute buffer growth in 64-bit, rejecting sizes above
UINT32_MAX. This prevents a uint32 wrap that could spin the growth loop
forever when a very large ConnFlowControlWindow is configured. App-owned
mode behavior is unchanged.

Fixes https://dev.azure.com/microsoft/OS/_workitems/edit/62826267/

## Testing

Added RecvBufferGrowthTest.WriteGrowthOverflow to cover the overflow
boundary. Existing recv buffer tests pass.

## Documentation

NA

<!-- Companion PR for release/2.5: #6246 -->
@gaurav2699
Gaurav Singh (gaurav2699) merged commit 367ac6b into release/2.5 Aug 24, 2026
282 of 283 checks passed
@gaurav2699
Gaurav Singh (gaurav2699) deleted the gaurasingh/cp_recv_buffer_overflow_2_5_copilot branch August 24, 2026 13:19
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