CVE-2025-40294 Bluetooth: MGMT: Fix OOB access in parse_adv_monitor_pattern()

Not scored Published Updated

A local attacker with low privileges can trigger an out-of-bounds write in the Linux kernel Bluetooth subsystem, potentially leading to code execution or privilege escalation.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Local or same network only
Victim action needed
Not needed
Fix
Available

What is CVE-2025-40294?

CVE-2025-40294 is a memory corruption vulnerability in Linux, published on 8 Dec 2025. It can only be exploited from the same machine or local network, with no action from the victim.

Official description

In the Linux kernel, the following vulnerability has been resolved:

Bluetooth: MGMT: Fix OOB access in parse_adv_monitor_pattern()

In the parse_adv_monitor_pattern() function, the value of the 'length' variable is currently limited to HCI_MAX_EXT_AD_LENGTH(251). The size of the 'value' array in the mgmt_adv_pattern structure is 31. If the value of 'pattern[i].length' is set in the user space and exceeds 31, the 'patterns[i].value' array can be accessed out of bound when copied.

Increasing the size of the 'value' array in the 'mgmt_adv_pattern' structure will break the userspace. Considering this, and to avoid OOB access revert the limits for 'offset' and 'length' back to the value of HCI_MAX_AD_LENGTH.

Found by InfoTeCS on behalf of Linux Verification Center (linuxtesting.org) with SVACE.

Which versions are affected by CVE-2025-40294?

How do I fix CVE-2025-40294?

Apply the vendor's patch.

Upgrade to the fixed version. Memory-safe languages, compiler hardening and fuzzing prevent most new cases. More about Memory corruption.

Is CVE-2025-40294 being exploited?

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

Sources

Also known as BELL-CVE-2025-40294, DEBIAN-CVE-2025-40294, GHSA-23g6-rffg-7f3p, ROOT-OS-DEBIAN-12-CVE-2025-40294, ROOT-OS-DEBIAN-13-CVE-2025-40294, ROOT-OS-UBUNTU-2404-CVE-2025-40294 and 1 more.

Is CVE-2025-40294 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free