Created attachment 1202570 [details] sealert.log The U2F module for PAM is being denied access to U2F device by selinux (see attached sealert). The following TE modification fixes the issue. module my-login 1.0; require { type local_login_t; type udev_var_run_t; class file { getattr open read }; } #============= local_login_t ============== allow local_login_t udev_var_run_t:file { getattr open read }; Also see: https://bugzilla.redhat.com/show_bug.cgi?id=1283296#c16
This package has changed ownership in the Fedora Package Database. Reassigning to the new owner of this component.
I can confirm that this is still in an issue on Fedora 25. How to reproduce: 1. insert a line like this into `/etc/pam.d/login`: auth requisite pam_u2f.so debug authfile=/etc/u2f_mappings interactive before auth substack system-auth 2. Generate the content of `/etc/u2f_mappings` with the `pamu2fcfg` utility. 3. Go to a real linux console (e.g. Ctrl+Alt+F3) 4. try to login expected results: a prompt for the U2F-key, and then successful login actual results: a prompt for the U2F-key, some SELinux related AVC denials in the system journal and a failed login. The old work-around still works: semanage permissive -a local_login_t
This message is a reminder that Fedora 24 is nearing its end of life. Approximately 2 (two) weeks from now Fedora will stop maintaining and issuing updates for Fedora 24. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a Fedora 'version' of '24'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 24 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete.
I can reproduce this issue on Fedora 26. The AVCs I get (in permissive mode): Jul 29 17:09:57 example.org audit[10736]: AVC avc: denied { read } for pid=10736 comm="login" name="c247:3" dev="tmpfs" ino=20875 scontext=system_u:system_r:local_login_t:s0-s0:c0.c1023 tcontext=system_u:object_r:udev_var_run_t:s0 tclass=file permissive=1 Jul 29 17:09:57 example.org audit[10736]: AVC avc: denied { open } for pid=10736 comm="login" path="/run/udev/data/c247:3" dev="tmpfs" ino=20875 scontext=system_u:system_r:local_login_t:s0-s0:c0.c1023 tcontext=system_u:object_r:udev_var_run_t:s0 tclass=file permissive=1 Jul 29 17:09:57 example.org audit[10736]: AVC avc: denied { getattr } for pid=10736 comm="login" path="/run/udev/data/c247:3" dev="tmpfs" ino=20875 scontext=system_u:system_r:local_login_t:s0-s0:c0.c1023 tcontext=system_u:object_r:udev_var_run_t:s0 tclass=file permissive=1 As before, the old work-around still works (when SELinux is enforcing): $ semanage permissive -a local_login_t
Fedora 24 changed to end-of-life (EOL) status on 2017-08-08. Fedora 24 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug. If you can reproduce this bug against a currently maintained version of Fedora please feel free to reopen this bug against that version. If you are unable to reopen this bug, please file a new report against the current release. If you experience problems, please add a comment to this bug. Thank you for reporting this bug and we are sorry it could not be fixed.
I am affected in Fedora 27, is there a new bug report for this? type=AVC msg=audit(1522974875.239:3188): avc: denied { read } for pid=26663 comm="login" name="c245:1" dev="tmpfs" ino=1937611 scontext=system_u:system_r:local_login_t:s0-s0:c0.c1023 tcontext=system_u:object_r:udev_var_run_t:s0 tclass=file permissive=0 type=AVC msg=audit(1522974875.240:3189): avc: denied { read } for pid=26663 comm="login" name="c245:0" dev="tmpfs" ino=2038831 scontext=system_u:system_r:local_login_t:s0-s0:c0.c1023 tcontext=system_u:object_r:udev_var_run_t:s0 tclass=file permissive=0 audit2allow suggests this: allow local_login_t udev_var_run_t:file read; I compiled the module suggested in https://bugzilla.redhat.com/show_bug.cgi?id=1283296#c22 and it works perfectly.
selinux-policy-3.13.1-283.32.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2018-d3085b9774
selinux-policy-3.13.1-283.32.fc27 has been pushed to the Fedora 27 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-2018-d3085b9774
selinux-policy-3.13.1-283.32.fc27 has been pushed to the Fedora 27 stable repository. If problems still persist, please make note of it in this bug report.
I can confirm, on a fresh Fedora 29 system, I don't need to apply the `semanage permissive -a local_login_t` work-around, anymore. U2F enabled login works as expected.