Gentoo Archives: gentoo-hardened

From: Chris PeBenito <pebenito@g.o>
To: gentoo-hardened@l.g.o
Subject: Re: [gentoo-hardened] hwclock and selinux
Date: Sun, 20 Apr 2008 13:58:00
Message-Id: 1208699870.5307.4.camel@defiant.pebenito.net
In Reply to: Re: [gentoo-hardened] hwclock and selinux by "François Valenduc"
1 On Sun, 2008-04-20 at 12:12 +0200, François Valenduc wrote:
2 > xake@×××××××××.net a écrit :
3 > >> type=1400 audit(1208682664.167:223): avc: denied { read write } for
4 > >> pid=29607 comm="hwclock" path="/var/log/faillog" dev=dm-6 ino=271083
5 > >> scontext=root:system_r:hwclock_t tcontext=system_u:object_r:faillog_t
6 > >> tclass=file
7 > >>
8 > >
9 > > This is just an error about hwclock being unable to write to "faillog" so
10 > > there must be something that goes wrong (making hwclock want to write to
11 > > faillog).
12 > >
13 > >
14 > >> I also got this error:
15 > >> type=1400 audit(1208679707.497:84): avc: denied { read } for
16 > >> pid=18454 comm="hwclock" path="/dev/urandom" dev=tmpfs ino=2059
17 > >> scontext=root:system_r:hwclock_t
18 > >> tcontext=system_u:object_r:urandom_device_t tclass=chr_file
19 > >>
20 > >> However, I think I solved it by issuing the commands "setsebool -P
21 > >> global_ssp 1" and "load_policy"
22 > >>
23 > >
24 > > This is becouse you have the hardened toolchain, compiling everything with
25 > > PIE/SSP by default. SSP want a random number (picked from /dev/urandom)
26 > > when the binaries start. SELinux disables access to urandom per default so
27 > > you have to (as you did with sebool) tell SELinux that your system is
28 > > compiled with SSP and thus the access to urandom should be permitted.
29 > >
30 > >
31 > Yes, this has been solved with sebool. However, I still got the second
32 > error (related to faillog). It also blocks distccd like this: (even if
33 > the corresponding selinux policy is loaded):
34 > type=1400 audit(1208681304.633:191): avc: denied { read write } for
35 > pid=27886 comm="distccd" path="/var/log/faillog" dev=dm-6 ino=271083
36 > scontext=root:system_r:distccd_t tcontext=system_u:object_r:faillog_t
37 > tclass=file
38 >
39 > Do you know how to solve this second type of errors ?
40 > Thanks for your help.
41
42 Seems weird that either of these programs would be writing to faillog,
43 since that file is usually for logging login failures. Do you have any
44 idea why this might be happening on your system?
45
46 --
47 Chris PeBenito
48 <pebenito@g.o>
49 Developer,
50 Hardened Gentoo Linux
51
52 Public Key: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xE6AF9243
53 Key fingerprint = B0E6 877A 883F A57A 8E6A CB00 BC8E E42D E6AF 9243

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies

Subject Author
Re: [gentoo-hardened] hwclock and selinux "François Valenduc" <francois.valenduc@××××××××××.be>
Re: [gentoo-hardened] hwclock and selinux "François Valenduc" <francois.valenduc@××××××××××.be>