CVE-2022-50869
Description
In the Linux kernel, the following vulnerability has been resolved:
fs/ntfs3: Fix slab-out-of-bounds in r_page
When PAGE_SIZE is 64K, if read_log_page is called by log_read_rst for the first time, the size of *buffer would be equal to DefaultLogPageSize(4K).But for *buffer operations like memcpy, if the memory area size(n) which being assigned to buffer is larger than 4K (log->page_size(64K) or bytes(64K-page_off)), it will cause an out of boundary error. Call trace: [...] kasan_report+0x44/0x130 check_memory_region+0xf8/0x1a0 memcpy+0xc8/0x100 ntfs_read_run_nb+0x20c/0x460 read_log_page+0xd0/0x1f4 log_read_rst+0x110/0x75c log_replay+0x1e8/0x4aa0 ntfs_loadlog_and_replay+0x290/0x2d0 ntfs_fill_super+0x508/0xec0 get_tree_bdev+0x1fc/0x34c [...]
Fix this by setting variable r_page to NULL in log_read_rst.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
In the Linux kernel's NTFS3 driver, a slab-out-of-bounds write can occur when PAGE_SIZE is 64K and the log replay code assumes a 4K buffer for reads, allowing memory corruption.
Vulnerability
Overview
The vulnerability resides in the NTFS3 filesystem driver (fs/ntfs3) in the Linux kernel. When the system's PAGE_SIZE is configured as 64 KB, a flaw in the read_log_page function can lead to a slab-out-of-bounds write. Specifically, during the initial call to log_read_rst, the allocated buffer (*buffer) is sized to DefaultLogPageSize (4 KB). However, the subsequent memory operations, such as memcpy in ntfs_read_run_nb, may attempt to copy beyond that 4 KB boundary when the actual log page size (log->page_size, 64 KB) or the total bytes to read exceeds the smaller buffer [1][2].
Exploitation
Prerequisites
The issue is triggered during filesystem mount, specifically within the log replay sequence (ntfs_loadlog_and_replay -> log_replay -> log_read_rst -> read_log_page). No special user privileges are required beyond the ability to mount a crafted NTFS3 filesystem image. The attacker must convince a target system to mount a maliciously prepared NTFS volume, which can occur through removable media, network filesystem mounts, or other vectors [2].
Impact
A successful exploit results in a slab-out-of-bounds write, which manifests as memory corruption. This can lead to system instability, denial of service (kernel panic), or potentially arbitrary code execution in kernel space, given the nature of the write primitive. The KASAN report confirms the out-of-bound access occurs via memcpy during read operations [1].
Mitigation
The fix, introduced via commits in the stable kernel tree, sets the variable r_page to NULL within log_read_rst to ensure proper reallocation or handling of the buffer size mismatch [1][2]. Users should apply the latest kernel updates from their distribution that include this patch. No workaround is available short of disabling the NTFS3 driver or avoiding the mounting of untrusted NTFS volumes.
AI Insight generated on May 19, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.
Affected products
1Patches
4ed686e7a26ddbf86a640a3496d076293e5bfecfbd57cf9c5Vulnerability mechanics
Generated on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.
References
4News mentions
0No linked articles in our index yet.