CVE-2022-48802
Linux Kernel vulnerability analysis and mitigation

Overview

CVE-2022-48802 affects the Linux kernel's fs/proc/taskmmu.c component. The vulnerability was discovered when a race condition occurred while reading /proc/$PID/smaps during MADVFREE operations. The issue was reported by syzbot and involves incorrect handling of mapcount for migration entries (Kernel Git).

Technical details

The vulnerability occurs in a race condition scenario between smaps walk and MADVFREE operations. When MADVFREE is called for partial THP (Transparent Huge Pages), it may split THPs, leading to a situation where PageDoubleMap() is called on a page that is no longer a tail page of THP. The race condition sequence is: CPU A performs smaps walk with pagemapcount(), while CPU B executes MADVFREE involving PageCompound(), splithugepage(), and page = compound_head(page) operations, followed by PageDoubleMap(page) (Kernel Git).

Impact

The vulnerability results in a kernel BUG being triggered at include/linux/page-flags.h:785, causing an invalid opcode: 0000 error. This can lead to system instability and potential denial of service conditions (NVD).

Mitigation and workarounds

The fix involves adding a new parameter for smapsaccount() to indicate migration entries and skip calling pagemapcount() for these entries. The solution avoids elevating the refcount of the page before calling mapcount, as this would prevent counting migration entries. The fix also addresses similar issues in pagemap functionality (Kernel Git).

Additional resources


SourceThis report was generated using AI

Related Linux Kernel vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2025-40343MEDIUM6.4
  • Linux KernelLinux Kernel
  • linux-iot
NoYesDec 09, 2025
CVE-2025-40342MEDIUM6.4
  • Linux KernelLinux Kernel
  • kernel-rt-devel-matched
NoYesDec 09, 2025
CVE-2025-40340MEDIUM6.4
  • Linux KernelLinux Kernel
  • linux-hwe
NoYesDec 09, 2025
CVE-2025-40341MEDIUM5.1
  • Linux KernelLinux Kernel
  • kernel-zfcpdump-core
NoYesDec 09, 2025
CVE-2025-40344N/AN/A
  • Linux KernelLinux Kernel
  • libperf-devel
NoYesDec 09, 2025

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management