The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: "Theodore Tso" <tytso@mit.edu>
To: Jakub Stasiak <jakub@stasiak.at>
Cc: "Jason A. Donenfeld" <Jason@zx2c4.com>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] random: reject negative RNDADDENTROPY sizes early
Date: Sun, 28 Jun 2026 22:12:37 -0400	[thread overview]
Message-ID: <akHUO87OmtshDmHZ@mit.edu> (raw)
In-Reply-To: <9C982B79-FC02-49E0-8021-D1E41F249E45@stasiak.at>

On Sun, Jun 28, 2026 at 01:42:27PM -0500, Jakub Stasiak wrote:
> Reject negative len values at the ioctl boundary instead. This avoids
> relying on the later import and write paths, and prevents an invalid
> request from mixing user data into the pool at the clamped length
> instead of the requested len before returning -EFAULT. Consider this
> defense in depth.

The patch isn't wrong per se, but defense in depth against what?  This
ioctl() requires root privileges, and so it's not something where we
would need to worry about an attacker passing in invalid data to the
ioctl.  If you have CAP_SYS_ADMIN, there is far more mischief you
could do....

					- Ted

  reply	other threads:[~2026-06-29  2:12 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-28 11:42 [PATCH] random: reject negative RNDADDENTROPY sizes early Jakub Stasiak
2026-06-29  2:12 ` Theodore Tso [this message]
2026-06-29  7:23   ` Jakub Stasiak

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=akHUO87OmtshDmHZ@mit.edu \
    --to=tytso@mit.edu \
    --cc=Jason@zx2c4.com \
    --cc=jakub@stasiak.at \
    --cc=linux-kernel@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