时间: 20220-1-25
事件: qualys 安全研究人员披露 CVE-2021-4034 polkit pkexec 本地提权漏洞细节。
漏洞描述: polkit pkexec 中对命令行参数处理有误,参数注入能够使非特权用户在有漏洞的主机上获取完全 root 权限。
我检测了我的几台 linux 设备都有问题,赶紧来修复一下。
修复方式一:
yum update polkit 命令更新解决问题。
修复方式二:
如果是单机环境或上面命令执行失败的,可以通过
chmod 0755 /usr/bin/pkexec 命令删除 SUID-bit 权限来规避漏洞风险。
使用 ll /usr/bin/pkexec 命令返回的结果如果是 -rwsr-xr-x 是有问题的,-rwxr-xr-x 是好的。
方式一修复过程:
[root@NCCLOUD-CPYY-YLZ ~]# yum update polkit Loaded plugins: fastestmirror Determining fastest mirrors base | 2.2 kB 00:00:00 epel | 3.3 kB 00:00:00 extras-source | 1.5 kB 00:00:00 mysql-connectors | 1.5 kB 00:00:00 mysql-tools | 1.5 kB 00:00:00 mysql56-community | 1.5 kB 00:00:00 mysql57-community | 1.5 kB 00:00:00 mysql80-community | 1.5 kB 00:00:00 updates-source | 1.5 kB 00:00:00 (1/4): epel/7/x86_64/updateinfo | 1.1 MB 00:00:00 (2/4): epel/7/x86_64/primary | 3.9 MB 00:00:00 (3/4): mysql-tools/primary | 23 kB 00:00:00 (4/4): updates-source/7/x86_64/primary | 7.8 MB 00:00:00 epel 13728/13728 mysql-tools 137/137 updates-source 3411/3411 Resolving Dependencies --> Running transaction check ---> Package polkit.x86_64 0:0.112-18.el7 will be updated ---> Package polkit.x86_64 0:0.112-26.el7_9.1 will be an update --> Finished Dependency Resolution Dependencies Resolved =============================================================================================== Package Arch Version Repository Size =============================================================================================== Updating: polkit x86_64 0.112-26.el7_9.1 updates-source 170 k Transaction Summary =============================================================================================== Upgrade 1 Package Total download size: 170 k Is this ok [y/d/N]: y Downloading packages: Delta RPMs disabled because /usr/bin/applydeltarpm not installed. polkit-0.112-26.el7_9.1.x86_64.rpm | 170 kB 00:00:00 Running transaction check Running transaction test Transaction test succeeded Running transaction Updating : polkit-0.112-26.el7_9.1.x86_64 1/2 Cleanup : polkit-0.112-18.el7.x86_64 2/2 Verifying : polkit-0.112-26.el7_9.1.x86_64 1/2 Verifying : polkit-0.112-18.el7.x86_64 2/2 Updated: polkit.x86_64 0:0.112-26.el7_9.1 Complete!
喜欢的点个赞❤吧!