]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MINOR: log: prevent saddr NULL deref in syslog_io_handler()
authorAurelien DARRAGON <adarragon@haproxy.com>
Mon, 17 Mar 2025 23:09:59 +0000 (00:09 +0100)
committerAurelien DARRAGON <adarragon@haproxy.com>
Mon, 17 Mar 2025 23:13:19 +0000 (00:13 +0100)
commit7895726bffb14dd463a969fb8ffaec4ed44ef8b8
treee39d5d176ec304ae7b2826c272ab9158cd9bcf3c
parent29b4b985c3c2b465ae639536620d515510d49122
BUG/MINOR: log: prevent saddr NULL deref in syslog_io_handler()

In ad0133cc ("MINOR: log: handle log-forward "option host""), we
de-reference saddr without first checking if saddr is NULL. In practise
saddr shouldn't be null, but it may be the case if memory error happens
for tcp syslog handler so we must assume that it can be NULL at some
point.

To fix the bug, we simply check for NULL before de-referencing it
under syslog_io_handler(), as the function comment suggests.

No backport needed unless ad0133cc is.
src/log.c