netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: jdb@comx.dk
Cc: netdev@vger.kernel.org
Subject: Re: [RFC] [PATCH] Fix UDP short packet false positive
Date: Fri, 06 Feb 2009 01:08:24 -0800 (PST)	[thread overview]
Message-ID: <20090206.010824.99072382.davem@davemloft.net> (raw)
In-Reply-To: <1233910824.21135.6.camel@localhost.localdomain>

From: Jesper Dangaard Brouer <jdb@comx.dk>
Date: Fri, 06 Feb 2009 10:00:24 +0100

> On Thu, 2009-02-05 at 15:06 -0800, David Miller wrote:
> > From: Jesper Dangaard Brouer <jdb@comx.dk>
> > Date: Thu, 05 Feb 2009 13:47:07 +0100
> >
> > > The UDP header pointer assignment must happen after calling
> > > pskb_may_pull().  As pskb_may_pull() can potentially alter the SKB
> > > buffer.
> >
> > Excellent work!
> 
> Thanks :-)
> 
> I'm wondering if the ip_hdr() pointer can be changed by the
> pskb_may_pull(), but I assume it cannot as it should already be in the
> linear area... right?
> 
> Well the patch below, shows what I mean...

It has the same potential problem, but in this case you'd
only see corruption if the old skb->data buffer were reallocated
by another user and written into very quickly (or poison'd by
SLAB debugging).

Please respin this patch of your's with proper commit message
and signoffs, thanks!

BTW, ipv6 udp gets all of this right :-)

  reply	other threads:[~2009-02-06  9:08 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-03 13:38 BUG: NIU driver: strange issues with multicast "UDP: short packet" Jesper Dangaard Brouer
2009-02-03 23:38 ` David Miller
2009-02-04  8:55   ` Jesper Dangaard Brouer
2009-02-04  9:00     ` David Miller
2009-02-04  9:32       ` Jesper Dangaard Brouer
2009-02-04  9:34         ` David Miller
2009-02-05 12:44       ` Jesper Dangaard Brouer
2009-02-05 12:47         ` [PATCH] Fix UDP short packet false positive Jesper Dangaard Brouer
2009-02-05 23:06           ` David Miller
2009-02-06  9:00             ` [RFC] " Jesper Dangaard Brouer
2009-02-06  9:08               ` David Miller [this message]
2009-02-06  9:55                 ` [PATCH] udp: Fix potential wrong ip_hdr(skb) pointers Jesper Dangaard Brouer
2009-02-06  9:59                   ` David Miller
2009-02-06 10:04                   ` Eric Dumazet
2009-02-06 10:49                     ` Jesper Dangaard Brouer
2009-02-06 11:11                       ` David Miller
2009-02-04 11:52   ` BUG: NIU driver: strange issues with multicast "UDP: short packet" Herbert Xu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090206.010824.99072382.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=jdb@comx.dk \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).