🇰🇷 한글 설명
Linux 커널의 OCFS2 파일 시스템에서 익스텐트(extent) 이동 또는 조각 모음 시 익스텐트 맵 캐시가 갱신되지 않는 취약점입니다. 이로 인해 오래된 캐시 데이터가 사용되면서 데이터 불일치가 발생하고, 결국 커널의 BUG_ON 명령이 실행되어 시스템이 중단될 수 있습니다.
💡 쉬운 설명
파일의 저장 위치를 옮기는 과정에서 컴퓨터가 예전 정보를 계속 기억하고 있어 오류가 발생하는 문제입니다. 이 오류가 발생하면 시스템이 스스로를 보호하기 위해 갑자기 멈출 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
ocfs2: clear extent cache after moving/defragmenting extents
The extent map cache can become stale when extents are moved or
defragmented, causing subsequent operations to see outdated extent flags.
This triggers a BUG_ON in ocfs2_refcount_cal_cow_clusters().
The problem occurs when:
1. copy_file_range() creates a reflinked extent with OCFS2_EXT_REFCOUNTED
2. ioctl(FITRIM) triggers ocfs2_move_extents()
3. __ocfs2_move_extents_range() reads and caches the extent (flags=0x2)
4. ocfs2_move_extent()/ocfs2_defrag_extent() calls __ocfs2_move_extent()
which clears OCFS2_EXT_REFCOUNTED flag on disk (flags=0x0)
5. The extent map cache is not invalidated after the move
6. Later write() operations read stale cached flags (0x2) but disk has
updated flags (0x0), causing a mismatch
7. BUG_ON(!(rec->e_flags & OCFS2_EXT_REFCOUNTED)) triggers
Fix by clearing the extent map cache after each extent move/defrag
operation in __ocfs2_move_extents_range(). This ensures subsequent
operations read fresh extent data from disk.
📍 영향받는 시스템
Linux Kernel (OCFS2 파일 시스템을 사용하는 시스템)
⚔️ 공격 벡터
로컬 사용자가 특정 파일 시스템 작업(copy_file_range, FITRIM ioctl 등)을 유도하여 커널 패닉 유발
🛡️ 대응 방법
OCFS2 익스텐트 이동/조각 모음 시 캐시를 무효화하는 패치가 적용된 최신 Linux 커널로 업데이트
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 해결된 최신 보안 패치 버전인지 확인합니다.