Public bug reported:

ubuntu-core/15.04/edge
armhf

getrandom() stucks when process has no read permission on /dev/urandom.
It should return an error.

Easy example to reproduce in golang:

//--------------------
package main

import (
        "crypto/rand"
        "io"
)

func main() {
        p := make([]byte, 16)
        if _, err := io.ReadFull(rand.Reader, p); err != nil { // <--- stuck!
                println(err)
                return
        }
        println(p)
}
//--------------------

The internal implementation of reading from rand.Reader contains getrandom() 
syscall:
     https://golang.org/src/crypto/rand/rand_linux.go

** Affects: ubuntu
     Importance: Undecided
         Status: New

** Information type changed from Private Security to Public

** Package changed: libseccomp (Ubuntu) => ubuntu

-- 
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to libseccomp in Ubuntu.
https://bugs.launchpad.net/bugs/1452402

Title:
  getrandom() stucks when process has no read permission on /dev/urandom

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+bug/1452402/+subscriptions

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs

Reply via email to