🇰🇷 한글 설명
Linux 커널의 NFC LLCP 프로토콜 구현에서 SNL TLV 파싱 시 길이 검증이 누락되어 발생하는 취약점입니다. 공격자가 조작된 LLCP 프레임을 전송할 경우, 데이터 경계를 벗어난 읽기(Out-of-bounds read)가 발생하여 시스템 정보가 유출되거나 오류가 발생할 수 있습니다.
💡 쉬운 설명
근처에 있는 NFC 기기가 특수한 신호를 보내면 스마트폰이나 기기의 메모리 정보를 몰래 읽어갈 수 있는 보안 약점입니다. 이 문제는 데이터의 길이를 제대로 확인하지 않아 발생하는 오류입니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
nfc: llcp: bound SNL TLV parsing to the skb and add length checks
nfc_llcp_recv_snl() walked the SNL TLV list using a u16 offset/length
pair derived from skb->len, without bounding reads to the actual skb
data. Three problems followed:
- For a short frame (skb->len < LLCP_HEADER_SIZE), tlv_len underflowed.
- The per-TLV header (type, length) was read without checking that two
bytes remained.
- A declared TLV length could run past the end of the buffer, and an
SDREQ with length == 0 made "service_name_len = length - 1" underflow
(size_t), driving an out-of-bounds read in the following strncmp() /
nfc_llcp_sock_from_sn(). The SDRES case likewise read tlv[2]/tlv[3]
without a length check.
A nearby NFC device can reach this without authentication; LLCP link
activation happens automatically after NFC-DEP.
Walk the TLV list by pointer, bounded by skb_tail_pointer() over the
linear skb data, and validate each TLV declared length before use. Add
explicit length checks for SDREQ (>= 1) and SDRES (exactly 2).
Found by 0sec automated security-research tooling (https://0sec.ai).
📍 영향받는 시스템
NFC 기능을 사용하는 Linux 커널 기반 시스템
⚔️ 공격 벡터
인증 없이 근거리(NFC 범위 내)에서 조작된 LLCP 프레임을 전송하여 공격
🛡️ 대응 방법
NFC LLCP 관련 패치가 적용된 최신 Linux 커널로 업데이트
🔧 검증 코드
현재 실행 중인 커널 버전을 확인하여 보안 패치가 적용된 최신 버전인지 확인합니다.