🇰🇷 한글 설명
Linux 커널의 SUNRPC svcauth_gss 구성 요소에서 Kerberos v2 토큰의 최소 길이를 검증하지 않아 발생하는 취약점입니다. 공격자가 조작된 짧은 길이의 토큰을 전송할 경우, 내부 함수인 rotate_left()에서 0으로 나누기(Division by Zero) 오류가 발생하여 시스템이 충돌할 수 있습니다.
💡 쉬운 설명
컴퓨터가 데이터를 처리할 때 너무 짧은 가짜 데이터를 받으면 계산 과정에서 0으로 나누는 실수를 하여 시스템이 멈출 수 있는 문제입니다. 이 문제는 특수하게 조작된 네트워크 신호를 보내 시스템을 마비시키는 방식으로 발생합니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
SUNRPC: svcauth_gss: enforce krb5 token minimum length
svcauth_gss_unwrap_priv() validates only an upper bound on the
wire-supplied opaque length before handing the buffer to
gss_unwrap():
if (len > xdr_stream_remaining(xdr))
goto unwrap_failed;
offset = xdr_stream_pos(xdr);
...
maj_stat = gss_unwrap(ctx, offset, offset + len, buf);
The wire value `len` flows unchanged as the upper bound into the
krb5 unwrap path, so a len in [0, 16] passes this check and is
handed to gss_unwrap(). For a krb5 v2 context that lands in
gss_krb5_unwrap_v2(), which reads the 16-byte RFC 4121 token
header fields at ptr+4 and ptr+6 and then calls rotate_left()
before any integrity check. With a sub-header length the header
reads run past the token, and _rotate_left()'s `shift %= buf->len`
path can divide by zero when buf->len has been driven to zero by
the truncated token. A header-only token (len == 16) is equally
invalid: with a non-zero RRC field and the opaque blob ending at
the XDR buffer boundary, rotate_left() builds a zero-length
subbuffer, reaching the same division.
Reject the token at the server entry point before it reaches the
krb5 unwrap core. A valid sealed RFC 4121 token must contain
the 16-byte header plus at least some encrypted payload.
Fix by adding a minimum-length check immediately after the
existing upper-bound check:
if (len <= GSS_KRB5_TOK_HDR_LEN)
goto unwrap_failed;
📍 영향받는 시스템
Linux Kernel (SUNRPC/svcauth_gss 구성 요소 사용 시스템)
⚔️ 공격 벡터
네트워크를 통해 조작된 짧은 길이의 Kerberos v2 토큰을 SUNRPC 서비스로 전송
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트하여 토큰 최소 길이 검증 로직을 적용해야 합니다.
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 해결된 패치 버전 이후인지 확인합니다.