🇰🇷 한글 설명
Linux 커널의 Ceph 파일 시스템 구현 중 parse_longname() 함수에서 잘못된 포인터로 kfree()를 호출하여 커널 Oops가 발생하는 취약점입니다. Ceph 스냅샷 디렉토리(.snap)를 읽을 때 메모리 포인터가 잘못 계산되어 시스템이 중단되거나 멈출 수 있습니다.
💡 쉬운 설명
Ceph라는 저장 장치를 사용할 때 특정 폴더를 조회하면 컴퓨터의 핵심 시스템(커널)이 오류를 일으켜 멈추는 문제입니다. 스냅샷이라는 기능을 사용할 때 메모리 주소를 잘못 계산하여 발생하는 실수입니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
ceph: fix oops due to invalid pointer for kfree() in parse_longname()
This fixes a kernel oops when reading ceph snapshot directories (.snap),
for example by simply running `ls /mnt/my_ceph/.snap`.
The variable str is guarded by __free(kfree), but advanced by one for
skipping the initial '_' in snapshot names. Thus, kfree() is called
with an invalid pointer. This patch removes the need for advancing the
pointer so kfree() is called with correct memory pointer.
Steps to reproduce:
1. Create snapshots on a cephfs volume (I've 63 snaps in my testcase)
2. Add cephfs mount to fstab
$ echo "
[email protected]=/volumes/datapool/stuff/3461082b-ecc9-4e82-8549-3fd2590d3fb6 /mnt/test/stuff ceph acl,noatime,_netdev 0 0" >> /etc/fstab
3. Reboot the system
$ systemctl reboot
4. Check if it's really mounted
$ mount | grep stuff
5. List snapshots (expected 63 snapshots on my system)
$ ls /mnt/test/stuff/.snap
Now ls hangs forever and the kernel log shows the oops.
📍 영향받는 시스템
CephFS를 사용하는 Linux 커널 시스템
⚔️ 공격 벡터
로컬 사용자가 CephFS 마운트 지점의 .snap 디렉토리에 접근하여 파일 목록을 조회할 때 발생
🛡️ 대응 방법
해당 취약점이 수정된 최신 Linux 커널 버전으로 업데이트
🔧 검증 코드
현재 실행 중인 커널 버전을 확인하여 수정된 패치가 적용된 버전인지 확인