All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Theodore Y. Ts'o" <tytso@mit.edu>
To: "Jason A. Donenfeld" <Jason@zx2c4.com>
Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
	davem@davemloft.net
Subject: Re: [PATCH v1 1/3] random: Make crng state queryable
Date: Thu, 2 Aug 2018 17:35:59 -0400	[thread overview]
Message-ID: <20180802213559.GA32066@thunk.org> (raw)
In-Reply-To: <20180731191102.2434-2-Jason@zx2c4.com>

On Tue, Jul 31, 2018 at 09:11:00PM +0200, Jason A. Donenfeld wrote:
> It is very useful to be able to know whether or not get_random_bytes_wait
> / wait_for_random_bytes is going to block or not, or whether plain
> get_random_bytes is going to return good randomness or bad randomness.
> 
> The particular use case is for mitigating certain attacks in WireGuard.
> A handshake packet arrives and is queued up. Elsewhere a worker thread
> takes items from the queue and processes them. In replying to these
> items, it needs to use some random data, and it has to be good random
> data. If we simply block until we can have good randomness, then it's
> possible for an attacker to fill the queue up with packets waiting to be
> processed. Upon realizing the queue is full, WireGuard will detect that
> it's under a denial of service attack, and behave accordingly. A better
> approach is just to drop incoming handshake packets if the crng is not
> yet initialized.
> 
> This patch, therefore, makes that information directly accessible.
> 
> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
> Signed-off-by: Theodore Ts'o <tytso@mit.edu>

Applied to the random.git tree.

					- Ted

  reply	other threads:[~2018-08-02 21:36 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-31 19:10 [PATCH v1 0/3] WireGuard: Secure Network Tunnel Jason A. Donenfeld
2018-07-31 19:11 ` [PATCH v1 1/3] random: Make crng state queryable Jason A. Donenfeld
2018-08-02 21:35   ` Theodore Y. Ts'o [this message]
2018-07-31 19:11 ` [PATCH v1 2/3] zinc: Introduce minimal cryptography library Jason A. Donenfeld
2018-07-31 19:11 ` [PATCH v1 3/3] net: WireGuard secure network tunnel Jason A. Donenfeld
2018-07-31 20:02   ` Andrew Lunn
2018-07-31 20:22   ` Stephen Hemminger
2018-08-21 23:41     ` Jason A. Donenfeld
2018-08-21 23:54       ` David Miller
2018-08-21 23:59         ` Jason A. Donenfeld
2018-08-22  0:23           ` Andrew Lunn
2018-07-31 20:27   ` Stephen Hemminger
2018-08-03  0:35     ` Jason A. Donenfeld
2018-08-03 14:39       ` Andrew Lunn
2018-08-01  1:21   ` Shawn Landden
2018-08-13 15:40 ` [PATCH v1 0/3] WireGuard: Secure Network Tunnel James Bottomley
2018-08-13 15:53   ` Willy Tarreau
2018-08-13 17:02   ` Jason A. Donenfeld
2018-08-13 17:37     ` James Bottomley
2018-08-13 17:55       ` Jason A. Donenfeld
2018-08-13 18:04         ` James Bottomley

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=20180802213559.GA32066@thunk.org \
    --to=tytso@mit.edu \
    --cc=Jason@zx2c4.com \
    --cc=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.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.