5.5 CVE-2024-53130

Enriched by CISA Patch
 

In the Linux kernel, the following vulnerability has been resolved: nilfs2: fix null-ptr-deref in block_dirty_buffer tracepoint When using the "block:block_dirty_buffer" tracepoint, mark_buffer_dirty() may cause a NULL pointer dereference, or a general protection fault when KASAN is enabled. This happens because, since the tracepoint was added in mark_buffer_dirty(), it references the dev_t member bh->b_bdev->bd_dev regardless of whether the buffer head has a pointer to a block_device structure. In the current implementation, nilfs_grab_buffer(), 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 try_to_free_buffers(), and new buffer heads are then attached by create_empty_buffers(), the uptodate flag may be restored to each buffer without the block device being set to bh->b_bdev, and mark_buffer_dirty() may be called later in that state, resulting in the bug mentioned above. Fix this issue by making nilfs_grab_buffer() always set the block device of the super block structure to the buffer head, regardless of the state of the buffer's uptodate flag.
https://nvd.nist.gov/vuln/detail/CVE-2024-53130

Categories

CWE-476 : NULL Pointer Dereference
The product dereferences a pointer that it expects to be valid but is NULL. NULL pointer dereferences are frequently resultant from rarely encountered error conditions and race conditions, since these are most likely to escape detection during the testing phases. Common abbreviation for Null Pointer Dereference Common abbreviation for Null Pointer Dereference Common abbreviation for Null Pointer Exception used for access of nil in Go programs This weakness can be detected using dynamic tools and techniques that interact with the software using large test suites with many diverse inputs, such as fuzz testing (fuzzing), robustness testing, and fault injection. The software's operation may slow down, but it should not become unstable, crash, or generate incorrect results. Identify error conditions that are not likely to occur during normal usage and trigger them. For example, run the program under low memory conditions, run with insufficient privileges or permissions, interrupt a transaction before it is completed, or disable connectivity to basic network services such as DNS. Monitor the software for any unexpected behavior. If you trigger an unhandled exception or similar error that was discovered and handled by the application's environment, it may still indicate unexpected conditions that were not handled by the application itself. Automated static analysis, commonly referred to as Static Application Security Testing (SAST), can find some instances of this weakness by analyzing source code (or binary/compiled code) without having to execute it. Typically, this is done by building a model of data flow and control flow, then searching for potentially-vulnerable patterns that connect "sources" (origins of input) with "sinks" (destinations where the data interacts with external components, a lower layer such as the OS, etc.) Use tools that are integrated duringcompilation to insert runtime error-checking mechanismsrelated to memory safety errors, such as AddressSanitizer(ASan) for C/C++ [REF-1518]. For any pointers that could have been modified or provided from a function that can return NULL, check the pointer for NULL before use. When working with a multithreaded or otherwise asynchronous environment, ensure that proper locking APIs are used to lock before the check, and unlock when it has finished [REF-1484]. Select a programming language that is not susceptible to these issues. Check the results of all functions that return a value and verify that the value is non-null before acting upon it. Identify all variables and data stores that receive information from external sources, and apply input validation to make sure that they are only initialized to expected values. Explicitly initialize all variables and other data stores, either during declaration or just before the first usage. C++ library for LLM inference has NULL pointer dereference if a read operation fails race condition causes a table to be corrupted if a timer activates while it is being modified, leading to resultant NULL dereference; also involves locking. large number of packets leads to NULL dereference packet with invalid error status value triggers NULL dereference Chain: race condition for an argument value, possibly resulting in NULL dereference ssh component for Go allows clients to cause a denial of service (nil pointer dereference) against SSH servers. Chain: Use of an unimplemented network socket operation pointing to an uninitialized handler function (CWE-456) causes a crash because of a null pointer dereference (CWE-476). Chain: race condition (CWE-362) might allow resource to be released before operating on it, leading to NULL dereference (CWE-476) Chain: some unprivileged ioctls do not verify that a structure has been initialized before invocation, leading to NULL dereference Chain: IP and UDP layers each track the same value with different mechanisms that can get out of sync, possibly resulting in a NULL dereference Chain: Use of an unimplemented network socket operation pointing to an uninitialized handler function (CWE-456) causes a crash because of a null pointer dereference (CWE-476) Chain: improper initialization of memory can lead to NULL dereference Chain: game server can access player data structures before initialization has happened leading to NULL dereference Chain: The return value of a function returning a pointer is not checked for success (CWE-252) resulting in the later use of an uninitialized variable (CWE-456) and a null pointer dereference (CWE-476) Chain: a message having an unknown message type may cause a reference to uninitialized memory resulting in a null pointer dereference (CWE-476) or dangling pointer (CWE-825), possibly crashing the system or causing heap corruption. Chain: unchecked return value can lead to NULL dereference SSL software allows remote attackers to cause a denial of service (crash) via a crafted SSL/TLS handshake that triggers a null dereference. Network monitor allows remote attackers to cause a denial of service (crash) via a malformed RADIUS packet that triggers a null dereference. Network monitor allows remote attackers to cause a denial of service (crash) via a malformed Q.931, which triggers a null dereference. Chat client allows remote attackers to cause a denial of service (crash) via a passive DCC request with an invalid ID number, which causes a null dereference. Server allows remote attackers to cause a denial of service (crash) via malformed requests that trigger a null dereference. OS allows remote attackers to cause a denial of service (crash from null dereference) or execute arbitrary code via a crafted request during authentication protocol selection. Game allows remote attackers to cause a denial of service (server crash) via a missing argument, which triggers a null pointer dereference. Network monitor allows remote attackers to cause a denial of service (crash) or execute arbitrary code via malformed packets that cause a NULL pointer dereference. Chain: System call returns wrong value (CWE-393), leading to a resultant NULL dereference (CWE-476).

References


 

AFFECTED (from MITRE)


Vendor Product Versions
Linux Linux
  • 5305cb830834549b9203ad4d009ad5483c5e293f < 7af3309c7a2ef26831a67125b11c34a7e01c1b2a [affected]
  • 5305cb830834549b9203ad4d009ad5483c5e293f < 0ce59fb1c73fdd5b6028226aeb46259a0cdc0957 [affected]
  • 5305cb830834549b9203ad4d009ad5483c5e293f < 0a5014ad37c77ac6a2c525137c00a0e1724f6020 [affected]
  • 5305cb830834549b9203ad4d009ad5483c5e293f < d904e4d845aafbcfd8a40c1df7d999f02f062be8 [affected]
  • 5305cb830834549b9203ad4d009ad5483c5e293f < 86b19031dbc79abc378dfae357f6ea33ebeb0c95 [affected]
  • 5305cb830834549b9203ad4d009ad5483c5e293f < b0e4765740040c44039282057ecacd7435d1d2ba [affected]
  • 5305cb830834549b9203ad4d009ad5483c5e293f < ffc440a76a0f476a7e6ea838ec0dc8e9979944d1 [affected]
  • 5305cb830834549b9203ad4d009ad5483c5e293f < 2026559a6c4ce34db117d2db8f710fe2a9420d5a [affected]
Linux Linux
  • 3.9 [affected]
  • < 3.9 [unaffected]
  • 4.19.325 ≤ 4.19.* [unaffected]
  • 5.4.287 ≤ 5.4.* [unaffected]
  • 5.10.231 ≤ 5.10.* [unaffected]
  • 5.15.174 ≤ 5.15.* [unaffected]
  • 6.1.119 ≤ 6.1.* [unaffected]
  • 6.6.63 ≤ 6.6.* [unaffected]
  • 6.11.10 ≤ 6.11.* [unaffected]
  • 6.12 ≤ * [unaffected]
© 2022 The MITRE Corporation. This work is reproduced and distributed with the permission of The MITRE Corporation.

CPE

cpe start end
Configuration 1
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* >= 3.9 < 6.1.119
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* >= 6.6.0 < 6.6.63
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* >= 6.11.0 < 6.11.10


REMEDIATION


Patch

Url
https://git.kernel.org/stable/c/2026559a6c4ce34db117d2db8f710fe2a9420d5a
https://git.kernel.org/stable/c/7af3309c7a2ef26831a67125b11c34a7e01c1b2a
https://git.kernel.org/stable/c/86b19031dbc79abc378dfae357f6ea33ebeb0c95
https://git.kernel.org/stable/c/b0e4765740040c44039282057ecacd7435d1d2ba
https://git.kernel.org/stable/c/ffc440a76a0f476a7e6ea838ec0dc8e9979944d1


EXPLOITS


Exploit-db.com

id description date
No known exploits

POC Github

Url
No known exploits

Other Nist (github, ...)

Url
No known exploits


CAPEC


Common Attack Pattern Enumerations and Classifications

id description severity
No entry