CVE-2024-26595: mlxsw: spectrum_acl_tcam: Fix NULL pointer dereference in error path
In the Linux kernel, the following vulnerability has been resolved:
mlxsw: spectrumacltcam: Fix NULL pointer dereference in error path
When calling mlxswspacltcamregiondestroy() from an error path after failing to attach the region to an ACL group, we hit a NULL pointer dereference upon 'region->group->tcam' [1].
Fix by retrieving the 'tcam' pointer using mlxswspacltotcam().
[1] BUG: kernel NULL pointer dereference, address: 0000000000000000 [...] RIP: 0010:mlxswspacltcamregiondestroy+0xa0/0xd0 [...] Call Trace: mlxswspacltcamvchunkget+0x88b/0xa20 mlxswspacltcamventryadd+0x25/0xe0 mlxswspaclruleadd+0x47/0x240 mlxswspflowerreplace+0x1a9/0x1d0 tcsetupcbadd+0xdc/0x1c0 flhwreplacefilter+0x146/0x1f0 flchange+0xc17/0x1360 tcnewtfilter+0x472/0xb90 rtnetlinkrcvmsg+0x313/0x3b0 netlinkrcvskb+0x58/0x100 netlinkunicast+0x244/0x390 netlinksendmsg+0x1e4/0x440 syssendmsg+0x164/0x260 syssendmsg+0x9a/0xe0 syssendmsg+0x7a/0xc0 dosyscall64+0x40/0xe0 entrySYSCALL64afterhwframe+0x63/0x6b
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.8 - Upgrade
Upgrade
ubuntu/linux-azureto a version that resolves this vulnerability.Fixed in 4.15.0-1185.200~14.04.1 - Upgrade
Upgrade
ubuntu/linux-aws-hweto a version that resolves this vulnerability.Fixed in 4.15.0-1177.190~16.04.1 - Upgrade
Upgrade
ubuntu/linux-azureto a version that resolves this vulnerability.Fixed in 4.15.0-1185.200~16.04.1 - Upgrade
Upgrade
ubuntu/linux-gcpto a version that resolves this vulnerability.Fixed in 4.15.0-1170.187~16.04.1 - Upgrade
Upgrade
ubuntu/linux-hweto a version that resolves this vulnerability.Fixed in 4.15.0-233.245~16.04.1 - Upgrade
Upgrade
ubuntu/linux-oracleto a version that resolves this vulnerability.Fixed in 4.15.0-1139.150~16.04.1 - Upgrade
Upgrade
ubuntu/linuxto a version that resolves this vulnerability.Fixed in 4.15.0-233.245 - Upgrade
Upgrade
ubuntu/linux-awsto a version that resolves this vulnerability.Fixed in 4.15.0-1177.190 - Upgrade
Upgrade
ubuntu/linux-azure-4.15to a version that resolves this vulnerability.Fixed in 4.15.0-1185.200 - Upgrade
Upgrade
ubuntu/linux-gcp-4.15to a version that resolves this vulnerability.Fixed in 4.15.0-1170.187 - Upgrade
Upgrade
ubuntu/linux-kvmto a version that resolves this vulnerability.Fixed in 4.15.0-1160.165 - Upgrade
Upgrade
ubuntu/linux-oracleto a version that resolves this vulnerability.Fixed in 4.15.0-1139.150 - Upgrade
Upgrade
ubuntu/linux-aws-fipsto a version that resolves this vulnerability.Fixed in 4.15.0-2115.121 - Upgrade
Upgrade
ubuntu/linux-azure-fipsto a version that resolves this vulnerability.Fixed in 4.15.0-2094.100 - Upgrade
Upgrade
ubuntu/linux-fipsto a version that resolves this vulnerability.Fixed in 4.15.0-1131.142 - Upgrade
Upgrade
ubuntu/linux-gcp-fipsto a version that resolves this vulnerability.Fixed in 4.15.0-2078.84 - Upgrade
Upgrade
ubuntu/linux-azure-6.5to a version that resolves this vulnerability.Fixed in 6.5.0-1022.23~22.04.1 - Upgrade
Upgrade
ubuntu/linux-gcp-6.5to a version that resolves this vulnerability.Fixed in 6.5.0-1022.24~22.04.1 - Upgrade
Upgrade
ubuntu/linux-hwe-6.5to a version that resolves this vulnerability.Fixed in 6.5.0-41.41~22.04.2 - Upgrade
Upgrade
ubuntu/linux-lowlatency-hwe-6.5to a version that resolves this vulnerability.Fixed in 6.5.0-41.41.1~22.04.1 - Upgrade
Upgrade
ubuntu/linux-nvidia-6.5to a version that resolves this vulnerability.Fixed in 6.5.0-1021.22 - Upgrade
Upgrade
ubuntu/linux-oem-6.5to a version that resolves this vulnerability.Fixed in 6.5.0-1024.25 - Upgrade
Upgrade
ubuntu/linux-oracle-6.5to a version that resolves this vulnerability.Fixed in 6.5.0-1024.24~22.04.1 - Upgrade
Upgrade
ubuntu/linux-riscv-6.5to a version that resolves this vulnerability.Fixed in 6.5.0-40.40.1~22.04.1 - Upgrade
Upgrade
ubuntu/linux-starfive-6.5to a version that resolves this vulnerability.Fixed in 6.5.0-1015.16~22.04.1 - Upgrade
Upgrade
ubuntu/linux-raspi-realtimeto a version that resolves this vulnerability.Fixed in 6.8.0-2001.1 - Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 6.1.123-1 - Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 6.6.15-1 - Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 6.1.176-1Fixed in 6.1.190-1Fixed in 6.12.107-1Fixed in 6.12.115-2Fixed in 7.2.12-1Fixed in 7.2.15-1 - Compensating control
Apply the code fix: in mlxsw spectrum_acl_tcam, fix the error path NULL pointer dereference by retrieving the 'tcam' pointer using mlxsw_sp_acl_to_tcam() when calling mlxsw_sp_acl_tcam_region_destroy().
Event History
Frequently Asked Questions
What is the severity of CVE-2024-26595?
CVE-2024-26595 has been classified as a low severity vulnerability in the Linux kernel.
How do I fix CVE-2024-26595?
To mitigate CVE-2024-26595, it is recommended to upgrade to kernel version 6.8 or later for Red Hat and 6.1.123-1 or later for Debian.
Which versions of the Linux kernel are affected by CVE-2024-26595?
CVE-2024-26595 affects Linux kernel versions from 4.11.0 up to 6.6.14 and 6.7.0 up to 6.7.2.
What is the impact of CVE-2024-26595?
The impact of CVE-2024-26595 includes a potential NULL pointer dereference that can occur in an error path.
Who can be affected by CVE-2024-26595?
Users running vulnerable versions of the Linux kernel on affected systems may be prone to CVE-2024-26595.