PT-2025-44108 · Linux+3 · Linux Kernel+3

Published

2025-10-07

·

Updated

2026-05-07

·

CVE-2025-40040

CVSS v2.0

6.0

Medium

VectorAV:L/AC:H/Au:S/C:C/I:C/A:C
Name of the Vulnerable Software and Affected Versions Linux kernel versions prior to 6.16.0-rc6
Description The Linux kernel contains a flaw in the ksm madvise function related to how flags are handled during MADV UNMEARGEABLE operations on memory regions registered for userfaultfd (UFFD) in MINOR mode. Specifically, the issue arises from a type mismatch when applying the VM MERGEABLE flag, leading to the unintentional clearing of flags in the upper 32 bits of vm flags. This inconsistency can cause kernel panics or warnings during userfaultfd release all(), indicating a UFFD inconsistency. The root cause is that the VM MERGEABLE constant is defined as an unsigned int, which, when negated and promoted to an unsigned long, results in an incorrect bitmask for the AND operation. This issue affects only the VM MERGEABLE flag, as other VM * flags are not susceptible to this behavior due to their bit patterns after negation.
Recommendations Update to Linux kernel version 6.16.0-rc6 or later.

Exploit

Fix

Improper Resource Release

Weakness Enumeration

Related Identifiers

AZL-68870
AZL-78386
BDU:2026-02395
CVE-2025-40040
DLA-4379-1
DSA-6053-1
ECHO-2205-68D6-8173
MGASA-2025-0309
MGASA-2025-0310
OPENSUSE-SU-2025:15702-1
OPENSUSE-SU-2025:20091-1
OPENSUSE-SU-2026:10301-1
SUSE-SU-2025:21080-1
SUSE-SU-2025:21147-1
SUSE-SU-2025:21180-1
SUSE-SU-2025:4393-1
SUSE-SU-2025:4422-1
SUSE-SU-2025:4505-1
SUSE-SU-2025:4506-1
SUSE-SU-2025:4515-1
SUSE-SU-2025:4516-1
SUSE-SU-2025:4517-1
SUSE-SU-2025:4521-1
SUSE-SU-2025:4530-1
SUSE-SU-2026:0029-1
SUSE-SU-2026:0032-1
SUSE-SU-2026:0033-1
SUSE-SU-2026:0034-1
SUSE-SU-2026:20039-1
SUSE-SU-2026:20059-1
SUSE-SU-2026:20473-1
SUSE-SU-2026:20496-1
USN-8029-1
USN-8029-2
USN-8029-3
USN-8030-1
USN-8048-1
USN-8096-1
USN-8096-2
USN-8096-3
USN-8096-4
USN-8096-5
USN-8116-1
USN-8141-1
USN-8163-1
USN-8163-2
USN-8243-1

Affected Products

Linuxmint
Linux Kernel
Suse
Ubuntu