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 products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| Linux | Linux | 6.1.47 – < 6.1.91, 6.4.11 – < 6.5, 6.5 | 6.1.91 |
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 14 | linux | 6.8.9-1 | — |
| Debian 13 | linux | 6.8.9-1 | — |
| Debian 12 | linux | 6.1.94-1 | — |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 24.04 LTS | linux | 6.8.0-40.40 | USN-6949-1 |
| Ubuntu 24.04 LTS | linux-aws | 6.8.0-1013.14 | USN-6949-1 |
| Ubuntu 24.04 LTS | linux-azure | 6.8.0-1012.14 | USN-6952-2 |
| Ubuntu 24.04 LTS | linux-gcp | 6.8.0-1012.13 | USN-6949-1 |
| Ubuntu 24.04 LTS | linux-gke | 6.8.0-1008.11 | USN-6949-1 |
| Ubuntu 24.04 LTS | linux-ibm +2 | 6.8.0-1010.10 | USN-6955-1, USN-6952-1, USN-6949-1 |
| Ubuntu 24.04 LTS | linux-nvidia | 6.8.0-1011.11 | USN-6949-1 |
| Ubuntu 24.04 LTS | linux-nvidia-lowlatency | 6.8.0-1011.11.1 | USN-6952-1 |
| Ubuntu 24.04 LTS | linux-raspi | 6.8.0-1009.10 | USN-6949-2 |
| Ubuntu 24.04 LTS | linux-riscv +1 | 6.8.0-40.40.1 | USN-6949-2 |
| Ubuntu 22.04 LTS | linux-aws-6.8 | 6.8.0-1013.14~22.04.1 | — |
| Ubuntu 22.04 LTS | linux-azure-6.8 | 6.8.0-1012.14~22.04.1 | — |
| Ubuntu 22.04 LTS | linux-gcp-6.8 | 6.8.0-1012.13~22.04.1 | — |
| Ubuntu 22.04 LTS | linux-hwe-6.8 | 6.8.0-40.40~22.04.3 | — |
| Ubuntu 22.04 LTS | linux-nvidia-6.8 | 6.8.0-1011.11~22.04.1 | USN-6949-1 |
| Ubuntu 22.04 LTS | linux-oracle-6.8 | 6.8.0-1010.10~22.04.1 | — |
| Ubuntu 22.04 LTS | linux-riscv +32 | No fix yet | — |
| Ubuntu 22.04 LTS | linux-riscv-6.8 +1 | 6.8.0-40.40.1~22.04.1 | — |
| Ubuntu 20.04 LTS | linux-gke +26 | No fix yet | — |
| Ubuntu 18.04 LTS | linux-gcp +13 | No fix yet | — |
| Ubuntu 16.04 LTS | linux-hwe-edge | No fix yet | — |
Show 1 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu Pro Realtime 24.04 LTS | linux-raspi-realtime | 6.8.0-2008.8 | — |
| Ubuntu Pro Realtime 24.04 LTS | linux-realtime | 6.8.1-1006.6 | — |
Red Hat
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| RHEL 9 | bpftool | 7.4.0-503.11.1.el9_5 | RHSA-2024:9315 |
| RHEL 9 | rv +67 | 5.14.0-503.11.1.el9_5 | RHSA-2024:9315 |
SUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| SLES 15 SP7 | kernel-64kb +5 | 6.4.0-150700.53.11.1 | SUSE-SU-2025:02997-1 |
| SLES 15 SP7 | kernel-azure +2 | 6.4.0-150700.20.11.1 | SUSE-SU-2025:03011-1 |
| SLES 15 SP7 | kernel-default-base | 6.4.0-150700.53.11.1.150700.17.9.4 | SUSE-SU-2025:02997-1 |
| SLES 15 SP7 | kernel-docs | 6.4.0-150700.53.11.3 | SUSE-SU-2025:02997-1 |
| SLES 15 SP6 | kernel-64kb +6 | 6.4.0-150600.23.65.1 | SUSE-SU-2025:02996-1 |
| SLES 15 SP6 | kernel-azure +2 | 6.4.0-150600.8.48.1 | SUSE-SU-2025:02969-1 |
| SLES 15 SP6 | kernel-coco +3 | 6.4.0-15061.28.coco15sp6.1 | SUSE-SU-2025:02923-1 |
| SLES 15 SP6 | kernel-default-base | 6.4.0-150600.23.65.1.150600.12.28.4 | SUSE-SU-2025:02996-1 |
Show 6 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| SLE Micro 6.1 | kernel-default-base | 6.4.0-32.1.21.10 | SUSE-SU-2025:20602-1 |
| SLE Micro 6.1 | kernel-rt +1 | 6.4.0-35.1 | SUSE-SU-2025:20601-1 |
| SLE Micro 6.1 | kernel-source +2 | 6.4.0-32.1 | SUSE-SU-2025:20602-1 |
| SLE Micro 6.0 | kernel-default-base | 6.4.0-32.1.21.10 | SUSE-SU-2025:20586-1 |
| SLE Micro 6.0 | kernel-rt +1 | 6.4.0-35.1 | SUSE-SU-2025:20577-1 |
| SLE Micro 6.0 | kernel-source +2 | 6.4.0-32.1 | SUSE-SU-2025:20586-1 |
| SLE Live Patching 15 SP7 | kernel-default | 6.4.0-150700.53.11.1 | SUSE-SU-2025:02997-1 |
| SLE Live Patching 15 SP7 | kernel-livepatch-SLE15-SP7-RT_Update_3 | 1-150700.1.5.1 | SUSE-SU-2025:02853-1 |
| SLE Live Patching 15 SP7 | kernel-livepatch-SLE15-SP7_Update_3 | 1-150700.15.3.4 | SUSE-SU-2025:02997-1 |
| SLE Live Patching 15 SP6 | kernel-default | 6.4.0-150600.23.65.1 | SUSE-SU-2025:02996-1 |
| SLE Live Patching 15 SP6 | kernel-livepatch-SLE15-SP6-RT_Update_14 | 1-150600.1.5.1 | SUSE-SU-2025:03023-1 |
| SLE Live Patching 15 SP6 | kernel-livepatch-SLE15-SP6_Update_14 | 1-150600.13.3.4 | SUSE-SU-2025:02996-1 |
| SUSE Real Time Module 15 SP7 | kernel-rt +2 | 6.4.0-150700.7.13.1 | SUSE-SU-2025:02853-1 |
| SUSE Real Time Module 15 SP6 | kernel-rt +3 | 6.4.0-150600.10.49.1 | SUSE-SU-2025:03023-1 |
openSUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| openSUSE Leap 15.6 | dtb-aarch64 +10 | 6.4.0-150600.23.65.1 | SUSE-SU-2025:02996-1 |
| openSUSE Leap 15.6 | kernel-azure +2 | 6.4.0-150600.8.48.1 | SUSE-SU-2025:02969-1 |
| openSUSE Leap 15.6 | kernel-default-base | 6.4.0-150600.23.65.1.150600.12.28.4 | SUSE-SU-2025:02996-1 |
| openSUSE Leap 15.6 | kernel-rt +3 | 6.4.0-150600.10.49.1 | SUSE-SU-2025:03023-1 |
Amazon Linux
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Amazon Linux 2023 | kernel-livepatch-6.1.91-99.172 | 1.0-0.amzn2023 | ALAS2023-2024-643 |
| Amazon Linux 2023 | perf +14 | 6.1.91-99.172.amzn2023 | ALAS2023-2024-643 |
Oracle Linux
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Oracle Linux 9 | bpftool | 7.4.0-503.11.1.el9_5 | ELSA-2024-9315 |
| Oracle Linux 9 | rv +28 | 5.14.0-503.11.1.el9_5 | ELSA-2024-9315 |
| Oracle Linux 8 | bpftool +13 | 5.15.0-302.167.6.el9uek | ELSA-2024-12815 |
| Oracle Linux 7 | kernel-uek +6 | 5.4.17-2136.337.5.el8uek | ELSA-2024-12813 |
| Oracle Linux 7 | perf +3 | 5.4.17-2136.337.5.el7uek | ELSA-2024-12813 |
Advisories 23
- USN-6955-1 linux-oem-6.8 vulnerabilities Ubuntu Security Notices (USN) · Oct 26, 2026
- USN-6952-2 linux-azure vulnerabilities Ubuntu Security Notices (USN) · Oct 26, 2026
- USN-6952-1 linux-nvidia-lowlatency, linux-oracle vulnerabilities Ubuntu Security Notices (USN) · Oct 26, 2026
- USN-6949-2 linux-lowlatency, linux-raspi vulnerabilities Ubuntu Security Notices (USN) · Oct 26, 2026
- USN-6949-1 linux, linux-aws, linux-gcp, linux-gke, linux-ibm, linux-nvidia, linux-nvidia-6.8 vulnerabilities Ubuntu Security Notices (USN) · Oct 26, 2026
- RHSA-2024:9315 Red Hat Security Advisory: kernel security update Red Hat Security Advisories (RHSA) · Oct 20, 2026
- WID-SEC-2024-1259 Linux Kernel: Mehrere Schwachstellen ermöglichen Denial of Service und unspezifischen Angriff BSI CERT-Bund (WID) · Oct 7, 2026
- SUSE-SU-2025:20601-1 Security update for the Linux Kernel SUSE / openSUSE Security Updates · Mar 23, 2026
- SUSE-SU-2025:20602-1 Security update for the Linux Kernel SUSE / openSUSE Security Updates · Mar 23, 2026
- SUSE-SU-2025:02997-1 Security update for the Linux Kernel SUSE / openSUSE Security Updates · Mar 23, 2026
- SUSE-SU-2025:20586-1 Security update for the Linux Kernel SUSE / openSUSE Security Updates · Mar 23, 2026
- SUSE-SU-2025:20577-1 Security update for the Linux Kernel SUSE / openSUSE Security Updates · Mar 23, 2026
- SUSE-SU-2025:03011-1 Security update for the Linux Kernel SUSE / openSUSE Security Updates · Mar 23, 2026
- SUSE-SU-2025:02996-1 Security update for the Linux Kernel SUSE / openSUSE Security Updates · Mar 23, 2026
- SUSE-SU-2025:02853-1 Security update for the Linux Kernel SUSE / openSUSE Security Updates · Feb 4, 2026
- SUSE-SU-2025:02923-1 Security update for the Linux Kernel SUSE / openSUSE Security Updates · Feb 4, 2026
- SUSE-SU-2025:02969-1 Security update for the Linux Kernel SUSE / openSUSE Security Updates · Feb 4, 2026
- SUSE-SU-2025:03023-1 Security update for the Linux Kernel SUSE / openSUSE Security Updates · Feb 4, 2026
- WID-SEC-2025-1293 IBM DataPower Gateway: Mehrere Schwachstellen BSI CERT-Bund (WID) · Dec 3, 2025
- ALAS2023-2024-643 Moderate: kernel security update (Amazon Linux 2023) Amazon Linux Security Center (ALAS) · Jun 5, 2025
- ELSA-2024-9315 Moderate: kernel security update (Oracle Linux 9) Oracle Linux Security Advisories (ELSA) · Nov 14, 2024
- ELSA-2024-12813 Important: Unbreakable Enterprise kernel security update (Oracle Linux 7) Oracle Linux Security Advisories (ELSA) · Nov 12, 2024
- ELSA-2024-12815 Important: Unbreakable Enterprise kernel security update (Oracle Linux 8) Oracle Linux Security Advisories (ELSA) · Nov 11, 2024