All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Dumazet <eric.dumazet@gmail.com>
To: Hannes Frederic Sowa <hannes@stressinduktion.org>
Cc: netdev@vger.kernel.org, Dmitry Vyukov <dvyukov@google.com>
Subject: Re: [PATCH net] af_unix: don't append consumed skbs to sk_receive_queue
Date: Mon, 16 Nov 2015 08:38:00 -0800	[thread overview]
Message-ID: <1447691880.22599.68.camel@edumazet-glaptop2.roam.corp.google.com> (raw)
In-Reply-To: <1447687556-22712-1-git-send-email-hannes@stressinduktion.org>

On Mon, 2015-11-16 at 16:25 +0100, Hannes Frederic Sowa wrote:
> In case multiple writes to a unix stream socket race we could end up in a
> situation where we pre-allocate a new skb for use in unix_stream_sendpage
> but have to free it again in the locked section because another skb
> has been appended meanwhile, which we must use. Accidentally we didn't
> clear the pointer after consuming it and so we touched freed memory
> while appending it to the sk_receive_queue. So, clear the pointer after
> consuming the skb.
> 
> This bug has been found with syzkaller
> (http://github.com/google/syzkaller) by Dmitry Vyukov.
> 
> Fixes: 869e7c62486e ("net: af_unix: implement stream sendpage support")
> Reported-by: Dmitry Vyukov <dvyukov@google.com>
> Cc: Dmitry Vyukov <dvyukov@google.com>
> Cc: Eric Dumazet <eric.dumazet@gmail.com>
> Signed-off-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
> ---

Acked-by: Eric Dumazet <edumazet@google.com>

  reply	other threads:[~2015-11-16 16:38 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-16 15:25 [PATCH net] af_unix: don't append consumed skbs to sk_receive_queue Hannes Frederic Sowa
2015-11-16 16:38 ` Eric Dumazet [this message]
2015-11-16 20:40 ` David 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=1447691880.22599.68.camel@edumazet-glaptop2.roam.corp.google.com \
    --to=eric.dumazet@gmail.com \
    --cc=dvyukov@google.com \
    --cc=hannes@stressinduktion.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.