Bug 743245

Summary: If secmark packets are rejected by SELinux, the calling app should get a eperm returned
Product: Red Hat Enterprise Linux 6 Reporter: Miroslav Grepl <mgrepl>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED ERRATA QA Contact: Milos Malik <mmalik>
Severity: medium Docs Contact:
Priority: low    
Version: 6.2CC: arozansk, branto, dougsland, dwalsh, gansalmon, itamar, jonathan, jrieden, kernel-maint, kzhang, madhu.chinakonda, mgrepl, mmalik, nstraz, syeghiay
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: selinux-policy-3.7.19-115.el6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 656952 Environment:
Last Closed: 2011-12-06 10:19:35 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 656950, 656952    
Bug Blocks: 748554    

Comment 1 Miroslav Grepl 2011-10-04 10:57:10 UTC
Dan,
I see I should also backport unlabelenet stuff.

Comment 2 Daniel Walsh 2011-10-04 18:44:16 UTC
Yes, but why is this bug assigned to selinux-policy, it is a kernel bug.

Comment 3 RHEL Program Management 2011-10-04 18:51:13 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 4 Miroslav Grepl 2011-10-05 05:03:16 UTC
Yes, there is a bug for kernel. 

I just wanted to test it also by Milos and Karel because of policy changes.

Comment 6 Miroslav Grepl 2011-10-06 09:15:11 UTC
Everything what you need to know is stated in the original kernel bug together with tests.

The policy changes just added interfaces to support secmark.

Basically you will make sure secmark.te policy can be compiled/loaded which means no interfaces miss.

So this is a test scenario for you:

---

cat > secmark.te << EOF

policy_module(secmark, 1.0)

# Type Definitions

require {
 type xguest_t;
 type avahi_t;
 attribute domain;
}

attribute external_packet;
type internal_packet_t;
corenet_packet(internal_packet_t)

type dns_external_packet_t, external_packet;
corenet_packet(dns_external_packet_t)

type http_external_packet_t, external_packet;
corenet_packet(http_external_packet_t)

type external_packet_t, external_packet;
corenet_packet(external_packet_t)

EOF


# make -f /usr/share/selinux/devel/Makefile secmark.pp
# semodule -i secmark.pp
# semodule -d unlabelednet

Comment 11 Miroslav Grepl 2011-10-12 16:54:10 UTC
Fixed in selinux-policy-3.7.19-115.el6

Comment 14 errata-xmlrpc 2011-12-06 10:19:35 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2011-1511.html