Bug 2225377 - AVCs for accessing Samba registry
Summary: AVCs for accessing Samba registry
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 38
Hardware: Unspecified
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Zdenek Pytela
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-07-25 06:48 UTC by Alexander Bokovoy
Modified: 2023-09-20 01:31 UTC (History)
8 users (show)

Fixed In Version: selinux-policy-38.28-1.fc38
Clone Of:
Environment:
Last Closed: 2023-09-20 01:31:31 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github fedora-selinux selinux-policy pull 1858 0 None open Allow nm-dispatcher winbind plugin read/write samba var files 2023-08-28 20:08:32 UTC

Description Alexander Bokovoy 2023-07-25 06:48:35 UTC
FreeIPA upstream tests uncovered an issue in SELinux policy for Samba. Samba installs a dispatcher hook to NetworkManager and this hook is ran by the NetworkManager in a network status change situation.

When a network change happens, the hook runs a testparm to check whether configuration has been extended to provide an offline logon support.

In FreeIPA environment this means looking into the Samba registry. However, an SELinux policy does not allow 'NetworkManager_dispatcher_winbind_t' context to access 'samba_var_t' context.

http://freeipa-org-pr-ci.s3-website.eu-central-1.amazonaws.com/jobs/83a8ea8e-2a8b-11ee-8aec-fa163e33b8c8/test_integration-test_adtrust_install.py-TestIpaAdTrustInstall-uninstall/master.ipa.test/var/log/audit/audit.log.gz

type=SERVICE_START msg=audit(1690250776.068:4270): pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=NetworkManager-dispatcher comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'UID="root" AUID="unset"
type=AVC msg=audit(1690250776.237:4271): avc:  denied  { read write } for  pid=15249 comm="testparm" name="registry.tdb" dev="vda5" ino=215804 scontext=system_u:system_r:NetworkManager_dispatcher_winbind_t:s0 tcontext=unconfined_u:object_r:samba_var_t:s0 tclass=file permissive=1
type=AVC msg=audit(1690250776.238:4272): avc:  denied  { open } for  pid=15249 comm="testparm" path="/var/lib/samba/registry.tdb" dev="vda5" ino=215804 scontext=system_u:system_r:NetworkManager_dispatcher_winbind_t:s0 tcontext=unconfined_u:object_r:samba_var_t:s0 tclass=file permissive=1
type=AVC msg=audit(1690250776.240:4273): avc:  denied  { lock } for  pid=15249 comm="testparm" path="/var/lib/samba/registry.tdb" dev="vda5" ino=215804 scontext=system_u:system_r:NetworkManager_dispatcher_winbind_t:s0 tcontext=unconfined_u:object_r:samba_var_t:s0 tclass=file permissive=1
type=AVC msg=audit(1690250776.240:4274): avc:  denied  { getattr } for  pid=15249 comm="testparm" path="/var/lib/samba/registry.tdb" dev="vda5" ino=215804 scontext=system_u:system_r:NetworkManager_dispatcher_winbind_t:s0 tcontext=unconfined_u:object_r:samba_var_t:s0 tclass=file permissive=1
type=AVC msg=audit(1690250776.240:4275): avc:  denied  { map } for  pid=15249 comm="testparm" path="/var/lib/samba/registry.tdb" dev="vda5" ino=215804 scontext=system_u:system_r:NetworkManager_dispatcher_winbind_t:s0 tcontext=unconfined_u:object_r:samba_var_t:s0 tclass=file permissive=1


Reproducible: Always

Comment 1 Fedora Update System 2023-09-17 20:33:21 UTC
FEDORA-2023-79e968d189 has been submitted as an update to Fedora 38. https://bodhi.fedoraproject.org/updates/FEDORA-2023-79e968d189

Comment 2 Fedora Update System 2023-09-18 03:15:18 UTC
FEDORA-2023-79e968d189 has been pushed to the Fedora 38 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2023-79e968d189`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2023-79e968d189

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 3 Fedora Update System 2023-09-20 01:31:31 UTC
FEDORA-2023-79e968d189 has been pushed to the Fedora 38 stable repository.
If problem still persists, 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.