5.5 CVE-2023-52458

Patch
 

In the Linux kernel, the following vulnerability has been resolved: block: add check that partition length needs to be aligned with block size Before calling add partition or resize partition, there is no check on whether the length is aligned with the logical block size. If the logical block size of the disk is larger than 512 bytes, then the partition size maybe not the multiple of the logical block size, and when the last sector is read, bio_truncate() will adjust the bio size, resulting in an IO error if the size of the read command is smaller than the logical block size.If integrity data is supported, this will also result in a null pointer dereference when calling bio_integrity_free.
https://nvd.nist.gov/vuln/detail/CVE-2023-52458

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.) 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. 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. 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: uninitialized function pointers can be dereferenced allowing code execution 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


 

CPE

cpe start end
Configuration 1
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* < 5.10.215
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* >= 5.11.0 < 5.15.148
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* >= 5.16.0 < 6.1.75
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* >= 6.2.0 < 6.6.14
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* >= 6.7.0 < 6.7.2


REMEDIATION


Patch

Url
https://git.kernel.org/stable/c/5010c27120962c85d2f421d2cf211791c9603503
https://git.kernel.org/stable/c/6f64f866aa1ae6975c95d805ed51d7e9433a0016
https://git.kernel.org/stable/c/8f6dfa1f1efe6dcca2d43e575491d8fcbe922f62
https://git.kernel.org/stable/c/bcdc288e7bc008daf38ef0401b53e4a8bb61bbe5
https://git.kernel.org/stable/c/cb16cc1abda18a9514106d2ac8c8d7abc0be5ed8
https://git.kernel.org/stable/c/ef31cc87794731ffcb578a195a2c47d744e25fb8
https://git.kernel.org/stable/c/5010c27120962c85d2f421d2cf211791c9603503
https://git.kernel.org/stable/c/6f64f866aa1ae6975c95d805ed51d7e9433a0016
https://git.kernel.org/stable/c/8f6dfa1f1efe6dcca2d43e575491d8fcbe922f62
https://git.kernel.org/stable/c/bcdc288e7bc008daf38ef0401b53e4a8bb61bbe5
https://git.kernel.org/stable/c/cb16cc1abda18a9514106d2ac8c8d7abc0be5ed8
https://git.kernel.org/stable/c/ef31cc87794731ffcb578a195a2c47d744e25fb8


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