]> git.kaiwu.me - nginx.git/commit
QUIC: avoid updating connection address for a backup path master
authorVadim Zhestikov <v.zhestikov@f5.com>
Tue, 20 Oct 2026 20:02:35 +0000 (13:02 -0700)
committerSergey Kandaurov <pluknet@nginx.com>
Fri, 27 Nov 2026 15:22:14 +0000 (19:22 +0400)
commite76b6746c92d8b1167f361977032d123f8f92393
tree07d69c9271ce1ae9d859ad1277d6e93ea130c3fb
parentc9486339df9db249540ce0aa7f163282a450638b
QUIC: avoid updating connection address for a backup path

On NAT rebinding, both the new path and the previously active path
are validated.  If the previous path, now a backup, was validated
last, the connection address was updated to its address, and new
streams used it while packets were exchanged on the new path.

Validation of the previous path only checks that it is still viable
and does not make it active again, see RFC 9000, 9.3.3.  The fix is
to update the connection address only for the active path.  If the
client migrates back to the previous path, the address is updated in
ngx_quic_handle_migration(), as the path is already validated.

The connection address is also updated when a backup path is restored
after the active path fails validation.  Commit f37ec3e5d removed this,
assuming the address never tracked a path that could later fail; an
incomplete MTU validation breaks that assumption, as the address is
set after the first, size-limited round and before the path is
re-validated with full-size datagrams.

The problem appeared in f37ec3e5d (1.31.0).

Reported by Keita Sode of SYZD Research LLC.
src/event/quic/ngx_event_quic_migration.c