Description
In the Linux kernel, the following vulnerability has been resolved:
x86/mm: Fix user-space data loss with MADV_FREE and THP
Some of users of Polars (a data analytics library) have lost production
data from this bug. They seem to have just the right combination of
huge pages, MADV_FREE and heavy reclaim pressure.
pmd_modify() masks the old value with (_HPAGE_CHG_MASK & ~_PAGE_DIRTY),
silently discarding the hardware dirty bit. The subsequent
pmd_mksaveddirty() call is supposed to transfer _PAGE_DIRTY into
_PAGE_SAVED_DIRTY when write-protecting, but the dirty bit was already
stripped from the value, so there is nothing left to transfer.
Contrast with pte_modify(), which keeps _PAGE_DIRTY_BITS in its mask,
and pud_modify(), which keeps _HPAGE_CHG_MASK untouched: pmd_modify()
is the odd one out. Any pmd_modify() on a writable, dirty PMD loses
the dirty state.
One visible consequence is data loss with MADV_FREE on PMD-mapped THP:
memset(buf, 0x5A, size); // PMD-mapped THP, PMD dirty
madvise(buf, size, MADV_FREE); // PMD cleaned but left writable,
// folio marked lazyfree
memset(buf, 0x5A, size); // hardware sets _PAGE_DIRTY again
mprotect(buf, size, PROT_READ); // pmd_modify() drops the dirty bit
mprotect(buf, size, PROT_READ|PROT_WRITE);
// ... memory pressure ...
Reclaim (e.g. under memcg pressure) then finds the lazyfree folio with
no dirty bit set anywhere and frees it in
__discard_anon_folio_pmd_locked(), even though the data was rewritten
after MADV_FREE; subsequent reads fault in fresh zero pages. NUMA
hinting alone can trigger the same loss, as do_huge_pmd_numa_page()
restores the PMD through pmd_modify() as well.
PMD-mapped file THPs are affected too: mprotect()/NUMA hinting dropping
the dirty bit means rewritten data is never written back.
Fix it by keeping _PAGE_DIRTY in the preserved mask, exactly like
pte_modify() and pud_modify() do. The existing
pmd_mksaveddirty()/pmd_clear_saveddirty() pair then performs the
hardware-dirty <-> saved-dirty transition based on the write bit,
preserving the shadow-stack encoding rules.
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| Linux | Linux | 6.6 | 6.6.158 |
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 | 7.2.7-1 | — |
| Debian 13 | linux | 6.12.111-1 | — |
| Debian 12 | linux-6.12 | 6.12.111-1~deb12u1 | — |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu Nvidia-BlueField 24.04 LTS | linux-bluefield | 6.8.0-1036.41 | — |
| Ubuntu 26.04 LTS | linux | 7.0.0-42.42 | USN-8959-1 |
| Ubuntu 26.04 LTS | linux-aws | 7.0.0-1016.17 | USN-8959-1 |
| Ubuntu 26.04 LTS | linux-azure | 7.0.0-1020.21 | USN-9019-1 |
| Ubuntu 26.04 LTS | linux-azure-fde | 7.0.0-1019.19 | USN-9020-1 |
| Ubuntu 26.04 LTS | linux-gcp | 7.0.0-1016.18 | USN-8959-1 |
| Ubuntu 26.04 LTS | linux-gke | 7.0.0-1010.11 | USN-9020-1 |
| Ubuntu 26.04 LTS | linux-ibm +1 | 7.0.0-1017.17 | USN-8960-1, USN-8959-1 |
| Ubuntu 26.04 LTS | linux-nvidia +1 | No fix yet | — |
| Ubuntu 26.04 LTS | linux-oracle | 7.0.0-1015.16 | USN-8959-1 |
| Ubuntu 26.04 LTS | linux-raspi | 7.0.0-1023.23 | USN-9021-1 |
| Ubuntu 26.04 LTS | linux-realtime | 7.0.0-43.43.1 | USN-9020-1 |
| Ubuntu 26.04 LTS | linux-riscv | 7.0.0-42.42.1 | — |
| Ubuntu 24.04 LTS | linux | 6.8.0-149.149 | USN-9022-1 |
| Ubuntu 24.04 LTS | linux-aws | 6.8.0-1069.74 | USN-9022-1 |
| Ubuntu 24.04 LTS | linux-aws-7.0 | 7.0.0-1017.18~24.04.1 | USN-9020-1 |
| Ubuntu 24.04 LTS | linux-azure | 6.8.0-1073.82 | USN-9022-1 |
| Ubuntu 24.04 LTS | linux-azure-fde | 6.8.0-1071.78 | USN-9039-1 |
| Ubuntu 24.04 LTS | linux-azure-fde-7.0 | 7.0.0-1019.19~24.04.1 | USN-9020-1 |
| Ubuntu 24.04 LTS | linux-gcp | 6.8.0-1073.81 | USN-9022-1 |
| Ubuntu 24.04 LTS | linux-gcp-7.0 | 7.0.0-1017.19~24.04.1 | USN-9020-1 |
| Ubuntu 24.04 LTS | linux-gke | 6.8.0-1068.77 | USN-9022-1 |
| Ubuntu 24.04 LTS | linux-gkeop | 6.8.0-1053.57 | USN-9023-1 |
| Ubuntu 24.04 LTS | linux-hwe-7.0 | 7.0.0-42.42~24.04.1 | USN-8959-1 |
| Ubuntu 24.04 LTS | linux-ibm | 6.8.0-1069.70 | USN-9022-1 |
| Ubuntu 24.04 LTS | linux-lowlatency | 6.8.0-149.149.1 | USN-9022-1 |
| Ubuntu 24.04 LTS | linux-nvidia | 6.8.0-1067.70 | USN-9024-1 |
| Ubuntu 24.04 LTS | linux-nvidia-lowlatency | 6.8.0-1067.70.1 | USN-9040-1 |
| Ubuntu 24.04 LTS | linux-oracle | 6.8.0-1067.71 | USN-9022-1 |
| Ubuntu 24.04 LTS | linux-oracle-7.0 | 7.0.0-1016.18~24.04.1 | USN-9020-1 |
| Ubuntu 24.04 LTS | linux-raspi | 6.8.0-1068.72 | USN-9025-1 |
| Ubuntu 24.04 LTS | linux-riscv +32 | No fix yet | — |
| Ubuntu 24.04 LTS | linux-riscv-7.0 | 7.0.0-42.42.1~24.04.1 | — |
| Ubuntu 24.04 LTS | linux-vmware | 6.8.0-1010.10 | USN-9022-1 |
| Ubuntu 22.04 LTS | linux-aws-6.8 | 6.8.0-1069.74~22.04.1 | USN-9024-1 |
| Ubuntu 22.04 LTS | linux-azure-6.8 | 6.8.0-1073.82~22.04.1 | USN-9026-1 |
| Ubuntu 22.04 LTS | linux-azure-fde-6.8 | 6.8.0-1071.78~22.04.1 | USN-9026-1 |
| Ubuntu 22.04 LTS | linux-gcp-6.8 | 6.8.0-1073.81~22.04.1 | USN-9024-1 |
| Ubuntu 22.04 LTS | linux-hwe-6.8 | 6.8.0-149.149~22.04.1 | USN-9066-1 |
| Ubuntu 22.04 LTS | linux-ibm-6.8 | 6.8.0-1069.70~22.04.1 | USN-9024-1 |
| Ubuntu 22.04 LTS | linux-lowlatency-hwe-6.8 | 6.8.0-149.149.1~22.04.1 | USN-9024-1 |
| Ubuntu 22.04 LTS | linux-oracle-6.8 | 6.8.0-1067.71~22.04.1 | USN-9025-1 |
| Ubuntu 22.04 LTS | linux-riscv +33 | No fix yet | — |
| Ubuntu 20.04 LTS | linux-gke +28 | No fix yet | — |
Show 5 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 18.04 LTS | linux-gcp +14 | No fix yet | — |
| Ubuntu 16.04 LTS | linux-hwe-edge | No fix yet | — |
| Ubuntu Pro Realtime 24.04 LTS | linux-raspi-realtime | 6.8.0-2056.58 | USN-9025-1 |
| Ubuntu Pro Realtime 24.04 LTS | linux-realtime | 6.8.1-1064.65 | USN-9023-1 |
| Ubuntu Pro Realtime 24.04 LTS | linux-realtime-6.14 +1 | No fix yet | — |
| Ubuntu Pro Realtime 22.04 LTS | linux-realtime-6.8 | 6.8.1-1064.65~22.04.1 | USN-9024-1 |
| Ubuntu Pro FIPS-updates 24.04 LTS | linux-aws-fips | 6.8.0-1069.74+fips1 | USN-9023-1 |
| Ubuntu Pro FIPS-updates 24.04 LTS | linux-azure-fips | 6.8.0-1073.82+fips1 | USN-9022-1 |
| Ubuntu Pro FIPS-updates 24.04 LTS | linux-fips | No fix yet | — |
| Ubuntu Pro FIPS-updates 24.04 LTS | linux-gcp-fips | 6.8.0-1073.81+fips1 | USN-9023-1 |
SUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| SLES 15 SP7 | kernel-64kb +5 | 6.4.0-150700.53.87.3 | SUSE-SU-2026:4935-1 |
| SLES 15 SP7 | kernel-default-base | 6.4.0-150700.53.87.3.150700.17.49.2 | SUSE-SU-2026:4935-1 |
| SLES 15 SP7 | kernel-obs-build | 6.4.0-150700.53.87.2 | SUSE-SU-2026:4935-1 |
| SLES 15 SP7 | kernel-syms | 6.4.0-150700.53.87.1 | SUSE-SU-2026:4935-1 |
| SLES 15 SP6 | kernel-64kb +6 | 6.4.0-150600.23.143.1 | SUSE-SU-2026:4934-1 |
| SLES 15 SP6 | kernel-default-base | 6.4.0-150600.23.143.1.150600.12.66.3 | SUSE-SU-2026:4934-1 |
Show 9 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| SLES for SAP 16.0 | kernel-64kb +8 | 6.12.0-160000.40.1 | SUSE-SU-2026:24446-1 |
| SLES for SAP 16.0 | kernel-default-base | 6.12.0-160000.40.1.160000.2.29 | SUSE-SU-2026:24446-1 |
| SLES for SAP 15 SP6 | kernel-default-base | 6.4.0-150600.23.143.1.150600.12.66.3 | SUSE-SU-2026:4934-1 |
| SLES for SAP 15 SP6 | kernel-docs +4 | 6.4.0-150600.23.143.1 | SUSE-SU-2026:4934-1 |
| SLES 16.0 | kernel-64kb +8 | 6.12.0-160000.40.1 | SUSE-SU-2026:24446-1, SUSE-SU-2026:24437-1 |
| SLES 16.0 | kernel-default-base | 6.12.0-160000.40.1.160000.2.29 | SUSE-SU-2026:24446-1 |
| SLE Micro 6.2 | kernel-default-base | 6.12.0-160000.40.1.160000.2.29 | SUSE-SU-2026:24422-1 |
| SLE Micro 6.2 | kernel-rt +5 | 6.12.0-160000.40.1 | SUSE-SU-2026:24422-1, SUSE-SU-2026:24386-1 |
| SLE Micro 6.1 | kernel-default-base | 6.4.0-159998.54.1.159998.21.39 | SUSE-SU-2026:24379-1 |
| SLE Micro 6.1 | kernel-rt +4 | 6.4.0-159998.54.1 | SUSE-SU-2026:24553-1, SUSE-SU-2026:24379-1 |
| SLE Micro 6.0 | kernel-default-base | 6.4.0-159998.54.1.159998.21.40 | SUSE-SU-2026:24371-1 |
| SLE Micro 6.0 | kernel-rt +4 | 6.4.0-159998.54.1 | SUSE-SU-2026:24473-1, SUSE-SU-2026:24371-1 |
| SLE Live Patching 15 SP7 | kernel-default | 6.4.0-150700.53.87.3 | SUSE-SU-2026:4935-1 |
| SLE Live Patching 15 SP7 | kernel-livepatch-SLE15-SP7-RT_Update_22 | 1-150700.1.3.1 | SUSE-SU-2026:4940-1 |
| SLE Live Patching 15 SP7 | kernel-livepatch-SLE15-SP7_Update_23 | 1-150700.15.3.2 | SUSE-SU-2026:4935-1 |
| SLE Live Patching 15 SP6 | kernel-default | 6.4.0-150600.23.143.1 | SUSE-SU-2026:4934-1 |
| SLE Live Patching 15 SP6 | kernel-livepatch-SLE15-SP6_Update_33 | 1-150600.13.5.1 | SUSE-SU-2026:4934-1 |
| SUSE Real Time Module 15 SP7 | kernel-rt +2 | 6.4.0-150700.7.81.1 | SUSE-SU-2026:4940-1 |
openSUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| openSUSE Tumbleweed | kernel-source | 7.2.9-1.1 | openSUSE-SU-2026:12074-1 |
| openSUSE Leap 16.0 | kernel-default-base | 6.12.0-160000.40.1.160000.2.29 | openSUSE-SU-2026:22167-1 |
| openSUSE Leap 16.0 | kernel-rt +11 | 6.12.0-160000.40.1 | openSUSE-SU-2026:22167-1 |
Amazon Linux
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Amazon Linux 2023 | kernel-livepatch-6.18.54-121.166 +1 | 1:1.0-0.amzn2023 | ALAS2023-2026-3193, ALAS2023-2026-3192 |
| Amazon Linux 2023 | perf6.12 +11 | 1:6.12.111-136.204.amzn2023 | ALAS2023-2026-3193 |
| Amazon Linux 2023 | perf6.18 +12 | 1:6.18.54-121.166.amzn2023 | ALAS2023-2026-3192 |
Azure Linux
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Azure Linux 3 | kernel | 6.6.158.1-1 | — |
Oracle Linux
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Oracle Linux 9 | kernel-uek +34 | 6.12.0-207.111.5.1.el10uek | ELSA-2026-500374 |
Advisories 30
- USN-9066-1 linux-hwe-6.8 vulnerabilities Ubuntu Security Notices (USN) · Nov 12, 2026
- USN-9021-1 linux-raspi vulnerabilities Ubuntu Security Notices (USN) · Nov 12, 2026
- USN-9022-1 linux, linux-aws, linux-azure, linux-azure-fips, linux-gcp, linux-gke, linux-ibm, linux-lowlatency, linux-oracle, linux-vmware vulnerabilities Ubuntu Security Notices (USN) · Nov 12, 2026
- USN-9024-1 linux-aws-6.8, linux-gcp-6.8, linux-ibm-6.8, linux-lowlatency-hwe-6.8, linux-nvidia, linux-realtime-6.8 vulnerabilities Ubuntu Security Notices (USN) · Nov 12, 2026
- USN-9026-1 linux-azure-6.8, linux-azure-fde-6.8 vulnerabilities Ubuntu Security Notices (USN) · Nov 12, 2026
- USN-9039-1 linux-azure-fde vulnerabilities Ubuntu Security Notices (USN) · Nov 12, 2026
- USN-9040-1 linux-nvidia-lowlatency vulnerabilities Ubuntu Security Notices (USN) · Nov 12, 2026
- USN-9020-1 linux-aws-7.0, linux-azure-fde, linux-azure-fde-7.0, linux-gcp-7.0, linux-gke, linux-oracle-7.0, linux-realtime vulnerabilities Ubuntu Security Notices (USN) · Nov 12, 2026
- USN-8959-1 linux, linux-aws, linux-gcp, linux-hwe-7.0, linux-ibm, linux-oracle vulnerabilities Ubuntu Security Notices (USN) · Nov 12, 2026
- USN-9025-1 linux-oracle-6.8, linux-raspi, linux-raspi-realtime vulnerabilities Ubuntu Security Notices (USN) · Nov 12, 2026
- USN-9023-1 linux-aws-fips, linux-gcp-fips, linux-gkeop, linux-realtime vulnerabilities Ubuntu Security Notices (USN) · Nov 12, 2026
- USN-9019-1 linux-azure vulnerabilities Ubuntu Security Notices (USN) · Nov 12, 2026
- USN-8960-1 linux-oem-7.0 vulnerabilities Ubuntu Security Notices (USN) · Nov 12, 2026
- WID-SEC-2026-3579 Linux Kernel: Mehrere Schwachstellen BSI CERT-Bund (WID) · Nov 11, 2026
- SUSE-SU-2026:24553-1 Security update for the Linux Kernel SUSE / openSUSE Security Updates · Nov 7, 2026
- SUSE-SU-2026:24473-1 Security update for the Linux Kernel SUSE / openSUSE Security Updates · Nov 4, 2026
- SUSE-SU-2026:24437-1 Security update for the Linux Kernel SUSE / openSUSE Security Updates · Nov 1, 2026
- SUSE-SU-2026:24446-1 Security update for the Linux Kernel SUSE / openSUSE Security Updates · Nov 1, 2026
- SUSE-SU-2026:4940-1 Security update for the Linux Kernel SUSE / openSUSE Security Updates · Oct 31, 2026
- SUSE-SU-2026:4934-1 Security update for the Linux Kernel SUSE / openSUSE Security Updates · Oct 31, 2026
- SUSE-SU-2026:4935-1 Security update for the Linux Kernel SUSE / openSUSE Security Updates · Oct 31, 2026
- SUSE-SU-2026:24422-1 Security update for the Linux Kernel SUSE / openSUSE Security Updates · Oct 30, 2026
- SUSE-SU-2026:24386-1 Security update for the Linux Kernel SUSE / openSUSE Security Updates · Oct 30, 2026
- SUSE-SU-2026:24379-1 Security update for the Linux Kernel SUSE / openSUSE Security Updates · Oct 27, 2026
- SUSE-SU-2026:24371-1 Security update for the Linux Kernel SUSE / openSUSE Security Updates · Oct 27, 2026
- ALAS2023-2026-3192 Important: kernel6.18 security update (Amazon Linux 2023) Amazon Linux Security Center (ALAS) · Oct 26, 2026
- ALAS2023-2026-3193 Important: kernel6.12 security update (Amazon Linux 2023) Amazon Linux Security Center (ALAS) · Oct 26, 2026
- openSUSE-SU-2026:22167-1 Security update for the Linux Kernel SUSE / openSUSE Security Updates · Oct 25, 2026
- openSUSE-SU-2026:12074-1 kernel-devel-7.2.9-1.1 on GA media SUSE / openSUSE Security Updates · Oct 9, 2026
- ELSA-2026-500374 Important: Unbreakable Enterprise kernel security update (Oracle Linux 9) Oracle Linux Security Advisories (ELSA) · Oct 7, 2026
References
- https://git.kernel.org/stable/c/b5dec6dfb593d81fec15ba43c4fe5d58f10a49a2
- https://git.kernel.org/stable/c/e4d569fe2f436a9b58c048fefabf56eab68c1b7e
- https://git.kernel.org/stable/c/55ddbc2ca6d5db64d44c3fb8f8705b4d39eb30b7
- https://git.kernel.org/stable/c/a5ad97cbcfcec31430268441c10eedde73200177
- https://git.kernel.org/stable/c/f7491d7c81db0e7c304a7bd757a76d2fbeaff80e