You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 6, 2022. It is now read-only.
Found in version 2.8.1.
If a HTTP header spans 2 IP packets the nread state var is off by one.
The bug is caused since the nread var is incremented before a pointer check is done (which decrements the pointer value by 1):
http_parser.c:1637
COUNT_HEADER_SIZE(p - start);
if (p == data + len)
--p;
should have been:
if (p == data + len)
--p;
COUNT_HEADER_SIZE(p - start);
The same issue seems to reside in http_parser:1342
The issue is easily reproduced by injecting part of an HTTP request and verifying the nread var after http_parser_execute: "GET / HTTP/1.1\r\nHost: myhost".