Bug 2441643 - SELinux is preventing gpsd from using the 'setcap' accesses on a process.
Summary: SELinux is preventing gpsd from using the 'setcap' accesses on a process.
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 43
Hardware: x86_64
OS: Unspecified
medium
unspecified
Target Milestone: ---
Assignee: Zdenek Pytela
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:a3dd0c08a51d749e922c0a7b18e...
: 2418373 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2026-02-21 15:29 UTC by Aleksandar Kostadinov
Modified: 2026-04-30 01:21 UTC (History)
9 users (show)

Fixed In Version: selinux-policy-43.7-1.fc43
Clone Of:
Environment:
Last Closed: 2026-04-30 01:21:03 UTC
Type: ---
Embargoed:
zpytela: mirror+


Attachments (Terms of Use)
File: description (1.79 KB, text/plain)
2026-02-21 15:29 UTC, Aleksandar Kostadinov
no flags Details
File: os_info (630 bytes, text/plain)
2026-02-21 15:29 UTC, Aleksandar Kostadinov
no flags Details
logs from gpsd startup (5.17 KB, text/plain)
2026-03-01 21:12 UTC, Aleksandar Kostadinov
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Github fedora-selinux selinux-policy pull 3163 0 None open Allow gpsd the setcap process capability 2026-04-20 16:05:16 UTC
Red Hat Issue Tracker FC-3239 0 None None None 2026-02-27 15:17:12 UTC

Description Aleksandar Kostadinov 2026-02-21 15:29:35 UTC
Description of problem:
Trying to run gpsd with config file:

> # Options for gpsd, including serial devices (default empty)
> OPTIONS="-n"
> # Set to 'true' to add USB devices automatically via udev (default true)
> USBAUTO="false"
> # default not set at all. this link is created by UDEV when device is detected
> DEVICES="/dev/em05.at"

The device itself is:
Quectel EM05-G Revision: EM05GFAR07A07M1G
vendor/prod id: 2c7c:0314
SELinux is preventing gpsd from using the 'setcap' accesses on a process.

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

If you believe that gpsd should be allowed setcap access on processes labeled gpsd_t 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 'gpsd' --raw | audit2allow -M my-gpsd
# semodule -X 300 -i my-gpsd.pp

Additional Information:
Source Context                system_u:system_r:gpsd_t:s0
Target Context                system_u:system_r:gpsd_t:s0
Target Objects                Unknown [ process ]
Source                        gpsd
Source Path                   gpsd
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
SELinux Policy RPM            selinux-policy-targeted-42.23-1.fc43.noarch
Local Policy RPM              selinux-policy-targeted-42.23-1.fc43.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 6.18.8-200.fc43.x86_64 #1 SMP
                              PREEMPT_DYNAMIC Fri Jan 30 20:23:28 UTC 2026
                              x86_64
Alert Count                   1
First Seen                    2026-02-21 17:13:50 EET
Last Seen                     2026-02-21 17:13:50 EET
Local ID                      91bded3a-4c7c-4df4-91bc-e98997000880

Raw Audit Messages
type=AVC msg=audit(1771686830.13:5630): avc:  denied  { setcap } for  pid=134303 comm="gpsd" scontext=system_u:system_r:gpsd_t:s0 tcontext=system_u:system_r:gpsd_t:s0 tclass=process permissive=0


Hash: gpsd,gpsd_t,gpsd_t,process,setcap

Version-Release number of selected component:
selinux-policy-targeted-42.23-1.fc43.noarch

Additional info:
reporter:       libreport-2.17.15
reason:         SELinux is preventing gpsd from using the 'setcap' accesses on a process.
package:        selinux-policy-targeted-42.23-1.fc43.noarch
component:      selinux-policy
hashmarkername: setroubleshoot
type:           libreport
kernel:         6.18.8-200.fc43.x86_64
component:      selinux-policy

Comment 1 Aleksandar Kostadinov 2026-02-21 15:29:38 UTC
Created attachment 2130453 [details]
File: description

Comment 2 Aleksandar Kostadinov 2026-02-21 15:29:39 UTC
Created attachment 2130454 [details]
File: os_info

Comment 3 Zdenek Pytela 2026-02-27 15:14:55 UTC
Hi,

Can you include some details like journal entries?
Can you reproduce it with full audigin enabled?

https://fedoraproject.org/wiki/SELinux/Debugging#Enable_full_auditing

Comment 4 Aleksandar Kostadinov 2026-03-01 21:12:39 UTC
Created attachment 2131564 [details]
logs from gpsd startup

I followed the wiki for a more thorough reproducer (I wonder why is it not the default, otherwise reporting bugs would be very hard for an average user):

> 🐚 sudo ausearch -i -m avc,user_avc,selinux_err,user_selinux_err -ts today
> ----
> type=PROCTITLE msg=audit( 1.03.2026 22:59:40.600:1655) : proctitle=/usr/bin/gpsd -n /dev/em05.at 
> type=SYSCALL msg=audit( 1.03.2026 22:59:40.600:1655) : arch=x86_64 syscall=capset success=no exit=EACCES(Permission denied) a0=0x564277d56c9c a1=0x564277d56ca4 a2=0x564277d56ca4 a3=0x564277d08010 items=0 ppid=1 pid=592931 auid=unset uid=nobody gid=dialout euid=nobody suid=nobody fsuid=nobody egid=dialout sgid=dialout fsgid=dialout > tty=(none) ses=unset comm=gpsd exe=/usr/bin/gpsd subj=system_u:system_r:gpsd_t:s0 key=(null) 
> type=AVC msg=audit( 1.03.2026 22:59:40.600:1655) : avc:  denied  { setcap } for  pid=592931 comm=gpsd scontext=system_u:system_r:gpsd_t:s0 tcontext=system_u:system_r:gpsd_t:s0 tclass=process permissive=0 

Also attached what I thought was relevant from `journalctl`

Is this any better because I can't spot with my untrained eye any additional information :)

Comment 5 Zdenek Pytela 2026-04-20 16:05:16 UTC
yes, it was helpful.

Comment 6 Zdenek Pytela 2026-04-20 16:05:32 UTC
*** Bug 2418373 has been marked as a duplicate of this bug. ***

Comment 7 Fedora Update System 2026-04-28 15:55:45 UTC
FEDORA-2026-80879d3dfe (selinux-policy-43.7-1.fc43) has been submitted as an update to Fedora 43.
https://bodhi.fedoraproject.org/updates/FEDORA-2026-80879d3dfe

Comment 8 Fedora Update System 2026-04-29 03:12:21 UTC
FEDORA-2026-80879d3dfe has been pushed to the Fedora 43 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2026-80879d3dfe`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2026-80879d3dfe

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

Comment 9 Fedora Update System 2026-04-30 01:21:03 UTC
FEDORA-2026-80879d3dfe (selinux-policy-43.7-1.fc43) has been pushed to the Fedora 43 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.