[nginx] QUIC: client transport parameter data length checking.
Maxim Dounin
mdounin at mdounin.ru
Mon Jun 3 01:46:30 UTC 2024
details: http://freenginx.org/hg/nginx/rev/081d4beeb591
branches:
changeset: 9281:081d4beeb591
user: Sergey Kandaurov <pluknet at nginx.com>
date: Tue May 28 17:17:19 2024 +0400
description:
QUIC: client transport parameter data length checking.
diffstat:
src/event/quic/ngx_event_quic_transport.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diffs (18 lines):
diff --git a/src/event/quic/ngx_event_quic_transport.c b/src/event/quic/ngx_event_quic_transport.c
--- a/src/event/quic/ngx_event_quic_transport.c
+++ b/src/event/quic/ngx_event_quic_transport.c
@@ -1750,6 +1750,14 @@ ngx_quic_parse_transport_params(u_char *
return NGX_ERROR;
}
+ if ((size_t) (end - p) < len) {
+ ngx_log_error(NGX_LOG_INFO, log, 0,
+ "quic failed to parse"
+ " transport param id:0x%xL, data length %uL too long",
+ id, len);
+ return NGX_ERROR;
+ }
+
rc = ngx_quic_parse_transport_param(p, p + len, id, tp);
if (rc == NGX_ERROR) {
More information about the nginx-devel
mailing list