Commit Graph

23 Commits

Author SHA1 Message Date
Michael Kerrisk a721e8b25f aio.7, arp.7, attributes.7, boot.7, cgroups.7, cpuset.7, credentials.7, fanotify.7, fifo.7, glob.7, hier.7, hostname.7, icmp.7, inode.7, inotify.7, keyrings.7, libc.7, mailaddr.7, mount_namespaces.7, mq_overview.7, nptl.7, numa.7, path_resolution.7, persistent-keyring.7, pid_namespaces.7, pipe.7, pkeys.7, process-keyring.7, pthreads.7, pty.7, random.7, sched.7, sem_overview.7, session-keyring.7, shm_overview.7, signal-safety.7, signal.7, spufs.7, standards.7, symlink.7, termio.7, thread-keyring.7, time.7, unicode.7, user-keyring.7, user-session-keyring.7, user_namespaces.7, utf-8.7, xattr.7: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-08-18 00:59:04 +02:00
Michael Kerrisk 31a1b45ece add_key.2, execve.2, fork.2, fsync.2, getrandom.2, getrlimit.2, getxattr.2, inotify_add_watch.2, ioctl.2, ioctl_fat.2, kcmp.2, keyctl.2, link.2, listxattr.2, lseek.2, madvise.2, mincore.2, mlock.2, nanosleep.2, poll.2, posix_fadvise.2, read.2, readv.2, recv.2, request_key.2, select.2, send.2, setxattr.2, sigaction.2, stat.2, statfs.2, syscall.2, tkill.2, truncate.2, unlink.2, vfork.2, write.2, __ppc_set_ppr_med.3, aio_suspend.3, backtrace.3, bcmp.3, bcopy.3, bzero.3, exec.3, fopen.3, fts.3, ftw.3, getline.3, getmntent.3, getopt.3, memccpy.3, memchr.3, memcmp.3, memcpy.3, memfrob.3, memmem.3, memmove.3, memset.3, random.3, random_r.3, resolver.3, scandir.3, scanf.3, sem_post.3, sem_wait.3, setjmp.3, sleep.3, strerror.3, strverscmp.3, system.3, random.4, core.5, intro.5, resolv.conf.5, slabinfo.5, environ.7, ip.7, keyrings.7, man.7, persistent-keyring.7, pipe.7, process-keyring.7, random.7, session-keyring.7, signal-safety.7, signal.7, thread-keyring.7, unix.7, user-keyring.7, user-session-keyring.7, ld.so.8: tstamp
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-03-13 21:14:49 +01:00
Michael Kerrisk f13970357e random.7: Mention getentropy(3)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-01-25 00:14:06 +13:00
Michael Kerrisk 933ab9c7f6 random.7: SEE ALSO: add getentropy(3)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-01-25 00:14:06 +13:00
Michael Kerrisk 7c28a0b660 random.7: SEE ALSO: add getauxval(3)
A small hint to the reader that some random bytes arrive
in the auxiliary vector.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-12-13 12:11:32 +01:00
Michael Kerrisk 1b9d581944 Removed trailing white space at end of lines 2016-12-12 10:47:17 +01:00
Jakub Wilk 40f0931ccb random.7: tfix
Signed-off-by: Jakub Wilk <jwilk@jwilk.net>
2016-11-27 18:59:06 +01:00
Michael Kerrisk 983c70fcfc random.7: srcfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-11-26 14:31:53 +01:00
Michael Kerrisk 289b177f0f random.7: Remove recommendation against consuming large amounts of randomness
From the email discussion:

> >    Usage recommendations
> >        The kernel random-number generator relies on  entropy  gathered
> >        from  device  drivers and other sources of environmental noise.
> >        It is designed to produce a small amount of  high-quality  seed
> >        material to seed a cryptographically secure pseudorandom number
> >        generator (CSPRNG).  It is designed for  security,  not  speed,
> >        and  is  poorly  suited  to generating large amounts of crypto‐
> >        graphic random data.  Users should be economical in the  amount
> >        of seed material that they consume via getrandom(2), /dev/uran‐
> >        dom, and /dev/random.
> >
> >        ┌─────────────────────────────────────────────────────┐
> >        │FIXME                                                │
> >        ├─────────────────────────────────────────────────────┤
> >        │Is it really  necessary  to  avoid  consuming  large │
> >        │amounts from /dev/urandom? Various sources linked to │
> >        │by https://bugzilla.kernel.org/show_bug.cgi?id=71211 │
> >        │suggest it is not.                                   │
> >        │                                                     │
> >        │And: has the answer to the previous question changed │
> >        │across kernel versions?                              │
> >        └─────────────────────────────────────────────────────┘
> >        Consuming unnecessarily large  quantities  of  data  via  these
> >        interfaces  will  have  a negative impact on other consumers of
> >        randomness.

[Ted T'so:]

> So "poorly suited" is definitely true.  Also true is that urandom is
> not engineered for use for non-cryptographic uses.  It's always going
> to be faster to use random(3) for those purposes.
>
> As far as whether or not it has a negative impact, it depends on how
> much you trust the underlying cryptographic algorithms.  If the CSPRNG
> is seeded correctly with at least 256 bits of entropy that can't be
> guessed by the attacker, and if the underlying cryptographic
> primitives are secure, then it won't matter.  But *if* there is an
> unknown vulnerability in the underlying primitive, and *if* large
> amounts of data generated by the CSPRNG would help exploit that
> vulnerability, and *if* that bulk amount of CSPRNG output is made
> available to an attacker with the capability to break the underlying
> cryptographic vulnerability, then there would be a problem.
>
> Obviously, no one knows of such a vulnerability, and I'm fairly
> confident that there won't be such a vulnerability across the
> different ways we've used to generate the urandom source --- but some
> people are professional paranoids, and would argue that we shouldn't
> make bulk output of the CSPRNG available for no good reason, just in
> case.

[Nikos Mavrogiannopoulos:]

The above is certainly accurate, however, I think that such a
discussion or text, when reflected to a man-page is going to
cause problems. The audience of a man-page are not crypto people,
and seeing such text would create confusion rather than clarify
how these devices/apis should be used. The *if* part is not put
into a perspective, suggesting that such an *if* is possible.
However, if one clarifies, i.e., in that case, your TLS or SSH
connection is most likely broken as well, and not because of any
attack on /dev/urandom, then one can see that we are heading
towards a theoretical discussion.

My suggestion, on that particular text would be to remove it,
but make it explicit somewhere in the text that all the
assurances for the devices depend on the crypto primitives,
rather than describing risks that may arise on particular
usage patterns *if* primitives are broken.

Reviewed-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
Reported-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-11-26 14:31:53 +01:00
Michael Kerrisk 7c896e1ece random.7: wfix
Reported-by: Jeremy Harris <jgh@redhat.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-11-19 11:28:46 +01:00
Michael Kerrisk 2b44a16879 random.7: wfix
Reported-by: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-11-15 22:14:52 +01:00
Michael Kerrisk e97a8a1d49 random.7: srcfix: tweak FIXMEs
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-11-15 07:48:59 +01:00
Michael Kerrisk 091ae4d20b random.7: Tewaks after review by Ted T'so
Reviewed-by: Theodore Ts'o <tytso@mit.edu>
Reported-by: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-11-15 07:40:35 +01:00
Michael Kerrisk 76d8c32d6f random.7: Fixes after review by Laurent Georget
Reviewed-by: Laurent Georget <laurent@lgeorget.eu>
Reported-by: Laurent Georget <laurent@lgeorget.eu>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-11-15 07:19:09 +01:00
Michael Kerrisk e10dec2908 random.7: wfix
Reported-by: Jeremy Harris <jgh@redhat.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-11-15 06:57:51 +01:00
Michael Kerrisk b171f0af8a random.7: srcfix: FIXME
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-11-13 07:34:18 +01:00
Michael Kerrisk 2c158ae506 random.7: Note that simulations don't need cryptographically secure random numbers
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-11-13 07:26:51 +01:00
Michael Kerrisk cdfedc0324 random.7: wfix
Reported-by: Laurent Georget <laurent.georget@supelec.fr>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-11-12 23:00:40 +01:00
Michael Kerrisk 5a1df80797 random.7: srcfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-11-12 20:18:15 +01:00
Michael Kerrisk e919912d34 random.7: wfix
Further weaken any suggestion that the "random" source is
in some cases preferable.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-11-12 13:19:10 +01:00
Michael Kerrisk d8de7cba64 random.7: wfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-11-12 12:22:10 +01:00
Michael Kerrisk dce6b79650 getrandom.2, random.7: wfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-11-12 12:22:10 +01:00
Michael Kerrisk 0ae2c1356d random.7: New page providing an overview of interfaces for obtaining randomness
Ccontains material extracted from getrandom(2) and random(4),
as well as new material.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-11-12 12:22:10 +01:00