Search CVEs and advisories

Search CVEs and Linux security advisories by vendor, product, package, or severity, and see which vulnerabilities each advisory addresses.

CVE

CVE-2022-50517

published high CVSS 3.1 · 7.8

mm/huge_memory: do not clobber swp_entry_t during THP split

Published
07 Oct 2025, 15:19:12 UTC
Updated
05 Aug 2026, 08:59:01 UTC
Language
en

Package status and fixes

Distro / vendorReleasePackage / productPublisher statusFixed buildSource
Linux — Linuxb653db77350c7307a513b81856fe53e94cf42446 to < 8cace0eeb03d6043827faa6cf6c9067a9f05cd9f · b653db77350c7307a513b81856fe53e94cf42446 to < 71e2d666ef85d51834d658830f823560c402b8b6 · Other versions: unaffected Affected Not stated Linux
Linux — Linux5.19 (affected) · 0 to < 5.19 (unaffected · semver) · 6.0.7 through 6.0.* (unaffected · semver) · 6.1 and later (unaffected · original_commit_for_fix) · Other versions: affected Version-specific Not stated Linux
Amazon Linux AL2 Release evaluation Not Affected Not required Amazon Linux assessment
Amazon Linux AL2023 Release evaluation Not Affected Not required Amazon Linux assessment

Description

In the Linux kernel, the following vulnerability has been resolved: mm/huge_memory: do not clobber swp_entry_t during THP split The following has been observed when running stressng mmap since commit b653db77350c ("mm: Clear page->private when splitting or migrating a page") watchdog: BUG: soft lockup - CPU#75 stuck for 26s! [stress-ng:9546] CPU: 75 PID: 9546 Comm: stress-ng Tainted: G E 6.0.0-revert-b653db77-fix+ #29 0357d79b60fb09775f678e4f3f64ef0579ad1374 Hardware name: SGI.COM C2112-4GP3/X10DRT-P-Series, BIOS 2.0a 05/09/2016 RIP: 0010:xas_descend+0x28/0x80 Code: cc cc 0f b6 0e 48 8b 57 08 48 d3 ea 83 e2 3f 89 d0 48 83 c0 04 48 8b 44 c6 08 48 89 77 18 48 89 c1 83 e1 03 48 83 f9 02 75 08 <48> 3d fd 00 00 00 76 08 88 57 12 c3 cc cc cc cc 48 c1 e8 02 89 c2 RSP: 0018:ffffbbf02a2236a8 EFLAGS: 00000246 RAX: ffff9cab7d6a0002 RBX: ffffe04b0af88040 RCX: 0000000000000002 RDX: 0000000000000030 RSI: ffff9cab60509b60 RDI: ffffbbf02a2236c0 RBP: 0000000000000000 R08: ffff9cab60509b60 R09: ffffbbf02a2236c0 R10: 0000000000000001 R11: ffffbbf02a223698 R12: 0000000000000000 R13: ffff9cab4e28da80 R14: 0000000000039c01 R15: ffff9cab4e28da88 FS: 00007fab89b85e40(0000) GS:ffff9cea3fcc0000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007fab84e00000 CR3: 00000040b73a4003 CR4: 00000000003706e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: <TASK> xas_load+0x3a/0x50 __filemap_get_folio+0x80/0x370 ? put_swap_page+0x163/0x360 pagecache_get_page+0x13/0x90 __try_to_reclaim_swap+0x50/0x190 scan_swap_map_slots+0x31e/0x670 get_swap_pages+0x226/0x3c0 folio_alloc_swap+0x1cc/0x240 add_to_swap+0x14/0x70 shrink_page_list+0x968/0xbc0 reclaim_page_list+0x70/0xf0 reclaim_pages+0xdd/0x120 madvise_cold_or_pageout_pte_range+0x814/0xf30 walk_pgd_range+0x637/0xa30 __walk_page_range+0x142/0x170 walk_page_range+0x146/0x170 madvise_pageout+0xb7/0x280 ? asm_common_interrupt+0x22/0x40 madvise_vma_behavior+0x3b7/0xac0 ? find_vma+0x4a/0x70 ? find_vma+0x64/0x70 ? madvise_vma_anon_name+0x40/0x40 madvise_walk_vmas+0xa6/0x130 do_madvise+0x2f4/0x360 __x64_sys_madvise+0x26/0x30 do_syscall_64+0x5b/0x80 ? do_syscall_64+0x67/0x80 ? syscall_exit_to_user_mode+0x17/0x40 ? do_syscall_64+0x67/0x80 ? syscall_exit_to_user_mode+0x17/0x40 ? do_syscall_64+0x67/0x80 ? do_syscall_64+0x67/0x80 ? common_interrupt+0x8b/0xa0 entry_SYSCALL_64_after_hwframe+0x63/0xcd The problem can be reproduced with the mmtests config config-workload-stressng-mmap. It does not always happen and when it triggers is variable but it has happened on multiple machines. The intent of commit b653db77350c patch was to avoid the case where PG_private is clear but folio->private is not-NULL. However, THP tail pages uses page->private for "swp_entry_t if folio_test_swapcache()" as stated in the documentation for struct folio. This patch only clobbers page->private for tail pages if the head page was not in swapcache and warns once if page->private had an unexpected value.

en · Linux · cna

Vendor advisories explicitly linked to this CVE.

0

No linked advisories were found for this CVE.

Assessment

CVSS risk assessment and additional context for this vulnerability.

CVSS version
3.1
Base score
7.8 / 10
Severity
high
Provider
Linux · cna
Vector string
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Scenarios
en: AV:L - The bug is reached through local memory-management paths (madvise pageout/cold, reclaim, migration) that split anonymous THPs after they are in the swap cache; it is not reachable from the network stack or remote protocols. AC:L - An unprivileged attacker who can allocate THPs and force reclaim/split (e.g., MADV_PAGEOUT, memory pressure, partial THP unmap) controls the triggering conditions; clobbering swp_entry_t on split is deterministic once a swapcached THP is split, and retries remove remaining timing noise. PR:L - Ordinary unprivileged local users can create anonymous THP mappings and invoke madvise(MADV_PAGEOUT/MADV_COLD) on their own VMAs without capabilities; only process_madvise on other tasks needs CAP_SYS_NICE. UI:N - Exploitation requires no victim action; the attacker performs the memory allocation and madvise/reclaim operations themselves. S:U - Impact stays within the host kernel's memory-management authority (local DoS / potential privilege impact on the same kernel); it is not a VM escape or other cross-authority boundary bypass. C:H - Zeroing tail-page swp_entry_t corrupts swap-cache bookkeeping so later delete/reclaim uses the wrong swap offset, leaving stale folio pointers in the swap xarray and enabling use-after-free / cross-process swap-data exposure. I:H - The same metadata corruption can remove or free the wrong swap-cache entries and swap slots, yielding heap UAF and arbitrary kernel memory-corruption primitives beyond a clean crash. A:H - The observed failure is a soft lockup in xas_descend during swap reclaim, and the corrupted swap-cache state can hang or crash the kernel under continued memory pressure.

Publisher product statements

Version ranges and default statuses as reported by each provider.

Affected vendor and product assertions
VendorProductVersion statusSource
Linux Linux b653db77350c7307a513b81856fe53e94cf42446 to < 8cace0eeb03d6043827faa6cf6c9067a9f05cd9f (affected · git)b653db77350c7307a513b81856fe53e94cf42446 to < 71e2d666ef85d51834d658830f823560c402b8b6 (affected · git)Default: unaffected Linux · cna
Linux Linux 5.19 (affected)0 to < 5.19 (unaffected · semver)6.0.7 through 6.0.* (unaffected · semver)6.1 and later (unaffected · original_commit_for_fix)Default: affected Linux · cna

Weaknesses

0

No weakness assertions.

References

2

Provider assertions

1

Linux · cna

mm/huge_memory: do not clobber swp_entry_t during THP split

Provenance

Schema
5.2
Searchable
yes
Content hash
f896c781b1c3a0410b0b8e490f378ae9d5daad5c867a22b176c2daa856e70986
Ingested
23 Sep 2026, 08:04:48 UTC
Source record
Official CVE record

Search filters

Match options apply to free text. CVE words match tokens; use contains:"…" for literal substrings.

Text

Words and phrases
buffer overflow "remote code execution"
Word prefix
auth*
Literal substring (title or description)
contains:"use-after-free"
Exclude a term or filter
-test -vendor:example

Affected product

Vendor
vendor:Example
Product
product:"Demo Widget"

Severity and score

Severity · none, low, medium, high, critical, unknown
severity:critical
CWE identifier
cwe:CWE-863
CVSS score (0–10)
cvss:>=7.0

Dates and status

Published date · comparisons, relative days
published:>=2026-01-01
Updated date · comparisons, relative days
updated:<30d
Status · published (default), rejected, unknown
status:rejected