🇰🇷 한글 설명
Linux 커널의 EROFS 파일 시스템에서 페이지 캐시 공유를 위한 백킹 파일 설정 시 f_path가 NULL로 설정되어 발생하는 취약점입니다. 이로 인해 mincore 함수 호출 시 커널 NULL 포인터 역참조가 발생하여 시스템 크래시(Kernel Panic)가 유발될 수 있습니다.
💡 쉬운 설명
파일의 정보를 확인하는 과정에서 컴퓨터가 참조해야 할 주소값이 비어 있어 시스템이 갑자기 멈추거나 꺼질 수 있는 오류입니다. 특정 파일 시스템을 사용할 때 시스템 운영체제의 핵심 부분에서 충돌이 발생합니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
erofs: ensure valid f_path for page cache sharing
Previously, backing files for page cache sharing were set up with
f_path left as NULL (only f_inode was valid). It worked, but a recent
mincore fix relies on f_path.mnt and crashes (found by "erofs/028" on
7.2-rc4):
BUG: kernel NULL pointer dereference, address: 0000000000000018
#PF: supervisor read access in kernel mode
#PF: error_code(0x0000) - not-present page
PGD 0 P4D 0
Oops: Oops: 0000 [#1] SMP PTI
CPU: 3 UID: 0 PID: 675528 Comm: fincore Not tainted 7.2.0-rc4-00002-g[]-dirty #1 PREEMPT(lazy)
Hardware name: Red Hat KVM, BIOS 1.16.0-4.al8 04/01/2014
RIP: 0010:__do_sys_mincore+0xc0/0x2c0
...
Specify valid paths using valid disconnected dentries together with
erofs_ishare_mnt instead of leaving f_path empty, so they are more
like real backing files in a pseudo filesystem and standard
backing_file_open() can be used directly.
📍 영향받는 시스템
Linux kernel (특히 7.2-rc4 이전 버전 및 EROFS를 사용하는 시스템)
⚔️ 공격 벡터
로컬 사용자가 특수하게 조작된 EROFS 파일 시스템을 마운트하거나 관련 시스템 호출(mincore 등)을 수행하여 발생
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트하십시오.
🔧 검증 코드
출력된 커널 버전이 취약점이 해결된 최신 버전인지 확인하십시오.