CVE-2024-50147: net/mlx5: Fix command bitmask initialization

Published Nov 7, 2024
·
Updated

In the Linux kernel, the following vulnerability has been resolved:

net/mlx5: Fix command bitmask initialization

Command bitmask have a dedicated bit for MANAGEPAGES command, this bit isn't Initialize during command bitmask Initialization, only during MANAGEPAGES.

In addition, mlx5cmdtriggercompletions() is trying to trigger completion for MANAGEPAGES command as well.

Hence, in case health error occurred before any MANAGEPAGES command have been invoke (for example, during mlx5enablehca()), mlx5cmdtriggercompletions() will try to trigger completion for MANAGEPAGES command, which will result in null-ptr-deref error.[1]

Fix it by Initialize command bitmask correctly.

While at it, re-write the code for better understanding.

[1] BUG: KASAN: null-ptr-deref in mlx5cmdtriggercompletions+0x1db/0x600 [mlx5core] Write of size 4 at addr 0000000000000214 by task kworker/u96:2/12078 CPU: 10 PID: 12078 Comm: kworker/u96:2 Not tainted 6.9.0-rc2forupstreamdebug202404071901 #1 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.13.0-0-gf21b5a4aeb02-prebuilt.qemu.org 04/01/2014 Workqueue: mlx5health0000:08:00.0 mlx5fwfatalreportererrwork [mlx5core] Call Trace: <TASK> dumpstacklvl+0x7e/0xc0 kasanreport+0xb9/0xf0 kasancheckrange+0xec/0x190 mlx5cmdtriggercompletions+0x1db/0x600 [mlx5core] mlx5cmdflush+0x94/0x240 [mlx5core] entererrorstate+0x6c/0xd0 [mlx5core] mlx5fwfatalreportererrwork+0xf3/0x480 [mlx5core] processonework+0x787/0x1490 ? lockdephardirqsonprepare+0x400/0x400 ? pwqdecnrinflight+0xda0/0xda0 ? assignwork+0x168/0x240 workerthread+0x586/0xd30 ? rescuerthread+0xae0/0xae0 kthread+0x2df/0x3b0 ? kthreadcompleteandexit+0x20/0x20 retfromfork+0x2d/0x70 ? kthreadcompleteandexit+0x20/0x20 retfromforkasm+0x11/0x20 </TASK>

Affected Software

8 affected componentsFixes available
Linux Linux kernel>=6.1<6.1.115
Linux Linux kernel>=6.2<6.6.59
Linux Linux kernel>=6.7<6.11.6
Linux Linux kernel=6.12-rc1
Linux Linux kernel=6.12-rc2
Linux Linux kernel=6.12-rc3
debian/linux
5.10.223-15.10.234-16.1.129-16.1.133-16.12.22-1
debian/linux-6.1
6.1.129-1~deb11u1

Event History

Nov 7, 2024
CVE Published
via MITRE·09:31 AM
Data Sourced
via MITRE·09:31 AM
Description
Data Sourced
via NVD·10:15 AM
RemedyDescriptionSeverityWeaknessAffected Software
Apr 25, 2025
Data Sourced
via Ubuntu·12:58 AM
RemedyDescriptionSeverityAffected Software
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2024-50147?

The severity of CVE-2024-50147 has not been explicitly rated but involves a technical flaw in the Linux kernel's command bitmask initialization.

2

How does CVE-2024-50147 affect Linux kernel users?

CVE-2024-50147 affects certain versions of the Linux kernel by potentially leading to mismanagement of command bits.

3

How do I fix CVE-2024-50147?

To fix CVE-2024-50147, users should upgrade their Linux kernel to a patched version that addresses the command bitmask initialization issue.

4

Which versions of the Linux kernel are affected by CVE-2024-50147?

CVE-2024-50147 affects Linux kernel versions between 6.1 and 6.12-rc3, including several specific release candidates.

5

Is CVE-2024-50147 exploitable?

While the specifics of exploitation are not detailed, vulnerabilities in command bitmask initialization can have security implications.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203