Over the past month a number of our CentOS 7 machines have stopped accepting logins over SSH. Open sessions freeze but otherwise processes, web servers, etc keep running. It requires a reboot to gain access again. This problem seems to coincide with Sophos updates. Not all updates cause this problem but every time the problem occurs it appears to be immediately after an antivirus update.
Any ideas why Sophos updates would interfere with SSH logins or with SE Linux? Or ways I could further investigate this to demonstrate that there's a real link or that it's just a coincidence?
We recently switched from using Talpa to fanotify. Could this be related?
Here's an example from /opt/sophos-av/log/savd.log. I manually converted the Unix timestamps in order to interpret them.
<log><category>update.updated</category><level>NOTICE</level><domain>savupdate</domain><msg>UPDATING_FROM_VERSION %s %s %s</msg><time>1596516042</time><arg>10.5.2</arg><arg>3.79.0</arg><arg>5.76</arg></log>
<log><category>update.updated</category><level>NOTICE</level><domain>savupdate</domain><msg>%s</msg><time>1596516042</time><arg>Updating Sophos Anti-Virus....
Updating SAVScan on-demand scanner
Updating Virus Engine and Data
Updating Manifest
Update completed.</arg></log>
<log><category>update.updated</category><level>NOTICE</level><domain>savupdate</domain><msg>UPDATED_TO_VERSION %s %s %s</msg><time>1596516042</time><arg>10.5.2</arg><arg>3.79.0</arg><arg>5.76</arg></log>
<log><category>update.updated</category><level>NOTICE</level><domain>savupdate</domain><msg>SUCCESSFULLY_UPDATED_FROM %s</msg><time>1596516042</time><arg>sdds:SOPHOS</arg></log>
The same snippet is repeated several times during the day with the same version numbers which is odd but probably not related to the issue at hand.
/var/log/audit/audit.log (SELinux) shows the antivirus update and then 20 minutes later we start seeing that systemd-logind is unhappy (I don't really understand it all but it's obviously linked to supporting log in).
type=SERVICE_START msg=audit(04/08/20 05:40:42.285:2578) : pid=1 uid=root auid=unset ses=unset subj=system_u:system_r:init_t:s0 msg='unit=sav-update comm=systemd exe=/usr/lib/systemd/systemd hostname=? addr=? terminal=? res=success'
type=SERVICE_STOP msg=audit(04/08/20 05:40:42.285:2579) : pid=1 uid=root auid=unset ses=unset subj=system_u:system_r:init_t:s0 msg='unit=sav-update comm=systemd exe=/usr/lib/systemd/systemd hostname=? addr=? terminal=? res=success'
type=USER_ACCT msg=audit(04/08/20 05:50:01.761:2580) : pid=21416 uid=root auid=unset ses=unset subj=system_u:system_r:crond_t:s0-s0:c0.c1023 msg='op=PAM:accounting grantors=pam_access,pam_unix,pam_localuser acct=root exe=/usr/sbin/crond hostname=? addr=? terminal=cron re
s=success'
type=CRED_ACQ msg=audit(04/08/20 05:50:01.763:2581) : pid=21416 uid=root auid=unset ses=unset subj=system_u:system_r:crond_t:s0-s0:c0.c1023 msg='op=PAM:setcred grantors=pam_env,pam_fprintd acct=root exe=/usr/sbin/crond hostname=? addr=? terminal=cron res=success'
type=LOGIN msg=audit(04/08/20 05:50:01.765:2582) : pid=21416 uid=root subj=system_u:system_r:crond_t:s0-s0:c0.c1023 old-auid=unset auid=root tty=(none) old-ses=4294967295 ses=175 res=yes
type=USER_START msg=audit(04/08/20 05:50:26.796:2583) : pid=21416 uid=root auid=root ses=175 subj=system_u:system_r:crond_t:s0-s0:c0.c1023 msg='op=PAM:session_open grantors=pam_loginuid,pam_keyinit,pam_limits acct=root exe=/usr/sbin/crond hostname=? addr=? terminal=cron
res=success'
type=USER_ACCT msg=audit(04/08/20 06:00:01.676:2584) : pid=23854 uid=root auid=unset ses=unset subj=system_u:system_r:crond_t:s0-s0:c0.c1023 msg='op=PAM:accounting grantors=pam_access,pam_unix,pam_localuser acct=root exe=/usr/sbin/crond hostname=? addr=? terminal=cron re
s=success'
type=CRED_ACQ msg=audit(04/08/20 06:00:01.676:2585) : pid=23854 uid=root auid=unset ses=unset subj=system_u:system_r:crond_t:s0-s0:c0.c1023 msg='op=PAM:setcred grantors=pam_env,pam_fprintd acct=root exe=/usr/sbin/crond hostname=? addr=? terminal=cron res=success'
type=LOGIN msg=audit(04/08/20 06:00:01.678:2586) : pid=23854 uid=root subj=system_u:system_r:crond_t:s0-s0:c0.c1023 old-auid=unset auid=root tty=(none) old-ses=4294967295 ses=176 res=yes
type=USER_START msg=audit(04/08/20 06:00:26.712:2587) : pid=23854 uid=root auid=root ses=176 subj=system_u:system_r:crond_t:s0-s0:c0.c1023 msg='op=PAM:session_open grantors=pam_loginuid,pam_keyinit,pam_limits acct=root exe=/usr/sbin/crond hostname=? addr=? terminal=cron
res=success'
type=SERVICE_STOP msg=audit(04/08/20 06:00:33.045:2588) : pid=1 uid=root auid=unset ses=unset subj=system_u:system_r:init_t:s0 msg='unit=systemd-logind comm=systemd exe=/usr/lib/systemd/systemd hostname=? addr=? terminal=? res=failed'
type=SERVICE_START msg=audit(04/08/20 06:00:33.293:2589) : pid=1 uid=root auid=unset ses=unset subj=system_u:system_r:init_t:s0 msg='unit=systemd-logind comm=systemd exe=/usr/lib/systemd/systemd hostname=? addr=? terminal=? res=success'
type=SERVICE_STOP msg=audit(04/08/20 06:00:33.293:2590) : pid=1 uid=root auid=unset ses=unset subj=system_u:system_r:init_t:s0 msg='unit=systemd-logind comm=systemd exe=/usr/lib/systemd/systemd hostname=? addr=? terminal=? res=success'
This thread was automatically locked due to age.