Skip to content

Conversation

bengal
Copy link

@bengal bengal commented Oct 14, 2025

Currently NetworkManager writes
/run/NetworkManager/no-stub-resolv.conf by using mkstemp(), which creates a temporary file name with a random suffix and then renames it. The policy doesn't handle this, and the file gets wrongly labeled as NetworkManager_var_run_t.

NetworkManager is being updated to write the file with a fixed ".tmp" suffix here:

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/2298

Adapt the policy accordingly.

Currently NetworkManager writes
/run/NetworkManager/no-stub-resolv.conf by using mkstemp(), which
creates a temporary file name with a random suffix and then renames
it. The policy doesn't handle this, and the file gets wrongly labeled
as NetworkManager_var_run_t.

NetworkManager is being updated to write the file with a fixed ".tmp"
suffix here:

  https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/2298

Adapt the policy accordingly.
@jsegitz
Copy link
Contributor

jsegitz commented Oct 14, 2025

The changed NM in combination with this policy change (available for openSUSE here https://build.opensuse.org/project/show/home:jsegitz:branches:security:SELinux_1248136) fixes the issue and the file has the proper label

@zpytela
Copy link
Contributor

zpytela commented Oct 16, 2025

LGTM, together with the change in nm it is going to prevent many future misconfigurations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants