# CVE-2021-47592: net: stmmac: fix tc flower deletion for VLAN priority Rx steering

> 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, CNA) `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.27% (percentile 12, 2026-11-26)
- **CWE:** CWE-476
- **Published:** 2024-06-19T14:53:55.574Z
- **Modified:** 2026-06-17T04:17:49.980Z

## Who should check

- Anyone running Linux \>= 0e039f5cf86ce2fcb62077a163e7ff3d7b7b7cf3, \< 97cb5c82aa1dd85a39b1bd021c8b5f18af623779; \>= 0e039f5cf86ce2fcb62077a163e7ff3d7b7b7cf3, \< aeb7c75cb77478fdbf821628e9c95c4baa9adc63
- Anyone running Linux 5.13

## Description

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

net: stmmac: fix tc flower deletion for VLAN priority Rx steering

To replicate the issue:-

1) Add 1 flower filter for VLAN Priority based frame steering:-
$ IFDEVNAME=eth0
$ tc qdisc add dev $IFDEVNAME ingress
$ tc qdisc add dev $IFDEVNAME root mqprio num\_tc 8 \\
   map 0 1 2 3 4 5 6 7 0 0 0 0 0 0 0 0 \\
   queues 1@0 1@1 1@2 1@3 1@4 1@5 1@6 1@7 hw 0
$ tc filter add dev $IFDEVNAME parent ffff: protocol 802.1Q \\
   flower vlan\_prio 0 hw\_tc 0

2) Get the 'pref' id
$ tc filter show dev $IFDEVNAME ingress

3) Delete a specific tc flower record (say pref 49151)
$ tc filter del dev $IFDEVNAME parent ffff: pref 49151

From dmesg, we will observe kernel NULL pointer ooops

\[  197.170464\] BUG: kernel NULL pointer dereference, address: 0000000000000000
\[  197.171367\] \#PF: supervisor read access in kernel mode
\[  197.171367\] \#PF: error\_code(0x0000) - not-present page
\[  197.171367\] PGD 0 P4D 0
\[  197.171367\] Oops: 0000 \[\#1\] PREEMPT SMP NOPTI

\<snip\>

\[  197.171367\] RIP: 0010:tc\_setup\_cls+0x20b/0x4a0 \[stmmac\]

\<snip\>

\[  197.171367\] Call Trace:
\[  197.171367\]  \<TASK\>
\[  197.171367\]  ? \_\_stmmac\_disable\_all\_queues+0xa8/0xe0 \[stmmac\]
\[  197.171367\]  stmmac\_setup\_tc\_block\_cb+0x70/0x110 \[stmmac\]
\[  197.171367\]  tc\_setup\_cb\_destroy+0xb3/0x180
\[  197.171367\]  fl\_hw\_destroy\_filter+0x94/0xc0 \[cls\_flower\]

The above issue is due to previous incorrect implementation of
tc\_del\_vlan\_flow(), shown below, that uses flow\_cls\_offload\_flow\_rule()
to get struct flow\_rule \*rule which is no longer valid for tc filter
delete operation.

  struct flow\_rule \*rule = flow\_cls\_offload\_flow\_rule(cls);
  struct flow\_dissector \*dissector = rule-\>match.dissector;

So, to ensure tc\_del\_vlan\_flow() deletes the right VLAN cls record for
earlier configured RX queue (configured by hw\_tc) in tc\_add\_vlan\_flow(),
this patch introduces stmmac\_rfs\_entry as driver-side flow\_cls\_offload
record for 'RX frame steering' tc flower, currently used for VLAN
priority. The implementation has taken consideration for future extension
to include other type RX frame steering such as EtherType based.

v2:
 - Clean up overly extensive backtrace and rewrite git message to better
   explain the kernel NULL pointer issue.

## Affected and fixed versions

- Linux: \>= 0e039f5cf86ce2fcb62077a163e7ff3d7b7b7cf3, \< 97cb5c82aa1dd85a39b1bd021c8b5f18af623779; \>= 0e039f5cf86ce2fcb62077a163e7ff3d7b7b7cf3, \< aeb7c75cb77478fdbf821628e9c95c4baa9adc63 (cvelist)
- Linux: 5.13 (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-2021-47592. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2021-47592.md
Affected: Linux >= 0e039f5cf86ce2fcb62077a163e7ff3d7b7b7cf3, < 97cb5c82aa1dd85a39b1bd021c8b5f18af623779; >= 0e039f5cf86ce2fcb62077a163e7ff3d7b7b7cf3, < aeb7c75cb77478fdbf821628e9c95c4baa9adc63; Linux 5.13
Fixed in: Linux 97cb5c82aa1dd85a39b1bd021c8b5f18af623779

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

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

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

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

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

Linux \>= 0e039f5cf86ce2fcb62077a163e7ff3d7b7b7cf3, \< 97cb5c82aa1dd85a39b1bd021c8b5f18af623779; \>= 0e039f5cf86ce2fcb62077a163e7ff3d7b7b7cf3, \< aeb7c75cb77478fdbf821628e9c95c4baa9adc63; Linux 5.13.

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

Yes. Fixed in Linux 97cb5c82aa1dd85a39b1bd021c8b5f18af623779. No fix listed yet: follow the vendor advisory.

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

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/97cb5c82aa1dd85a39b1bd021c8b5f18af623779>
- patch: <https://git.kernel.org/stable/c/aeb7c75cb77478fdbf821628e9c95c4baa9adc63>

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

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