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
To fix the issue, you need to add 1 byte in the malloc call (to match the one used by the default mmap).
Then, the execution with ASan no longer reports the heap buffer overflow.
A sample patch is attached to this issue. sm_overflow_fix_patch.txt
The text was updated successfully, but these errors were encountered:
dimstav23
changed the title
Heap buffer overflow in string_match benchmark when malloc is used.
[minor] Heap buffer overflow in string_match benchmark when malloc is used.
Apr 12, 2024
dimstav23
changed the title
[minor] Heap buffer overflow in string_match benchmark when malloc is used.
Heap buffer overflow in string_match benchmark when malloc is used.
Apr 12, 2024
Heap buffer overflow in
string_match
benchmark whenmalloc
is used.How to reproduce:
Compile the benchmarks with a patch that enables the
NO_MMAP
flag andAddressSanitizer
(ASan
):Retrieve the inputs for the
string_match
benchmark:Run the
string_match
benchmark and observe the output ofASan
:How to fix:
To fix the issue, you need to add 1 byte in the
malloc
call (to match the one used by the defaultmmap
).Then, the execution with
ASan
no longer reports the heap buffer overflow.A sample patch is attached to this issue.
sm_overflow_fix_patch.txt
Tested on:
OS:
Ubuntu 22.04.4 LTS
Kernel:
6.2.0-39-generic
gcc:
11.4.0
The text was updated successfully, but these errors were encountered: