🇰🇷 한글 설명
ieee802154_decipher_data_frame() 함수에서 수신된 프레임의 길이를 검증하기 전에 페이로드 길이를 계산하여 정수 언더플로우가 발생합니다. 이로 인해 잘못된 길이 값이 암호화 처리 과정에 전달되어 네트워크 버퍼 범위를 벗어난 읽기 및 쓰기가 발생하며, 메모리 오염 및 서비스 거부(DoS)를 유발할 수 있습니다.
💡 쉬운 설명
데이터의 길이를 계산할 때 숫자가 너무 작아져서 엉뚱하게 큰 숫자로 변하는 오류가 있습니다. 이 오류를 이용해 공격자가 특수하게 만든 짧은 데이터를 보내면 시스템의 메모리가 망가져 장치가 멈출 수 있습니다.
🇺🇸 원문 (English)
ieee802154_decipher_data_frame() in subsys/net/l2/ieee802154/ieee802154_frame.c computed payload_len = net_pkt_get_len(pkt) - ll_hdr_len - authtag_len without first checking that the received frame is at least ll_hdr_len + authtag_len bytes long. All three variables are uint8_t, so a frame whose payload is shorter than the configured authentication tag makes the subtraction wrap around to a large value (up to 255).
The wrapped length is passed unchanged to ieee802154_decrypt_auth() and on to the CCM operation as cipher_pkt.in_len/out_buf_max, with apkt->tag pointing at frame + ll_hdr_len + payload_len. Because the receive buffer is allocated to the exact length of the frame received from the radio driver, the crypto layer then reads several hundred bytes past the end of the packet buffer and writes the same number of decrypted bytes back over it in place. The frame's authentication tag is only verified after this processing has taken place, so no key material, association or prior authentication is needed — a single crafted short frame from any device in radio range is sufficient. Frame validation in ieee802154_validate_frame() does not prevent it: a data frame is accepted with a one-byte payload.
The result is an out-of-bounds read and an out-of-bounds write of up to roughly 240 bytes into the adjacent network-buffer pool, corrupting other packets or allocator metadata and typically faulting the target. The out-of-bounds content is not attacker-chosen (it is ciphertext XOR keystream over out-of-bounds memory) and the frame is dropped when tag verification fails, so the primary impact is memory corruption and denial of service rather than information disclosure.
Exposure is limited to configurations that enable the experimental CONFIG_NET_L2_IEEE802154_SECURITY option, select a crypto device via CONFIG_NET_L2_IEEE802154_SECURITY_CRYPTO_DEV_NAME, and have established a security session with a level other than IEEE802154_SECURITY_LEVEL_NONE; with security disabled or at level NONE the tag length is zero and no underflow occurs. The fix rejects frames shorter than ll_hdr_len + authtag_len before the subtraction, and adds the matching guard on the transmit side in ieee802154_create_data_frame().
📍 영향받는 시스템
CONFIG_NET_L2_IEEE802154_SECURITY 옵션이 활성화되고 보안 세션이 설정된 IEEE 802.15.4 스택 환경
⚔️ 공격 벡터
무선 범위 내에서 인증 태그 길이보다 짧게 조작된 데이터 프레임을 전송
🛡️ 대응 방법
프레임 길이를 계산하기 전 ll_hdr_len + authtag_len보다 작은지 확인하는 검증 로직을 적용하고 송신 측에도 동일한 가드 로직 추가
🔧 검증 코드
명령어 결과에 해당 설정이 포함되어 있다면 취약한 보안 옵션이 활성화된 상태이므로 주의가 필요합니다.
grep -E 'CONFIG_NET_L2_IEEE802154_SECURITY=y' /config/defconfig 2>/dev/null
📊 CVSS Vector String
CVSS:3.1/AV:A/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H
💻 영향받는 소프트웨어
Windows iSCSI Target Service