BUG/MAJOR: lua segmentation fault when the request is like 'GET ?arg=val HTTP/1.1'
authorThierry FOURNIER <thierry.fournier@ozon.io>
Wed, 22 Feb 2017 01:06:16 +0000 (02:06 +0100)
committerWilly Tarreau <w@1wt.eu>
Thu, 23 Feb 2017 20:52:18 +0000 (21:52 +0100)
commit7d388635526cffa79f4a62906f17afa5990f6092
tree4901c41d2dcd6f3ff56718515a48817bda128596
parente3cc3a302651e905209b96e07203d03cf7e46ccb
BUG/MAJOR: lua segmentation fault when the request is like 'GET ?arg=val HTTP/1.1'

Error in the HTTP parser. The function http_get_path() can
return NULL and this case is not catched in the code. So, we
try to dereference NULL pointer, and a segfault occurs.

These two lines are useful to prevent the bug.

   acl prevent_bug path_beg /
http-request deny if !prevent_bug

This bug fix should be backported in 1.6 and 1.7
src/hlua.c