netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "David S. Miller" <davem@davemloft.net>
To: Patrick McHardy <kaber@trash.net>
Cc: maxk@qualcomm.com, shemminger@osdl.org, netdev@oss.sgi.com
Subject: Re: Fw: [Bug 4279] New: When I try to start vpnc the net/core/skbuff.c:91 crash
Date: Thu, 10 Mar 2005 19:20:23 -0800	[thread overview]
Message-ID: <20050310192023.1270fef6.davem@davemloft.net> (raw)
In-Reply-To: <4228AD8F.4020000@trash.net>

On Fri, 04 Mar 2005 19:48:47 +0100
Patrick McHardy <kaber@trash.net> wrote:

> Max Krasnyansky wrote:
> > Hi Stephen,
> > 
> >> Looks like a something wrong with tun driver on 2.6.11
> > 
> > Thanks for forwarding this. I'll take a look at it.
> > As far as I remember nothing really changed in the TUN write logic.
> > Must be some other changes broke it.
> 
> This check is wrong, gcc optimizes it away:
> 
>                 if ((len -= sizeof(pi)) > len)
> 			return -EINVAL;
> 
> This could be responsible for the BUG. If len is 2 or 3 and TUN_NO_PI
> isn't set it underflows. alloc_skb() allocates len + 2, which is 0 or
> 1 byte. skb_reserve tries to reserve 2 bytes and things explode in
> skb_put.

Good catch Patrick.

Patch applied, thanks.

  reply	other threads:[~2005-03-11  3:20 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-03-03 17:58 Fw: [Bug 4279] New: When I try to start vpnc the net/core/skbuff.c:91 crash Stephen Hemminger
2005-03-04 18:05 ` Max Krasnyansky
2005-03-04 18:48   ` Patrick McHardy
2005-03-11  3:20     ` David S. Miller [this message]
2005-03-11  5:03       ` Patrick McHardy
2005-03-23  2:44         ` David S. Miller

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=20050310192023.1270fef6.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=kaber@trash.net \
    --cc=maxk@qualcomm.com \
    --cc=netdev@oss.sgi.com \
    --cc=shemminger@osdl.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).