CVE-2024-38595: net/mlx5: Fix peer devlink set for SF representor devlink port
In the Linux kernel, the following vulnerability has been resolved:
net/mlx5: Fix peer devlink set for SF representor devlink port
The cited patch change register devlink flow, and neglect to reflect the changes for peer devlink set logic. Peer devlink set is triggering a call trace if done after devlregister.[1]
Hence, align peer devlink set logic with register devlink flow.
[1] WARNING: CPU: 4 PID: 3394 at net/devlink/core.c:155 devlinkrelnestedinadd+0x177/0x180 CPU: 4 PID: 3394 Comm: kworker/u40:1 Not tainted 6.9.0-rc4forlinustmindebug202404161408 #1 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.13.0-0-gf21b5a4aeb02-prebuilt.qemu.org 04/01/2014 Workqueue: mlx5vhcaevent0 mlx5vhcastateworkhandler [mlx5core] RIP: 0010:devlinkrelnestedinadd+0x177/0x180 Call Trace: <TASK> ? warn+0x78/0x120 ? devlinkrelnestedinadd+0x177/0x180 ? reportbug+0x16d/0x180 ? handlebug+0x3c/0x60 ? excinvalidop+0x14/0x70 ? asmexcinvalidop+0x16/0x20 ? devlinkportinit+0x30/0x30 ? devlinkporttypeclear+0x50/0x50 ? devlinkrelnestedinadd+0x177/0x180 ? devlinkrelnestedinadd+0xdd/0x180 mlx5sfmdevevent+0x74/0xb0 [mlx5core] notifiercallchain+0x35/0xb0 blockingnotifiercallchain+0x3d/0x60 mlx5blockingnotifiercallchain+0x22/0x30 [mlx5core] mlx5sfdevprobe+0x185/0x3e0 [mlx5core] auxiliarybusprobe+0x38/0x80 ? driversysfsadd+0x51/0x80 reallyprobe+0xc5/0x3a0 ? driverprobedevice+0x90/0x90 driverprobedevice+0x80/0x160 driverprobedevice+0x1e/0x90 deviceattachdriver+0x7d/0x100 busforeachdrv+0x80/0xd0 deviceattach+0xbc/0x1f0 busprobedevice+0x86/0xa0 deviceadd+0x64f/0x860 auxiliarydeviceadd+0x3b/0xa0 mlx5sfdevadd+0x139/0x330 [mlx5core] mlx5sfdevstatechangehandler+0x1e4/0x250 [mlx5core] notifiercallchain+0x35/0xb0 blockingnotifiercallchain+0x3d/0x60 mlx5vhcastateworkhandler+0x151/0x200 [mlx5core] processonework+0x13f/0x2e0 workerthread+0x2bd/0x3c0 ? rescuerthread+0x410/0x410 kthread+0xc4/0xf0 ? kthreadcompleteandexit+0x20/0x20 retfromfork+0x2d/0x50 ? kthreadcompleteandexit+0x20/0x20 retfromforkasm+0x11/0x20 </TASK>
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 5.10.223-1Fixed in 5.10.234-1Fixed in 6.1.129-1Fixed in 6.1.135-1Fixed in 6.12.22-1Fixed in 6.12.25-1
Event History
Frequently Asked Questions
What is the severity of CVE-2024-38595?
CVE-2024-38595 has been classified as a medium severity vulnerability in the Linux kernel.
How do I fix CVE-2024-38595?
To fix CVE-2024-38595, update to the patched versions of the Linux kernel: 5.10.223-1, 5.10.226-1, 6.1.123-1, 6.1.128-1, or 6.12.12-1.
What systems are affected by CVE-2024-38595?
CVE-2024-38595 affects specific Debian packages of the Linux kernel.
What does CVE-2024-38595 affect in the Linux kernel?
CVE-2024-38595 affects the peer devlink set logic related to the net/mlx5 component of the Linux kernel.
When was CVE-2024-38595 resolved?
CVE-2024-38595 was resolved with patches included in kernel updates released in 2024.