]> git.kaiwu.me - haproxy.git/commit
BUG/MINOR: http-ext: always check remaining data when reading rfc7239 nodeport
authorWilly Tarreau <w@1wt.eu>
Tue, 26 May 2026 06:47:11 +0000 (08:47 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 26 May 2026 11:13:24 +0000 (13:13 +0200)
commit076655e18d901f158b12c34f1db0994b240ef8b9
tree13403bc8e50adc79decd37e9737fa592dfce788a
parent8cb0a0c53d392c3abf2bb6ccbf9ac1d90f77db24
BUG/MINOR: http-ext: always check remaining data when reading rfc7239 nodeport

http_7239_extract_nodeport() reads the first byte of the passed string
but the caller doesn't check that it's not empty, which can happen if
passed as 'host="127.0.0.1:"'. In that case the function would read and
return garbage that is present in the buffer after the colon. Let's just
check the remaining length before reading.

This can be backported to 2.8 as it was introduced with commit b2bb9257d2
("MINOR: proxy/http_ext: introduce proxy forwarded option").
src/http_ext.c