-
Notifications
You must be signed in to change notification settings - Fork 274
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
A Buffer Overflow Write Bug at Checksum.c:88 #556
Labels
Comments
This bug is different from this issue #538. |
GabrielGanne
added a commit
to GabrielGanne/tcpreplay
that referenced
this issue
May 9, 2019
prevent the function from interpreting as packet header if there is not enough bytes. Fixes appneta#538 Fixes appneta#556
fklassen
added a commit
that referenced
this issue
Jun 2, 2020
fklassen
added a commit
that referenced
this issue
Jun 2, 2020
…ow_do_checksum Bug #556 #538 guard HBO in checksum - fix as per @GabrielGanne
Fixed as per @GabrielGanne patch in #591 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
There is a buffer overflow write at
checksum.c:88
, download at lastest commit a00fd47.Code near checksum.c:88 is showed below.
The code didn't check whether the data is long enough comparing IP and TCP packet length. When running the poc, the data len is even less than IP header. So a buffer overflow write will reported when writing to TCP header.
To Reproduce
Steps to reproduce the behavior:
CFLAGS="-g -O0 -fsanitize=address"
tcpreplay-edit -r 80:84 -s 20 -b -C -m 1500 -P --oneatatime -i eth0 $poc
Expected behavior
A buffer overflow write will be reported by ASAN, which is showed at below screen shots part.
Screenshots
System (please complete the following information):
The text was updated successfully, but these errors were encountered: