mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andreas Dilger <adilger@turbolinux.com>
To: Steve Hill <steve@navaho.co.uk>
Cc: "Richard B. Johnson" <root@chaos.analogic.com>,
	linux-kernel@vger.kernel.org
Subject: Re: /dev/random in 2.4.6
Date: Wed, 15 Aug 2001 11:13:41 -0600 (MDT)	[thread overview]
Message-ID: <200108151713.f7FHDg0n013420@webber.adilger.int> (raw)
In-Reply-To: <Pine.LNX.4.21.0108151622570.2107-100000@sorbus.navaho> "from Steve Hill at Aug 15, 2001 04:27:04 pm"

Steve Hill writes:
> On Wed, 15 Aug 2001, Richard B. Johnson wrote:
> > Same problem on 2.4.1. The first 512 bytes comes right away if
> > /dev/random hasn't been accessed since boot, then the rest trickles
> > a few words per second.
> 
> Hmm...  Well, ATM I've kludged a fix by using /dev/urandom instead, but
> it's not ideal because it's being used to generate cryptographic keys, and
> urandom isn't cryptographically secure.
> 
> I might have a look into increasing the size of the entropy pool so
> there's more data to access at once...

Yes, it is possible to increase the size of the in-kernel entropy pool
by changing the value in linux/drivers/char/random.c.  You will likely
also need to fix up the user-space scripts that save and restore the
entropy on shutdown/startup (they can check /proc/sys/kernel/random/poolsize,
if available, to see how many bytes to read/write).

> Are you seeing the problem on a normal machine? (I assumed I was seeing it
> because I'm using Cobalt hardware that's not going to get much entropy
> data due to the lack of keyboard, etc)...  although when I'm generating
> this data I'm using a root NFS filesystem, so there should be plenty of
> network interrupts happening,which should generate some entropy...

Note that network interrupts do NOT normally contribute to the entropy
pool.  This is because of the _very_theoretical_ possibility that an
attacker can "control" the network traffic to such a precise extent as
to flush or otherwise contaminate the entropy from the pool by sending
packets with very precise intervals and generating interrupts so exactly
as to fill the entropy pool with known data.  IMVHO, this is basically
impossible, as the attacker could not possibly control ALL of the network
traffic, and you could optionally define "safe" and "unsafe" interfaces
for terms of entropy.

It is basically inconcievable (IMHO) that anything but a machine connected
via a single crossover cable could "attack" a system precisely enough to
actually compromise the entropy pool because of network interrupts, but
then again people with more knowledge of this than I are in charge.

That said, if you are running on a machine with an Intel i81[05]
chipset, it has a hardware random number generator (I doubt Cobalt boxes
have these).  Alternately, you you need to add SA_SAMPLE_RANDOM to the
request_irq() call of the network card in your system.

You may also want to add a kernel/module parameter to make this flag
conditional on a per-controller basis, so for example it will only add
entropy from the internal interface of a firewall, and not the external
interface (if you have identical NICs on both).

Cheers, Andreas
-- 
Andreas Dilger  \ "If a man ate a pound of pasta and a pound of antipasto,
                 \  would they cancel out, leaving him still hungry?"
http://www-mddsp.enel.ucalgary.ca/People/adilger/               -- Dogbert


  parent reply	other threads:[~2001-08-15 17:14 UTC|newest]

Thread overview: 59+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-08-15 15:07 Steve Hill
2001-08-15 15:21 ` Richard B. Johnson
2001-08-15 15:27   ` Steve Hill
2001-08-15 15:42     ` Richard B. Johnson
2001-08-15 16:29       ` Tim Walberg
2001-08-15 17:13     ` Andreas Dilger [this message]
2001-08-16  8:37       ` Steve Hill
2001-08-16 19:11         ` Andreas Dilger
2001-08-16 19:35           ` Alex Bligh - linux-kernel
2001-08-16 20:30             ` Andreas Dilger
2001-08-17  1:05           ` Robert Love
2001-08-17  0:49         ` Robert Love
2001-08-19 17:29           ` David Wagner
2001-08-17 21:18       ` Theodore Tso
2001-08-17 22:05         ` David Schwartz
2001-08-19 15:13           ` Theodore Tso
2001-08-19 15:33             ` Rob Radez
2001-08-19 17:32             ` David Wagner
2001-08-19 23:32             ` Oliver Xymoron
2001-08-20  7:40               ` Helge Hafting
2001-08-20 14:01                 ` Oliver Xymoron
2001-08-20 13:37               ` Alex Bligh - linux-kernel
2001-08-20 14:12                 ` Oliver Xymoron
2001-08-20 14:40                   ` Alex Bligh - linux-kernel
2001-08-20 14:55                     ` Chris Friesen
2001-08-20 15:22                       ` Oliver Xymoron
2001-08-20 15:25                       ` Doug McNaught
2001-08-20 15:42                         ` Chris Friesen
2001-08-21 10:03                           ` Steve Hill
2001-08-21 18:14                             ` David Wagner
2001-08-20 16:01                       ` David Wagner
2001-08-20 19:30                       ` Gérard Roudier
2001-08-20 15:07                     ` Oliver Xymoron
2001-08-21  8:33                       ` Alex Bligh - linux-kernel
2001-08-21 16:13                         ` Oliver Xymoron
2001-08-21 17:44                           ` Alex Bligh - linux-kernel
2001-08-21 18:24                             ` David Wagner
2001-08-21 18:49                               ` Alex Bligh - linux-kernel
2001-08-21 19:04                             ` Oliver Xymoron
2001-08-21 19:20                               ` Alex Bligh - linux-kernel
2001-08-21 21:44                               ` Robert Love
2001-08-21 18:19                         ` David Wagner
2001-08-20 16:00                     ` David Wagner
2001-08-21  1:20                       ` Theodore Tso
2001-08-21  8:39                       ` Alex Bligh - linux-kernel
2001-08-21 10:46                         ` Marco Colombo
2001-08-21 12:40                           ` Alex Bligh - linux-kernel
2001-08-21 17:06                           ` cfs+linux-kernel
2001-08-21 17:48                             ` Alex Bligh - linux-kernel
2001-08-21 18:27                           ` David Wagner
2001-08-21 18:25                         ` David Wagner
2001-08-20 22:55                     ` D. Stimits
2001-08-21  1:06                       ` David Schwartz
2001-08-19 17:31         ` David Wagner
2001-08-19 17:27     ` David Wagner
2001-08-15 19:25 ` Alex Bligh - linux-kernel
2001-08-16  8:55   ` Steve Hill
2001-08-15 20:55 ` Robert Love
2001-08-15 21:27   ` Alex Bligh - linux-kernel

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=200108151713.f7FHDg0n013420@webber.adilger.int \
    --to=adilger@turbolinux.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=root@chaos.analogic.com \
    --cc=steve@navaho.co.uk \
    /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

all inboxes | Powered by JetHome®