]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MINOR: log: fix parse_log_message rfc5424 size check
authorAurelien DARRAGON <adarragon@haproxy.com>
Tue, 22 Nov 2022 10:17:11 +0000 (11:17 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Tue, 22 Nov 2022 15:27:52 +0000 (16:27 +0100)
commitab9efc25f07b9870c827e2da05fe23a084a8b8f4
treeaffa888476d804dcb3717c815aacde70ec55c279
parent9dce88ba2cb73b6c3665b4eeaa74186ebce2c7a5
BUG/MINOR: log: fix parse_log_message rfc5424 size check

In parse_log_message(), if log is rfc5424 compliant, p pointer
is incremented and size is not. However size is still used in further
checks as if p pointer was not incremented.

This could lead to logic error or buffer overflow if input buf is not
null-terminated.

Fixing this by making sure size is up to date where it is needed.

It could be backported up to 2.4.
src/log.c