nvmet-tcp: fix kernel crash if commands allocation fails
Published Sep 18, 2024
7.5
HIGHCVSS 3.1
EPSS 0.76%
Description
If the commands allocation fails in nvmet_tcp_alloc_cmds() the kernel crashes in nvmet_tcp_release_queue_work() because of a NULL pointer dereference.
nvmet: failed to install queue 0 cntlid 1 ret 6 Unable to handle kernel NULL pointer dereference at virtual address 0000000000000008
Fix the bug by setting queue->nr_cmds to zero in case nvmet_tcp_alloc_cmd() fails.
Affected products
-
Affected
- ≥ 872d26a391da, < 03e1fd0327fa
- ≥ 872d26a391da, < 489f2913a63f
- ≥ 872d26a391da, < 50632b877ce5
- ≥ 872d26a391da, < 5572a55a6f83
- ≥ 872d26a391da, < 6c04d1e3ab22
- ≥ 872d26a391da, < 7957c731fc2b
- ≥ 872d26a391da, < 91dad30c5607
-
Affected
- 5.0
Unaffected
- ≥ 0, < 5.0
- ≥ 5.10.226, ≤ 5.10.*
- ≥ 5.15.167, ≤ 5.15.*
- ≥ 5.4.284, ≤ 5.4.*
- ≥ 6.1.110, ≤ 6.1.*
- ≥ 6.10.10, ≤ 6.10.*
- 6.11
- ≥ 6.6.51, ≤ 6.6.*
Default status is the baseline for the product. Each version can override it (patched versions can be marked unaffected).
| Vendor | Product | Default status | Versions |
|---|---|---|---|
| Linux | Linux | unaffected | Affected
|
| Linux | Linux | affected | Affected
Unaffected
|
- ≥ 5.0 · < 5.4.284
- ≥ 5.5 · < 5.10.226
- ≥ 5.11 · < 5.15.167
- ≥ 5.16 · < 6.1.110
- ≥ 6.2 · < 6.6.51
- ≥ 6.7 · < 6.10.10
- 6.11
- 6.11
- 6.11
- 6.11
- 6.11
- 6.11
No data.
Red Hat Enterprise Linux 6
kernel
Not affected
Red Hat Enterprise Linux 7
kernel
Not affected
Red Hat Enterprise Linux 7
kernel-rt
Not affected
Red Hat Enterprise Linux 8
kernel
Will not fix
Red Hat Enterprise Linux 8
kernel-rt
Will not fix
Red Hat Enterprise Linux 9
kernel
Will not fix
Red Hat Enterprise Linux 9
kernel-rt
Will not fix
| Product | Package | State | Advisory |
|---|---|---|---|
| Red Hat Enterprise Linux 6 | kernel | Not affected | n/a |
| Red Hat Enterprise Linux 7 | kernel | Not affected | n/a |
| Red Hat Enterprise Linux 7 | kernel-rt | Not affected | n/a |
| Red Hat Enterprise Linux 8 | kernel | Will not fix | n/a |
| Red Hat Enterprise Linux 8 | kernel-rt | Will not fix | n/a |
| Red Hat Enterprise Linux 9 | kernel | Will not fix | n/a |
| Red Hat Enterprise Linux 9 | kernel-rt | Will not fix | n/a |
No package ranges for this CVE.
Remediation
Red Hat mitigation
To mitigate this issue, prevent the `nvmet-tcp` kernel module from loading. This can be achieved by blacklisting the module. 1. Create a new file `/etc/modprobe.d/blacklist-nvmet-tcp.conf` with the following content: ``` blacklist nvmet_tcp ``` 2. Rebuild the `initramfs` to ensure the blacklist is applied during boot: ```bash dracut -f -v ``` 3. Reboot the system for the changes to take effect. This mitigation may impact systems that rely on NVMe over TCP functionality.
References (15)
- https://access.redhat.com/security/cve/CVE-2024-46737 Vendor Advisory
- https://bugzilla.redhat.com/show_bug.cgi?id=2313085 Issue Tracking
- https://euvd.enisa.europa.eu/vulnerability/EUVD-2024-41998 Advisory
- https://git.kernel.org/stable/c/03e1fd0327fa5e2174567f5fe9290fe21d21b8f4 Patch
- https://git.kernel.org/stable/c/489f2913a63f528cfe3f21722583fb981967ecda Patch
- https://git.kernel.org/stable/c/50632b877ce55356f5d276b9add289b1e7ddc683 Patch
- https://git.kernel.org/stable/c/5572a55a6f830ee3f3a994b6b962a5c327d28cb3 Patch
- https://git.kernel.org/stable/c/6c04d1e3ab22cc5394ef656429638a5947f87244 Patch
- https://git.kernel.org/stable/c/7957c731fc2b23312f8935812dee5a0b14b04e2d Patch
- https://git.kernel.org/stable/c/91dad30c5607e62864f888e735d0965567827bdf Patch
- https://lists.debian.org/debian-lts-announce/2024/10/msg00003.html
- https://lists.debian.org/debian-lts-announce/2025/01/msg00001.html
- https://lore.kernel.org/linux-cve-announce/2024091833-CVE-2024-46737-d36f@gregkh/T
- https://nvd.nist.gov/vuln/detail/CVE-2024-46737
- https://www.cve.org/CVERecord?id=CVE-2024-46737
Change history (0)
No recorded changes yet.
CVE.org / MITRE
CISA Vulnrichment
GitHub
No data