🇰🇷 한글 설명
Linux 커널의 fscrypt 구성 요소에서 find_or_insert_direct_key() 함수 호출 시 super_block에 대한 검증이 누락된 취약점입니다. 서로 다른 super_block을 가진 inode들이 동일한 fscrypt_direct_key를 참조할 수 있어, 키의 수명이 super_block보다 길어짐에 따라 Use-After-Free(UAF) 오류가 발생할 수 있습니다.
💡 쉬운 설명
파일 암호화 키를 관리하는 과정에서 서로 다른 저장 공간의 키를 구분하지 못하는 오류가 발견되었습니다. 이로 인해 이미 삭제된 메모리 영역에 접근하게 되어 시스템이 충돌하거나 보안 문제가 생길 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
fscrypt: Add missing superblock check in find_or_insert_direct_key()
The legacy 'fscrypt_direct_keys' table caches master keys that are used
by v1 encryption policies that have FSCRYPT_POLICY_FLAG_DIRECT_KEY.
It's just a global table for all filesystems (since the keys can be
provided by the legacy process-subscribed keyrings mechanism, which
makes it difficult to reuse super_block::s_master_keys).
The entries in it ('struct fscrypt_direct_key') do contain a super_block
pointer, though, for passing to fscrypt_destroy_inline_crypt_key() when
the last inode that references the key is evicted.
However, when finding the fscrypt_direct_key for an inode, we weren't
actually comparing the super_block pointer. As a result, inodes with
different super_blocks could point to the same fscrypt_direct_key. That
could extend the lifetime of a fscrypt_direct_key beyond the
super_block it points to, causing a use-after-free later.
Fix this by creating distinct fscrypt_direct_key structs for distinct
super_block structs.
Note that this problem doesn't exist in the v2 policy equivalent
("per-mode keys"), since the data structures there are per super_block.
📍 영향받는 시스템
fscrypt v1 정책을 사용하는 Linux 커널 (v2 정책은 안전함)
⚔️ 공격 벡터
특정 조건에서 서로 다른 파일 시스템의 inode를 조작하여 메모리 해제 후 재사용(Use-After-Free) 유도
🛡️ 대응 방법
fscrypt 관련 패치가 적용된 최신 Linux 커널 버전으로 업데이트
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 수정된 패치 버전 이후인지 확인
📊 CVSS Vector String
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
💻 영향받는 소프트웨어
NVIDIA vGPU Guest Driver for Linux