Skip to content
OpenAdvisories
Unscored CVE-2024-26698 EUVD-2024-23960GHSA-7g56-3wmh-7x3p

hv_netvsc: Fix race condition between netvsc_probe and netvsc_remove

Published Apr 3, 2024 · Updated May 11, 2026 · Assigned by Linux

Vendor: Linux Product: Linux Package: linux Package: linux Package: linux-allwinner-5.19 Package: linux-aws Package: linux-aws-5.0 Package: linux-aws-5.11 Package: linux-aws-5.13 Package: linux-aws-5.15 Package: linux-aws-5.19 Package: linux-aws-5.3 Package: linux-aws-5.8 Package: linux-aws-6.2 Package: linux-aws-6.5 Package: linux-aws-fips Package: linux-azure Package: linux-azure-5.11 Package: linux-azure-5.13 Package: linux-azure-5.15 Package: linux-azure-5.19 Package: linux-azure-5.3 Package: linux-azure-5.4 Package: linux-azure-5.8 Package: linux-azure-6.2 Package: linux-azure-6.5 Package: linux-azure-edge Package: linux-azure-fde Package: linux-azure-fde-5.19 Package: linux-azure-fde-6.2 Package: linux-azure-fips Package: linux-bluefield Package: linux-fips Package: linux-gcp Package: linux-gcp-5.11 Package: linux-gcp-5.13 Package: linux-gcp-5.15 Package: linux-gcp-5.19 Package: linux-gcp-5.3 Package: linux-gcp-5.8 Package: linux-gcp-6.2 Package: linux-gcp-6.5 Package: linux-gcp-fips Package: linux-gke Package: linux-gke-4.15 Package: linux-gke-5.15 Package: linux-gke-5.4 Package: linux-gkeop Package: linux-gkeop-5.15 Package: linux-gkeop-5.4 Package: linux-hwe Package: linux-hwe-5.11 Package: linux-hwe-5.13 Package: linux-hwe-5.15 Package: linux-hwe-5.19 Package: linux-hwe-5.8 Package: linux-hwe-6.2 Package: linux-hwe-6.5 Package: linux-hwe-edge Package: linux-ibm Package: linux-ibm-5.15 Package: linux-intel-5.13 Package: linux-intel-iot-realtime Package: linux-intel-iotg Package: linux-intel-iotg-5.15 Package: linux-kvm Package: linux-lowlatency Package: linux-lowlatency-hwe-5.15 Package: linux-lowlatency-hwe-5.19 Package: linux-lowlatency-hwe-6.2 Package: linux-lowlatency-hwe-6.5 Package: linux-nvidia Package: linux-nvidia-6.2 Package: linux-nvidia-6.5 Package: linux-nvidia-tegra Package: linux-nvidia-tegra-5.15 Package: linux-nvidia-tegra-igx Package: linux-oem Package: linux-oem-5.10 Package: linux-oem-5.13 Package: linux-oem-5.14 Package: linux-oem-5.17 Package: linux-oem-5.6 Package: linux-oem-6.0 Package: linux-oem-6.1 Package: linux-oem-6.5 Package: linux-oracle Package: linux-oracle-5.0 Package: linux-oracle-5.11 Package: linux-oracle-5.13 Package: linux-oracle-5.15 Package: linux-oracle-5.3 Package: linux-oracle-5.8 Package: linux-oracle-6.5 Package: linux-raspi Package: linux-raspi-realtime Package: linux-raspi2 Package: linux-realtime Package: linux-riscv Package: linux-riscv-5.11 Package: linux-riscv-5.15 Package: linux-riscv-5.19 Package: linux-riscv-5.8 Package: linux-riscv-6.5 Package: linux-starfive-5.19 Package: linux-starfive-6.2 Package: linux-starfive-6.5 Package: linux-vmware Package: linux-xilinx-zynqmp Platform: Linux Ecosystem: Debian Ecosystem: Ubuntu

Description

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

hv_netvsc: Fix race condition between netvsc_probe and netvsc_remove

In commit ac5047671758 ("hv_netvsc: Disable NAPI before closing the
VMBus channel"), napi_disable was getting called for all channels,
including all subchannels without confirming if they are enabled or not.

This caused hv_netvsc getting hung at napi_disable, when netvsc_probe()
has finished running but nvdev->subchan_work has not started yet.
netvsc_subchan_work() -> rndis_set_subchannel() has not created the
sub-channels and because of that netvsc_sc_open() is not running.
netvsc_remove() calls cancel_work_sync(&nvdev->subchan_work), for which
netvsc_subchan_work did not run.

netif_napi_add() sets the bit NAPI_STATE_SCHED because it ensures NAPI
cannot be scheduled. Then netvsc_sc_open() -> napi_enable will clear the
NAPIF_STATE_SCHED bit, so it can be scheduled. napi_disable() does the
opposite.

Now during netvsc_device_remove(), when napi_disable is called for those
subchannels, napi_disable gets stuck on infinite msleep.

This fix addresses this problem by ensuring that napi_disable() is not
getting called for non-enabled NAPI struct.
But netif_napi_del() is still necessary for these non-enabled NAPI struct
for cleanup purpose.

Call trace:
[ 654.559417] task:modprobe state:D stack: 0 pid: 2321 ppid: 1091 flags:0x00004002
[ 654.568030] Call Trace:
[ 654.571221] <TASK>
[ 654.573790] __schedule+0x2d6/0x960
[ 654.577733] schedule+0x69/0xf0
[ 654.581214] schedule_timeout+0x87/0x140
[ 654.585463] ? __bpf_trace_tick_stop+0x20/0x20
[ 654.590291] msleep+0x2d/0x40
[ 654.593625] napi_disable+0x2b/0x80
[ 654.597437] netvsc_device_remove+0x8a/0x1f0 [hv_netvsc]
[ 654.603935] rndis_filter_device_remove+0x194/0x1c0 [hv_netvsc]
[ 654.611101] ? do_wait_intr+0xb0/0xb0
[ 654.615753] netvsc_remove+0x7c/0x120 [hv_netvsc]
[ 654.621675] vmbus_remove+0x27/0x40 [hv_vmbus]

Affected products

VendorProductAffectedFixed
Linux Linux 5.8 5.10.210

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 14 linux 6.7.7-1 —
Debian 13 linux 6.7.7-1 —
Debian 12 linux 6.1.82-1 —
Debian 11 linux 5.10.216-1 DSA-5681-1
Debian 10 linux-5.10 5.10.216-1~deb10u1 DLA-3842-1
ReleasePackageFixed inAdvisory
Ubuntu Nvidia-BlueField 22.04 LTS linux-bluefield 5.15.0-1043.45 —
Ubuntu 22.04 LTS linux +1 5.15.0-106.116 USN-6766-1
Ubuntu 22.04 LTS linux-aws 5.15.0-1061.67 USN-6766-3
Ubuntu 22.04 LTS linux-aws-6.5 6.5.0-1023.23~22.04.1 USN-6895-3
Ubuntu 22.04 LTS linux-azure 5.15.0-1056.64 USN-6766-1
Ubuntu 22.04 LTS linux-azure-6.5 6.5.0-1015.15~22.04.1 USN-6895-2
Ubuntu 22.04 LTS linux-azure-fde 5.15.0-1056.64.1 USN-6766-1
Ubuntu 22.04 LTS linux-gcp 5.15.0-1059.67 USN-6766-1
Ubuntu 22.04 LTS linux-gcp-6.5 6.5.0-1024.26~22.04.1 USN-6895-2
Ubuntu 22.04 LTS linux-gke +1 5.15.0-1058.63 USN-6766-1
Ubuntu 22.04 LTS linux-gkeop 5.15.0-1044.51 USN-6766-1
Ubuntu 22.04 LTS linux-hwe-6.5 6.5.0-44.44~22.04.1 USN-6900-1
Ubuntu 22.04 LTS linux-ibm +1 5.15.0-1054.57 USN-6766-2, USN-6766-1
Ubuntu 22.04 LTS linux-intel-iotg 5.15.0-1057.63 USN-6795-1
Ubuntu 22.04 LTS linux-lowlatency-hwe-6.5 6.5.0-44.44.1~22.04.1 USN-6895-3
Ubuntu 22.04 LTS linux-nvidia 5.15.0-1054.55 USN-6766-1
Ubuntu 22.04 LTS linux-nvidia-6.5 6.5.0-1023.24 USN-6895-1
Ubuntu 22.04 LTS linux-nvidia-tegra 5.15.0-1026.26 —
Ubuntu 22.04 LTS linux-nvidia-tegra-igx 5.15.0-1015.15 —
Ubuntu 22.04 LTS linux-oem-6.5 6.5.0-1027.28 USN-6895-4
Ubuntu 22.04 LTS linux-oracle 5.15.0-1059.65 USN-6766-1
Ubuntu 22.04 LTS linux-oracle-6.5 6.5.0-1026.26~22.04.1 USN-6895-3
Ubuntu 22.04 LTS linux-riscv +22 No fix yet —
Ubuntu 22.04 LTS linux-starfive-6.5 6.5.0-1017.18~22.04.1 USN-6895-3
Ubuntu 22.04 LTS linux-xilinx-zynqmp 5.15.0-1030.34 —
Ubuntu 20.04 LTS linux-aws-5.15 5.15.0-1061.67~20.04.1 USN-6766-3
Ubuntu 20.04 LTS linux-azure 5.4.0-1126.133 —
Ubuntu 20.04 LTS linux-azure-5.15 5.15.0-1056.64~20.04.1 USN-6766-1
Ubuntu 20.04 LTS linux-azure-fde-5.15 5.15.0-1063.72~20.04.1.1 USN-6766-1
Ubuntu 20.04 LTS linux-gcp-5.15 5.15.0-1059.67~20.04.1 USN-6766-1
Ubuntu 20.04 LTS linux-gke +26 No fix yet —
Ubuntu 20.04 LTS linux-gkeop-5.15 5.15.0-1044.51~20.04.1 USN-6766-1
Ubuntu 20.04 LTS linux-hwe-5.15 +1 5.15.0-106.116~20.04.1 USN-6766-2, USN-6766-1
Ubuntu 20.04 LTS linux-ibm-5.15 5.15.0-1054.57~20.04.1 USN-6766-1
Ubuntu 20.04 LTS linux-intel-iotg-5.15 5.15.0-1058.64~20.04.1 USN-6828-1
Ubuntu 20.04 LTS linux-nvidia-tegra-5.15 5.15.0-1027.27~20.04.1 —
Ubuntu 20.04 LTS linux-oracle-5.15 5.15.0-1059.65~20.04.1 USN-6766-1
Ubuntu 20.04 LTS linux-riscv-5.15 5.15.0-1057.61~20.04.1 —
Ubuntu 18.04 LTS linux-gcp +13 No fix yet —
Ubuntu 16.04 LTS linux-hwe-edge No fix yet —
Show 6 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Ubuntu Pro Realtime 24.04 LTS linux-raspi-realtime 6.8.0-2001.1 —
Ubuntu Pro Realtime 22.04 LTS linux-intel-iot-realtime 5.15.0-1054.56 —
Ubuntu Pro Realtime 22.04 LTS linux-realtime 5.15.0-1062.70 —
Ubuntu Pro FIPS-updates 22.04 LTS linux-aws-fips 5.15.0-1061.67+fips1 —
Ubuntu Pro FIPS-updates 22.04 LTS linux-fips 5.15.0-106.116+fips1 —
Ubuntu Pro FIPS-updates 22.04 LTS linux-gcp-fips 5.15.0-1059.67+fips1 —
Ubuntu Pro FIPS-updates 20.04 LTS linux-azure-fips 5.4.0-1126.133+fips1 —
Ubuntu Pro FIPS-preview 22.04 LTS linux-fips +3 No fix yet —
Ubuntu Pro 18.04 LTS linux-azure-5.4 5.4.0-1126.133~18.04.1 —
ReleasePackageFixed inAdvisory
RHEL 8 perf +26 4.18.0-553.16.1.el8_10 RHSA-2024:5101
Show 5 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
RHEL 9.2 EUS bpftool 7.0.0-284.75.1.el9_2 RHSA-2024:4823
RHEL 9.2 EUS kernel-rt +14 5.14.0-284.75.1.rt14.360.el9_2 RHSA-2024:4831
RHEL 9.2 EUS perf +48 5.14.0-284.75.1.el9_2 RHSA-2024:4823
RHEL 8.8 EUS perf +26 4.18.0-477.74.1.el8_8 RHSA-2024:6993
RHEL 8.6 TUS perf +16 4.18.0-372.121.1.el8_6 RHSA-2024:6297
RHEL 8.6 E4S perf +24 4.18.0-372.121.1.el8_6 RHSA-2024:6297
RHEL 8.6 AUS perf +16 4.18.0-372.121.1.el8_6 RHSA-2024:6297

AlmaLinux

Errata ↗
ReleasePackageFixed inAdvisory
AlmaLinux 8 perf +24 4.18.0-553.16.1.el8_10 ALSA-2024:5101

Rocky Linux

Errata ↗
ReleasePackageFixed inAdvisory
Rocky Linux 8 kernel 4.18.0-553.16.1.el8_10 RXSA-2024:5101, RLSA-2024:5101
ReleasePackageFixed inAdvisory
SLES 15 SP5 kernel-64kb +6 5.14.21-150500.55.68.1 SUSE-SU-2024:2190-1
SLES 15 SP5 kernel-azure +2 5.14.21-150500.33.57.1 SUSE-SU-2024:2019-1
SLES 15 SP5 kernel-default-base 5.14.21-150500.55.68.1.150500.6.31.1 SUSE-SU-2024:2190-1
Show 3 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
SLE Micro 5.5 kernel-default 5.14.21-150500.55.68.1 SUSE-SU-2024:2190-1
SLE Micro 5.5 kernel-default-base 5.14.21-150500.55.68.1.150500.6.31.1 SUSE-SU-2024:2190-1
SLE Micro 5.5 kernel-rt +1 5.14.21-150500.13.58.1 SUSE-SU-2024:2008-1
SLE Live Patching 15 SP5 kernel-default 5.14.21-150500.55.68.1 SUSE-SU-2024:2190-1
SLE Live Patching 15 SP5 kernel-livepatch-SLE15-SP5_Update_15 +1 1-150500.11.3.1 SUSE-SU-2024:2190-1, SUSE-SU-2024:2008-1
SUSE Real Time Module 15 SP5 kernel-rt +3 5.14.21-150500.13.58.1 SUSE-SU-2024:2008-1
ReleasePackageFixed inAdvisory
openSUSE Leap 15.5 dtb-aarch64 +10 5.14.21-150500.55.68.1 SUSE-SU-2024:2190-1
openSUSE Leap 15.5 kernel-azure +2 5.14.21-150500.33.57.1 SUSE-SU-2024:2019-1
openSUSE Leap 15.5 kernel-default-base 5.14.21-150500.55.68.1.150500.6.31.1 SUSE-SU-2024:2190-1
openSUSE Leap 15.5 kernel-rt +3 5.14.21-150500.13.58.1 SUSE-SU-2024:2008-1

Amazon Linux

ReleasePackageFixed inAdvisory
Amazon Linux 2023 kernel-livepatch-6.1.79-99.164 1.0-0.amzn2023 ALAS2023-2024-549
Amazon Linux 2023 perf +14 6.1.79-99.164.amzn2023 ALAS2023-2024-549

Oracle Linux

ReleasePackageFixed inAdvisory
Oracle Linux 8 perf +19 4.18.0-553.16.1.el8_10 ELSA-2024-5101

Advisories 27

References