netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: andrew.hendry@gmail.com
Cc: apw@canonical.com, john@calva.com, linux-x25@vger.kernel.org,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	tim.gardner@canonical.com
Subject: Re: x25: possible skb leak on bad facilities
Date: Mon, 07 Feb 2011 13:42:40 -0800 (PST)	[thread overview]
Message-ID: <20110207.134240.260080815.davem@davemloft.net> (raw)
In-Reply-To: <1297073295.9577.13.camel@jaunty>

From: Andrew Hendry <andrew.hendry@gmail.com>
Date: Mon, 07 Feb 2011 21:08:15 +1100

> 
> Originally x25_parse_facilities returned
> -1 for an error
>  0 meaning 0 length facilities
>>0 the length of the facilities parsed.
> 
> 5ef41308f94dc introduced more error checking in x25_parse_facilities
> however used 0 to indicate bad parsing
> a6331d6f9a429 followed this further for DTE facilities, again using 0 for bad parsing.
> 
> The meaning of 0 got confused in the callers.
> If the facilities are messed up we can't determine where the data starts.
> So patch makes all parsing errors return -1 and ensures callers close and don't use the skb further.
> 
> Reported-by: Andy Whitcroft <apw@canonical.com>
> Signed-off-by: Andrew Hendry <andrew.hendry@gmail.com>

Please reference the commit header line text when referring to SHA1
IDs, because when backporting to other GIT trees the SHA1 IDs might be
different.

I took care of this when applying your patch, thanks.

  reply	other threads:[~2011-02-07 21:42 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-31 13:08 x25: possible skb leak on bad facilities Andy Whitcroft
2011-02-01 11:55 ` Andrew Hendry
2011-02-07  4:28   ` David Miller
2011-02-07  6:29     ` Andrew Hendry
2011-02-07 10:08       ` Andrew Hendry
2011-02-07 21:42         ` David Miller [this message]
2011-02-07  9:25 ` John Hughes

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=20110207.134240.260080815.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=andrew.hendry@gmail.com \
    --cc=apw@canonical.com \
    --cc=john@calva.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-x25@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=tim.gardner@canonical.com \
    /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).