]> 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>
Mon, 11 Aug 2008 09:34:01 +0000 (11:34 +0200)
commitfb0528bd56063e9800c7dd6fbd96b3c5c6a687f2
tree995a2cf3f0132631600a6c21b4d3b33e5492e2e1
parent718f0ef129ec31c8a38632ca475463a03f1c1c00
[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.
src/backend.c
src/proto_http.c