** 描述
- CVE-2022-0847 的 PoC:Linux 内核本地权限提升漏洞。
- 由 antx 于 2022-03-08 创建。
** 详情
- 安全研究员 Max Kellermann 负责任地披露了 "Dirty Pipe" 漏洞,并指出该漏洞影响 Linux 内核 5.8 及更高版本,甚至包括 Android 设备。
- 自 Linux 内核 5.8 版本起存在一个漏洞,允许覆写任意只读文件中的数据。这会导致权限提升,因为非特权进程可以将代码注入到根进程中。
- 发现了一个缺陷:在 Linux 内核的 copy_page_to_iter_pipe 和 push_pipe 函数中,新的管道缓冲区结构的 "flags" 成员缺乏正确的初始化,从而可能包含过时的值。非特权本地用户可以利用此缺陷写入由只读文件支持的页面缓存中的页面,从而提升其在系统上的权限。该缺陷影响 5.17-rc6 之前的 Linux 内核版本。
- 它类似于 [[https://nvd.nist.gov/vuln/detail/CVE-2016-5195][CVE-2016-5195]] "Dirty Cow",但更容易利用。
- 该漏洞在 Linux 5.16.11、5.15.25 和 5.10.102 中已被 [[https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=9d2231c5d74e13b2a0546fee6737ee4446017903][修复]]。
** CVE 严重性
- attackComplexity: LOW
- attackVector: LOCAL
- availabilityImpact: -
- confidentialityImpact: -
- integrityImpact: HIGH
- privilegesRequired: -
- scope: -
- userInteraction: -
- version: 3.1
- baseScore: -
- baseSeverity: -
** 影响
- Linux 内核 5.8 及更高版本,甚至包括 Android 设备
** PoC
- [[./CVE-2022-0847.c][Poc]]
** 参考
- 来源参考
- [[https://dirtypipe.cm4all.com/][脏管道漏洞]]
- [[https://github.com/Arinerron/CVE-2022-0847-DirtyPipe-Exploit][CVE-2022-0847-DirtyPipe-Exploit]]
- 文章参考
- [[https://www.bleepingcomputer.com/news/security/new-linux-bug-gives-root-on-all-major-distros-exploit-released/][新 Linux 漏洞在所有主要发行版上提供 root 权限,漏洞利用已发布]]
- PoC 参考
- [[https://github.com/Al1ex/LinuxEelvation/tree/master/CVE-2022-0847][CVE-2022-0847]]
- [[https://github.com/imfiver/CVE-2022-0847][CVE-2022-0847]]
- [[https://github.com/lucksec/CVE-2022-0847][CVE-2022-0847]]
- [[https://github.com/bbaranoff/CVE-2022-0847][CVE-2022-0847]]
- 风险参考
- CVE
- 相关参考
- [[https://nvd.nist.gov/vuln/detail/CVE-2016-5195][CVE-2016-5195]]