Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 600926 - selinux portage policy: portage_tmp_t relabeling denials
Summary: selinux portage policy: portage_tmp_t relabeling denials
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: SELinux (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: SE Linux Bugs
URL:
Whiteboard: sec-policy r2
Keywords:
Depends on:
Blocks:
 
Reported: 2016-11-26 18:20 UTC by Mira Ressel
Modified: 2016-12-11 14:07 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
Proposed patch for contrib/portage.if (0001-Allow-portage-compile-domains-to-relabel-portage_tmp.patch,1.18 KB, patch)
2016-11-26 18:23 UTC, Mira Ressel
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mira Ressel 2016-11-26 18:20:42 UTC
Today, perfinion asked if I knew anything about the "portage_sandbox_t portage_tmp_t:dir relabelfrom" denials we've all been seeing for quite some time now, so I went to trace them to their origin.

Those denials turn out to be caused by the multilib eclassed, which creates the directory $D/tmp/multilib-include/ and later copies it to $D/usr/include. If that target dir doesn't already exist, cp insists on "relabeling" it from portage_tmp_t to portage_tmp_t.

Hence, this permission doesn't seem to be required and we could probably just dontaudit it. But since it doesn't cause any security problems and we already allow the respective permissions for files, I've opted to just allow relabeling dirs, too.

You can pull my patch from git://github.com/atlaua/hardened-refpolicy aranea/portage_tmp_relabel.
Comment 1 Mira Ressel 2016-11-26 18:23:41 UTC
Created attachment 454448 [details, diff]
Proposed patch for contrib/portage.if
Comment 2 Mira Ressel 2016-12-11 14:07:20 UTC
Fixed in 2.20161023-r2.