# CVE-2020-15137: Integer overflow in HoRNDIS

> A malicious USB device can trigger an integer overflow in HoRNDIS, leading to kernel memory disclosure or system crashes on macOS hosts.

- **Severity:** Medium 5.5 (`CVSS:3.1/AV:P/AC:H/PR:L/UI:R/S:U/C:H/I:N/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Local or same network only
- **Victim action needed:** A user has to click or open something
- **Fix available:** No
- **Published:** 12 Aug 2020
- **Updated:** 4 Aug 2024

## What is CVE-2020-15137?

CVE-2020-15137 is a medium-severity vulnerability in jwise HoRNDIS, published on 12 Aug 2020. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.

### Official description

All versions of HoRNDIS are affected by an integer overflow in the RNDIS packet parsing routines. A malicious USB device can trigger disclosure of unrelated kernel memory to userspace applications on the host, or can cause the kernel to crash. Kernel memory disclosure is especially likely on 32-bit kernels; 64-bit kernels are more likely to crash on attempted exploitation. It is not believed that kernel memory corruption is possible, or that unattended kernel memory disclosure without the collaboration of a userspace program running on the host is possible. The vulnerability is in `HoRNDIS::receivePacket`. `msg_len`, `data_ofs`, and `data_len` can be controlled by an attached USB device, and a negative value of `data_ofs` can bypass the check for `(data_ofs + data_len + 8) > msg_len`, and subsequently can cause a wild pointer copy in the `mbuf_copyback` call. The software is not maintained and no patches are planned. Users of multi-tenant systems with HoRNDIS installed should only connect trusted USB devices to their system.

Weakness: CWE-190 (Integer Overflow or Wraparound)

## Which versions are affected by CVE-2020-15137?

It affects 1 product.


Products: Horndis Project Horndis.

## How do I fix CVE-2020-15137?

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

## Is CVE-2020-15137 being exploited?

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

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2020-15137 and fix it if it is affected.

What it is: CVE-2020-15137 is a medium-severity vulnerability in jwise HoRNDIS, published on 12 Aug 2020. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.
Exploitation: There is no known exploitation of CVE-2020-15137 in the wild and no public exploit code.

Affected product: jwise HoRNDIS. 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-2020-15137/ (Markdown: https://insights.sbomify.com/CVE-2020-15137/index.md)
```

## Sources

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

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