# CVE-2022-48840: iavf: Fix hang during reboot/shutdown

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** MEDIUM 5.5
- **CVSS:** 5.5 (v3.1, NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: None; Integrity impact: None; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.30% (percentile 16, 2026-11-26)
- **CWE:** CWE-835
- **Published:** 2024-07-16T12:25:11.173Z
- **Modified:** 2026-06-17T05:16:21.310Z

## Who should check

- Anyone running Linux \>= 85aa76066fef64de8a48d0da6b4071ceac455a94, \< 80974bb730270199c6fcb189af04d5945b87e813; \>= 7b9515172ab4d4c6ac0eae4b71013ee6ce932205, \< 4477b9a4193b35eb3a8afd2adf2d42add2f88d57; \>= 974578017fc1fdd06cea8afb9dfa32602e8529ed, \< b04683ff8f0823b869c219c78ba0d974bddea0b5
- Anyone running Linux \>= 5.15.27, \< 5.15.31; \>= 5.16.13, \< 5.16.17

## Description

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

iavf: Fix hang during reboot/shutdown

Recent commit 974578017fc1 ("iavf: Add waiting so the port is
initialized in remove") adds a wait-loop at the beginning of
iavf\_remove() to ensure that port initialization is finished
prior unregistering net device. This causes a regression
in reboot/shutdown scenario because in this case callback
iavf\_shutdown() is called and this callback detaches the device,
makes it down if it is running and sets its state to \_\_IAVF\_REMOVE.
Later shutdown callback of associated PF driver (e.g. ice\_shutdown)
is called. That callback calls among other things sriov\_disable()
that calls indirectly iavf\_remove() (see stack trace below).
As the adapter state is already \_\_IAVF\_REMOVE then the mentioned
loop is end-less and shutdown process hangs.

The patch fixes this by checking adapter's state at the beginning
of iavf\_remove() and skips the rest of the function if the adapter
is already in remove state (shutdown is in progress).

Reproducer:
1. Create VF on PF driven by ice or i40e driver
2. Ensure that the VF is bound to iavf driver
3. Reboot

\[52625.981294\] sysrq: SysRq : Show Blocked State
\[52625.988377\] task:reboot          state:D stack:    0 pid:17359 ppid:     1 f2
\[52625.996732\] Call Trace:
\[52625.999187\]  \_\_schedule+0x2d1/0x830
\[52626.007400\]  schedule+0x35/0xa0
\[52626.010545\]  schedule\_hrtimeout\_range\_clock+0x83/0x100
\[52626.020046\]  usleep\_range+0x5b/0x80
\[52626.023540\]  iavf\_remove+0x63/0x5b0 \[iavf\]
\[52626.027645\]  pci\_device\_remove+0x3b/0xc0
\[52626.031572\]  device\_release\_driver\_internal+0x103/0x1f0
\[52626.036805\]  pci\_stop\_bus\_device+0x72/0xa0
\[52626.040904\]  pci\_stop\_and\_remove\_bus\_device+0xe/0x20
\[52626.045870\]  pci\_iov\_remove\_virtfn+0xba/0x120
\[52626.050232\]  sriov\_disable+0x2f/0xe0
\[52626.053813\]  ice\_free\_vfs+0x7c/0x340 \[ice\]
\[52626.057946\]  ice\_remove+0x220/0x240 \[ice\]
\[52626.061967\]  ice\_shutdown+0x16/0x50 \[ice\]
\[52626.065987\]  pci\_device\_shutdown+0x34/0x60
\[52626.070086\]  device\_shutdown+0x165/0x1c5
\[52626.074011\]  kernel\_restart+0xe/0x30
\[52626.077593\]  \_\_do\_sys\_reboot+0x1d2/0x210
\[52626.093815\]  do\_syscall\_64+0x5b/0x1a0
\[52626.097483\]  entry\_SYSCALL\_64\_after\_hwframe+0x65/0xca

## Affected and fixed versions

- Linux: \>= 85aa76066fef64de8a48d0da6b4071ceac455a94, \< 80974bb730270199c6fcb189af04d5945b87e813; \>= 7b9515172ab4d4c6ac0eae4b71013ee6ce932205, \< 4477b9a4193b35eb3a8afd2adf2d42add2f88d57; \>= 974578017fc1fdd06cea8afb9dfa32602e8529ed, \< b04683ff8f0823b869c219c78ba0d974bddea0b5 (cvelist)
- Linux: \>= 5.15.27, \< 5.15.31; \>= 5.16.13, \< 5.16.17 (cvelist)

## Mitigation

- Upgrade Linux to 5.16.17 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2022-48840. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2022-48840.md
Affected: Linux >= 85aa76066fef64de8a48d0da6b4071ceac455a94, < 80974bb730270199c6fcb189af04d5945b87e813; >= 7b9515172ab4d4c6ac0eae4b71013ee6ce932205, < 4477b9a4193b35eb3a8afd2adf2d42add2f88d57; >= 974578017fc1fdd06cea8afb9dfa32602e8529ed, < b04683ff8f0823b869c219c78ba0d974bddea0b5; Linux >= 5.15.27, < 5.15.3…
Fixed in: Linux 80974bb730270199c6fcb189af04d5945b87e813, Linux 4477b9a4193b35eb3a8afd2adf2d42add2f88d57, Linux 5.15.31, Linux 5.16.17

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2022-48840 being exploited?

There is no confirmed exploitation: CVE-2022-48840 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.30% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2022-48840?

Medium: CVSS 5.5 (v3.1, scored by NVD). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2022-48840?

Linux \>= 85aa76066fef64de8a48d0da6b4071ceac455a94, \< 80974bb730270199c6fcb189af04d5945b87e813; \>= 7b9515172ab4d4c6ac0eae4b71013ee6ce932205, \< 4477b9a4193b35eb3a8afd2adf2d42add2f88d57; \>= 974578017fc1fdd06cea8afb9dfa32602e8529ed, \< b04683ff8f0823b869c219c78ba0d974bddea0b5; Linux \>= 5.15.27, \< 5.15.31; \>= 5.16.13, \< 5.16.17.

### Is there a fix for CVE-2022-48840?

Yes. Fixed in Linux 80974bb730270199c6fcb189af04d5945b87e813, Linux 4477b9a4193b35eb3a8afd2adf2d42add2f88d57, Linux 5.15.31, Linux 5.16.17. Upgrade Linux to 5.16.17 or later.

### How do I check if I'm affected by CVE-2022-48840?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- patch: <https://git.kernel.org/stable/c/80974bb730270199c6fcb189af04d5945b87e813>
- patch: <https://git.kernel.org/stable/c/4477b9a4193b35eb3a8afd2adf2d42add2f88d57>
- patch: <https://git.kernel.org/stable/c/b04683ff8f0823b869c219c78ba0d974bddea0b5>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2022-48840>

HTML: <https://flawdb.com/CVE-2022-48840> · JSON: <https://flawdb.com/api/v1/entries/CVE-2022-48840>
