[release/8.0] fix ReceiveFrom with dual mode socket#92103
[release/8.0] fix ReceiveFrom with dual mode socket#92103carlossanlop merged 4 commits intorelease/8.0from
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:
|
rzikm
left a comment
There was a problem hiding this comment.
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 |
|
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).