CVE-2024-41066: ibmvnic: Add tx check to prevent skb leak
In the Linux kernel, the following vulnerability has been resolved:
ibmvnic: Add tx check to prevent skb leak
Below is a summary of how the driver stores a reference to an skb during transmit: txbuff[freemap[consumerindex]]->skb = newskb; freemap[consumerindex] = IBMVNICINVALIDMAP; consumerindex ++; Where variable data looks like this: freemap == [4, IBMVNICINVALIDMAP, IBMVNICINVALIDMAP, 0, 3] consumerindex^ txbuff == [skb=null, skb=, skb=, skb=null, skb=null]
The driver has checks to ensure that freemap[consumerindex] pointed to a valid index but there was no check to ensure that this index pointed to an unused/null skb address. So, if, by some chance, our freemap and txbuff lists become out of sync then we were previously risking an skb memory leak. This could then cause tcp congestion control to stop sending packets, eventually leading to ETIMEDOUT.
Therefore, add a conditional to ensure that the skb address is null. If not then warn the user (because this is still a bug that should be patched) and free the old pointer to prevent memleak/tcp problems.
Other sources
In the Linux kernel, the following vulnerability has been resolved:
ibmvnic: Add tx check to prevent skb leak
Below is a summary of how the driver stores a reference to an skb during transmit: txbuff[freemap[consumerindex]]->skb = newskb; freemap[consumerindex] = IBMVNICINVALIDMAP; consumerindex ++; Where variable data looks like this: freemap == [4, IBMVNICINVALIDMAP, IBMVNICINVALIDMAP, 0, 3] consumerindex^ txbuff == [skb=null, skb=<ptr>, skb=<ptr>, skb=null, skb=null]
The driver has checks to ensure that freemap[consumerindex] pointed to a valid index but there was no check to ensure that this index pointed to an unused/null skb address. So, if, by some chance, our freemap and txbuff lists become out of sync then we were previously risking an skb memory leak. This could then cause tcp congestion control to stop sending packets, eventually leading to ETIMEDOUT.
Therefore, add a conditional to ensure that the skb address is null. If not then warn the user (because this is still a bug that should be patched) and free the old pointer to prevent memleak/tcp problems.
— Red Hat
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
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
redhat/kernelto a version that resolves this vulnerability.Fixed in 6.1.101 - Upgrade
Upgrade
redhat/kernelto a version that resolves this vulnerability.Fixed in 6.6.42 - Upgrade
Upgrade
redhat/kernelto a version that resolves this vulnerability.Fixed in 6.9.11 - Upgrade
Upgrade
redhat/kernelto a version that resolves this vulnerability.Fixed in 6.10 - Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 6.1.129-1Fixed in 6.1.135-1Fixed in 6.12.27-1 - Upgrade
Upgrade
debian/linux-6.1to a version that resolves this vulnerability.Fixed in 6.1.129-1~deb11u1 - Upgrade
Upgrade
Linux kernel ibmvnicto a version that resolves this vulnerability.Patch ibmvnic: Add tx check to prevent skb leak - Configuration
Modify ibmvnic transmit path to add a conditional that verifies tx_buff[free_map[consumer_index]] points to an unused/null skb address before assigning: tx_buff[free_map[consumer_index]]->skb = new_skb. This prevents skb memory leaks if free_map and tx_buff become out of sync.
ibmvnic (Linux kernel driver) tx skb pointer null check = conditional check before setting tx_buff[free_map[consumer_index]]->skb = new_skb (ensure skb address is null)
Event History
Frequently Asked Questions
What is the severity of CVE-2024-41066?
CVE-2024-41066 is classified as a moderate severity vulnerability affecting the Linux kernel.
How do I fix CVE-2024-41066?
To resolve CVE-2024-41066, update the Linux kernel to version 6.1.101 or later, specifically to versions like 6.6.42, 6.9.11, or 6.10.
Which Linux kernel versions are affected by CVE-2024-41066?
CVE-2024-41066 impacts Linux kernel versions below 6.1.101, 6.6.42, 6.9.11, and 6.10.
Is CVE-2024-41066 exploitable?
Exploitation of CVE-2024-41066 could potentially lead to a denial of service or memory corruption issues.
What software packages are related to CVE-2024-41066?
CVE-2024-41066 affects the Red Hat kernel, Debian Linux, and the Linux kernel in general.