1 |
On Mon, 2004-04-05 at 16:00, coldolph-hg@×××××.com wrote: |
2 |
> I saw this portage bug (marked critical) and wondered |
3 |
> if the default installation of either grsecurity or |
4 |
> selinux flavor of hardened Gentoo would protect .. |
5 |
> |
6 |
> http://bugs.gentoo.org/show_bug.cgi?id=21923 |
7 |
|
8 |
Currently SELinux won't do anything about it. Portage_t is allowed to |
9 |
modify any file on the system (except device nodes). However, in light |
10 |
of this, it could be tightened up a little. You could change the |
11 |
current rule: |
12 |
|
13 |
create_dir_notdevfile(portage_t,file_type) |
14 |
|
15 |
To exclude user temp files: |
16 |
|
17 |
create_dir_notdevfile(portage_t,{ file_type -user_tmp_t }) |
18 |
|
19 |
Therefore, portage_t can modify all files, except those created by |
20 |
users, in /tmp. |
21 |
|
22 |
> Then I am curious what would be the recommended path |
23 |
> to add protection, if the default setup did not |
24 |
> protect from this class of exploits? It seems tricky |
25 |
> to me, since ordinary users generally are allowed to |
26 |
> write to /tmp, and the security context / userid of |
27 |
> the portage user would allow emerge's to scribble in |
28 |
> places that ordinary users should not. |
29 |
|
30 |
-- |
31 |
Chris PeBenito |
32 |
<pebenito@g.o> |
33 |
Developer, |
34 |
Hardened Gentoo Linux |
35 |
Embedded Gentoo Linux |
36 |
|
37 |
Public Key: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xE6AF9243 |
38 |
Key fingerprint = B0E6 877A 883F A57A 8E6A CB00 BC8E E42D E6AF 9243 |