Cloudanix VulnDB

CVE-2024-8946

High · 7.5

CVSS

7.5

EPSS

1.0%

Published

Sep 17, 2024

CISA due date

—

Cloudanix analysis

Monitor only SSVC: Track

A bug in MicroPython lets remote attackers crash or potentially control devices by sending bad commands when removing a file system.

Exploitation
Remote Unauthenticated
Attacker needs
None
Complexity
Low
Impact
Data Exposure
Component
Library
Class
Buffer Overflow
Remediation
Patch
Effort
Low
Patch risk
Low

What it actually does

Heap-based buffer overflow read in mp_vfs_umount within extmod/vfs.c triggered when the mounted path comparison relies solely on the length of the unmount string.

Why it matters to the business

Remote attackers may crash or compromise MicroPython devices used in embedded and IoT environments, causing operational downtime and potential unauthorized access to connected systems.

How an attack unfolds

An attacker sends a crafted remote unmount request to the VFS handler; the length-only string comparison permits reading past the heap buffer boundary, enabling crash or further exploitation.

How to fix it

Apply the patch identified by commit 29943546343c92334e8518695a11fc0e2ceea68b or upgrade micropython/micropython to the fixed revision.

How to confirm the fix worked

Confirm the patch commit is present in the vfs.c source and verify that unmount operations complete without buffer overruns or crashes.

Typical attack path

  1. Locate exposed MicroPython instance with VFS enabled
  2. Send crafted unmount request matching only the length of a valid mount path
  3. Trigger mp_vfs_umount to perform out-of-bounds heap read
  4. Convert overflow into denial of service or code execution

How to detect it

Review application logs and crash dumps for VFS unmount failures or heap-related errors in micropython processes; inspect network traffic for unusual unmount request lengths.

  • mp_vfs_umount
  • extmod/vfs.c
  • heap buffer overflow read during unmount

What your security team should do

  • Immediately apply the referenced patch to all MicroPython deployments
  • Restrict remote access to VFS interfaces until patched
  • Monitor device stability and VFS-related error logs for anomalies

The record

A vulnerability was found in MicroPython 1.23.0. It has been classified as critical. Affected is the function mp_vfs_umount of the file extmod/vfs.c of the component VFS Unmount Handler. The manipulation leads to heap-based buffer overflow. It is possible to launch the attack remotely. The exploit has been disclosed to the public and may be used. The name of the patch is 29943546343c92334e8518695a11fc0e2ceea68b. It is recommended to apply a patch to fix this issue. In the VFS unmount process, the comparison between the mounted path string and the unmount requested string is based solely on the length of the unmount string, which can lead to a heap buffer overflow read.

Affected packages

Ecosystem Package Introduced Fixed
PyPI micropython-copy 0 No fix
PyPI micropython-io 0 No fix
PyPI micropython-os-path 0 No fix
PyPI micropython-string 0 No fix
Debian:13 micropython 0 No fix
Debian:14 micropython 0 1.24.0+ds-1
Ubuntu:20.04:LTS micropython 0 No fix
Ubuntu:22.04:LTS micropython 0 No fix
Ubuntu:24.04:LTS micropython 0 No fix
Ubuntu:24.10 micropython 0 No fix
Ubuntu:Pro:20.04:LTS micropython 0 1.12-1ubuntu0.1~esm1
Ubuntu:Pro:22.04:LTS micropython 0 1.17+ds-1.1ubuntu2+esm1
Ubuntu:Pro:24.04:LTS micropython 0 1.22.1+ds-1ubuntu0.24.04.1~esm1

Related vulnerabilities