🇰🇷 한글 설명
Linux 커널의 NFC LLCP TLV 파서에서 OOB(Out-of-Bounds) 읽기 및 u8 오프셋 래핑 취약점이 발견되었습니다. 오프셋 변수의 타입 범위 초과로 인한 무한 루프와 데이터 경계 검사 미흡으로 인한 메모리 외부 읽기가 가능합니다.
💡 쉬운 설명
NFC 통신 데이터를 처리하는 과정에서 데이터의 길이를 잘못 계산하거나 범위를 넘어서 읽는 오류가 있습니다. 공격자가 조작된 데이터를 보내면 시스템의 메모리 정보를 몰래 읽어낼 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
nfc: llcp: fix OOB read and u8 offset wrap in TLV parsers
nfc_llcp_parse_gb_tlv() and nfc_llcp_parse_connection_tlv() contain
three related bugs in their TLV parsing loops:
1. 'offset' is declared u8 but tlv_array_len is u16. When TLV data
advances offset past 255 it silently wraps to zero, causing
infinite loops or double-processing of buffer data.
2. Before reading tlv[0] (type) and tlv[1] (length) there is no
check that offset+2 <= tlv_array_len. A truncated TLV causes
an OOB read of one byte past the buffer end.
3. After reading the length field, the value bytes are accessed
without checking offset+2+length <= tlv_array_len. A crafted
length=0xFF on a short buffer causes up to 255 bytes of OOB
read past the buffer end.
Both functions are reachable without authentication via
nfc_llcp_set_remote_gb() which feeds remote LLCP general bytes
directly into nfc_llcp_parse_gb_tlv() with no additional
validation.
Fix all three issues by widening offset from u8 to u16 and adding
bounds checks for both the TLV header and value field before each
access.
📍 영향받는 시스템
NFC LLCP 기능을 사용하는 Linux 커널 버전
⚔️ 공격 벡터
인증 없이 원격에서 조작된 LLCP General Bytes 패킷을 전송하여 발생
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트하여 오프셋 타입 변경 및 경계 검사 로직 적용
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 수정된 패치 버전 이후인지 확인