# CVE-2023-29001: Uncontrolled recursion due to insufficient validation of the IPv6 source routing header in Contiki-NG

> Attackers can cause a stack overflow and denial of service in Contiki-NG IoT devices by sending crafted IPv6 packets with invalid source routing headers.

- **Severity:** High 8.7 (`CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** No
- **Published:** 27 Nov 2024
- **Updated:** 27 Nov 2024
- **Also known as:** GHSA-7p75-mf53-ffwm

## What is CVE-2023-29001?

CVE-2023-29001 is a high-severity denial of service vulnerability in contiki-ng, published on 27 Nov 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

Contiki-NG is an open-source, cross-platform operating system for IoT devices. The Contiki-NG operating system processes source routing headers (SRH) in its two alternative RPL protocol implementations. The IPv6 implementation uses the results of this processing to determine whether an incoming packet should be forwarded to another host. Because of missing validation of the resulting next-hop address, an uncontrolled recursion may occur in the tcpip_ipv6_output function in the os/net/ipv6/tcpip.c module when receiving a packet with a next-hop address that is a local address. Attackers that have the possibility to send IPv6 packets to the Contiki-NG host can therefore trigger deeply nested recursive calls, which can cause a stack overflow. The vulnerability has not been patched in the current release of Contiki-NG, but is expected to be patched in the next release. The problem can be fixed by applying the patch in Contiki-NG pull request #2264. Users are advised to either apply the patch manually or to wait for the next release. There are no known workarounds for this vulnerability.

Weakness: CWE-674 (Uncontrolled Recursion)

## Which versions are affected by CVE-2023-29001?

It affects 1 product.


Products: Contiki-Ng Contiki-Ng.

## How do I fix CVE-2023-29001?

No fix has been published for CVE-2023-29001 yet. Limit exposure of the affected software until one is available.

## Is CVE-2023-29001 being exploited?

There is no known exploitation of CVE-2023-29001 in the wild and no public exploit code.

## Other vulnerabilities in contiki-ng

- [CVE-2018-19417](https://insights.sbomify.com/CVE-2018-19417/): Memory corruption in n/a (critical 10.0)
- [CVE-2023-30546](https://insights.sbomify.com/CVE-2023-30546/): Contiki-NG has off-by-one error in Antelope DBMS (critical 9.8)
- [CVE-2020-24336](https://insights.sbomify.com/CVE-2020-24336/): Memory corruption in n/a (critical 9.8)
- [CVE-2020-14934](https://insights.sbomify.com/CVE-2020-14934/): Memory corruption in n/a (critical 9.8)
- [CVE-2020-14935](https://insights.sbomify.com/CVE-2020-14935/): Memory corruption in n/a (critical 9.8)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2023-29001 and fix it if it is affected.

What it is: CVE-2023-29001 is a high-severity denial of service vulnerability in contiki-ng, published on 27 Nov 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2023-29001 in the wild and no public exploit code.

Affected product: contiki-ng. No package-level version data is available, so check the vendor advisory linked from the reference page.

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2023-29001/ (Markdown: https://insights.sbomify.com/CVE-2023-29001/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2023-29001
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2023-29001
- OSV: https://osv.dev/vulnerability/CVE-2023-29001

---
From sbomify Insights: https://insights.sbomify.com/CVE-2023-29001/
Summaries are generated and may contain mistakes; the official description above is the record.
