🇰🇷 한글 설명
Linux 커널의 btrfs 파일 시스템에서 lookup_extent_data_ref() 함수 내 반환 값 처리 오류가 발견되었습니다. 특정 조건에서 데이터 검색 실패 시 -ENOENT 대신 0을 반환하여, 시스템이 검색에 성공한 것으로 잘못 판단할 수 있습니다. 이로 인해 잘못된 익스텐트 트리 항목에 작업이 수행되어 파일 시스템 데이터가 손상될 위험이 있습니다.
💡 쉬운 설명
파일 시스템이 데이터를 찾지 못했을 때 '찾지 못했다'고 알려줘야 하는데, 실수로 '찾았다'고 잘못 알려주는 버그입니다. 이 때문에 엉뚱한 데이터를 건드리게 되어 저장된 파일이나 데이터가 망가질 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
btrfs: fix incorrect return value after changing leaf in lookup_extent_data_ref()
After commit 1618aa3c2e01 ("btrfs: simplify return variables in
lookup_extent_data_ref()"), the err and ret variables were merged into
a single ret variable. However, when btrfs_next_leaf() returns 0
(success), ret is overwritten from -ENOENT to 0. If the first key in
the next leaf does not match (different objectid or type), the function
returns 0 instead of -ENOENT, making the caller believe the lookup
succeeded when it did not. This can lead to operations on the wrong
extent tree item, potentially causing extent tree corruption.
Fix this by returning -ENOENT directly when the key does not match,
instead of relying on the ret variable.
📍 영향받는 시스템
btrfs 파일 시스템을 사용하는 Linux 커널 (commit 1618aa3c2e01 이후 버전)
⚔️ 공격 벡터
로컬 공격자가 조작된 btrfs 파일 시스템 구조를 통해 익스텐트 트리 손상을 유도할 수 있음
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트하십시오.
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 수정된 패치 이후 버전인지 확인하십시오.