# CVE-2024-36028: mm/hugetlb: fix DEBUG\_LOCKS\_WARN\_ON(1) when dissolve\_free\_hugetlb\_folio()

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** MEDIUM 4.7
- **CVSS:** 4.7 (v3.1, NVD) `CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: High; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: None; Integrity impact: None; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.22% (percentile 7, 2026-11-26)
- **CWE:** CWE-362
- **Published:** 2024-05-30T15:19:42.538Z
- **Modified:** 2026-06-17T07:35:59.233Z

## Who should check

- Anyone running Linux \>= 1b4ce2952b4f33e198d5e993acff0611dff1e399, \< 2effe407f7563add41750fd7e03da4ea44b98099; \>= 32c877191e022b55fe3a374f3d7e9fb5741c514d, \< 7e0a322877416e8c648819a8e441cf8c790b2cce; \>= 32c877191e022b55fe3a374f3d7e9fb5741c514d, \< 9c9b32d46afab2d911897914181c488954012300; \>= 32c877191e022b55fe3a374f3d7e9fb5741c514d, \< 52ccdde16b6540abe43b6f8d8e1e1ec90b0983af; 9a1a43a0e7e96911eaa00ad20b20f2edefb31d8a; \>= 6.1.47, \< 6.1.91; \>= 6.4.11, \< 6.5
- Anyone running Linux 6.5

## Description

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

mm/hugetlb: fix DEBUG\_LOCKS\_WARN\_ON(1) when dissolve\_free\_hugetlb\_folio()

When I did memory failure tests recently, below warning occurs:

DEBUG\_LOCKS\_WARN\_ON(1)
WARNING: CPU: 8 PID: 1011 at kernel/locking/lockdep.c:232 \_\_lock\_acquire+0xccb/0x1ca0
Modules linked in: mce\_inject hwpoison\_inject
CPU: 8 PID: 1011 Comm: bash Kdump: loaded Not tainted 6.9.0-rc3-next-20240410-00012-gdb69f219f4be \#3
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.14.0-0-g155821a1990b-prebuilt.qemu.org 04/01/2014
RIP: 0010:\_\_lock\_acquire+0xccb/0x1ca0
RSP: 0018:ffffa7a1c7fe3bd0 EFLAGS: 00000082
RAX: 0000000000000000 RBX: eb851eb853975fcf RCX: ffffa1ce5fc1c9c8
RDX: 00000000ffffffd8 RSI: 0000000000000027 RDI: ffffa1ce5fc1c9c0
RBP: ffffa1c6865d3280 R08: ffffffffb0f570a8 R09: 0000000000009ffb
R10: 0000000000000286 R11: ffffffffb0f2ad50 R12: ffffa1c6865d3d10
R13: ffffa1c6865d3c70 R14: 0000000000000000 R15: 0000000000000004
FS:  00007ff9f32aa740(0000) GS:ffffa1ce5fc00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007ff9f3134ba0 CR3: 00000008484e4000 CR4: 00000000000006f0
Call Trace:
 \<TASK\>
 lock\_acquire+0xbe/0x2d0
 \_raw\_spin\_lock\_irqsave+0x3a/0x60
 hugepage\_subpool\_put\_pages.part.0+0xe/0xc0
 free\_huge\_folio+0x253/0x3f0
 dissolve\_free\_huge\_page+0x147/0x210
 \_\_page\_handle\_poison+0x9/0x70
 memory\_failure+0x4e6/0x8c0
 hard\_offline\_page\_store+0x55/0xa0
 kernfs\_fop\_write\_iter+0x12c/0x1d0
 vfs\_write+0x380/0x540
 ksys\_write+0x64/0xe0
 do\_syscall\_64+0xbc/0x1d0
 entry\_SYSCALL\_64\_after\_hwframe+0x77/0x7f
RIP: 0033:0x7ff9f3114887
RSP: 002b:00007ffecbacb458 EFLAGS: 00000246 ORIG\_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 000000000000000c RCX: 00007ff9f3114887
RDX: 000000000000000c RSI: 0000564494164e10 RDI: 0000000000000001
RBP: 0000564494164e10 R08: 00007ff9f31d1460 R09: 000000007fffffff
R10: 0000000000000000 R11: 0000000000000246 R12: 000000000000000c
R13: 00007ff9f321b780 R14: 00007ff9f3217600 R15: 00007ff9f3216a00
 \</TASK\>
Kernel panic - not syncing: kernel: panic\_on\_warn set ...
CPU: 8 PID: 1011 Comm: bash Kdump: loaded Not tainted 6.9.0-rc3-next-20240410-00012-gdb69f219f4be \#3
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.14.0-0-g155821a1990b-prebuilt.qemu.org 04/01/2014
Call Trace:
 \<TASK\>
 panic+0x326/0x350
 check\_panic\_on\_warn+0x4f/0x50
 \_\_warn+0x98/0x190
 report\_bug+0x18e/0x1a0
 handle\_bug+0x3d/0x70
 exc\_invalid\_op+0x18/0x70
 asm\_exc\_invalid\_op+0x1a/0x20
RIP: 0010:\_\_lock\_acquire+0xccb/0x1ca0
RSP: 0018:ffffa7a1c7fe3bd0 EFLAGS: 00000082
RAX: 0000000000000000 RBX: eb851eb853975fcf RCX: ffffa1ce5fc1c9c8
RDX: 00000000ffffffd8 RSI: 0000000000000027 RDI: ffffa1ce5fc1c9c0
RBP: ffffa1c6865d3280 R08: ffffffffb0f570a8 R09: 0000000000009ffb
R10: 0000000000000286 R11: ffffffffb0f2ad50 R12: ffffa1c6865d3d10
R13: ffffa1c6865d3c70 R14: 0000000000000000 R15: 0000000000000004
 lock\_acquire+0xbe/0x2d0
 \_raw\_spin\_lock\_irqsave+0x3a/0x60
 hugepage\_subpool\_put\_pages.part.0+0xe/0xc0
 free\_huge\_folio+0x253/0x3f0
 dissolve\_free\_huge\_page+0x147/0x210
 \_\_page\_handle\_poison+0x9/0x70
 memory\_failure+0x4e6/0x8c0
 hard\_offline\_page\_store+0x55/0xa0
 kernfs\_fop\_write\_iter+0x12c/0x1d0
 vfs\_write+0x380/0x540
 ksys\_write+0x64/0xe0
 do\_syscall\_64+0xbc/0x1d0
 entry\_SYSCALL\_64\_after\_hwframe+0x77/0x7f
RIP: 0033:0x7ff9f3114887
RSP: 002b:00007ffecbacb458 EFLAGS: 00000246 ORIG\_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 000000000000000c RCX: 00007ff9f3114887
RDX: 000000000000000c RSI: 0000564494164e10 RDI: 0000000000000001
RBP: 0000564494164e10 R08: 00007ff9f31d1460 R09: 000000007fffffff
R10: 0000000000000000 R11: 0000000000000246 R12: 000000000000000c
R13: 00007ff9f321b780 R14: 00007ff9f3217600 R15: 00007ff9f3216a00
 \</TASK\>

After git bisecting and digging into the code, I believe the root cause is
that \_deferred\_list field of folio is unioned with \_hugetlb\_subpool field.
In \_\_update\_and\_free\_hugetlb\_folio(), folio-\>\_deferred\_
---truncated---

## Affected and fixed versions

- Linux: \>= 1b4ce2952b4f33e198d5e993acff0611dff1e399, \< 2effe407f7563add41750fd7e03da4ea44b98099; \>= 32c877191e022b55fe3a374f3d7e9fb5741c514d, \< 7e0a322877416e8c648819a8e441cf8c790b2cce; \>= 32c877191e022b55fe3a374f3d7e9fb5741c514d, \< 9c9b32d46afab2d911897914181c488954012300; \>= 32c877191e022b55fe3a374f3d7e9fb5741c514d, \< 52ccdde16b6540abe43b6f8d8e1e1ec90b0983af; 9a1a43a0e7e96911eaa00ad20b20f2edefb31d8a; \>= 6.1.47, \< 6.1.91; \>= 6.4.11, \< 6.5 (cvelist)
- Linux: 6.5 (cvelist)

## Mitigation

- Upgrade Linux to 6.5 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2024-36028. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2024-36028.md
Affected: Linux >= 1b4ce2952b4f33e198d5e993acff0611dff1e399, < 2effe407f7563add41750fd7e03da4ea44b98099; >= 32c877191e022b55fe3a374f3d7e9fb5741c514d, < 7e0a322877416e8c648819a8e441cf8c790b2cce; >= 32c877191e022b55fe3a374f3d7e9fb5741c514d, < 9c9b32d46afab2d911897914181c488954012300; >= 32c877191e022b55fe3a374…
Fixed in: Linux 2effe407f7563add41750fd7e03da4ea44b98099, Linux 7e0a322877416e8c648819a8e441cf8c790b2cce, Linux 9c9b32d46afab2d911897914181c488954012300, Linux 52ccdde16b6540abe43b6f8d8e1e1ec90b0983af, Linux 6.1.91, Linux 6.5

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2024-36028 being exploited?

There is no confirmed exploitation: CVE-2024-36028 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.22% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2024-36028?

Medium: CVSS 4.7 (v3.1, scored by NVD). Not remotely exploitable (local or adjacent access needed). The attack needs conditions outside the attacker's control, which makes it harder.

### Which versions are affected by CVE-2024-36028?

Linux \>= 1b4ce2952b4f33e198d5e993acff0611dff1e399, \< 2effe407f7563add41750fd7e03da4ea44b98099; \>= 32c877191e022b55fe3a374f3d7e9fb5741c514d, \< 7e0a322877416e8c648819a8e441cf8c790b2cce; \>= 32c877191e022b55fe3a374f3d7e9fb5741c514d, \< 9c9b32d46afab2d911897914181c488954012300; \>= 32c877191e022b55fe3a374f3d7e9fb5741c514d, \< 52ccdde16b6540abe43b6f8d8e1e1ec90b0983af; 9a1a43a0e7e96911eaa00ad20b20f2edefb31d8a; \>= 6.1.47, \< 6.1.91; \>= 6.4.11, \< 6.5; Linux 6.5.

### Is there a fix for CVE-2024-36028?

Yes. Fixed in Linux 2effe407f7563add41750fd7e03da4ea44b98099, Linux 7e0a322877416e8c648819a8e441cf8c790b2cce, Linux 9c9b32d46afab2d911897914181c488954012300, Linux 52ccdde16b6540abe43b6f8d8e1e1ec90b0983af, Linux 6.1.91, Linux 6.5. Upgrade Linux to 6.5 or later.

### How do I check if I'm affected by CVE-2024-36028?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- patch: <https://git.kernel.org/stable/c/2effe407f7563add41750fd7e03da4ea44b98099>
- patch: <https://git.kernel.org/stable/c/7e0a322877416e8c648819a8e441cf8c790b2cce>
- patch: <https://git.kernel.org/stable/c/9c9b32d46afab2d911897914181c488954012300>
- patch: <https://git.kernel.org/stable/c/52ccdde16b6540abe43b6f8d8e1e1ec90b0983af>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2024-36028>

HTML: <https://flawdb.com/CVE-2024-36028> · JSON: <https://flawdb.com/api/v1/entries/CVE-2024-36028>
