Nest Labs Openweave Weave DecodeMessageWithLength Information Disclosure Vulnerability
An integer overflow in the Weave message length parsing allows a specially crafted packet to bypass a length check, causing the packet buffer to reuse leftover data from previous packets. An attacker could read sensitive information from previously sent packets, including encrypted data.
Originally disclosed on Cisco Talos
An exploitable information disclosure vulnerability exists in the Weave MessageLayer parsing of Openweave-core version 4.0.2 and Nest Cam IQ Indoor version 4620002. A specially crafted weave packet can cause an integer overflow to occur, resulting in PacketBuffer data reuse.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the integer overflow occurs because the message length plus 2 is stored in a 16-bit variable, allowing a wrap-around that bypasses the buffer length check.
Impact
An attacker could read leftover data from previous packets, including encrypted messages such as Fabric Configurations or Network Configurations, and could potentially end encrypted sessions by replaying packets with a modified Message_ID.
What the attacker needed
Network access to the device; ability to send crafted Weave packets
How it was found
- Craft a Weave packet with a message length field set to a value that causes an overflow when 2 is added.
- Send the packet over TCP to the vulnerable device.
- The overflow bypasses the length check and sets the buffer length to the maximum remaining size.
- Send an Echo Request message to read back the leftover data from the buffer.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
When a message arrives, the code reads a length value and adds 2 to it. If that value is very large, the addition wraps around to a small number, so a check that the buffer is big enough passes. The code then sets the buffer length to a huge value, but the system caps it to the remaining space, which may contain old data from other messages. This lets an attacker see data that was left in memory from earlier packets.
What is Info disclosure?
Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.