netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: dborkman@redhat.com
Cc: netdev@vger.kernel.org, eric.dumazet@gmail.com
Subject: Re: [PATCH net] net: ipv6: tcp: fix potential use after free in tcp_v6_do_rcv
Date: Wed, 04 Sep 2013 14:57:04 -0400 (EDT)	[thread overview]
Message-ID: <20130904.145704.1474150306960456668.davem@davemloft.net> (raw)
In-Reply-To: <1378229352-9779-1-git-send-email-dborkman@redhat.com>

From: Daniel Borkmann <dborkman@redhat.com>
Date: Tue,  3 Sep 2013 19:29:12 +0200

> In tcp_v6_do_rcv() code, when processing pkt options, we soley work
> on our skb clone opt_skb that we've created earlier before entering
> tcp_rcv_established() on our way. However, only in condition ...
> 
>   if (np->rxopt.bits.rxtclass)
>     np->rcv_tclass = ipv6_get_dsfield(ipv6_hdr(skb));
> 
> ... we work on skb itself. As we extract every other information out
> of opt_skb in ipv6_pktoptions path, this seems wrong, since skb can
> already be released by tcp_rcv_established() earlier on. When we try
> to access it in ipv6_hdr(), we will dereference freed skb.
> 
> Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
> Cc: Eric Dumazet <eric.dumazet@gmail.com>

Applied.

      parent reply	other threads:[~2013-09-04 18:57 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-03 17:29 [PATCH net] net: ipv6: tcp: fix potential use after free in tcp_v6_do_rcv Daniel Borkmann
2013-09-03 17:48 ` Eric Dumazet
2013-09-03 19:46   ` Jean Sacren
2013-09-03 20:35     ` Eric Dumazet
2013-09-03 21:59       ` Jean Sacren
2013-09-03 22:25         ` Daniel Borkmann
2013-09-03 22:29         ` Eric Dumazet
2013-09-04  0:51           ` Jean Sacren
2013-09-04  6:26             ` Jiri Benc
2013-09-04 18:57 ` David Miller [this message]

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=20130904.145704.1474150306960456668.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=dborkman@redhat.com \
    --cc=eric.dumazet@gmail.com \
    --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).