VirtualBox

Changeset 27441 in vbox


Ignore:
Timestamp:
Mar 17, 2010 12:37:53 PM (15 years ago)
Author:
vboxsync
Message:

NAT: check minimal size of ICMP header before type check.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Network/slirp/socket.c

    r27417 r27441  
    10571057    ip = (struct ip *)buff;
    10581058    hlen = (ip->ip_hl << 2);
     1059    if (RT_N2H_U16(ip->ip_len) < hlen + ICMP_MINLEN)
     1060    {
     1061        Log(("send_icmp_to_guest: ICMP header is too small to understand which type/subtype of the datagram\n"));
     1062       return;
     1063    }
    10591064    icp = (struct icmp *)((char *)ip + hlen);
    10601065
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette