]> git.ipfire.org Git - thirdparty/haproxy.git/commit
CLEANUP: pools: move the write before free to the uaf-only function
authorWilly Tarreau <w@1wt.eu>
Thu, 8 Dec 2022 08:29:42 +0000 (09:29 +0100)
committerWilly Tarreau <w@1wt.eu>
Thu, 8 Dec 2022 15:08:28 +0000 (16:08 +0100)
commit67f89c527f877c1003848e61e9e8af1f7def3045
treedeff072329918cba83897795c90b748c658e7e63
parent94dbfedec138101f314d746dab87caa3a1760b59
CLEANUP: pools: move the write before free to the uaf-only function

In UAF mode, pool_put_to_os() performs a write to the about-to-be-freed
memory area so as to make sure the page is properly mapped and catch a
possible double-free. However there's no point keeping that in an ifdef
in the generic function, because we now have a pool_free_area_uaf()
that is the UAF-specific version of pool_free_area() and the one that
is called immediately after this write. Let's move the code there, it
will be cleaner.
src/pool.c