🇰🇷 한글 설명
Linux kernel의 Ceph 파일시스템에서 ceph_path_info 구조체가 초기화되지 않아 메모리 해제 시 커널 패닉이 발생하는 취약점입니다. 특정 함수 호출자들이 구조체를 제로 초기화하지 않으면 메모리 손상 및 시스템 충돌이 발생할 수 있으며, 권한 상승도 가능합니다.
💡 쉬운 설명
Linux의 파일 관리 시스템(Ceph)에서 메모리 정리 과정의 오류로 인해 시스템이 예상치 못하게 충돌할 수 있습니다. 일반 사용자의 파일 작업만으로도 이 문제를 트리거할 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
ceph: add a bunch of missing ceph_path_info initializers
ceph_mdsc_build_path() must be called with a zero-initialized
ceph_path_info parameter, or else the following
ceph_mdsc_free_path_info() may crash.
Example crash (on Linux 6.18.12):
virt_to_cache: Object is not a Slab page!
WARNING: CPU: 184 PID: 2871736 at mm/slub.c:6732 kmem_cache_free+0x316/0x400
[...]
Call Trace:
[...]
ceph_open+0x13d/0x3e0
do_dentry_open+0x134/0x480
vfs_open+0x2a/0xe0
path_openat+0x9a3/0x1160
[...]
cache_from_obj: Wrong slab cache. names_cache but object is from ceph_inode_info
WARNING: CPU: 184 PID: 2871736 at mm/slub.c:6746 kmem_cache_free+0x2dd/0x400
[...]
kernel BUG at mm/slub.c:634!
Oops: invalid opcode: 0000 [#1] SMP NOPTI
RIP: 0010:__slab_free+0x1a4/0x350
Some of the ceph_mdsc_build_path() callers had initializers, but
others had not, even though they were all added by commit 15f519e9f883
("ceph: fix race condition validating r_parent before applying state").
The ones without initializer are suspectible to random crashes. (I can
imagine it could even be possible to exploit this bug to elevate
privileges.)
Unfortunately, these Ceph functions are undocumented and its semantics
can only be derived from the code. I see that ceph_mdsc_build_path()
initializes the structure only on success, but not on error.
Calling ceph_mdsc_free_path_info() after a failed
ceph_mdsc_build_path() call does not even make sense, but that's what
all callers do, and for it to be safe, the structure must be
zero-initialized. The least intrusive approach to fix this is
therefore to add initializers everywhere.
📍 영향받는 시스템
Linux kernel 6.18.12 이하, Ceph 파일시스템을 사용하는 모든 Linux 배포판
⚔️ 공격 벡터
로컬 공격자가 ceph_open() 같은 일반 파일 작업을 통해 초기화되지 않은 메모리 영역 접근 가능
🛡️ 대응 방법
커널을 최신 패치 버전으로 업그레이드하여 ceph_path_info 초기화 코드 적용
🔧 검증 코드
커널 버전과 Ceph 모듈 로드 여부를 확인하고, 해당 커널 버전의 보안 패치 적용 상태를 vendor 공지로 확인
uname -r && lsmod | grep ceph