CVE-2023-0394: Null Pointer Dereference
A NULL pointer dereference flaw was found in rawv6pushpendingframes in net/ipv6/raw.c in the network subcomponent in the Linux kernel. This flaw causes the system to crash.
Other sources
A null pointer dereference in Linux kernel that affects multiple kernel versions.
The bug is in "rawv6pushpendingframes" function in net/ipv6/raw.c. According to Herbert Xu, who fixed the bug, the root cause is that "totallen = inetsk(sk)->cork.base.length" in this function also counts the length of the extension header (+ the amount of valid data in the socket cork queue). In the vulnerable version of the function, it directly uses the length as the amount of data in the cork queue. In the following code:
struct skbuff csumskb = NULL; ... skbqueuewalk(&sk->skwritequeue, skb) { ... if (offset >= len) { offset -= len; continue; } csumskb = skb; } skb = csumskb;
If the offset is larger than the amount of data in the socket cork queue but smaller than valid data length + extension header length, then the loop shown above will always enter the "if (offset >= len)" branch. As a result, csumskb will never be set. Consequently, the final skb variable will be set to NULL.
Null dereference happens in the following "skbtransportoffset(skb);" call.
— Red Hat
Affected Software
Remediation
Information
Event History
Parent advisories
This vulnerability appears in the following advisories.
Frequently Asked Questions
What is the severity of CVE-2023-0394?
CVE-2023-0394 has a high severity due to its potential to cause system crashes.
How do I fix CVE-2023-0394?
To fix CVE-2023-0394, update your Linux kernel to the specified versions or later: 0:4.18.0-477.10.1.rt7.274.el8_8, 0:4.18.0-477.10.1.el8_8, 0:5.14.0-284.11.1.el9_2, 0:5.14.0-284.11.1.rt14.296.el9_2, or greater.
Which Linux kernel versions are affected by CVE-2023-0394?
CVE-2023-0394 affects multiple kernel versions including versions prior to 6.2.
What systems are likely to be impacted by CVE-2023-0394?
Systems running vulnerable versions of the Linux kernel, particularly Red Hat and Debian distributions, are likely to be impacted by CVE-2023-0394.
Is there a workaround for CVE-2023-0394?
Currently, the recommended mitigation for CVE-2023-0394 is to update to a patched version of the Linux kernel, as no specific workaround has been provided.