🇰🇷 한글 설명
Linux 커널의 NFC FDP 드라이버에서 장치가 보고하는 읽기 길이를 검증하지 않아 스택 버퍼 오버플로우가 발생할 수 있으며, skb 메모리 누수 취약점이 존재합니다. 공격자는 조작된 I2C 컨트롤러를 통해 스택의 카나리와 반환 주소를 덮어써 실행 흐름을 제어할 수 있습니다.
💡 쉬운 설명
NFC 장치가 잘못된 크기의 데이터를 보내면 컴퓨터의 중요한 메모리 영역을 망가뜨려 해킹할 수 있는 보안 약점이 발견되었습니다. 또한, 데이터를 처리하는 과정에서 메모리가 불필요하게 낭비되는 문제도 함께 수정되었습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
nfc: fdp: bound the device-reported read length and fix an skb leak
fdp_nci_i2c_read() takes the next packet length from two device-supplied
bytes and never validates it. The value is a u16 used as the
i2c_master_recv() count into a 261-byte on-stack buffer: a malicious,
counterfeit or malfunctioning controller (or an i2c bus interposer) can
drive it far past the buffer for a stack out-of-bounds write that
clobbers the canary and return address, or below the minimum frame size
(directly, or by truncating the computed sum) so the header/LRC strip
and the next length read run past a short receive. Reject a length
outside [FDP_NCI_I2C_MIN_PAYLOAD, FDP_NCI_I2C_MAX_PAYLOAD], as a
corrupted packet already is, and force resynchronization.
The same loop allocates one data skb per iteration and assumes a length
packet followed by a data packet; a device that sends two data packets
in one call leaks the first skb when the second allocation overwrites
it. Free a previously allocated skb before allocating the next.
📍 영향받는 시스템
Linux kernel (NFC FDP driver component)
⚔️ 공격 벡터
조작된 또는 결함이 있는 I2C 컨트롤러/인터포저를 통한 악의적인 데이터 전송
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트하여 FDP NCI I2C 길이 검증 및 메모리 해제 로직을 적용해야 합니다.
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 패치된 최신 버전인지 확인합니다.