]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MAJOR: map/acl: real fix segfault during show map/acl on CLI
authorWilly Tarreau <w@1wt.eu>
Tue, 30 Apr 2019 09:43:43 +0000 (11:43 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 30 Apr 2019 09:50:59 +0000 (11:50 +0200)
commit49ee3b2f9a9e5d0b8d394938df527aa645ce72b4
tree38d9db894214fdde5b4f7aa466f7afa331647461
parent85a7ea0740d7a0479d9a3f97e02f2e53c473a85f
BUG/MAJOR: map/acl: real fix segfault during show map/acl on CLI

A previous commit 8d85aa44d ("BUG/MAJOR: map: fix segfault during
'show map/acl' on cli.") was provided to address a concurrency issue
between "show acl" and "clear acl" on the CLI. Sadly the code placed
there was copy-pasted without changing the element type (which was
struct stream in the original code) and not tested since the crash
is still present.

The reproducer is simple : load a large ACL file (e.g. geolocation
addresses), issue "show acl #0" in loops in one window and issue a
"clear acl #0" in the other one, haproxy crashes.

This fix was also tested with threads enabled and looks good since
the locking seems to work correctly in these areas though. It will
have to be backported as far as 1.6 since the commit above went
that far as well...
src/pattern.c