-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
[release/8.0] fix ReceiveFrom with dual mode socket #92103
Conversation
Tagging subscribers to this area: @dotnet/ncl Issue DetailsBackport of #92086 to release/8.0 Customer ImpactTestingRiskIMPORTANT: If this backport is for a servicing release, please verify that:
|
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, I also verified the change on the original repro and it fixes the issue.
I approve - it is a regression and the fix is not that complicated. Given the privacy concerns, I would take it. @artl93 ready for your approval |
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.
M2 Approved.
The tvos-arm64 legs might be stuck. |
it is finished now, all check are green. |
Backport of #92086 to release/8.0
Fixes #92006
/cc @karelz @wfurt
Customer Impact
Regression against .NET 7.0
When UDP user uses IPv4 address (on machine with IPv6 enabled as well - which is typical scenario), they may get wrong peer address from
Socket.ReceiveFrom
(the main API for receiving data for UDP). As a result, they may start sending UDP packets to the wrong endpoint - potentially leading to privacy problems.There is a workaround to pass the address with correct
AddressFamily
, but that requires the developer to anticipate the problem.The regression was introduced by PR #89841 (UDP perf improvements).
Testing
Targeted tests are added in the PR
Verified on E2E original repro from #92006 (using managed QUIC implementation side project)
Risk
Medium. UDP is used much less than TCP (also partially due to its suboptimal performance prior to .NET 8.0).