Netdev List
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: eric.dumazet@gmail.com
Cc: netdev@vger.kernel.org, gerrit@erg.abdn.ac.uk
Subject: Re: [PATCH net] dccp: defer ccid_hc_tx_delete() at dismantle time
Date: Wed, 16 Aug 2017 14:27:14 -0700 (PDT)	[thread overview]
Message-ID: <20170816.142714.1364386866278233165.davem@davemloft.net> (raw)
In-Reply-To: <1502892195.4936.111.camel@edumazet-glaptop3.roam.corp.google.com>

From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Wed, 16 Aug 2017 07:03:15 -0700

> From: Eric Dumazet <edumazet@google.com>
> 
> syszkaller team reported another problem in DCCP [1]
> 
> Problem here is that the structure holding RTO timer
> (ccid2_hc_tx_rto_expire() handler) is freed too soon.
> 
> We can not use del_timer_sync() to cancel the timer
> since this timer wants to grab socket lock (that would risk a dead lock)
> 
> Solution is to defer the freeing of memory when all references to
> the socket were released. Socket timers do own a reference, so this
> should fix the issue.
> 
> [1]
> ==================================================================
> BUG: KASAN: use-after-free in ccid2_hc_tx_rto_expire+0x51c/0x5c0 net/dccp/ccids/ccid2.c:144
 ...
> Signed-off-by: Eric Dumazet <edumazet@google.com>
> Reported-by: Dmitry Vyukov <dvyukov@google.com>

Applied and queued up for -stable, thanks.

      reply	other threads:[~2017-08-16 21:27 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-16 14:03 [PATCH net] dccp: defer ccid_hc_tx_delete() at dismantle time Eric Dumazet
2017-08-16 21:27 ` 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=20170816.142714.1364386866278233165.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=eric.dumazet@gmail.com \
    --cc=gerrit@erg.abdn.ac.uk \
    --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