CVE-2024-53130

Source
https://cve.org/CVERecord?id=CVE-2024-53130
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2024-53130.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2024-53130
Downstream
Related
Published
2024-12-04T14:20:36.741Z
Modified
2026-03-20T12:40:45.520524Z
Summary
nilfs2: fix null-ptr-deref in block_dirty_buffer tracepoint
Details

In the Linux kernel, the following vulnerability has been resolved:

nilfs2: fix null-ptr-deref in blockdirtybuffer tracepoint

When using the "block:blockdirtybuffer" tracepoint, markbufferdirty() may cause a NULL pointer dereference, or a general protection fault when KASAN is enabled.

This happens because, since the tracepoint was added in markbufferdirty(), 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, nilfsgrabbuffer(), which grabs a buffer to read (or create) a block of metadata, including b-tree node blocks, does not set the block device, but instead does so only if the buffer is not in the "uptodate" state for each of its caller block reading functions. However, if the uptodate flag is set on a folio/page, and the buffer heads are detached from it by trytofreebuffers(), and new buffer heads are then attached by createemptybuffers(), the uptodate flag may be restored to each buffer without the block device being set to bh->bbdev, and markbufferdirty() may be called later in that state, resulting in the bug mentioned above.

Fix this issue by making nilfsgrabbuffer() always set the block device of the super block structure to the buffer head, regardless of the state of the buffer's uptodate flag.

Database specific
{
    "cna_assigner": "Linux",
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/53xxx/CVE-2024-53130.json"
}
References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
5305cb830834549b9203ad4d009ad5483c5e293f
Fixed
7af3309c7a2ef26831a67125b11c34a7e01c1b2a
Fixed
0ce59fb1c73fdd5b6028226aeb46259a0cdc0957
Fixed
0a5014ad37c77ac6a2c525137c00a0e1724f6020
Fixed
d904e4d845aafbcfd8a40c1df7d999f02f062be8
Fixed
86b19031dbc79abc378dfae357f6ea33ebeb0c95
Fixed
b0e4765740040c44039282057ecacd7435d1d2ba
Fixed
ffc440a76a0f476a7e6ea838ec0dc8e9979944d1
Fixed
2026559a6c4ce34db117d2db8f710fe2a9420d5a

Database specific

source
"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2024-53130.json"