]> git.kaiwu.me - nginx.git/commitdiff
QUIC: fixed parsing of transport parameter IDs
authorNitin Swami <n.swami@f5.com>
Wed, 11 Nov 2026 15:59:47 +0000 (21:29 +0530)
committerSergey Kandaurov <pluknet@nginx.com>
Wed, 25 Nov 2026 18:50:43 +0000 (22:50 +0400)
Transport parameter IDs were truncated to 16 bits and could be
misinterpreted as known ones from the permanent 0x00-0x3f range.

src/event/quic/ngx_event_quic_transport.c

index ba6211c33d43a1053aa90392db9ab92be4d9010b..19c23bec1a63f3c32ae594b547d05ff266f3b18a 100644 (file)
@@ -129,7 +129,7 @@ static size_t ngx_quic_create_retire_connection_id(u_char *p,
 static size_t ngx_quic_create_close(u_char *p, ngx_quic_frame_t *f);
 
 static ngx_int_t ngx_quic_parse_transport_param(u_char *p, u_char *end,
-    uint16_t id, ngx_quic_tp_t *dst);
+    uint64_t id, ngx_quic_tp_t *dst);
 
 
 uint32_t  ngx_quic_versions[] = {
@@ -1616,7 +1616,7 @@ ngx_quic_create_max_streams(u_char *p, ngx_quic_max_streams_frame_t *ms)
 
 
 static ngx_int_t
-ngx_quic_parse_transport_param(u_char *p, u_char *end, uint16_t id,
+ngx_quic_parse_transport_param(u_char *p, u_char *end, uint64_t id,
     ngx_quic_tp_t *dst)
 {
     uint64_t   varint;