yaoyansi 发表于 2016-01-01 15:27

求助,CentOS7的SELinux有几个Alert

大家好,
我刚刚重装的centos7(CentOS-7.0-1406-x86_64-DVD.iso)

用yum update之后的版本是:
Linux localhost.localdomain 3.10.0-327.3.1.el7.x86_64 #1 SMP Wed Dec 9 14:09:15 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

在yum update过程中,SELinux有几个Alert,然后光驱就弹出了. 不知道是不是被攻击?该怎么办?谢谢

我系统的/var/log/audit/audit.log贴在这里了
pastebin.ca/3305655

Alert 1--------------------------------------------------------------------------------SELinux is preventing /usr/libexec/abrt-handle-event from open access on the file .

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

If you believe that abrt-handle-event should be allowed open access on thefile 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:
# grep abrt-handle-eve /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:abrt_t:s0-s0:c0.c1023
Target Context                system_u:object_r:var_spool_t:s0
Target Objects               [ file ]
Source                        abrt-handle-eve
Source Path                   /usr/libexec/abrt-handle-event
Port                        <Unknown>
Host                        localhost.localdomain
Source RPM Packages         abrt-2.1.11-12.el7.centos.x86_64
Target RPM Packages         
Policy RPM                  selinux-policy-3.12.1-153.el7.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     localhost.localdomain
Platform                      Linux localhost.localdomain 3.10.0-123.el7.x86_64
                              #1 SMP Mon Jun 30 12:09:22 UTC 2014 x86_64 x86_64
Alert Count                   2
First Seen                  2015-12-27 09:21:35 EST
Last Seen                     2015-12-27 09:21:35 EST
Local ID                      5f7559d5-313a-4f09-96c3-bea0c3fd67c5

Raw Audit Messages
type=AVC msg=audit(1451226095.531:608): avc:denied{ open } forpid=17177 comm="abrt-handle-eve" path="/var/spool/abrt/ccpp-2015-12-27-09:21:35-883/time" dev="dm-1" ino=202708314 scontext=system_u:system_r:abrt_t:s0-s0:c0.c1023 tcontext=system_u:object_r:var_spool_t:s0 tclass=file


type=SYSCALL msg=audit(1451226095.531:608): arch=x86_64 syscall=open success=no exit=EACCES a0=7fec1af67c10 a1=0 a2=7fec1af67c1f a3=0 items=0 ppid=17167 pid=17177 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm=abrt-handle-eve exe=/usr/libexec/abrt-handle-event subj=system_u:system_r:abrt_t:s0-s0:c0.c1023 key=(null)

Hash: abrt-handle-eve,abrt_t,var_spool_t,file,open
Alert 2--------------------------------------------------------------------------------SELinux is preventing /usr/libexec/abrt-handle-event from create access on the lnk_file .

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

If you believe that abrt-handle-event should be allowed create access on thelnk_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:
# grep abrt-handle-eve /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:abrt_t:s0-s0:c0.c1023
Target Context                system_u:object_r:var_spool_t:s0
Target Objects               [ lnk_file ]
Source                        abrt-handle-eve
Source Path                   /usr/libexec/abrt-handle-event
Port                        <Unknown>
Host                        localhost.localdomain
Source RPM Packages         abrt-2.1.11-12.el7.centos.x86_64
Target RPM Packages         
Policy RPM                  selinux-policy-3.12.1-153.el7.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     localhost.localdomain
Platform                      Linux localhost.localdomain 3.10.0-123.el7.x86_64
                              #1 SMP Mon Jun 30 12:09:22 UTC 2014 x86_64 x86_64
Alert Count                   4
First Seen                  2015-12-27 09:21:35 EST
Last Seen                     2015-12-27 09:21:35 EST
Local ID                      8caf01b0-e3c6-4695-bf85-887026cb13af

Raw Audit Messages
type=AVC msg=audit(1451226095.534:610): avc:denied{ create } forpid=17167 comm="abrt-server" name=".lock" scontext=system_u:system_r:abrt_t:s0-s0:c0.c1023 tcontext=system_u:object_r:var_spool_t:s0 tclass=lnk_file


type=SYSCALL msg=audit(1451226095.534:610): arch=x86_64 syscall=symlinkat success=no exit=EACCES a0=7fffad941200 a1=5 a2=7faa8ee00b32 a3=7fffad940ed0 items=0 ppid=866 pid=17167 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm=abrt-server exe=/usr/sbin/abrt-server subj=system_u:system_r:abrt_t:s0-s0:c0.c1023 key=(null)

Hash: abrt-handle-eve,abrt_t,var_spool_t,lnk_file,create
alert3--------------------------------------------------------------------------------SELinux is preventing /usr/lib/systemd/systemd-logind from read access on the directory .

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

If you believe that systemd-logind should be allowed read access on thedirectory 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:
# grep systemd-logind /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:systemd_logind_t:s0
Target Context                system_u:object_r:tmpfs_t:s0
Target Objects               [ dir ]
Source                        systemd-logind
Source Path                   /usr/lib/systemd/systemd-logind
Port                        <Unknown>
Host                        localhost.localdomain
Source RPM Packages         systemd-208-11.el7.x86_64
                              systemd-219-19.el7.x86_64
Target RPM Packages         
Policy RPM                  selinux-policy-3.12.1-153.el7.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     localhost.localdomain
Platform                      Linux localhost.localdomain 3.10.0-123.el7.x86_64
                              #1 SMP Mon Jun 30 12:09:22 UTC 2014 x86_64 x86_64
Alert Count                   1
First Seen                  2015-12-27 09:21:54 EST
Last Seen                     2015-12-27 09:21:54 EST
Local ID                      e9da0e86-de1d-4784-93fa-f2cf68b23979

Raw Audit Messages
type=AVC msg=audit(1451226114.223:620): avc:denied{ read } forpid=17173 comm="systemd-logind" name="/" dev="mqueue" ino=7612 scontext=system_u:system_r:systemd_logind_t:s0 tcontext=system_u:object_r:tmpfs_t:s0 tclass=dir


type=SYSCALL msg=audit(1451226114.223:620): arch=x86_64 syscall=openat success=no exit=EACCES a0=ffffffffffffff9c a1=7f6fedaa71ee a2=90800 a3=0 items=0 ppid=1 pid=17173 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm=systemd-logind exe=/usr/lib/systemd/systemd-logind subj=system_u:system_r:systemd_logind_t:s0 key=(null)

Hash: systemd-logind,systemd_logind_t,tmpfs_t,dir,read
alert4--------------------------------------------------------------------------------SELinux is preventing /usr/lib/systemd/systemd-logind from mounton access on the directory .

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

If you believe that systemd-logind should be allowed mounton access on thedirectory 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:
# grep systemd-logind /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:systemd_logind_t:s0
Target Context                system_u:object_r:user_tmp_t:s0
Target Objects               [ dir ]
Source                        systemd-logind
Source Path                   /usr/lib/systemd/systemd-logind
Port                        <Unknown>
Host                        localhost.localdomain
Source RPM Packages         systemd-208-11.el7.x86_64
                              systemd-219-19.el7.x86_64
Target RPM Packages         
Policy RPM                  selinux-policy-3.12.1-153.el7.noarch selinux-
                              policy-3.13.1-60.el7.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     localhost.localdomain
Platform                      Linux localhost.localdomain 3.10.0-123.el7.x86_64
                              #1 SMP Mon Jun 30 12:09:22 UTC 2014 x86_64 x86_64
Alert Count                   2
First Seen                  2015-12-27 09:21:35 EST
Last Seen                     2015-12-27 09:30:01 EST
Local ID                      24895b84-2738-405b-91a6-e462387b530c

Raw Audit Messages
type=AVC msg=audit(1451226601.411:685): avc:denied{ mounton } forpid=17173 comm="systemd-logind" path="/run/user/0" dev="tmpfs" ino=3042889 scontext=system_u:system_r:systemd_logind_t:s0 tcontext=system_u:object_r:user_tmp_t:s0 tclass=dir


type=SYSCALL msg=audit(1451226601.411:685): arch=x86_64 syscall=mount success=no exit=EACCES a0=7f6fedaa6250 a1=7f6fedfa7400 a2=7f6fedaa6250 a3=6 items=0 ppid=1 pid=17173 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm=systemd-logind exe=/usr/lib/systemd/systemd-logind subj=system_u:system_r:systemd_logind_t:s0 key=(null)

Hash: systemd-logind,systemd_logind_t,user_tmp_t,dir,mounton

qq58945591 发表于 2016-01-14 23:05

回复 1# yaoyansi


    注意看每个alert 的这几行.比如
allow this access for now by executing:
# grep abrt-handle-eve /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp



然后复制红字部分到终端,以root身份运行就可以了.


页: [1]
查看完整版本: 求助,CentOS7的SELinux有几个Alert