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
debian/linuxto a version that resolves this vulnerability.Fixed in 6.1.129-1Fixed in 6.1.135-1Fixed in 6.12.25-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
redhat/kernelto a version that resolves this vulnerability.Fixed in 6.8 - 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.