Re: [tytso@xxxxxxx: [PATCH, RFC -v3] random: introduce getrandom(2) system call]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jul 18, 2014 at 03:16:18PM +0200, Arnd Bergmann wrote:
> On Friday 18 July 2014 08:56:06 Theodore Ts'o wrote:
> > 
> > The change in the v3 version of the commit was to eliminate potential
> > short reads and EINTR returns when reading from urandom (once the
> > urandom pool is initialized).  This was based on comments and requests
> > from Theo de Raadt.  See the NOTES section in the suggested man page for
> > a more in-depth discussion of the issues involved.
> 
> I think there is a problem with the completion...
>
> However, here you can get called an arbitrary number of times.
> It seems entirely possible than an attacker can manage to call
> this function 2 billion times. Assuming a latency of 1 microsecond
> per syscall, that would take about half an hour. After that, you
> never again get any urandom data out of the syscall.
> 
> I think you are better off using a plain wait_event() here.

Nice catch, thanks!!

I'll rework the patch to use wait_event().

							- Ted
--
To unsubscribe from this list: send the line "unsubscribe linux-api" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux