]> git.proxmox.com Git - grub2.git/commitdiff
icmp6 fix no respond to neighbor solicit message
authorMichael Chang <mchang@suse.com>
Mon, 3 Nov 2014 08:27:45 +0000 (16:27 +0800)
committerAndrei Borzenkov <arvidjaar@gmail.com>
Mon, 3 Nov 2014 17:03:04 +0000 (20:03 +0300)
The structure size used in grub_netbuff_pull to get the pointer to
option header is apparently wrong, which leads to subsequent range check
failed and therefore not responding to any neighbor solicit message in my
testing.

ChangeLog
grub-core/net/icmp6.c

index 190d19d9b25e9c20c183b433ed2205b062ca35b7..87faadf480d620d52cbd461b5c426cd92ef2ad22 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2014-11-03  Michael Chang  <mchang@suse.com>
+
+       * grub-core/net/icmp6.c (grub_net_recv_icmp6_packet): Fix size
+       of neighbor solicitation packet in grub_netbuff_pull.
+
 2014-10-14  Andrei Borzenkov  <arvidjaar@gmail.com>
 
        * grub-core/loader/arm/linux.c: Use full initializer for initrd_ctx to
index bbc902014fea9fe64f971f78bc09a7384d03ccbc..796d549f640b20b52908b343974440e702108b69 100644 (file)
@@ -205,7 +205,7 @@ grub_net_recv_icmp6_packet (struct grub_net_buff *nb,
        if (ttl != 0xff)
          break;
        nbh = (struct neighbour_solicit *) nb->data;
-       err = grub_netbuff_pull (nb, sizeof (struct router_adv));
+       err = grub_netbuff_pull (nb, sizeof (*nbh));
        if (err)
          {
            grub_netbuff_free (nb);