Bug 2391344 - SELinux is preventing sshd-session from 'read' accesses on the lnk_file /var/lock.
Summary: SELinux is preventing sshd-session from 'read' accesses on the lnk_file /var/...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 42
Hardware: x86_64
OS: Unspecified
low
unspecified
Target Milestone: ---
Assignee: Zdenek Pytela
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:b7cfd97cd87e4bb3941e871bc21...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2025-08-27 19:40 UTC by Enrique Meléndez
Modified: 2025-10-10 00:50 UTC (History)
8 users (show)

Fixed In Version: selinux-policy-42.12-1.fc42
Clone Of:
Environment:
Last Closed: 2025-10-10 00:50:46 UTC
Type: ---
Embargoed:
zpytela: mirror+


Attachments (Terms of Use)
File: description (1.93 KB, text/plain)
2025-08-27 19:40 UTC, Enrique Meléndez
no flags Details
File: os_info (739 bytes, text/plain)
2025-08-27 19:40 UTC, Enrique Meléndez
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Github fedora-selinux selinux-policy pull 2883 0 None Draft Update files_search_base_file_types() 2025-09-24 06:25:54 UTC
Red Hat Issue Tracker FC-2067 0 None None None 2025-08-28 07:27:19 UTC

Description Enrique Meléndez 2025-08-27 19:40:05 UTC
Description of problem:
sshd with 2fa via pam_oath.so
SELinux is preventing sshd-session from 'read' accesses on the lnk_file /var/lock.

*****  Plugin catchall (100. confidence) suggests   **************************

If you believe that sshd-session should be allowed read access on the lock lnk_file by default.
Then you should report this as a bug.
You can generate a local policy module to allow this access.
Do
allow this access for now by executing:
# ausearch -c 'sshd-session' --raw | audit2allow -M my-sshdsession
# semodule -X 300 -i my-sshdsession.pp

Additional Information:
Source Context                system_u:system_r:sshd_t:s0-s0:c0.c1023
Target Context                system_u:object_r:var_lock_t:s0
Target Objects                /var/lock [ lnk_file ]
Source                        sshd-session
Source Path                   sshd-session
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
SELinux Policy RPM            selinux-policy-targeted-42.6-1.fc42.noarch
Local Policy RPM              selinux-policy-targeted-42.6-1.fc42.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 6.15.10-200.fc42.x86_64 #1 SMP
                              PREEMPT_DYNAMIC Fri Aug 15 15:57:06 UTC 2025
                              x86_64
Alert Count                   2
First Seen                    2025-08-27 21:22:43 CEST
Last Seen                     2025-08-27 21:23:01 CEST
Local ID                      ed1a125a-185f-443f-8c75-2c47854ef365

Raw Audit Messages
type=AVC msg=audit(1756322581.289:872): avc:  denied  { read } for  pid=17624 comm="sshd-session" name="lock" dev="nvme0n1p3" ino=204794 scontext=system_u:system_r:sshd_t:s0-s0:c0.c1023 tcontext=system_u:object_r:var_lock_t:s0 tclass=lnk_file permissive=0


Hash: sshd-session,sshd_t,var_lock_t,lnk_file,read

Version-Release number of selected component:
selinux-policy-targeted-42.6-1.fc42.noarch

Additional info:
reporter:       libreport-2.17.15
reason:         SELinux is preventing sshd-session from 'read' accesses on the lnk_file /var/lock.
package:        selinux-policy-targeted-42.6-1.fc42.noarch
component:      selinux-policy
hashmarkername: setroubleshoot
type:           libreport
kernel:         6.15.10-200.fc42.x86_64
comment:        sshd with 2fa via pam_oath.so
component:      selinux-policy

Comment 1 Enrique Meléndez 2025-08-27 19:40:07 UTC
Created attachment 2105049 [details]
File: description

Comment 2 Enrique Meléndez 2025-08-27 19:40:09 UTC
Created attachment 2105050 [details]
File: os_info

Comment 3 Fedora Update System 2025-10-05 19:49:58 UTC
FEDORA-2025-586ab05666 (selinux-policy-42.12-1.fc42) has been submitted as an update to Fedora 42.
https://bodhi.fedoraproject.org/updates/FEDORA-2025-586ab05666

Comment 4 Fedora Update System 2025-10-06 01:51:53 UTC
FEDORA-2025-586ab05666 has been pushed to the Fedora 42 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2025-586ab05666`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2025-586ab05666

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

Comment 5 Fedora Update System 2025-10-10 00:50:46 UTC
FEDORA-2025-586ab05666 (selinux-policy-42.12-1.fc42) has been pushed to the Fedora 42 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.