CVE-2024-41083: netfs: Fix netfs_page_mkwrite() to check folio->mapping is valid
In the Linux kernel, the following vulnerability has been resolved:
netfs: Fix netfspagemkwrite() to check folio->mapping is valid
Fix netfspagemkwrite() to check that folio->mapping is valid once it has taken the folio lock (as filemappagemkwrite() does). Without this, generic/247 occasionally oopses with something like the following:
BUG: kernel NULL pointer dereference, address: 0000000000000000 #PF: supervisor read access in kernel mode #PF: errorcode(0x0000) - not-present page
RIP: 0010:traceeventraweventnetfsfolio+0x61/0xc0 ... Call Trace: <TASK> ? diebody+0x1a/0x60 ? pagefaultoops+0x6e/0xa0 ? excpagefault+0xc2/0xe0 ? asmexcpagefault+0x22/0x30 ? traceeventraweventnetfsfolio+0x61/0xc0 tracenetfsfolio+0x39/0x40 netfspagemkwrite+0x14c/0x1d0 dopagemkwrite+0x50/0x90 doptemissing+0x184/0x200 handlemmfault+0x42d/0x500 handlemmfault+0x121/0x1f0 douseraddrfault+0x23e/0x3c0 excpagefault+0xc2/0xe0 asmexcpagefault+0x22/0x30
This is due to the invalidateinodepages2range() issued at the end of the DIO write interfering with the mmap'd writes.
Affected Software
Remediation
Event History
Frequently Asked Questions
What is the severity of CVE-2024-41083?
CVE-2024-41083 has been categorized with a moderate severity level due to its impact on the Linux kernel.
How do I fix CVE-2024-41083?
To fix CVE-2024-41083, update your Linux kernel to the versions 5.10.223-1, 5.10.226-1, 6.1.123-1, 6.1.128-1, 6.12.12-1, or 6.12.15-1.
Which Linux kernel versions are affected by CVE-2024-41083?
CVE-2024-41083 affects Linux kernel versions prior to 6.12.15, specifically between 6.8 and 6.9.8.
What is the nature of the vulnerability described in CVE-2024-41083?
CVE-2024-41083 involves a flaw in the netfs_page_mkwrite() function that fails to validate folio->mapping after acquiring the folio lock.
Is there a public record for CVE-2024-41083?
Yes, CVE-2024-41083 is publicly acknowledged and documented in vulnerability databases like NVD and MITRE.