Skip to content

Out-of-bounds write when decompressing 6LoWPAN payload

Moderate
joakimeriksson published GHSA-c36p-vhwg-244c Aug 29, 2022

Package

No package listed

Affected versions

< 4.8

Patched versions

4.8

Description

Impact

The 6LoWPAN implementation in the Contiki-NG operating system (file os/net/ipv6/sicslowpan.c) contains an input function that processes incoming packets and copies them into a packet buffer. Because of a missing length check in the input function, it is possible to write outside the packet buffer's boundary.

The vulnerability can be exploited by anyone who has the possibility to send 6LoWPAN packets to a Contiki-NG system. In particular, the vulnerability is exposed when sending either of two types of 6LoWPAN packets: an unfragmented packet or the first fragment of a fragmented packet. If the packet is sufficiently large, a subsequent memory copy will cause an out-of-bounds write with data supplied by the attacker.

Patches

The problem has been patched in Contiki-NG version 4.8.

Workarounds

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

For more information

If you have any questions or comments about this advisory:

Severity

Moderate

CVE ID

CVE-2022-36054

Weaknesses