# CVE-2022-41972: Contiki-NG contains NULL Pointer Dereference in BLE L2CAP module

> An attacker can cause a denial of service in Contiki-NG IoT devices by sending a malicious Bluetooth Low Energy packet that triggers a NULL pointer dereference.

- **Severity:** Low 2.9 (`CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Local or same network only
- **Victim action needed:** Not needed
- **Fix available:** No
- **Published:** 16 Dec 2022
- **Updated:** 17 Apr 2025
- **Also known as:** GHSA-24xp-g5gf-6vvm

## What is CVE-2022-41972?

CVE-2022-41972 is a low-severity vulnerability in contiki-ng, published on 16 Dec 2022. It can only be exploited from the same machine or local network, with no action from the victim.

### Official description

Contiki-NG is an open-source, cross-platform operating system for Next-Generation IoT devices. Versions prior to 4.9 contain a NULL Pointer Dereference in BLE L2CAP module. The Contiki-NG operating system for IoT devices contains a Bluetooth Low Energy stack. An attacker can inject a packet in this stack, which causes the implementation to dereference a NULL pointer and triggers undefined behavior. More specifically, while processing the L2CAP protocol, the implementation maps an incoming channel ID to its metadata structure. In this structure, state information regarding credits is managed through calls to the function input_l2cap_credit in the module os/net/mac/ble/ble-l2cap.c. Unfortunately, the input_l2cap_credit function does not check that the metadata corresponding to the user-supplied channel ID actually exists, which can lead to the channel variable being set to NULL before a pointer dereferencing operation is performed. The vulnerability has been patched in the "develop" branch of Contiki-NG, and will be included in release 4.9. Users can apply the patch in Contiki-NG pull request #2253 as a workaround until the new package is released.

Weakness: CWE-476 (NULL Pointer Dereference)

## Which versions are affected by CVE-2022-41972?

It affects 1 product.


Products: Contiki-Ng Contiki-Ng.

## How do I fix CVE-2022-41972?

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

## Is CVE-2022-41972 being exploited?

There is no known exploitation of CVE-2022-41972 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-2022-41972 and fix it if it is affected.

What it is: CVE-2022-41972 is a low-severity vulnerability in contiki-ng, published on 16 Dec 2022. It can only be exploited from the same machine or local network, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2022-41972 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-2022-41972/ (Markdown: https://insights.sbomify.com/CVE-2022-41972/index.md)
```

## Sources

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

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