🔍 CVE-2026-64394

8.8
CVSS Score
HIGH
2026-07-25
2026-09-04 15:31
✅ 완료

🇰🇷 한글 설명

Linux 커널의 ksmbd 구성 요소에서 SMB2 SET_INFO SECURITY 요청 시 권한 검사가 누락된 취약점입니다. 공격자는 적절한 권한 없이도 파일의 소유권이나 DACL(액세스 제어 목록)을 수정하여 권한 상승을 수행할 수 있습니다.

💡 쉬운 설명

파일의 권한을 바꿀 수 없는 사용자가 특수한 명령을 통해 파일의 주인이나 접근 권한을 마음대로 바꿀 수 있는 보안 결함입니다. 이를 통해 원래 접근할 수 없던 파일에 대한 모든 권한을 획득할 수 있습니다.

🇺🇸 원문 (English)

In the Linux kernel, the following vulnerability has been resolved: ksmbd: add a WRITE_DAC/WRITE_OWNER check to SMB2 SET_INFO SECURITY commit cc57232cae23 ("ksmbd: fix FSCTL permission bypass by adding a permission check for FSCTL_SET_SPARSE") added a fp->daccess gate to fsctl_set_sparse and noted that "similar handle-level checks exist in other functions but are missing here." The SMB2 SET_INFO SECURITY arm is one of the missing ones, and the most security-relevant: smb2_set_info_sec() calls set_info_sec() with no per-handle access check. set_info_sec() (fs/smb/server/smbacl.c) re-permissions the file: it rewrites owner/group/mode via notify_change(), rewrites the POSIX ACL via set_posix_acl(), and on KSMBD_SHARE_FLAG_ACL_XATTR shares removes and rewrites the Windows security descriptor via ksmbd_vfs_set_sd_xattr(). Every other persistent-mutation arm of the sibling handler smb2_set_info_file() checks fp->daccess first (FILE_WRITE_DATA / FILE_DELETE / FILE_WRITE_EA / FILE_WRITE_ATTRIBUTES); the SECURITY arm — which mutates the access control itself — is the only one with no gate. A client can therefore open a handle with FILE_WRITE_ATTRIBUTES only (no FILE_WRITE_DAC / FILE_WRITE_OWNER) and use SMB2_SET_INFO with InfoType SMB2_O_INFO_SECURITY to rewrite the file's DACL and owner, granting itself access the handle's daccess never carried. Unlike the FSCTL data arms this is a metadata/xattr operation, so there is no FMODE_WRITE VFS backstop — the missing fp->daccess check is the entire gate. Setting a security descriptor is the WRITE_DAC / WRITE_OWNER operation, so require at least one of those on the handle before re-permissioning the file. -EACCES is mapped to STATUS_ACCESS_DENIED by smb2_set_info().

📍 영향받는 시스템

Linux kernel (ksmbd module 사용 환경)

⚔️ 공격 벡터

SMB2_SET_INFO 명령을 사용하여 권한 검사 없이 파일의 보안 설명자(Security Descriptor)를 재작성

🛡️ 대응 방법

Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트하여 ksmbd의 권한 검사 로직을 적용해야 합니다.

🔧 검증 코드

출력된 커널 버전이 해당 취약점이 수정된 커밋(cc57232cae23) 이후의 버전인지 확인합니다.

Shell / Script
uname -r

📊 CVSS Vector String

CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

💻 영향받는 소프트웨어

Linux Kernel