net-2.6.25 splat
Subsystems (3)
Pulled the tree a couple of hours ago. The machine was running the full -mm lineup, had been compiling kernels for an hour or so then oopsed in icmpv6_rcv+0x5b/0x832.
I have a partial photo of the scrolled-off backtrace but the camera cable is at home.
I don't know why it was doing ipv6 things at all. Maybe there's ip6 stuff running around google's corp network, dunno.
gdb says:
(gdb) l *0x173870x17387 is in icmpv6_rcv (net/ipv6/icmp.c:649).
644 struct in6_addr *saddr, *daddr; 645 struct ipv6hdr *orig_hdr; 646 struct icmp6hdr *hdr; 647 int type;
648
649 if (xfrm6_policy_check(NULL, XFRM_POLICY_IN, skb) &&
650 skb->sp->xvec[skb->sp->len - 1]->props.flags & XFRM_STATE_ICMP) {
651 int nh;
652
653 if (!pskb_may_pull(skb, sizeof(*hdr) + sizeof(*orig_hdr)))
I'll set the display to 80x50 and retry..
David Miller
maintainerFrom: Andrew Morton <[email protected]>
Date: Wed, 12 Dec 2007 16:21:40 -0800
Quoted 1 line
I don't know why it was doing ipv6 things at all.
When you bring up any interface, with explicit IPV6 addresses or not, the IPV6 stack seeks out local routers and whatnot using multicast and assigns the interface a link-local IPV6 address.
So no matter what you're doing IPV6.
I suspect the OOPS you hit might be related to IPSEC stack work done recently by Herbert Xu who has been added to the CC:.
I doubt poor Ilpo should be contacted as I doubt his TCP work is involved :-)
Quoted 10 lines · On Wed, 12 Dec 2007 16:26:13 -0800 (PST) David Miller <[email protected]>…
From: Andrew Morton <[email protected]>
Date: Wed, 12 Dec 2007 16:21:40 -0800Quoted 1 line
I don't know why it was doing ipv6 things at all.
When you bring up any interface, with explicit IPV6 addresses or not, the IPV6 stack seeks out local routers and whatnot using multicast and assigns the interface a link-local IPV6 address.
Quoted 8 lines
So no matter what you're doing IPV6.
I suspect the OOPS you hit might be related to IPSEC stack work done recently by Herbert Xu who has been added to the CC:.
I doubt poor Ilpo should be contacted as I doubt his TCP work is involved :-)
Here's the screen-shot (actually more like a reen-hot):
http://userweb.kernel.org/~akpm/pc121694.jpg
I'm awaiting a reoccurrence with the screen in 50-row mode.
[IPSEC]: Fix reversed ICMP6 policy check
Quoted 5 lines · Andrew Morton
Here's the screen-shot (actually more like a reen-hot):
http://userweb.kernel.org/~akpm/pc121694.jpgI'm awaiting a reoccurrence with the screen in 50-row mode.
Sorry, I didn't test IPv6.
[IPSEC]: Fix reversed ICMP6 policy check
The policy check I added for ICMP on IPv6 is reversed. This patch fixes that.
It also adds an skb->sp check so that unprotected packets that fail the policy check do not crash the machine.
Cheers,
Signature · 5 lines
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
--net/ipv4/icmp.c +1 -1
@@ -978,7 +978,7 @@ int icmp_rcv(struct sk_buff *skb)struct icmphdr *icmph;struct rtable *rt = (struct rtable *)skb->dst; -if (!xfrm4_policy_check (NULL ,XFRM_POLICY_IN , skb) && +if (!xfrm4_policy_check (NULL ,XFRM_POLICY_IN , skb) && skb->sp && skb->sp->xvec[skb->sp->len -1 ]->props.flags &XFRM_STATE_ICMP ) {int nh;
net/ipv6/icmp.c +1 -1
@@ -646,7 +646,7 @@ static int icmpv6_rcv(struct sk_buff *skb)struct icmp6hdr *hdr;int type; -if (xfrm6_policy_check (NULL ,XFRM_POLICY_IN , skb) && +if (!xfrm6_policy_check (NULL ,XFRM_POLICY_IN , skb) && skb->sp && skb->sp->xvec[skb->sp->len -1 ]->props.flags &XFRM_STATE_ICMP ) {int nh;
Re: [IPSEC]: Fix reversed ICMP6 policy check
From: Herbert Xu <[email protected]>
Date: Thu, 13 Dec 2007 09:58:56 +0800
Quoted 9 lines
[IPSEC]: Fix reversed ICMP6 policy check
The policy check I added for ICMP on IPv6 is reversed. This patch fixes that.
It also adds an
skb->spcheck so that unprotected packets that fail the policy check do not crash the machine.Signed-off-by Herbert Xu <[email protected]>
Applied, thanks Herbert.
Re: [IPSEC]: Fix reversed ICMP6 policy check
In reply to Herbert XuQuoted 2 lines · Herbert Xu
[IPSEC]: Fix reversed ICMP6 policy check
While that won't crash anymore, it's still logically wrong.
Here's a more complete fix.
[IPSEC]: Fix reversed ICMP6 policy check
The policy check I added for ICMP on IPv6 is reversed. We were also letting packets through incorrectly if the ICMP flag isn't set. This patch fixes that.
It also adds an skb->sp check so that unprotected packets that fail the policy check do not crash the machine.
net/ipv4/icmp.c +5 -2
@@ -978,10 +978,13 @@ int icmp_rcv(struct sk_buff *skb)struct icmphdr *icmph;struct rtable *rt = (struct rtable *)skb->dst; -if (!xfrm4_policy_check (NULL ,XFRM_POLICY_IN , skb) && - skb->sp->xvec[skb->sp->len -1 ]->props.flags &XFRM_STATE_ICMP ) { +if (!xfrm4_policy_check (NULL ,XFRM_POLICY_IN , skb)) {int nh; +if (!(skb->sp && skb->sp->xvec[skb->sp->len -1 ]->props.flags & +XFRM_STATE_ICMP )) + goto drop; +if (!pskb_may_pull (skb,sizeof (*icmph) +sizeof (struct iphdr ))) goto drop;
net/ipv6/icmp.c +5 -2
@@ -646,10 +646,13 @@ static int icmpv6_rcv(struct sk_buff *skb)struct icmp6hdr *hdr;int type; -if (xfrm6_policy_check (NULL ,XFRM_POLICY_IN , skb) && - skb->sp->xvec[skb->sp->len -1 ]->props.flags &XFRM_STATE_ICMP ) { +if (!xfrm6_policy_check (NULL ,XFRM_POLICY_IN , skb)) {int nh; +if (!(skb->sp && skb->sp->xvec[skb->sp->len -1 ]->props.flags & +XFRM_STATE_ICMP )) + goto drop_no_count; +if (!pskb_may_pull (skb,sizeof (*hdr) +sizeof (*orig_hdr))) goto drop_no_count;
Thanks,
Signature · 4 lines
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txtDavid Miller
maintainerRe: [IPSEC]: Fix reversed ICMP6 policy check
From: Herbert Xu <[email protected]>
Date: Thu, 13 Dec 2007 10:49:18 +0800
Quoted 7 lines · Herbert Xu
Quoted 2 lines
[IPSEC]: Fix reversed ICMP6 policy check
While that won't crash anymore, it's still logically wrong.
Here's a more complete fix.
I already applied the first one, please send a relative fixup which I'll combine as appropriate next rebase.
Re: [IPSEC]: Fix reversed ICMP6 policy check
In reply to David MillerQuoted 6 lines · David Miller
From: Herbert Xu <[email protected]>
Date: Thu, 13 Dec 2007 09:58:56 +0800Quoted 1 line
[IPSEC]: Fix reversed ICMP6 policy check
Applied, thanks Herbert.
You're too quick :) Before you ask for an incremental patch, here's a preemptive strike :)
[IPSEC]: Do not let packets pass when ICMP flag is off
This fixes a logical error in ICMP policy checks which lets packets through if the state ICMP flag is off.
Cheers,
Signature · 5 lines
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
--net/ipv4/icmp.c +5 -2
@@ -978,10 +978,13 @@ int icmp_rcv(struct sk_buff *skb)struct icmphdr *icmph;struct rtable *rt = (struct rtable *)skb->dst; -if (!xfrm4_policy_check (NULL ,XFRM_POLICY_IN , skb) && skb->sp && - skb->sp->xvec[skb->sp->len -1 ]->props.flags &XFRM_STATE_ICMP ) { +if (!xfrm4_policy_check (NULL ,XFRM_POLICY_IN , skb)) {int nh; +if (!(skb->sp && skb->sp->xvec[skb->sp->len -1 ]->props.flags & +XFRM_STATE_ICMP )) + goto drop; +if (!pskb_may_pull (skb,sizeof (*icmph) +sizeof (struct iphdr ))) goto drop;
net/ipv6/icmp.c +5 -2
@@ -646,10 +646,13 @@ static int icmpv6_rcv(struct sk_buff *skb)struct icmp6hdr *hdr;int type; -if (!xfrm6_policy_check (NULL ,XFRM_POLICY_IN , skb) && skb->sp && - skb->sp->xvec[skb->sp->len -1 ]->props.flags &XFRM_STATE_ICMP ) { +if (!xfrm6_policy_check (NULL ,XFRM_POLICY_IN , skb)) {int nh; +if (!(skb->sp && skb->sp->xvec[skb->sp->len -1 ]->props.flags & +XFRM_STATE_ICMP )) + goto drop_no_count; +if (!pskb_may_pull (skb,sizeof (*hdr) +sizeof (*orig_hdr))) goto drop_no_count;
Re: [IPSEC]: Fix reversed ICMP6 policy check
From: Herbert Xu <[email protected]>
Date: Thu, 13 Dec 2007 10:51:56 +0800
Quoted 2 lines
You're too quick :) Before you ask for an incremental patch, here's a preemptive strike :)
Hehe :)
Quoted 6 lines
[IPSEC]: Do not let packets pass when ICMP flag is off
This fixes a logical error in ICMP policy checks which lets packets through if the state ICMP flag is off.
Signed-off-by Herbert Xu <[email protected]>
Applied, thanks!
Re: [IPSEC]: Fix reversed ICMP6 policy check
In reply to Herbert XuQuoted 6 lines · Herbert Xu
Quoted 1 line · Herbert Xu
[IPSEC]: Fix reversed ICMP6 policy check
While that won't crash anymore, it's still logically wrong.
Here's a more complete fix.
...even more than this!
Since more than a year each time I read your patches I wonder what kind of special attachments you use they are so "unreadble" (blurred) in Mozilla Thunderbird (but, I was never so desperate to study all these mail RFCs). And now - BINGO! So, they are simply treated as signatures! Nice trick! But, I see, you forgot about something this time, and now it's all clear! (Actually, I probably need one more year to find, how to turn off this sh...)
Thanks,
Jarek P.