Bug 1467712 - SELinux is preventing unix_chkpwd from using the 'dac_read_search' capabilities.
Summary: SELinux is preventing unix_chkpwd from using the 'dac_read_search' capabilities.
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 26
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Lukas Vrabec
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:6273a4068d4a412edf218f10c67...
: 1481843 1502094 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-07-04 18:11 UTC by Mirek Svoboda
Modified: 2018-05-29 12:04 UTC (History)
38 users (show)

Fixed In Version: selinux-policy-3.13.1-260.4.fc26
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-05-29 12:04:46 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
Bug 1467712 fixed (115 bytes, text/plain)
2017-08-16 23:41 UTC, Antonio Pallicer
tonipallitur: review+
Details

Description Mirek Svoboda 2017-07-04 18:11:29 UTC
Description of problem:
I have installed kernel-4.12.0-1 x86_64 and rebooted.
SELinux is preventing unix_chkpwd from using the 'dac_read_search' capabilities.

*****  Plugin dac_override (91.4 confidence) suggests   **********************

If you want to help identify if domain needs this access or you have a file with the wrong permissions on your system
Then turn on full auditing to get path information about the offending file and generate the error again.
Do

Turn on full auditing
# auditctl -w /etc/shadow -p w
Try to recreate AVC. Then execute
# ausearch -m avc -ts recent
If you see PATH record check ownership/permissions on file, and fix it,
otherwise report as a bugzilla.

*****  Plugin catchall (9.59 confidence) suggests   **************************

If you believe that unix_chkpwd should have the dac_read_search capability 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 'unix_chkpwd' --raw | audit2allow -M my-unixchkpwd
# semodule -X 300 -i my-unixchkpwd.pp

Additional Information:
Source Context                system_u:system_r:chkpwd_t:s0-s0:c0.c1023
Target Context                system_u:system_r:chkpwd_t:s0-s0:c0.c1023
Target Objects                Unknown [ capability ]
Source                        unix_chkpwd
Source Path                   unix_chkpwd
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
Policy RPM                    selinux-policy-3.13.1-259.fc26.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 4.12.0-1.fc27.x86_64 #1 SMP Mon
                              Jul 3 15:45:36 UTC 2017 x86_64 x86_64
Alert Count                   3
First Seen                    2017-07-04 20:08:30 CEST
Last Seen                     2017-07-04 20:08:37 CEST
Local ID                      91cccf6d-ed7b-4297-a438-1e997bfb83d9

Raw Audit Messages
type=AVC msg=audit(1499191717.909:278): avc:  denied  { dac_read_search } for  pid=1835 comm="unix_chkpwd" capability=2  scontext=system_u:system_r:chkpwd_t:s0-s0:c0.c1023 tcontext=system_u:system_r:chkpwd_t:s0-s0:c0.c1023 tclass=capability permissive=0


Hash: unix_chkpwd,chkpwd_t,chkpwd_t,capability,dac_read_search

Version-Release number of selected component:
selinux-policy-3.13.1-259.fc26.noarch

Additional info:
component:      selinux-policy
reporter:       libreport-2.9.1
hashmarkername: setroubleshoot
kernel:         4.12.0-1.fc27.x86_64
type:           libreport

Potential duplicate: bug 1451379

Comment 1 Mirek Svoboda 2017-07-26 07:16:26 UTC
Description of problem:
dnf update

Version-Release number of selected component:
selinux-policy-3.13.1-260.1.fc26.noarch

Additional info:
reporter:       libreport-2.9.1
hashmarkername: setroubleshoot
kernel:         4.12.3-301.fc26.x86_64
type:           libreport

Comment 2 Mirek Svoboda 2017-07-26 09:53:21 UTC
Description of problem:
unlocking locked screen, Gnome Xorg

Version-Release number of selected component:
selinux-policy-3.13.1-260.1.fc26.noarch

Additional info:
reporter:       libreport-2.9.1
hashmarkername: setroubleshoot
kernel:         4.12.3-301.fc26.x86_64
type:           libreport

Comment 3 Daniel Walsh 2017-07-28 13:26:27 UTC
This is another case where the kernel change causes dac_read_search to be hit before dac_override.

Comment 4 Pablo Estigarribia 2017-07-30 23:19:43 UTC
Description of problem:
just working on normal gnome session on fedora 26

Version-Release number of selected component:
selinux-policy-3.13.1-260.3.fc26.noarch

Additional info:
reporter:       libreport-2.9.1
hashmarkername: setroubleshoot
kernel:         4.12.4-300.fc26.x86_64
type:           libreport

Comment 5 Alessio 2017-08-06 05:16:59 UTC
Description of problem:
Login in GNOME

Version-Release number of selected component:
selinux-policy-3.13.1-260.3.fc26.noarch

Additional info:
reporter:       libreport-2.9.1
hashmarkername: setroubleshoot
kernel:         4.12.4-300.fc26.x86_64
type:           libreport

Comment 6 Markus Wiegand 2017-08-15 05:03:32 UTC
Description of problem:
Problem after update to kernel 4.12

Version-Release number of selected component:
selinux-policy-3.13.1-260.3.fc26.noarch

Additional info:
reporter:       libreport-2.9.1
hashmarkername: setroubleshoot
kernel:         4.12.5-300.fc26.x86_64
type:           libreport

Comment 7 Matthias Runge 2017-08-15 09:35:11 UTC
Description of problem:
Launch updated f26 system

Version-Release number of selected component:
selinux-policy-3.13.1-260.3.fc26.noarch

Additional info:
reporter:       libreport-2.9.1
hashmarkername: setroubleshoot
kernel:         4.12.5-300.fc26.x86_64
type:           libreport

Comment 8 Terry A. Hurlbut 2017-08-15 11:32:59 UTC
Description of problem:
I did a cold restart after a kernel upgrade.


Additional info:
reporter:       libreport-2.9.1
hashmarkername: setroubleshoot
kernel:         4.12.5-300.fc26.x86_64
type:           libreport

Comment 9 tpypta 2017-08-15 13:49:59 UTC
Description of problem:
The SE Linux Troubleshooter pops up every time my PC locks and I unlock it. This happend after last update. Never had issues with SE Linux before.

Version-Release number of selected component:
selinux-policy-3.13.1-260.3.fc26.noarch

Additional info:
reporter:       libreport-2.9.1
hashmarkername: setroubleshoot
kernel:         4.12.5-300.fc26.x86_64
type:           libreport

Comment 10 vaughn miller 2017-08-15 13:51:12 UTC
Description of problem:
Rebooted after dnf update

Version-Release number of selected component:
selinux-policy-3.13.1-260.3.fc26.noarch

Additional info:
reporter:       libreport-2.9.1
hashmarkername: setroubleshoot
kernel:         4.12.5-300.fc26.x86_64
type:           libreport

Comment 11 vaughn miller 2017-08-15 13:51:57 UTC
Description of problem:
Rebooted after update

Version-Release number of selected component:
selinux-policy-3.13.1-260.3.fc26.noarch

Additional info:
reporter:       libreport-2.9.1
hashmarkername: setroubleshoot
kernel:         4.12.5-300.fc26.x86_64
type:           libreport

Comment 12 tpypta 2017-08-15 13:55:04 UTC
Description of problem:
On system unlock

Version-Release number of selected component:
selinux-policy-3.13.1-260.3.fc26.noarch

Additional info:
reporter:       libreport-2.9.1
hashmarkername: setroubleshoot
kernel:         4.12.5-300.fc26.x86_64
type:           libreport

Comment 13 vaughn miller 2017-08-15 14:23:37 UTC
Description of problem:
Did DNF update then rebooted - loads of alerts

Version-Release number of selected component:
selinux-policy-3.13.1-260.3.fc26.noarch

Additional info:
reporter:       libreport-2.9.1
hashmarkername: setroubleshoot
kernel:         4.12.5-300.fc26.x86_64
type:           libreport

Comment 14 Matthew Saltzman 2017-08-15 17:07:15 UTC
Description of problem:
Appears to have happened logging into a freshly updated fresh install of Fedora 26

Version-Release number of selected component:
selinux-policy-3.13.1-260.3.fc26.noarch

Additional info:
reporter:       libreport-2.9.1
hashmarkername: setroubleshoot
kernel:         4.12.5-300.fc26.x86_64
type:           libreport

Comment 15 Mike Norwood 2017-08-15 19:37:57 UTC
Description of problem:
This began occuring after updating the system today and occurs on login after locking screen.

Version-Release number of selected component:
selinux-policy-3.13.1-260.3.fc26.noarch

Additional info:
reporter:       libreport-2.9.1
hashmarkername: setroubleshoot
kernel:         4.12.5-300.fc26.x86_64
type:           libreport

Comment 16 agilley 2017-08-15 20:50:56 UTC
*** Bug 1481843 has been marked as a duplicate of this bug. ***

Comment 17 Robert Strube 2017-08-15 20:54:15 UTC
Description of problem:
After upgrading to kernel 4.12.5-300.fc26.x86_64 receiving SELinux alerts each time I login and unlock my system.

Additional Information:
Source Context                system_u:system_r:chkpwd_t:s0-s0:c0.c1023
Target Context                system_u:system_r:chkpwd_t:s0-s0:c0.c1023
Target Objects                Unknown [ capability ]
Source                        unix_chkpwd
Source Path                   unix_chkpwd
Port                          <Unknown>
Host                          ryzen.strube
Source RPM Packages           
Target RPM Packages           
Policy RPM                    selinux-policy-3.13.1-260.3.fc26.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     ryzen.strube
Platform                      Linux ryzen.strube 4.12.5-300.fc26.x86_64 #1 SMP
                              Mon Aug 7 15:27:25 UTC 2017 x86_64 x86_64
Alert Count                   15
First Seen                    2017-08-15 12:40:29 EDT
Last Seen                     2017-08-15 16:49:56 EDT
Local ID                      9b9f3787-b66c-4f40-b495-0c7394430bef

Raw Audit Messages
type=AVC msg=audit(1502830196.911:428): avc:  denied  { dac_read_search } for  pid=14506 comm="unix_chkpwd" capability=2  scontext=system_u:system_r:chkpwd_t:s0-s0:c0.c1023 tcontext=system_u:system_r:chkpwd_t:s0-s0:c0.c1023 tclass=capability permissive=0

Comment 18 Antonio Pallicer 2017-08-15 21:02:12 UTC
Description of problem:
This event occurs every time I log on as a non-administrator user after upgrade to kernel 4.12.5

Version-Release number of selected component:
selinux-policy-3.13.1-260.3.fc26.noarch

Additional info:
reporter:       libreport-2.9.1
hashmarkername: setroubleshoot
kernel:         4.12.5-300.fc26.x86_64
type:           libreport

Comment 19 Robert Strube 2017-08-15 21:14:24 UTC
I can confirm that selinux-policy.noarch 3.13.1-260.4.fc26 which is now available in the Fedora stable repos fixes this bug.  It also appears to be a duplicate to bug https://bugzilla.redhat.com/show_bug.cgi?id=1476345

Comment 20 vaughn miller 2017-08-15 22:11:27 UTC
Description of problem:
Rebooted -> logged in

Version-Release number of selected component:
selinux-policy-3.13.1-260.3.fc26.noarch

Additional info:
reporter:       libreport-2.9.1
hashmarkername: setroubleshoot
kernel:         4.12.5-300.fc26.x86_64
type:           libreport

Comment 21 Loye Young 2017-08-16 13:02:42 UTC
(In reply to Robert Strube from comment #19)
> I can confirm that selinux-policy.noarch 3.13.1-260.4.fc26 which is now
> available in the Fedora stable repos fixes this bug.  It also appears to be
> a duplicate to bug https://bugzilla.redhat.com/show_bug.cgi?id=1476345

Negative. Same problem occurs on that version.

Name         : selinux-policy
Version      : 3.13.1
Release      : 260.4.fc26
Arch         : noarch
Size         : 23 k
Source       : selinux-policy-3.13.1-260.4.fc26.src.rpm
Repo         : @System
From repo    : updates
Summary      : SELinux policy configuration
URL          : http://github.com/TresysTechnology/refpolicy/wiki
License      : GPLv2+
Description  : SELinux Base package for SELinux Reference Policy - modular.
             : Based off of reference policy: Checked out revision  2.20091117

# uname -a
Linux dominic 4.12.5-300.fc26.x86_64 #1 SMP Mon Aug 7 15:27:25 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

Comment 22 Robert Strube 2017-08-16 17:00:30 UTC
(In reply to Loye Young from comment #21)

Hmm, very interesting.  Before I upgraded to the latest version of selinux-policy (3.13.1-260.4.fc26) I was consistently receiving SELinux warning messages after login and after unlocking.

After installing the update those have completely gone away.

To be clear I haven't altered the stock SE Linux configuration in any way.

> (In reply to Robert Strube from comment #19)
> > I can confirm that selinux-policy.noarch 3.13.1-260.4.fc26 which is now
> > available in the Fedora stable repos fixes this bug.  It also appears to be
> > a duplicate to bug https://bugzilla.redhat.com/show_bug.cgi?id=1476345
> 
> Negative. Same problem occurs on that version.
> 
> Name         : selinux-policy
> Version      : 3.13.1
> Release      : 260.4.fc26
> Arch         : noarch
> Size         : 23 k
> Source       : selinux-policy-3.13.1-260.4.fc26.src.rpm
> Repo         : @System
> From repo    : updates
> Summary      : SELinux policy configuration
> URL          : http://github.com/TresysTechnology/refpolicy/wiki
> License      : GPLv2+
> Description  : SELinux Base package for SELinux Reference Policy - modular.
>              : Based off of reference policy: Checked out revision 
> 2.20091117
> 
> # uname -a
> Linux dominic 4.12.5-300.fc26.x86_64 #1 SMP Mon Aug 7 15:27:25 UTC 2017
> x86_64 x86_64 x86_64 GNU/Linux

Comment 23 Antonio Pallicer 2017-08-16 23:41:15 UTC
Created attachment 1314468 [details]
Bug 1467712 fixed

Comment 24 Hari 2017-10-14 06:10:43 UTC
*** Bug 1502094 has been marked as a duplicate of this bug. ***

Comment 25 Fedora End Of Life 2018-05-03 08:24:12 UTC
This message is a reminder that Fedora 26 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 26. 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 '26'.

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 26 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.

Comment 26 Fedora End Of Life 2018-05-29 12:04:46 UTC
Fedora 26 changed to end-of-life (EOL) status on 2018-05-29. Fedora 26
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.


Note You need to log in before you can comment on or make changes to this bug.