Skip to content

Out-of-bounds read in the uIP buffer module

Moderate
joakimeriksson published GHSA-2j9c-7754-w4cw Aug 29, 2022

Package

No package listed

Affected versions

< 4.8

Patched versions

4.8

Description

Impact

The low-power IPv6 network stack of Contiki-NG has a buffer module (os/net/ipv6/uipbuf.c) that processes IPv6 extension headers in incoming data packets. As part of this processing, the function uipbuf_get_next_header casts a pointer to a uip_ext_hdr structure into the packet buffer at different offsets where extension headers are expected to be found, and then reads from this structure.

Because of a lack of bounds checking, the casting can be done so that the structure extends beyond the packet's end. Hence, with a carefully crafted packet, it is possible to cause the Contiki-NG system to read data outside the packet buffer.

Patches

A patch that fixes the vulnerability is included in Contiki-NG 4.8.

Workarounds

The problem can be fixed by applying the patch in Contiki-NG pull request #1648 on GitHub.

For more information

If you have any questions or comments about this advisory:

Severity

Moderate

CVE ID

CVE-2022-36053

Weaknesses