** 설명
- CVE-2022-0847에 대한 PoC: Linux 커널 로컬 권한 상승 취약점.
** 상세
- 보안 연구원 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 Severity
- 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/][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/][new-linux-bug-gives-root-on-all-major-distros-exploit-released]]
- 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]]