ESP-IDFのlwIPに脆弱性、DNS応答でスタックが壊され再起動や制御奪取のおそれ
Summary
ESP-IDFのlwIP DNSリゾルバーに、キャッシュされた複数のアドレスを単一の出力バッファーへ境界チェックなしで書き込む脆弱性が見つかりました。DNS応答に影響できる攻撃者により、スタックが壊されて再起動したり、制御の流れを変えられたりするおそれがあります。5.5.6と6.0.3で修正されており、5.3.7と5.4.5でも修正される予定です。5.2系は寿命が終わっており、修正版は提供されません。
AI summary
Produced by SecPulse using an external AI model; it may contain mistakes. Check the original description and references below before acting on it.
ESP-IDFのlwIP DNSリゾルバーに、キャッシュされた複数のアドレスを単一の出力バッファーへ境界チェックなしで書き込む脆弱性が見つかりました。DNS応答に影響できる攻撃者により、スタックが壊されて再起動したり、制御の流れを変えられたりするおそれがあります。5.5.6と6.0.3で修正されており、5.3.7と5.4.5でも修正される予定です。5.2系は寿命が終わっており、修正版は提供されません。
Original description The description as published by the source.
ESP-IDF is the Espressif Internet of Things (IOT) Development Framework. From 5.2.3 until 5.3.7, 5.4.5, 5.5.6, and 6.0.3, the lwIP DNS resolver's cached-lookup path in dns_lookup() in dns.c copies every cached address into a caller-provided single ip_addr_t output buffer without a length parameter or bounds check. When CONFIG_LWIP_DNS_MAX_HOST_IP is greater than 1 and a cached hostname has multiple A or AAAA records, a subsequent lookup through dns_gethostbyname() or dns_gethostbyname_addrtype() writes beyond the single-element buffer into adjacent stack memory. A network-positioned attacker who influences DNS responses can cause a reboot through stack-canary corruption or, without stack protection, overwrite stack variables with attacker-controlled address bytes and potentially redirect control flow. This issue is fixed in versions 5.5.6 and 6.0.3 and is scheduled to be fixed in versions 5.3.7 and 5.4.5. No fixed release is available for the end-of-life 5.2 line.
Source: CVE.org (CVE Program・cvelistV5) NVD GitHub Advisory
References
- advisory github.com
- advisory github.com
- advisory nvd.nist.gov
- patch github.com
- patch github.com
- patch github.com
- patch github.com
- patch github.com
- patch github.com