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
Hi, I've found several potential issues in picoTCP v1.7.0 and picoTCP-NG v2.1. While it's difficult for these bugs to actually have an impact, I still think it's worth letting you know about and fixing these potential issues.
1. Integer Overflow in pico_icmp4_send_echo
The parameter cookie of function pico_icmp4_send_echo is completely controllable by the developer. When the cookie->size is set to a large value, an integer overflow will occur when calculating transport_len (Line 393). PICO_ICMPHDR_UN_SIZE is specified as 8, so overflow occurs when the value of cookie->size larger than 65528.
If developers use PicoTCP to develop applications and allow remote visitors to set cookie->size, it may lead to out-of-bounds read and write, which may eventually lead to information leakage and even remote code execution.
I think there are two potential integer overflows in the pico_socket_fionread function. When a packet that is too short is received, an integer underflow may occur when calculating f->payload_len of the received packet. This issue may occur when UDP packets are less than 8 bytes ([Line 1619]) or IPV4 packets are less than 20 bytes ([Line 1633). (just like CVE-2020-17443)
Although I didn't find where to call pico_socket_fionread, but to be on the safe side, I hope you can fix both issues.
Hi, I've found several potential issues in picoTCP v1.7.0 and picoTCP-NG v2.1. While it's difficult for these bugs to actually have an impact, I still think it's worth letting you know about and fixing these potential issues.
1. Integer Overflow in
pico_icmp4_send_echo
The parameter
cookie
of functionpico_icmp4_send_echo
is completely controllable by the developer. When thecookie->size
is set to a large value, an integer overflow will occur when calculatingtransport_len
(Line 393).PICO_ICMPHDR_UN_SIZE
is specified as 8, so overflow occurs when the value ofcookie->size
larger than 65528.If developers use PicoTCP to develop applications and allow remote visitors to set
cookie->size
, it may lead to out-of-bounds read and write, which may eventually lead to information leakage and even remote code execution.picotcp/modules/pico_icmp4.c
Lines 375 to 400 in 72ffa74
2. Integer Overflow in
pico_socket_fionread
I think there are two potential integer overflows in the
pico_socket_fionread
function. When a packet that is too short is received, an integer underflow may occur when calculatingf->payload_len
of the received packet. This issue may occur when UDP packets are less than 8 bytes ([Line 1619]) or IPV4 packets are less than 20 bytes ([Line 1633). (just like CVE-2020-17443)Although I didn't find where to call
pico_socket_fionread
, but to be on the safe side, I hope you can fix both issues.picotcp/stack/pico_socket.c
Lines 1595 to 1642 in 72ffa74
The text was updated successfully, but these errors were encountered: