🇰🇷 한글 설명
Linux 커널의 ksmbd 모듈에서 DACL 크기 검증 오류로 인해 발생하는 취약점입니다. 접근 권한을 확인하는 과정에서 DACL의 실제 크기가 아닌 남은 보안 기술자(NTSD) 길이를 기준으로 검사하여, 선언된 범위를 벗어난 잘못된 권한 정보가 처리될 수 있습니다.
💡 쉬운 설명
파일 접근 권한을 확인하는 과정에서 규칙의 끝을 제대로 확인하지 못하는 문제입니다. 공격자가 규칙 뒤에 몰래 '접근 허용' 명령을 숨겨두면, 시스템이 이를 읽어 들여 권한이 없는 사용자에게도 접근을 허용할 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
ksmbd: bound smb_check_perm_dacl() ACE walks by DACL size
smb_check_perm_dacl() validates that the DACL fits inside the NT
security descriptor, but then bounds its two ACE walks by the
remaining NTSD length (acl_size) rather than the DACL's declared
size (pdacl_size).
When pdacl->size is smaller than the trailing NTSD buffer, bytes
after the declared DACL boundary - still inside the stored security
descriptor - are parsed as ACEs during access checks. A crafted
DACL can place an access-granting ACE beyond pdacl->size, and the
current code accepts it during SMB2_CREATE access validation, while
parse_dacl() and smb_inherit_dacl() stop at pdacl_size.
Bound both ACE walks by pdacl_size to match the DACL boundary
semantics used elsewhere in the server.
Validation:
- semantic KUnit harness shows the post-boundary ACE is selected
before the fix and rejected (EACCES) after it
- linux master (7.2-rc6), x86_64
📍 영향받는 시스템
Linux kernel (ksmbd module 사용 환경, master branch 7.2-rc6 포함)
⚔️ 공격 벡터
조작된 DACL(Discretionary Access Control List)을 포함한 SMB2_CREATE 요청을 전송
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트하여 ksmbd의 ACE 검사 로직 수정
🔧 검증 코드
출력된 커널 버전이 취약점이 해결된 패치 버전 이후인지 확인