-
Notifications
You must be signed in to change notification settings - Fork 846
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
Unsigned integer wraparound in pcap-usb-linux-common.c:85:35
#1134
Comments
tenarchits
pushed a commit
to tenarchits/libpcap
that referenced
this issue
Jan 22, 2024
When adding values whose sum might overflow an unsigned integer, first check whether the sum *would* overflow an unsigned integer and, if so, clamp the sum at UINT_MAX. Do the same for a multiplication. This should fix the-tcpdump-group#1134, as well as the issue in the-tcpdump-group#1205.
tenarchits
pushed a commit
to tenarchits/libpcap
that referenced
this issue
Jan 26, 2024
When adding values whose sum might overflow an unsigned integer, first check whether the sum *would* overflow an unsigned integer and, if so, clamp the sum at UINT_MAX. Do the same for a multiplication. This should fix the-tcpdump-group#1134, as well as the issue in the-tcpdump-group#1205.
tenarchits
pushed a commit
to tenarchits/libpcap
that referenced
this issue
Jan 26, 2024
When adding values whose sum might overflow an unsigned integer, first check whether the sum *would* overflow an unsigned integer and, if so, clamp the sum at UINT_MAX. Do the same for a multiplication. This should fix the-tcpdump-group#1134, as well as the issue in the-tcpdump-group#1205.
tenarchits
pushed a commit
to tenarchits/libpcap
that referenced
this issue
Jan 26, 2024
When adding values whose sum might overflow an unsigned integer, first check whether the sum *would* overflow an unsigned integer and, if so, clamp the sum at UINT_MAX. Do the same for a multiplication. This should fix the-tcpdump-group#1134, as well as the issue in the-tcpdump-group#1205.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi! We've been fuzzing libpcap using
sydr-fuzz
and targets added to https://github.com/ispras/oss-sydr-fuzz/tree/master/projects/libpcap by @koltiradw. We've found unsigned integer wraparound error inpcap-usb-linux-common.c:85:35
, but we don't know whether this is a real bug or a normal situation that is not worth to be reported.Work environment
OS: Ubuntu 20.04
lipcap version: 53e9577
Bug description
Unsigned integer wraparound in
pcap-usb-linux-common.c:85:35
.Steps to reproduce
Build docker container from https://github.com/ispras/oss-sydr-fuzz/tree/master/projects/libpcap:
Run docker container:
Run sanitizer built target with the input leading to error (sydr_e669b5e526a19e08cb046f3f24413e3d13dc6860_int_overflow_0_unsigned.txt
):
You will see the following output:
The text was updated successfully, but these errors were encountered: