🇰🇷 한글 설명
Linux 커널의 SUNRPC 구성 요소 내 gss_krb5_verify_mic_v2 함수에서 발생하는 취약점입니다. RFC 4121 MIC 토큰의 길이를 사전에 검증하지 않아, 짧은 토큰이 전달될 경우 할당된 메모리 범위를 벗어나 읽는 버퍼 오버리드(Buffer Over-read)가 발생할 수 있습니다.
💡 쉬운 설명
네트워크를 통해 들어오는 데이터의 길이를 제대로 확인하지 않아, 실제 데이터보다 더 많은 양을 읽으려고 시도하는 보안 결함입니다. 이로 인해 시스템의 민감한 정보가 유출되거나 프로그램이 비정상적으로 종료될 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
SUNRPC: Reject short RFC 4121 MIC tokens in gss_krb5_verify_mic_v2
gss_krb5_verify_mic_v2() reads the token ID at ptr[0..1], the flags
byte at ptr[2], and padding at ptr[3..7], then passes
ptr + GSS_KRB5_TOK_HDR_LEN and cksum_len to gss_krb5_mic_build_sg().
None of these accesses check read_token->len first.
The minimum safe token size is GSS_KRB5_TOK_HDR_LEN (16) plus
ctx->krb5e->cksum_len (12-24, depending on the enctype). All callers
accept shorter tokens from the wire:
- gss_unwrap_resp_integ() enforces only an upper bound
(offset + len <= rcv_buf->len) before allocating
mic.data = kmalloc(len) and passing it to gss_verify_mic().
A malicious NFS server can therefore supply a short checksum
opaque, producing a small slab allocation that the Kerberos MIC
verifier reads past.
- gss_validate() enforces only len <= RPC_MAX_AUTH_SIZE (400)
before passing the wire-supplied length to
gss_validate_seqno_mic(), which constructs a mic xdr_netobj
and calls gss_verify_mic().
- svcauth_gss_verify_header() enforces only
checksum.len >= XDR_UNIT (4 bytes) before dispatching to
gss_verify_mic().
- svcauth_gss_unwrap_integ() checks only that the checksum fits
in gsd->gsd_scratch.
Add a length guard at the top of gss_krb5_verify_mic_v2(), before any
ptr[] access or scatterlist construction. Well-formed MIC tokens from
gss_krb5_get_mic_v2() already have exactly GSS_KRB5_TOK_HDR_LEN +
cksum_len bytes, so valid traffic is unaffected.
📍 영향받는 시스템
Linux Kernel (SUNRPC/Kerberos 관련 모듈 사용 시스템)
⚔️ 공격 벡터
악의적인 NFS 서버가 조작된 짧은 길이의 Kerberos MIC 토큰을 전송하여 발생
🛡️ 대응 방법
gss_krb5_verify_mic_v2() 함수 상단에 토큰 길이를 검증하는 가드 코드를 추가한 최신 커널로 업데이트
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 패치된 최신 보안 업데이트 버전인지 확인