🇰🇷 한글 설명
Linux 커널의 ksmbd 모듈에서 SID의 하위 권한 개수를 제대로 검증하지 않아 발생하는 취약점입니다. 특정 조건에서 ACL의 경계를 벗어난 메모리 영역을 파일 모드로 잘못 읽어 들여 권한 설정 오류를 유발할 수 있습니다.
💡 쉬운 설명
컴퓨터가 사용자 권한을 확인할 때, 정해진 범위를 넘어서 메모리의 엉뚱한 부분을 읽어버리는 오류입니다. 이로 인해 원래 허용되지 않아야 할 파일 권한이 잘못 설정될 위험이 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
ksmbd: require 3 sub-authorities before reading sub_auth[2]
parse_dacl() compares each ACE SID against sid_unix_NFS_mode and on
match reads sid.sub_auth[2] as the file mode. If sid_unix_NFS_mode is
the prefix S-1-5-88-3 with num_subauth = 2 then compare_sids() compares
only min(num_subauth, 2) sub-authorities so a client SID with
num_subauth = 2 and sub_auth = {88, 3} will match.
If num_subauth = 2 and the ACE is placed at the very end of the security
descriptor, sub_auth[2] will be 4 bytes past end_of_acl. The
out-of-band bytes will then be masked to the low 9 bits and applied as
the file's POSIX mode, probably not something that is good to have
happen.
Fix this up by forcing the SID to actually carry a third sub-authority
before reading it at all.
📍 영향받는 시스템
Linux kernel (ksmbd module 포함 버전)
⚔️ 공격 벡터
조작된 SID를 포함한 ACL(액세스 제어 목록)을 전송하여 메모리 경계 밖의 데이터를 읽도록 유도
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트하여 ksmbd의 SID 검증 로직을 수정
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 수정된 패치 버전 이후인지 확인