]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: prevent buffers being overwritten during build_logline() execution
authorDragan Dosen <ddosen@haproxy.com>
Thu, 26 Oct 2017 09:25:10 +0000 (11:25 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 27 Oct 2017 08:02:33 +0000 (10:02 +0200)
commit2ae327edaf6c96d33dd5acebdb5a9291c3d55ec4
tree60f1c5be80b9f2ff47aac6032598ff2016861855
parent145746c2d55f6524fdb47191479d84bcd6e3d5d1
BUG/MEDIUM: prevent buffers being overwritten during build_logline() execution

Calls to build_logline() are audited in order to use dynamic trash buffers
allocated by alloc_trash_chunk() instead of global trash buffers.

This is similar to commits 07a0fec ("BUG/MEDIUM: http: Prevent
replace-header from overwriting a buffer") and 0d94576 ("BUG/MEDIUM: http:
prevent redirect from overwriting a buffer").

This patch should be backported in 1.7, 1.6 and 1.5. It relies on commit
b686afd ("MINOR: chunks: implement a simple dynamic allocator for trash
buffers") for the trash allocator, which has to be backported as well.
src/proto_http.c
src/stream.c