CVE-2024-53131: nilfs2: fix null-ptr-deref in block_touch_buffer tracepoint
In the Linux kernel, the following vulnerability has been resolved:
nilfs2: fix null-ptr-deref in blocktouchbuffer tracepoint
Patch series "nilfs2: fix null-ptr-deref bugs on block tracepoints".
This series fixes null pointer dereference bugs that occur when using nilfs2 and two block-related tracepoints.
This patch (of 2):
It has been reported that when using "block:blocktouchbuffer" tracepoint, touchbuffer() called from nilfsgetfolioblock() causes a NULL pointer dereference, or a general protection fault when KASAN is enabled.
This happens because since the tracepoint was added in touchbuffer(), it references the devt member bh->bbdev->bddev regardless of whether the buffer head has a pointer to a blockdevice structure. In the current implementation, the blockdevice structure is set after the function returns to the caller.
Here, touchbuffer() is used to mark the folio/page that owns the buffer head as accessed, but the common search helper for folio/page used by the caller function was optimized to mark the folio/page as accessed when it was reimplemented a long time ago, eliminating the need to call touchbuffer() here in the first place.
So this solves the issue by eliminating the touchbuffer() call itself.
Other sources
This CVE was automatically created from a reference found in an email or other text. If you are reading this, then this CVE entry is probably erroneous, since this text should be replaced by the official CVE description automatically.
— Launchpad
Affected Software
Remediation
Event History
Frequently Asked Questions
What is the severity of CVE-2024-53131?
CVE-2024-53131 has a severity rating that indicates it can lead to null pointer dereference vulnerabilities in the Linux kernel.
How do I fix CVE-2024-53131?
To fix CVE-2024-53131, you should update your Linux kernel to a version that includes the patches, such as 6.1.123-1 or newer.
Which versions of the Linux kernel are affected by CVE-2024-53131?
CVE-2024-53131 affects versions from 3.9 to 6.1.119, 6.6.0 to 6.6.63, and 6.11.0 to 6.11.10.
What component of Linux is impacted by CVE-2024-53131?
CVE-2024-53131 impacts the nilfs2 file system within the Linux kernel.
Can CVE-2024-53131 cause system crashes?
Yes, CVE-2024-53131 can result in null pointer dereference which may lead to system crashes or instability.