🇰🇷 한글 설명
Linux 커널의 configfs에서 심볼릭 링크 생성 시 대상 디렉토리의 dentry를 적절히 고정하지 않아 발생하는 취약점입니다. 대상 디렉토리가 삭제되는 과정에서 race condition이 발생하면 이미 해제된 메모리에 접근하여 커널 경고(WARN_ON)를 유발할 수 있습니다.
💡 쉬운 설명
파일을 연결하는 과정에서 대상 파일이 갑자기 사라질 때, 컴퓨터가 이미 사라진 정보를 참조하려고 시도하여 오류가 발생하는 문제입니다. 이로 인해 시스템에 경고가 발생하거나 불안정해질 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
configfs: pin the symlink target's dirent instead of chasing ->ci_dentry
create_link() reads the target's configfs_dirent from
item->ci_dentry->d_fsdata, relying on the item reference taken by
get_target(). That reference pins the item, not its dentry: the dentry is
pinned by DCACHE_PERSISTENT, which configfs_remove_dir() releases via
simple_rmdir() while the item is still alive. A symlink racing with rmdir
of its target can therefore find ->ci_dentry freed and its dirent
released, triggering WARN_ON(!atomic_read(&sd->s_count)) in configfs_get().
Take the dirent in get_target() as well, under ->d_lock and atomically
with the item reference, and pass it down to create_link(). A hashed
dentry has not been killed yet, so its ->d_fsdata reference keeps the
dirent alive there.
📍 영향받는 시스템
Linux Kernel (configfs 모듈을 사용하는 시스템)
⚔️ 공격 벡터
심볼릭 링크 생성과 대상 디렉토리 삭제를 동시에 수행하는 레이스 컨디션 공격
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트하십시오.
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 해결된 패치 버전 이후인지 확인하십시오.