netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] additional update of dev_net(net) to struct *net in ip_fragment.c, NULL ptr OOPS
@ 2009-11-26 10:38 David Ford
  2009-11-30  1:16 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: David Ford @ 2009-11-26 10:38 UTC (permalink / raw)
  To: netdev

ipv4 ip_frag_reasm(), fully replace 'dev_net(dev)' with 'net', defined
previously patched into 2.6.29.

--- linux-2.6.32-rc8/net/ipv4/ip_fragment.c.orig 2009-09-09
18:13:59.000000000 -0400
+++ linux-2.6.32-rc8/net/ipv4/ip_fragment.c      2009-11-26
05:02:43.000000000 -0500
@@ -563,7 +563,7 @@
                printk(KERN_INFO "Oversized IP packet from %pI4.\n",
                        &qp->saddr);
 out_fail:
-       IP_INC_STATS_BH(dev_net(dev), IPSTATS_MIB_REASMFAILS);
+       IP_INC_STATS_BH(net, IPSTATS_MIB_REASMFAILS);
        return err;
 }

Signed-off-by: David Ford <david@blue-labs.org>



Between 2.6.28.10 and 2.6.29, net/ipv4/ip_fragment.c was patched,
changing from dev_net(dev) to container_of(...).  Unfortunately the goto
section (out_fail) on oversized packets inside ip_frag_reasm() didn't
get touched up as well.  Oversized IP packets cause a NULL pointer
dereference and immediate hang.

I discovered this running openvasd and my previous email on this is
titled:  NULL pointer dereference at 2.6.32-rc8:net/ipv4/ip_fragment.c:566

-david



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] additional update of dev_net(net) to struct *net in ip_fragment.c, NULL ptr OOPS
  2009-11-26 10:38 [PATCH] additional update of dev_net(net) to struct *net in ip_fragment.c, NULL ptr OOPS David Ford
@ 2009-11-30  1:16 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2009-11-30  1:16 UTC (permalink / raw)
  To: david; +Cc: netdev

From: David Ford <david@blue-labs.org>
Date: Thu, 26 Nov 2009 05:38:49 -0500

> ipv4 ip_frag_reasm(), fully replace 'dev_net(dev)' with 'net', defined
> previously patched into 2.6.29.

Your patch has been heavily corrupted by your email client, making
the patch unusable.

Please fix this up and resubmit, thank you.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-11-30  1:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-26 10:38 [PATCH] additional update of dev_net(net) to struct *net in ip_fragment.c, NULL ptr OOPS David Ford
2009-11-30  1:16 ` David Miller

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).