首页> 开发问题 >服务器问题 服务器问题
polkit pkexec 本地提权漏洞(CVE-2021-4034)解决办法
作者:小萝卜 2022-09-20 【 Linux 宝塔 阿里云 】 浏览 2097
简介服务器提示 polkit pkexec 本地提权漏洞(CVE-2021-4034)该漏洞EXP已公开传播,漏洞利用成本极低,建议您立即关注并修复。如何修复呢?
服务器提示 polkit pkexec 本地提权漏洞(CVE-2021-4034)
该漏洞EXP已公开传播,漏洞利用成本极低,建议您立即关注并修复。
如何修复呢?
解决建议
1、无法升级软件修复包的,可使用以下命令删除pkexec的SUID-bit权限来规避漏洞风险:
chmod 0755 /usr/bin/pkexec
示例:
# ll /usr/bin/pkexec
-rwsr-xr-x 1 root root /usr/bin/pkexec
# chmod 0755 /usr/bin/pkexec
# ll /usr/bin/pkexec
-rwxr-xr-x 1 root root /usr/bin/pkexec
执行前权限一般为-rwsr-xr-x ,删除SUID-bit权限后一般为-rwxr-xr-x
2、CentOS 7的用户可通过yum update polkit升级修复(云安全中心Linux软件漏洞已支持检测修复),Centos 5、6、8官方已终止生命周期 (EOL)维护,建议停止使用;
3、RedHat用户建议联系红帽官方获取安全修复源后执行yum update polkit
升级修复(云安全中心Linux软件漏洞已支持检测修复);
4、Alibaba Cloud Linux的用户可通过yum update polkit
升级修复(云安全中心Linux软件漏洞已支持检测修复);
5、Anolis OS(龙蜥)的用户可通过yum update polkit升级修复(云安全中心Linux软件漏洞已支持检测修复);
6、Ubuntu 18.04 LTS、Ubuntu 20.04 LTS的用户可通过apt update policykit-1升级修复,Ubuntu 14.04、16.04、12.04官方已终止生命周期 (EOL)维护,修复需要额外付费购买Ubuntu ESM(扩展安全维护)服务,建议停止使用;
7、其他Linux发行版操作系统OS建议联系官方寻求软件包修复源。
CentOS8 修复时提示:
CentOS-8 - AppStream 46 B/s | 38 B 00:00
Error: Failed to download metadata for repo 'AppStream': Cannot prepare internal mirrorlist: No URLs in mirrorlist
错误原因:
自2022年1月31日起,CentOS团队从官方镜像中移除CentOS 8的所有包,但软件包仍在官方镜像上保留一段时间。现在被转移到https://vault.centos.org。如需继续运行旧CentOS 8,可以在/etc/yum.repos中更新repos.d,使用vault.centos.org代替mirror.centos.org;
sudo sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-*
sudo sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-*
很赞哦! (0)
相关文章
- 可以ping通虚拟机但不能telnet 9000端口
- Linux启动提示Kernel panic - not syncing: Attempted to kill init解决办法
- ckfinder报错:从服务器读取XML数据出错
- The program 'yum' is currently not installed. You can install it by typing:
- Linux中“is not in the sudoers file”解决方法
- yum执行时Another app is currently holding the yum lock; waiting for it to exit... The other application is: yum
- IIS7.0运行PHP报错"php-cgi.exe - FastCGI 进程意外退出"
- 重启服务器之后 网站报错SQLSTATE[HY000] [2002] Connection refused
- cp: omitting directory `/www/yingcaizhibo/filespath/flash'复制文件出错
- 解决linux安装软件:/lib/ld-linux.so.2: bad ELF interpreter问题