🇰🇷 한글 설명
Linux 커널의 NFC-A 안티콜리전(anti-collision) 과정에서 SDD 응답 처리 시 경계 검사가 누락된 취약점입니다. 악의적인 피어 장치가 캐스케이드 라운드를 계속 유지할 경우, 힙에 할당된 nfc_target 버퍼를 초과하여 데이터를 쓰는 힙 오버플로우가 발생할 수 있습니다.
💡 쉬운 설명
NFC 장치 간의 통신 과정에서 데이터 크기를 제대로 확인하지 않아 발생하는 보안 문제입니다. 나쁜 의도를 가진 NFC 장치가 연결될 경우, 스마트폰이나 기기의 메모리 영역을 침범하여 시스템을 망가뜨릴 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
NFC: digital: Bounds check NFC-A cascade depth in SDD response handler
The NFC-A anti-collision cascade in digital_in_recv_sdd_res() appends 3
or 4 bytes to target->nfcid1 on each round, but the number of cascade
rounds is controlled entirely by the peer device. The peer sets the
cascade tag in the SDD_RES (deciding 3 vs 4 bytes) and the
cascade-incomplete bit in the SEL_RES (deciding whether another round
follows).
ISO 14443-3 limits NFC-A to three cascade levels and target->nfcid1 is
sized accordingly (NFC_NFCID1_MAXSIZE = 10), but nothing in the driver
actually enforces this. This means a malicious peer can keep the
cascade running, writing past the heap-allocated nfc_target with each
round.
Fix this by rejecting the response when the accumulated UID would exceed
the buffer.
Commit e329e71013c9 ("NFC: nci: Bounds check struct nfc_target arrays")
fixed similar missing checks against the same field on the NCI path.
📍 영향받는 시스템
Linux Kernel (NFC-A cascade depth 관련 모듈 사용 시스템)
⚔️ 공격 벡터
조작된 SDD_RES 및 SEL_RES 응답을 보내는 악의적인 NFC 피어 장치를 통한 힙 오버플로우 공격
🛡️ 대응 방법
커널 패치를 적용하여 누적된 UID가 버퍼 크기를 초과할 경우 응답을 거부하도록 수정해야 합니다.
🔧 검증 코드
현재 실행 중인 커널 버전을 확인하여 해당 취약점이 수정된 패치 버전인지 확인합니다.