** 描述
- CVE-2022-0847 的 PoC:Linux 内核本地权限提升漏洞。
** 详情
- 安全研究员 Max Kellermann 负责任地披露了 'Dirty Pipe' 漏洞,并指出该漏洞影响 Linux 内核 5.8 及更高版本,甚至影响 Android 设备。
- 自 5.8 起,Linux 内核中存在一个漏洞,允许覆盖任意只读文件中的数据。这会导致权限提升,因为非特权进程可以将代码注入到 root 进程中。
- 发现了一个缺陷:在 Linux 内核的 copy_page_to_iter_pipe 和 push_pipe 函数中,新的管道缓冲区结构的 "flags" 成员缺乏正确初始化,因此可能包含过时值。非特权本地用户可以利用此缺陷向页缓存中由只读文件支持的页面写入数据,从而提升其在系统上的权限。此缺陷影响 Linux 内核版本 5.17-rc6 之前的版本。
- 它与 [[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: 低
- attackVector: 本地
- availabilityImpact: -
- confidentialityImpact: -
- integrityImpact: 高
- privilegesRequired: -
- scope: -
- userInteraction: -
- version: 3.1
- baseScore: -
- baseSeverity: -
** 影响
- Linux 内核 5.8 及更高版本,甚至影响 Android 设备
** PoC
- [[./CVE-2022-0847.c][PoC]]
** 参考
- 参考来源
- [[https://dirtypipe.cm4all.com/][Dirty Pipe 漏洞]]
- [[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]]