# CVE-2022-49626: sfc: fix use after free when disabling sriov

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

- **Severity:** HIGH 7.8
- **CVSS:** 7.8 (v3.1, CNA) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: High; Integrity impact: High; 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 15, 2026-11-26)
- **CWE:** CWE-416
- **Published:** 2025-02-26T02:23:41.274Z
- **Modified:** 2026-06-17T05:18:40.050Z

## Who should check

- Anyone running Linux \>= 3c5eb87605e85146a78de589b5070a37862425db, \< 3199e34912d84cdfb8a93a984c5ae5c73fb13e84; \>= 3c5eb87605e85146a78de589b5070a37862425db, \< c9e75bb22a26e391f189f5a5133dd63dcb57fdaa; \>= 3c5eb87605e85146a78de589b5070a37862425db, \< 9c854ae512b89229aeee93849e9bd4c115b37909; \>= 3c5eb87605e85146a78de589b5070a37862425db, \< bcad880865bfb421885364b1f0c7351280fe2b97; \>= 3c5eb87605e85146a78de589b5070a37862425db, \< c2240500817b3b4b996cdf2a461a3a5679f49b94; \>= 3c5eb87605e85146a78de589b5070a37862425db, \< 58d93e9d160c0de6d867c7eb4c2206671a351eb1; \>= 3c5eb87605e85146a78de589b5070a37862425db, \< e435c4aeeaa073091f7f3b7735af2ef5c97d63f2; \>= 3c5eb87605e85146a78de589b5070a37862425db, \< ebe41da5d47ac0fff877e57bd14c54dccf168827
- Anyone running Linux 4.2

## Description

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

sfc: fix use after free when disabling sriov

Use after free is detected by kfence when disabling sriov. What was read
after being freed was vf-\>pci\_dev: it was freed from pci\_disable\_sriov
and later read in efx\_ef10\_sriov\_free\_vf\_vports, called from
efx\_ef10\_sriov\_free\_vf\_vswitching.

Set the pointer to NULL at release time to not trying to read it later.

Reproducer and dmesg log (note that kfence doesn't detect it every time):
$ echo 1 \> /sys/class/net/enp65s0f0np0/device/sriov\_numvfs
$ echo 0 \> /sys/class/net/enp65s0f0np0/device/sriov\_numvfs

 BUG: KFENCE: use-after-free read in efx\_ef10\_sriov\_free\_vf\_vswitching+0x82/0x170 \[sfc\]

 Use-after-free read at 0x00000000ff3c1ba5 (in kfence-\#224):
  efx\_ef10\_sriov\_free\_vf\_vswitching+0x82/0x170 \[sfc\]
  efx\_ef10\_pci\_sriov\_disable+0x38/0x70 \[sfc\]
  efx\_pci\_sriov\_configure+0x24/0x40 \[sfc\]
  sriov\_numvfs\_store+0xfe/0x140
  kernfs\_fop\_write\_iter+0x11c/0x1b0
  new\_sync\_write+0x11f/0x1b0
  vfs\_write+0x1eb/0x280
  ksys\_write+0x5f/0xe0
  do\_syscall\_64+0x5c/0x80
  entry\_SYSCALL\_64\_after\_hwframe+0x44/0xae

 kfence-\#224: 0x00000000edb8ef95-0x00000000671f5ce1, size=2792, cache=kmalloc-4k

 allocated by task 6771 on cpu 10 at 3137.860196s:
  pci\_alloc\_dev+0x21/0x60
  pci\_iov\_add\_virtfn+0x2a2/0x320
  sriov\_enable+0x212/0x3e0
  efx\_ef10\_sriov\_configure+0x67/0x80 \[sfc\]
  efx\_pci\_sriov\_configure+0x24/0x40 \[sfc\]
  sriov\_numvfs\_store+0xba/0x140
  kernfs\_fop\_write\_iter+0x11c/0x1b0
  new\_sync\_write+0x11f/0x1b0
  vfs\_write+0x1eb/0x280
  ksys\_write+0x5f/0xe0
  do\_syscall\_64+0x5c/0x80
  entry\_SYSCALL\_64\_after\_hwframe+0x44/0xae

 freed by task 6771 on cpu 12 at 3170.991309s:
  device\_release+0x34/0x90
  kobject\_cleanup+0x3a/0x130
  pci\_iov\_remove\_virtfn+0xd9/0x120
  sriov\_disable+0x30/0xe0
  efx\_ef10\_pci\_sriov\_disable+0x57/0x70 \[sfc\]
  efx\_pci\_sriov\_configure+0x24/0x40 \[sfc\]
  sriov\_numvfs\_store+0xfe/0x140
  kernfs\_fop\_write\_iter+0x11c/0x1b0
  new\_sync\_write+0x11f/0x1b0
  vfs\_write+0x1eb/0x280
  ksys\_write+0x5f/0xe0
  do\_syscall\_64+0x5c/0x80
  entry\_SYSCALL\_64\_after\_hwframe+0x44/0xae

## Affected and fixed versions

- Linux: \>= 3c5eb87605e85146a78de589b5070a37862425db, \< 3199e34912d84cdfb8a93a984c5ae5c73fb13e84; \>= 3c5eb87605e85146a78de589b5070a37862425db, \< c9e75bb22a26e391f189f5a5133dd63dcb57fdaa; \>= 3c5eb87605e85146a78de589b5070a37862425db, \< 9c854ae512b89229aeee93849e9bd4c115b37909; \>= 3c5eb87605e85146a78de589b5070a37862425db, \< bcad880865bfb421885364b1f0c7351280fe2b97; \>= 3c5eb87605e85146a78de589b5070a37862425db, \< c2240500817b3b4b996cdf2a461a3a5679f49b94; \>= 3c5eb87605e85146a78de589b5070a37862425db, \< 58d93e9d160c0de6d867c7eb4c2206671a351eb1; \>= 3c5eb87605e85146a78de589b5070a37862425db, \< e435c4aeeaa073091f7f3b7735af2ef5c97d63f2; \>= 3c5eb87605e85146a78de589b5070a37862425db, \< ebe41da5d47ac0fff877e57bd14c54dccf168827 (cvelist)
- Linux: 4.2 (cvelist)

## Mitigation

- No fix listed yet: follow the vendor advisory.

## Check your systems with an agent

Paste this into a coding agent:

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

Details: https://flawdb.com/CVE-2022-49626.md
Affected: Linux >= 3c5eb87605e85146a78de589b5070a37862425db, < 3199e34912d84cdfb8a93a984c5ae5c73fb13e84; >= 3c5eb87605e85146a78de589b5070a37862425db, < c9e75bb22a26e391f189f5a5133dd63dcb57fdaa; >= 3c5eb87605e85146a78de589b5070a37862425db, < 9c854ae512b89229aeee93849e9bd4c115b37909; >= 3c5eb87605e85146a78de58…
Fixed in: Linux 3199e34912d84cdfb8a93a984c5ae5c73fb13e84, Linux 9c854ae512b89229aeee93849e9bd4c115b37909, Linux 58d93e9d160c0de6d867c7eb4c2206671a351eb1

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-49626 being exploited?

There is no confirmed exploitation: CVE-2022-49626 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-49626?

High: CVSS 7.8 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed).

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

Linux \>= 3c5eb87605e85146a78de589b5070a37862425db, \< 3199e34912d84cdfb8a93a984c5ae5c73fb13e84; \>= 3c5eb87605e85146a78de589b5070a37862425db, \< c9e75bb22a26e391f189f5a5133dd63dcb57fdaa; \>= 3c5eb87605e85146a78de589b5070a37862425db, \< 9c854ae512b89229aeee93849e9bd4c115b37909; \>= 3c5eb87605e85146a78de589b5070a37862425db, \< bcad880865bfb421885364b1f0c7351280fe2b97; \>= 3c5eb87605e85146a78de589b5070a37862425db, \< c2240500817b3b4b996cdf2a461a3a5679f49b94; \>= 3c5eb87605e85146a78de589b5070a37862425db, \< 58d93e9d160c0de6d867c7eb4c2206671a351eb1; \>= 3c5eb87605e85146a78de589b5070a37862425db, \< e435c4aeeaa073091f7f3b7735af2ef5c97d63f2; \>= 3c5eb87605e85146a78de589b5070a37862425db, \< ebe41da5d47ac0fff877e57bd14c54dccf168827; Linux 4.2.

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

Yes. Fixed in Linux 3199e34912d84cdfb8a93a984c5ae5c73fb13e84, Linux 9c854ae512b89229aeee93849e9bd4c115b37909, Linux 58d93e9d160c0de6d867c7eb4c2206671a351eb1. No fix listed yet: follow the vendor advisory.

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

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/3199e34912d84cdfb8a93a984c5ae5c73fb13e84>
- patch: <https://git.kernel.org/stable/c/c9e75bb22a26e391f189f5a5133dd63dcb57fdaa>
- patch: <https://git.kernel.org/stable/c/9c854ae512b89229aeee93849e9bd4c115b37909>
- patch: <https://git.kernel.org/stable/c/bcad880865bfb421885364b1f0c7351280fe2b97>
- patch: <https://git.kernel.org/stable/c/c2240500817b3b4b996cdf2a461a3a5679f49b94>
- patch: <https://git.kernel.org/stable/c/58d93e9d160c0de6d867c7eb4c2206671a351eb1>
- patch: <https://git.kernel.org/stable/c/e435c4aeeaa073091f7f3b7735af2ef5c97d63f2>
- patch: <https://git.kernel.org/stable/c/ebe41da5d47ac0fff877e57bd14c54dccf168827>

## 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-49626>

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