Bug 253537 - avc: denied { getattr } for comm="named" path="/dev/random"
Summary: avc: denied { getattr } for comm="named" path="/dev/random"
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: bind
Version: 5.1
Hardware: All
OS: Linux
low
low
Target Milestone: ---
: ---
Assignee: Adam Tkac
QA Contact: Ben Levenson
URL:
Whiteboard:
: 431202 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-08-20 14:17 UTC by Milan Zázrivec
Modified: 2013-04-30 23:37 UTC (History)
3 users (show)

Fixed In Version: RHSA-2008-0300
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-05-21 14:17:46 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
audit.log (539 bytes, text/plain)
2007-08-20 14:17 UTC, Milan Zázrivec
no flags Details
proposed patch (463 bytes, patch)
2007-08-21 13:36 UTC, Adam Tkac
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2008:0300 0 normal SHIPPED_LIVE Moderate: bind security, bug fix, and enhancement update 2008-05-21 14:17:18 UTC

Description Milan Zázrivec 2007-08-20 14:17:05 UTC
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 Zázrivec 2007-08-20 14:17:05 UTC
Created attachment 161876 [details]
audit.log

Comment 2 Daniel Walsh 2007-08-20 19:51:28 UTC
For some reason /dev/random is labeled incorrectly.
Probably in the chroot environment.

restorecon -R -v /var/named


Comment 3 Milan Zázrivec 2007-08-21 08:10:51 UTC
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 13:34:36 UTC
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 13:36:36 UTC
Created attachment 161970 [details]
proposed patch

use restorecon instead chcon

Comment 6 Adam Tkac 2007-08-21 13:40:56 UTC
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 Program Management 2007-10-16 03:46:45 UTC
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 09:48:26 UTC
*** Bug 431202 has been marked as a duplicate of this bug. ***

Comment 11 Milan Zázrivec 2008-02-13 11:58:43 UTC
Verified with RHEL5.2-Server-20080212.0 / bind-chroot-9.3.4-4.P1.el5

Comment 13 errata-xmlrpc 2008-05-21 14:17:46 UTC
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.