Skip to content

HAProxy g_assert_not_reached() fix#814

Merged
OverOrion merged 4 commits intoaxoflow:mainfrom
bazsi:haproxy-abort-fix
Oct 9, 2025
Merged

HAProxy g_assert_not_reached() fix#814
OverOrion merged 4 commits intoaxoflow:mainfrom
bazsi:haproxy-abort-fix

Conversation

@bazsi
Copy link
Member

@bazsi bazsi commented Oct 3, 2025

Thanks @Damianv99 for the detailed error report in syslog-ng/syslog-ng#5516.

Since I merged that code originally into syslog-ng, I feel responsible for fixing it too. As we've forked syslog-ng, this PR is against the fork, AxoSyslog.

The minimal fix is only the first patch (a1f5b91), if you want to apply it locally, you are welcome to.

It should be merged into AxoSyslog after review, which should be pretty soon, as this is a trivial DoS attack, if the haproxy protocol is enabled.

bazsi added a commit to bazsi/axosyslog that referenced this pull request Oct 3, 2025
Signed-off-by: Balazs Scheidler <[email protected]>
bazsi added a commit to bazsi/axosyslog that referenced this pull request Oct 3, 2025
Signed-off-by: Balazs Scheidler <[email protected]>
@bazsi bazsi force-pushed the haproxy-abort-fix branch from 090cf46 to f67297e Compare October 3, 2025 20:22
@bazsi
Copy link
Member Author

bazsi commented Oct 3, 2025

Apart from fixing the abort, this PR also does the following:

  • truncated proxy headers are now reported as EINVAL errors
  • UNKNOWN / LOCAL connections are dropped with EOF, as these are only probes to check connectivity

The minimal fix continues to be the first patch.

bazsi added 4 commits October 9, 2025 11:16
…ions

LOCAL connections have no address information, so don't make an attempt at
extracting it.

Signed-off-by: Balazs Scheidler <[email protected]>
It is better to just accept our fate and not parse the addresses from
the header than to crash.

Signed-off-by: Balazs Scheidler <[email protected]>
UNKNOWN (PROXYv1) or LOCAL (PROXYv2) connections serve a health-check
purpose, so drop them without an error message.

Signed-off-by: Balazs Scheidler <[email protected]>
Signed-off-by: Balazs Scheidler <[email protected]>
@bazsi bazsi force-pushed the haproxy-abort-fix branch from f67297e to b95bbcf Compare October 9, 2025 09:16
@OverOrion OverOrion merged commit 21af849 into axoflow:main Oct 9, 2025
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants