# CVE-2021-46947: sfc: adjust efx-\>xdp\_tx\_queue\_count with the real number of initialized queues

> 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.19% (percentile 5, 2026-11-26)
- **CWE:** CWE-476
- **Published:** 2024-02-27T18:40:32.277Z
- **Modified:** 2026-06-17T04:15:56.670Z

## Who should check

- Anyone running Linux \>= e26ca4b535820b1445dcef3c0f82b3fb5b45108b, \< ebeac958b690123a0b40aa61f688f2f170035fad; \>= e26ca4b535820b1445dcef3c0f82b3fb5b45108b, \< 99ba0ea616aabdc8e26259fd722503e012199a76
- Anyone running Linux 5.12

## Description

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

sfc: adjust efx-\>xdp\_tx\_queue\_count with the real number of initialized queues

efx-\>xdp\_tx\_queue\_count is initially initialized to num\_possible\_cpus() and is
later used to allocate and traverse efx-\>xdp\_tx\_queues lookup array. However,
we may end up not initializing all the array slots with real queues during
probing. This results, for example, in a NULL pointer dereference, when running
"\# ethtool -S \<iface\>", similar to below

\[2570283.664955\]\[T4126959\] BUG: kernel NULL pointer dereference, address: 00000000000000f8
\[2570283.681283\]\[T4126959\] \#PF: supervisor read access in kernel mode
\[2570283.695678\]\[T4126959\] \#PF: error\_code(0x0000) - not-present page
\[2570283.710013\]\[T4126959\] PGD 0 P4D 0
\[2570283.721649\]\[T4126959\] Oops: 0000 \[\#1\] SMP PTI
\[2570283.734108\]\[T4126959\] CPU: 23 PID: 4126959 Comm: ethtool Tainted: G           O      5.10.20-cloudflare-2021.3.1 \#1
\[2570283.752641\]\[T4126959\] Hardware name: \<redacted\>
\[2570283.781408\]\[T4126959\] RIP: 0010:efx\_ethtool\_get\_stats+0x2ca/0x330 \[sfc\]
\[2570283.796073\]\[T4126959\] Code: 00 85 c0 74 39 48 8b 95 a8 0f 00 00 48 85 d2 74 2d 31 c0 eb 07 48 8b 95 a8 0f 00 00 48 63 c8 49 83 c4 08 83 c0 01 48 8b 14 ca \<48\> 8b 92 f8 00 00 00 49 89 54 24 f8 39 85 a0 0f 00 00 77 d7 48 8b
\[2570283.831259\]\[T4126959\] RSP: 0018:ffffb79a77657ce8 EFLAGS: 00010202
\[2570283.845121\]\[T4126959\] RAX: 0000000000000019 RBX: ffffb799cd0c9280 RCX: 0000000000000018
\[2570283.860872\]\[T4126959\] RDX: 0000000000000000 RSI: ffff96dd970ce000 RDI: 0000000000000005
\[2570283.876525\]\[T4126959\] RBP: ffff96dd86f0a000 R08: ffff96dd970ce480 R09: 000000000000005f
\[2570283.892014\]\[T4126959\] R10: ffffb799cd0c9fff R11: ffffb799cd0c9000 R12: ffffb799cd0c94f8
\[2570283.907406\]\[T4126959\] R13: ffffffffc11b1090 R14: ffff96dd970ce000 R15: ffffffffc11cd66c
\[2570283.922705\]\[T4126959\] FS:  00007fa7723f8740(0000) GS:ffff96f51fac0000(0000) knlGS:0000000000000000
\[2570283.938848\]\[T4126959\] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
\[2570283.952524\]\[T4126959\] CR2: 00000000000000f8 CR3: 0000001a73e6e006 CR4: 00000000007706e0
\[2570283.967529\]\[T4126959\] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
\[2570283.982400\]\[T4126959\] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
\[2570283.997308\]\[T4126959\] PKRU: 55555554
\[2570284.007649\]\[T4126959\] Call Trace:
\[2570284.017598\]\[T4126959\]  dev\_ethtool+0x1832/0x2830

Fix this by adjusting efx-\>xdp\_tx\_queue\_count after probing to reflect the true
value of initialized slots in efx-\>xdp\_tx\_queues.

## Affected and fixed versions

- Linux: \>= e26ca4b535820b1445dcef3c0f82b3fb5b45108b, \< ebeac958b690123a0b40aa61f688f2f170035fad; \>= e26ca4b535820b1445dcef3c0f82b3fb5b45108b, \< 99ba0ea616aabdc8e26259fd722503e012199a76 (cvelist)
- Linux: 5.12 (cvelist)

## Mitigation

- Upgrade Linux to 99ba0ea616aabdc8e26259fd722503e012199a76 or later.

## Check your systems with an agent

Paste this into a coding agent:

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

Details: https://flawdb.com/CVE-2021-46947.md
Affected: Linux >= e26ca4b535820b1445dcef3c0f82b3fb5b45108b, < ebeac958b690123a0b40aa61f688f2f170035fad; >= e26ca4b535820b1445dcef3c0f82b3fb5b45108b, < 99ba0ea616aabdc8e26259fd722503e012199a76; Linux 5.12
Fixed in: Linux 99ba0ea616aabdc8e26259fd722503e012199a76

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-2021-46947 being exploited?

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

### How serious is CVE-2021-46947?

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

### Which versions are affected by CVE-2021-46947?

Linux \>= e26ca4b535820b1445dcef3c0f82b3fb5b45108b, \< ebeac958b690123a0b40aa61f688f2f170035fad; \>= e26ca4b535820b1445dcef3c0f82b3fb5b45108b, \< 99ba0ea616aabdc8e26259fd722503e012199a76; Linux 5.12.

### Is there a fix for CVE-2021-46947?

Yes. Fixed in Linux 99ba0ea616aabdc8e26259fd722503e012199a76. Upgrade Linux to 99ba0ea616aabdc8e26259fd722503e012199a76 or later.

### How do I check if I'm affected by CVE-2021-46947?

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/ebeac958b690123a0b40aa61f688f2f170035fad>
- patch: <https://git.kernel.org/stable/c/99ba0ea616aabdc8e26259fd722503e012199a76>

## 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-2021-46947>

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