mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: "Theodore Ts'o" <tytso@mit.edu>,
	Chen Feng <puck.chen@hisilicon.com>,
	zhaoyukun@huawei.com, arnd@arndb.de,
	linux-kernel@vger.kernel.org, suzhuangluan@hisilicon.com,
	dan.zhao@hisilicon.com
Subject: Re: [PATCH RFC] random: fix syzkaller fuzzer test int overflow
Date: Mon, 30 Oct 2017 08:39:56 +0100	[thread overview]
Message-ID: <20171030073956.GA17153@kroah.com> (raw)
In-Reply-To: <20171029182529.rxmbawagx63e2dw4@thunk.org>

On Sun, Oct 29, 2017 at 02:25:29PM -0400, Theodore Ts'o wrote:
> On Sat, Oct 28, 2017 at 11:22:00AM +0800, Chen Feng wrote:
> > 
> > I checked the ioctl. What's the purpose of RNDADDTOENTCNT ioctl to
> > userspace?
> 
> It's a legacy ioctl which is probably not used anywhere; it's been
> replaced by RNDADDENTROPY.  It previously allows root to bump the
> entropy estimate, but the right way to do this by rngd is to
> atomically add entropy to the pool land and bump the entropy estimate
> at the same time.
> 
> The UBSAN is harmless.  The ioctl requires root, and the entropy_total
> field, which is involved in the UBSAN, is only used in the first few
> seconds of boot, to determine when the entropy pool has been
> initialized.  In general on desktop and servers this happens before
> userspace has a chance to run.
> 
> In any case, here's a fix for this.
> 
> 					- Ted
> 
> commit 6f7034d0c52e21f30002b95126b6b98e4618dc57
> Author: Theodore Ts'o <tytso@mit.edu>
> Date:   Sun Oct 29 14:17:26 2017 -0400
> 
>     random: use a tighter cap in credit_entropy_bits_safe()
>     
>     This fixes a harmless UBSAN where root could potentially end up
>     causing an overflow while bumping the entropy_total field (which is
>     ignored once the entropy pool has been initialized, and this generally
>     is completed during the boot sequence).
>     
>     This is marginal for the stable kernel series, but it's a really
>     trivial patch, and it UBSAN warning that might cause security folks to
>     get overly excited for no reason.
>     
>     Signed-off-by: Theodore Ts'o <tytso@mit.edu>
>     Cc: stable@vger.kernel.org

No "Reported-by:"?

thanks,

greg k-h

  reply	other threads:[~2017-10-30  7:39 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-24  7:44 Chen Feng
2017-10-24  9:09 ` Greg KH
2017-10-24  9:24   ` Chen Feng
2017-10-24  9:57     ` Greg KH
2017-10-24 10:25   ` Theodore Ts'o
2017-10-25  6:30     ` Chen Feng
2017-10-25  6:56       ` Greg KH
2017-10-25  7:08         ` Chen Feng
2017-10-25  8:49           ` Theodore Ts'o
2017-10-26  8:25             ` Chen Feng
2017-10-26 15:04               ` Theodore Ts'o
2017-10-28  3:22                 ` Chen Feng
2017-10-29 18:25                   ` Theodore Ts'o
2017-10-30  7:39                     ` Greg KH [this message]
2017-10-30  9:11                       ` Theodore Ts'o

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=20171030073956.GA17153@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=arnd@arndb.de \
    --cc=dan.zhao@hisilicon.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=puck.chen@hisilicon.com \
    --cc=suzhuangluan@hisilicon.com \
    --cc=tytso@mit.edu \
    --cc=zhaoyukun@huawei.com \
    /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

Powered by JetHome