* [PATCH] icmp6 fix no respond to neighbor solicit message
@ 2014-11-03 8:27 Michael Chang
2014-11-03 17:04 ` Andrei Borzenkov
0 siblings, 1 reply; 2+ messages in thread
From: Michael Chang @ 2014-11-03 8:27 UTC (permalink / raw)
To: grub-devel
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.
---
grub-core/net/icmp6.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/grub-core/net/icmp6.c b/grub-core/net/icmp6.c
index bbc9020..796d549 100644
--- a/grub-core/net/icmp6.c
+++ b/grub-core/net/icmp6.c
@@ -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);
--
1.7.3.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] icmp6 fix no respond to neighbor solicit message
2014-11-03 8:27 [PATCH] icmp6 fix no respond to neighbor solicit message Michael Chang
@ 2014-11-03 17:04 ` Andrei Borzenkov
0 siblings, 0 replies; 2+ messages in thread
From: Andrei Borzenkov @ 2014-11-03 17:04 UTC (permalink / raw)
To: Michael Chang; +Cc: grub-devel
В Mon, 3 Nov 2014 16:27:45 +0800
Michael Chang <mchang@suse.com> пишет:
> 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.
pushed
> ---
> grub-core/net/icmp6.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/grub-core/net/icmp6.c b/grub-core/net/icmp6.c
> index bbc9020..796d549 100644
> --- a/grub-core/net/icmp6.c
> +++ b/grub-core/net/icmp6.c
> @@ -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);
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-11-03 17:04 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-03 8:27 [PATCH] icmp6 fix no respond to neighbor solicit message Michael Chang
2014-11-03 17:04 ` Andrei Borzenkov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).