denied access to hidden file /dev/urandom by /usr/bin/tor
Posted: Fri Nov 27, 2015 10:08 am
I have a problem with the policy for tor and I can't figure out what's wrong. When I try to enable tor service I get these errors:
repeated several times.
My policy for tor is like this:
so it appears to me that it should be able to read /dev/urandom. What am I missing?
- Code: Select all
kernel: grsec: (tor:U:/usr/bin/tor) denied access to hidden file /dev/urandom by /usr/bin/tor[tor:11524] uid/euid:43/43 gid/egid:43/43, parent /usr/lib/systemd/systemd[systemd:1] uid/euid:0/0 gid/egid:0/0
kernel: grsec: (tor:U:/usr/bin/tor) denied access to hidden file /dev/random by /usr/bin/tor[tor:11524] uid/euid:43/43 gid/egid:43/43, parent /usr/lib/systemd/systemd[systemd:1] uid/euid:0/0 gid/egid:0/0
repeated several times.
My policy for tor is like this:
- Code: Select all
role tor u
role_allow_ip 0.0.0.0/32
# Role: tor
subject / o {
/ h
/usr/bin/tor x
-CAP_ALL
bind disabled
connect disabled
}
# Role: tor
subject /usr/bin/tor o {
/ h
/dev h
/dev/urandom r
/etc h
/etc/ld.so.cache r
/etc/tor/torrc r
/proc h
/proc/meminfo r
/proc/sys/kernel/random/uuid r
/run h
/run/systemd/journal/dev-log rw
/sys h
/sys/devices/system/cpu
/sys/devices/system/cpu/online r
/usr h
/usr/bin h
/usr/bin/tor rx
/usr/lib rx
/usr/lib/modules h
/usr/share h
/usr/share/tor/geoip r
/usr/share/tor/geoip6 r
/usr/share/zoneinfo r
/var h
/var/lib/tor rwcd
-CAP_ALL
bind 127.0.0.1/32:9050 stream icmp tcp
connect 0.0.0.0/0:1024-65535 stream icmp tcp
connect 0.0.0.0/0:443 stream icmp tcp
connect 0.0.0.0/0:110 stream icmp tcp
connect 0.0.0.0/0:80 stream icmp tcp
connect 0.0.0.0/0:21 stream icmp tcp
sock_allow_family netlink
}
so it appears to me that it should be able to read /dev/urandom. What am I missing?