🇰🇷 한글 설명
Linux 커널의 SUNRPC 구성 요소에서 Kerberos v2 토큰의 'extra count(ec)' 필드가 실제 데이터보다 클 경우 발생하는 취약점입니다. 이로 인해 xdr_buf의 길이가 비정상적으로 설정되거나 데이터 일관성이 깨지는 논리적 오류가 발생할 수 있습니다.
💡 쉬운 설명
인증 과정에서 사용하는 데이터 패킷의 크기 정보가 실제 내용보다 크게 조작될 경우, 시스템 내부의 데이터 처리 방식에 혼란을 줄 수 있는 문제입니다. 정상적인 권한을 가진 사용자가 잘못된 형식의 데이터를 보낼 때 시스템이 이를 제대로 걸러내지 못해 발생합니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
SUNRPC: Reject krb5 v2 wrap tokens with oversized ec field
gss_krb5_unwrap_v2() sets buf->len to a logical
length, which can be much smaller than head[0].iov_len
(the allocated receive-page capacity). It then calls
xdr_buf_trim() with a trim length derived from the 16-bit
"extra count" (ec) field in the Kerberos v2 token header.
The ec field is authenticated by the post-decrypt memcmp()
against the encrypted header copy, so a randomly-mutated
value is rejected. However, any peer holding a valid GSS
context can legitimately encrypt a token whose ec exceeds
the plaintext length. Per RFC 4121, such a token is
structurally malformed.
Although xdr_buf_trim() now clamps the buf->len subtraction
to avoid unsigned underflow, the buffer is still left in a
semantically invalid state (zero length, inconsistent iov
lengths) when ec is oversized.
Reject these tokens before calling xdr_buf_trim(), giving
callers a well-defined GSS_S_DEFECTIVE_TOKEN error and
keeping the xdr_buf internally consistent. The wrapped blob
begins at a nonzero offset -- both callers pass len as
offset + opaque_len -- so buf->len still counts the offset
bytes that precede the blob. Compare the trim length
against the remaining wrapped segment, buf->len - offset,
rather than the whole buffer; comparing against buf->len
alone leaves an offset-wide window in which an oversized ec
passes the test and xdr_buf_trim() cuts into the bytes ahead
of the blob.
📍 영향받는 시스템
Linux Kernel (SUNRPC/GSS-KRB5 관련 모듈 사용 시스템)
⚔️ 공격 벡터
유효한 GSS 컨텍스트를 보유한 피어(Peer)가 RFC 4121 규격에 어긋나는 oversized ec 필드를 포함한 Kerberos v2 토큰을 전송
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트하여 xdr_buf_trim() 호출 전 토큰 검증 로직을 적용해야 함
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 수정된 패치 버전 이후인지 확인하십시오.