🇰🇷 한글 설명
Linux 커널의 ksmbd 모듈에서 경로 해석 오류로 인해 발생하는 취약점입니다. 공격자가 특정 조건에서 '..' 경로 구성 요소를 사용하여 공유 디렉토리를 벗어나 파일 시스템의 루트 디렉토리에 접근할 수 있습니다.
💡 쉬운 설명
파일 공유 서비스에서 허용된 폴더 밖의 다른 파일이나 폴더에 몰래 접근할 수 있는 보안 구멍이 발견되었습니다. 공격자가 특수한 명령을 보내면 공유 폴더를 넘어 시스템 전체의 중요한 파일에 접근할 위험이 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
ksmbd: fix path resolution in ksmbd_vfs_kern_path_create
The SMB2 open lookup is rooted at the share with LOOKUP_BENEATH, but the
create/mkdir/hardlink sink is not: ksmbd_vfs_kern_path_create() builds an
absolute path with convert_to_unix_name() and resolves it from AT_FDCWD
via start_creating_path(), so a ".." component is walked from the real
filesystem root and escapes the export.
An authenticated client races a missing path component so the rooted open
lookup returns -ENOENT (taking the create branch) while the same component
is present (a directory) when the create walk runs; the create then
resolves ".." out of the share.
Root the create walk at the share like the lookup and rename paths already
are: resolve the parent with vfs_path_parent_lookup(..., LOOKUP_BENEATH,
&share_conf->vfs_path) and create the final component with
start_creating_noperm(). convert_to_unix_name() then has no callers and is
removed.
📍 영향받는 시스템
Linux kernel (ksmbd module 포함 버전)
⚔️ 공격 벡터
인증된 클라이언트가 경로 구성 요소 간의 레이스 컨디션을 이용하여 공유 디렉토리 외부로 경로를 탈출(Path Traversal)함
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트하여 ksmbd_vfs_kern_path_create 함수를 수정해야 함
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 해결된 패치 버전 이상인지 확인해야 합니다.