]> git.ipfire.org Git - thirdparty/haproxy.git/commit
[BUG] fix segfault with url_param + check_post
authorWilly Tarreau <w@1wt.eu>
Sun, 10 Aug 2008 22:21:56 +0000 (00:21 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 2 Sep 2008 08:52:14 +0000 (10:52 +0200)
commit3449d158ad4a44a7743854a9f754d4bd775007da
treef7b0cfacae72b9901348a9401ea1a3d6148080f8
parent0e3e59b11f7926a570cfc98d8967b61098c91602
[BUG] fix segfault with url_param + check_post

If an HTTP/0.9-like POST request is sent to haproxy while
configured with url_param + check_post, it will crash. The
reason is that the total buffer length was computed based
on req->total (which equals the number of bytes read) and
not req->l (number of bytes in the buffer), thus leading
to wrong size calculations when calling memchr().

The affected code does not look like it could have been
exploited to run arbitrary code, only reads were performed
at wrong locations.
(cherry picked from commit fb0528bd56063e9800c7dd6fbd96b3c5c6a687f2)
src/backend.c
src/proto_http.c