🇰🇷 한글 설명
Linux 커널의 ext4 파일 시스템에서 ext4_ext_replay_update_ex() 함수 호출 시 ppath를 처리하는 과정에서 메모리 해제 오류가 발생합니다. 특정 조건에서 이미 해제된 메모리 주소를 다시 해제하려고 시도하는 double-free 취약점이 존재합니다.
💡 쉬운 설명
컴퓨터가 데이터를 저장할 때 사용하는 메모리 관리 과정에서, 이미 사용이 끝난 메모리 공간을 실수로 두 번 지우려고 시도하는 오류입니다. 이로 인해 시스템이 갑자기 멈추거나 보안 공격에 악용될 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
ext4: drop ppath from ext4_ext_replay_update_ex() to avoid double-free
When calling ext4_force_split_extent_at() in ext4_ext_replay_update_ex(),
the 'ppath' is updated but it is the 'path' that is freed, thus potentially
triggering a double-free in the following process:
ext4_ext_replay_update_ex
ppath = path
ext4_force_split_extent_at(&ppath)
ext4_split_extent_at
ext4_ext_insert_extent
ext4_ext_create_new_leaf
ext4_ext_grow_indepth
ext4_find_extent
if (depth > path[0].p_maxdepth)
kfree(path) ---> path First freed
*orig_path = path = NULL ---> null ppath
kfree(path) ---> path double-free !!!
So drop the unnecessary ppath and use path directly to avoid this problem.
And use ext4_find_extent() directly to update path, avoiding unnecessary
memory allocation and freeing. Also, propagate the error returned by
ext4_find_extent() instead of using strange error codes.
📍 영향받는 시스템
ext4 파일 시스템을 사용하는 Linux 커널 버전
⚔️ 공격 벡터
조작된 파일 시스템 구조를 통해 커널의 메모리 관리 로직을 트리거하여 발생
🛡️ 대응 방법
ext4 관련 패치가 적용된 최신 Linux 커널로 업데이트
🔧 검증 코드
출력된 커널 버전을 확인하여 해당 취약점이 해결된 최신 보안 패치 버전인지 확인합니다.