🇰🇷 한글 설명
Linux 커널의 fscrypt 구성 요소에서 ioctl을 통한 암호화 정책 설정 시 소유자 확인 과정에 오류가 발견되었습니다. mount idmap 대신 nop_mnt_idmap을 사용하여 실제 소유자가 거부되거나 권한이 없는 사용자가 허용될 수 있는 취약점입니다.
💡 쉬운 설명
파일 암호화 설정을 할 때 '누가 주인인지' 확인하는 과정에서 잘못된 기준을 사용하고 있습니다. 이로 인해 진짜 주인이 거절당하거나, 권한이 없는 사람이 파일을 조작할 수 있는 위험이 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
fscrypt: use the mount idmap for the owner check in fscrypt_ioctl_set_policy()
fscrypt_ioctl_set_policy() calls inode_owner_or_capable() with
&nop_mnt_idmap before allowing an encryption policy to be set, instead
of the idmap of the mount the ioctl was issued on.
fscrypt is used by filesystems that support idmapped mounts (e.g. ext4,
f2fs), so on such a mount this compares the caller's fsuid against the
unmapped on-disk owner rather than the mapped owner: the actual owner
can be wrongly denied with -EACCES and an unrelated caller wrongly
allowed. Use file_mnt_idmap(filp) instead.
📍 영향받는 시스템
idmapped mount를 지원하는 파일시스템(ext4, f2fs 등)을 사용하는 Linux 커널
⚔️ 공격 벡터
권한이 없는 사용자가 idmapped mount 환경에서 fscrypt_ioctl_set_policy()를 호출하여 암호화 정책을 조작
🛡️ 대응 방법
fscrypt_ioctl_set_policy() 함수가 file_mnt_idmap(filp)을 사용하도록 수정된 최신 Linux 커널로 업데이트
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 패치된 최신 보안 업데이트 버전인지 확인