Bug 1787482 - strongswan-swanctl certificate loading mmap blocked by selinux
Summary: strongswan-swanctl certificate loading mmap blocked by selinux
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy-targeted
Version: 31
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
Assignee: Lukas Vrabec
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-01-03 04:32 UTC by Bob Richmond
Modified: 2020-02-01 01:30 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-02-01 01:30:41 UTC
Type: Bug


Attachments (Terms of Use)

Description Bob Richmond 2020-01-03 04:32:23 UTC
Description of problem:

service strongswan-swanctl start

Fails to read /etc/strongswan/swanctl/*/*.der. Strongswan's certificate loading routine unconditionally calls chunk_map on each certificate, which mmap's the file contents, which selinux denies:

allow ipsec_mgmt_t ipsec_conf_file_t:file { getattr ioctl lock open read };

Adding "map" permission allows strongswan to start correctly.

Version-Release number of selected component (if applicable):

selinux-policy-targeted-3.14.4-43.fc31.noarch

How reproducible:

Always

Comment 1 Lukas Vrabec 2020-01-10 12:27:42 UTC
commit 2e726f1df5b52f95a101a26e4b66dbc9266565b0
Author: Lukas Vrabec <lvrabec@redhat.com>
Date:   Fri Jan 10 13:25:14 2020 +0100

    Allow ipsec_mgmt_t domain to mmap ipsec_conf_file_t files
    
    Resolves: rhbz#1787482

Comment 2 Fedora Update System 2020-01-31 01:28:36 UTC
selinux-policy-3.14.4-45.fc31 has been pushed to the Fedora 31 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-bb42099a17

Comment 3 Fedora Update System 2020-02-01 01:30:41 UTC
selinux-policy-3.14.4-45.fc31 has been pushed to the Fedora 31 stable repository. If problems still persist, please make note of it in this bug report.


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