🇰🇷 한글 설명
리눅스 커널의 blk-crypto 구성 요소에서 blk_crypto_evict_key() 함수가 키 제거 실패 시 키를 관리 구조에서 분리하지 않는 결함이 발견되었습니다. 이로 인해 키가 여전히 연결된 상태에서 메모리가 해제되어 blk_crypto_reprogram_all_keys() 호출 시 Use-After-Free(UAF) 취약점이 발생할 수 있습니다.
💡 쉬운 설명
데이터 암호화 키를 삭제하는 과정에서 오류가 발생했을 때, 키가 시스템 메모리에서 완전히 제거되지 않고 남아있는 문제입니다. 이로 인해 이미 삭제된 메모리 영역에 접근하려는 시도가 발생하여 시스템이 충돌하거나 보안 문제가 생길 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
blk-crypto: make blk_crypto_evict_key() more robust
If blk_crypto_evict_key() sees that the key is still in-use (due to a
bug) or that ->keyslot_evict failed, it currently just returns while
leaving the key linked into the keyslot management structures.
However, blk_crypto_evict_key() is only called in contexts such as inode
eviction where failure is not an option. So actually the caller
proceeds with freeing the blk_crypto_key regardless of the return value
of blk_crypto_evict_key().
These two assumptions don't match, and the result is that there can be a
use-after-free in blk_crypto_reprogram_all_keys() after one of these
errors occurs. (Note, these errors *shouldn't* happen; we're just
talking about what happens if they do anyway.)
Fix this by making blk_crypto_evict_key() unlink the key from the
keyslot management structures even on failure.
Also improve some comments.
📍 영향받는 시스템
blk-crypto 모듈을 사용하는 Linux Kernel 버전
⚔️ 공격 벡터
특정 오류 상황을 유도하여 메모리 관리 구조 내의 키를 조작함으로써 Use-After-Free 취약점을 악용
🛡️ 대응 방법
리눅스 커널을 최신 보안 패치가 적용된 버전으로 업데이트하여 blk_crypto_evict_key()의 오류 처리 로직을 수정해야 함
🔧 검증 코드
현재 실행 중인 커널 버전을 확인하여 해당 취약점이 해결된 패치 버전인지 확인