Description
In the Linux kernel, the following vulnerability has been resolved: net/mlx5: lag: Check for LAG device before creating debugfs __mlx5_lag_dev_add_mdev() may return 0 (success) even when an error occurs that is handled gracefully. Consequently, the initialization flow proceeds to call mlx5_ldev_add_debugfs() even when there is no valid LAG context. mlx5_ldev_add_debugfs() blindly created the debugfs directory and attributes. This exposed interfaces (like the members file) that rely on a valid ldev pointer, leading to potential NULL pointer dereferences if accessed when ldev is NULL. Add a check to verify that mlx5_lag_dev(dev) returns a valid pointer before attempting to create the debugfs entries.
Affected products
Version statuses are supplied by the assigning organization. Consult the original record for detailed ranges and platform conditions.
Linux Linux
Default version status: unaffected
7f46a0b7327ae261f9981888708dbca22c283900 to < a3db46d5f4df92630a96f7bc77b60e75c2353e06affected7f46a0b7327ae261f9981888708dbca22c283900 to < 7129632cab3e4d23510b21930aa73b8d97a859f5affected7f46a0b7327ae261f9981888708dbca22c283900 to < cfa774e6c920c81e700327bf10db8cb50d5db456affected7f46a0b7327ae261f9981888708dbca22c283900 to < c53cf44588a93000f71817a6bb87a66353c48deeaffected7f46a0b7327ae261f9981888708dbca22c283900 to < 89c65f2fcd8801365b410f40a427cbcd7f4c28e9affected7f46a0b7327ae261f9981888708dbca22c283900 to < bf16bca6653679d8a514d6c1c5a2c67065033f14affected
Linux Linux
Default version status: affected
5.19affected0 to < 5.19unaffected6.1.168 to ≤ 6.1.*unaffected6.6.134 to ≤ 6.6.*unaffected6.12.81 to ≤ 6.12.*unaffected6.18.22 to ≤ 6.18.*unaffected6.19.12 to ≤ 6.19.*unaffected7.0 to ≤ *unaffected
References
- https://git.kernel.org/stable/c/a3db46d5f4df92630a96f7bc77b60e75c2353e06 ↗
- https://git.kernel.org/stable/c/7129632cab3e4d23510b21930aa73b8d97a859f5 ↗
- https://git.kernel.org/stable/c/cfa774e6c920c81e700327bf10db8cb50d5db456 ↗
- https://git.kernel.org/stable/c/c53cf44588a93000f71817a6bb87a66353c48dee ↗
- https://git.kernel.org/stable/c/89c65f2fcd8801365b410f40a427cbcd7f4c28e9 ↗
- https://git.kernel.org/stable/c/bf16bca6653679d8a514d6c1c5a2c67065033f14 ↗