Skip to content

Conversation

@DavidKorczynski
Copy link

The fuzzer added in #102 finds an overflow in the URL parsing logic, with the following sanitizer report:

==13==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x5020001398f4 at pc 0x557be604430c bp 0x7ffe725a0400 sp 0x7ffe725a03f8
READ of size 1 at 0x5020001398f4 thread T0                       
SCARINESS: 12 (1-byte-read-heap-buffer-overflow)                 
    #0 0x557be604430b in http_parse_host /src/http-parser/./http_parser/http_parser.c:2015:58
    #1 0x557be604430b in http_parser_parse_url /src/http-parser/./http_parser/http_parser.c:2150:9
    #2 0x557be6039317 in LLVMFuzzerTestOneInput /src/fuzzer.c:19:3

This fixes it by ensuring the http_parse_host function does not beyond the buffer it uses for reading.

Signed-off-by: David Korczynski <david@adalogics.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant