Bug 253537 - avc: denied { getattr } for comm="named" path="/dev/random"
avc: denied { getattr } for comm="named" path="/dev/random"
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: bind (Show other bugs)
5.1
All Linux
low Severity low
: ---
: ---
Assigned To: Adam Tkac
Ben Levenson
: EasyFix, Patch, Reopened
: 431202 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-08-20 10:17 EDT by Milan Zazrivec
Modified: 2013-04-30 19:37 EDT (History)
3 users (show)

See Also:
Fixed In Version: RHSA-2008-0300
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-05-21 10:17:46 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
audit.log (539 bytes, text/plain)
2007-08-20 10:17 EDT, Milan Zazrivec
no flags Details
proposed patch (463 bytes, patch)
2007-08-21 09:36 EDT, Adam Tkac
no flags Details | Diff

  None (edit)
Description Milan Zazrivec 2007-08-20 10:17:05 EDT
Description of problem:
Starting of named on RHEL5.1-Server-20070817.0 produces
avc denial.

Version-Release number of selected component (if applicable):
RHEL5.1-Server-20070817.0 / selinux-policy-targeted-2.4.6-83.el5

How reproducible:
Always

Steps to Reproduce:
1. Install RHEL5.1-Server-20070817.0 (with named)
2. After successful install and reboot: /etc/init.d/named start
  
Actual results:
Attachment
Comment 1 Milan Zazrivec 2007-08-20 10:17:05 EDT
Created attachment 161876 [details]
audit.log
Comment 2 Daniel Walsh 2007-08-20 15:51:28 EDT
For some reason /dev/random is labeled incorrectly.
Probably in the chroot environment.

restorecon -R -v /var/named
Comment 3 Milan Zazrivec 2007-08-21 04:10:51 EDT
restorecon -R -v /var/named helps, but since this was a new
install, relabeling just to make this denial disappear is
not acceptable.

Reopening and reassigning to bind.

Comment 4 Adam Tkac 2007-08-21 09:34:36 EDT
problem is that /dev/random is mislabeled during installation so
/usr/bin/chcon --reference=/dev/random ${BIND_CHROOT_PREFIX}/dev/random;
makes ${BIND_CHROOT_PREFIX}/dev/random mislabeled
Comment 5 Adam Tkac 2007-08-21 09:36:36 EDT
Created attachment 161970 [details]
proposed patch

use restorecon instead chcon
Comment 6 Adam Tkac 2007-08-21 09:40:56 EDT
Adding to 5.2 proposed

For QA:

try install bind-chroot in default installation (with enabled selinux). Old
package has mislabeled /dev/random in chroot
Comment 7 RHEL Product and Program Management 2007-10-15 23:46:45 EDT
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
release.
Comment 10 Adam Tkac 2008-02-08 04:48:26 EST
*** Bug 431202 has been marked as a duplicate of this bug. ***
Comment 11 Milan Zazrivec 2008-02-13 06:58:43 EST
Verified with RHEL5.2-Server-20080212.0 / bind-chroot-9.3.4-4.P1.el5
Comment 13 errata-xmlrpc 2008-05-21 10:17:46 EDT
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHSA-2008-0300.html

Note You need to log in before you can comment on or make changes to this bug.