]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MINOR: http_ext: unhandled ERR_ABORT in proxy_http_parse_7239()
authorAurelien DARRAGON <adarragon@haproxy.com>
Tue, 4 Jul 2023 08:33:33 +0000 (10:33 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Thu, 6 Jul 2023 13:41:17 +0000 (15:41 +0200)
commit5028a6e50bec80825a9e3691b4e20bea600abf0f
tree3fa0cc561aad628a854203aed1707407035c78b5
parent999699a277d85e875c5351cfe949c851f574f007
BUG/MINOR: http_ext: unhandled ERR_ABORT in proxy_http_parse_7239()

_proxy_http_parse_7239_expr() helper used in proxy_http_parse_7239()
function may return ERR_ABORT in case of memory error. But the error check
used below is insufficient to catch ERR_ABORT so the function could keep
executing prior to returning ERR_ABORT, which may cause undefined
behavior. Hopefully no sensitive handling is performed in this case so
this bug has very limited impact, but let's fix it anyway.

We now use ERR_CODE mask instead of ERR_FATAL to check if err_code is set
to any kind of error combination that should prevent the function from
further executing.

This may be backported in 2.8 with b2bb9257d2 ("MINOR: proxy/http_ext:
introduce proxy forwarded option")
src/http_ext.c