Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.

Bug 1971170

Summary: sslh_t needs capability net_admin
Product: [Fedora] Fedora Reporter: Ralf Ertzinger <redhat-bugzilla>
Component: selinux-policyAssignee: Zdenek Pytela <zpytela>
Status: NEW --- QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 34CC: dwalsh, grepl.miroslav, lvrabec, mmalik, omosnace, vmojzis, zpytela
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: ---
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Ralf Ertzinger 2021-06-12 16:26:40 UTC
Description of problem:
sshl, when run in transparent proxy mode, needs CAP_NET_ADMIN to set IP_TRANSPARENT on the socket. The systemd service file already allows this capability, but right now it's denied by selinux:

type=AVC msg=audit(1623508461.430:33758): avc:  denied  { net_admin } for  pid=63924 comm="sslh" capability=12  scontext=system_u:system_r:sslh_t:s0 tcontext=system_u:system_r:sslh_t:s0 tclass=capability permissive=0


Version-Release number of selected component (if applicable):
selinux-policy-targeted-34.7-1.fc34.noarch

How reproducible:
Always

Steps to Reproduce:
1. configure sslh for transparent proxying
2. attempt to use a transparent connection

results in
sslh[3867]: common.c:237:setsockopt: Operation not permitted

Generating a local policy with

allow sslh_t self:capability net_admin;

makes sslh work for transparent mode.