🇰🇷 한글 설명
Linux 커널의 SMB 클라이언트에서 forceuid/forcegid 마운트 옵션이 SID를 UID/GID로 매핑할 때 무시되는 취약점이 발견되었습니다. 특정 코드 경로에서 관리자의 설정보다 서버가 제공한 값을 우선시하여 로컬 파일 소유권이 의도치 않게 변경될 수 있습니다.
💡 쉬운 설명
컴퓨터가 네트워크 저장소를 연결할 때 '모든 파일의 주인은 나로 해줘'라고 설정해도, 저장소 서버가 강제로 다른 사람의 이름으로 파일을 보여줄 수 있는 문제입니다. 이로 인해 파일의 권한 관리에 혼란이 생길 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
smb: client: honor forceuid/forcegid when mapping SIDs to uid/gid
When the administrator mounts with forceuid or forcegid (uid=/gid=
mount options), they expect all files to appear owned by the specified
user/group. However, several code paths unconditionally called
sid_to_id() to overwrite cf_uid/cf_gid with server-provided values,
ignoring the administrator's explicit override:
- smb311_posix_info_to_fattr() (stat via POSIX extensions)
- cifs_posix_to_fattr() (readdir via POSIX extensions)
- parse_sec_desc() (CIFS ACL ownership mapping)
This allowed an untrusted server to dictate local file ownership even
when the mount was configured to force specific uid/gid values.
Fix all three call sites to check CIFS_MOUNT_OVERR_UID and
CIFS_MOUNT_OVERR_GID before calling sid_to_id(), following the
same pattern already used by cifs_unix_basic_to_fattr() for unix
extensions.
📍 영향받는 시스템
Linux kernel (SMB/CIFS client components)
⚔️ 공격 벡터
신뢰할 수 없는 SMB 서버가 클라이언트의 마운트 옵션을 무시하고 조작된 SID를 전송하여 로컬 파일 소유권을 변경함
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트하여 CIFS_MOUNT_OVERR_UID/GID 체크 로직을 적용해야 함
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 수정된 패치 버전 이후인지 확인하십시오.