🔍 CVE-2026-5857

8.1
CVSS Score
HIGH
2026-08-06
2026-09-24 20:06
✅ 완료

🇰🇷 한글 설명

Contiki-NG의 MQTT 클라이언트에서 토픽 길이 검증 로직의 결함으로 인해 발생하는 버퍼 오버플로 취약점입니다. 잘못된 상태 플래그 유지로 인해 검증되지 않은 길이 값이 memcpy()에 사용되어 인접한 구조체 필드를 덮어쓸 수 있습니다. 이를 통해 공격자는 임의 포인터 쓰기를 수행하여 원격 코드 실행(RCE)이나 서비스 거부(DoS)를 유발할 수 있습니다.

💡 쉬운 설명

MQTT 통신 중 메시지 제목(토픽)의 길이를 확인하는 과정에서 실수가 발생하여, 너무 긴 제목을 보내면 시스템의 중요한 메모리 영역을 망가뜨릴 수 있습니다. 이를 통해 해커가 기기를 조종하거나 시스템을 멈추게 만들 수 있습니다.

🇺🇸 원문 (English)

Contiki-NG's MQTT client parse_publish_vhdr() in os/net/app-layer/mqtt/mqtt.c sets topic_len_received=1 before checking topic_len against the 64-byte limit, so an over-length topic returns early but leaves the flag set. On the next TCP segment, tcp_input() re-invokes the parser with topic_received==0, and the persisted topic_len_received==1 skips the length-reading block containing the guard, falling through directly to a memcpy() that uses the unvalidated 16-bit topic_len as the copy length. The 65-byte topic[] destination overruns into adjacent struct fields including the payload_chunk pointer, which subsequent MQTT code dereferences, giving a compromised or attacker-controlled broker an arbitrary-pointer-write primitive. Contiki-NG's MQTT implementation has no TLS support so the connection is plaintext. Impact ranges from information disclosure and denial of service to remote code execution on embedded targets without memory protection.

📍 영향받는 시스템

Contiki-NG MQTT client (os/net/app-layer/mqtt/mqtt.c 포함 버전)

⚔️ 공격 벡터

조작된 길이 값을 가진 MQTT PUBLISH 패킷을 전송하여 메모리 오버플로 유발

🛡️ 대응 방법

Contiki-NG를 최신 보안 패치가 적용된 버전으로 업데이트하거나, MQTT 토픽 길이에 대한 엄격한 검증 로직을 적용해야 합니다.

🔧 검증 코드

해당 소스 코드 파일 내에 취약한 함수인 parse_publish_vhdr()가 존재하는지 확인합니다.

Shell / Script
grep -r "parse_publish_vhdr" os/net/app-layer/mqtt/mqtt.c

📊 CVSS Vector String

CVSS Vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H

💻 영향받는 소프트웨어

Storage Protect Client