# CVE-2022-50483: net: enetc: avoid buffer leaks on xdp\_do\_redirect() failure

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

- **Severity:** HIGH 7.5
- **CVSS:** 7.5 (v3.1, CNA) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`
- **CVSS metrics:** Attack vector: Network; Attack complexity: Low; Privileges required: None; 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:** Remote, no login needed
- **EPSS:** 0.63% (percentile 44, 2026-11-26)
- **Published:** 2025-10-04T15:16:41.703Z
- **Modified:** 2026-08-05T08:58:54.379Z

## Who should check

- Anyone running Linux \>= 9d2b68cc108db2fdb35022ed2d88cfb305c441a6, \< bcf2c1dc5358dcf7e34a68cdb6b0bbf967801efa; \>= 9d2b68cc108db2fdb35022ed2d88cfb305c441a6, \< 7fba523b51ccce5f7981f8a43ad84d664da68131; \>= 9d2b68cc108db2fdb35022ed2d88cfb305c441a6, \< 306526331e7a37e714e11ab7c6d73eb004745224; \>= 9d2b68cc108db2fdb35022ed2d88cfb305c441a6, \< 628050ec952d2e2e46ec9fb6aa07e41139e030c8
- Anyone running Linux 5.13

## Description

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

net: enetc: avoid buffer leaks on xdp\_do\_redirect() failure

Before enetc\_clean\_rx\_ring\_xdp() calls xdp\_do\_redirect(), each software
BD in the RX ring between index orig\_i and i can have one of 2 refcount
values on its page.

We are the owner of the current buffer that is being processed, so the
refcount will be at least 1.

If the current owner of the buffer at the diametrically opposed index
in the RX ring (i.o.w, the other half of this page) has not yet called
kfree(), this page's refcount could even be 2.

enetc\_page\_reusable() in enetc\_flip\_rx\_buff() tests for the page
refcount against 1, and \[ if it's 2 \] does not attempt to reuse it.

But if enetc\_flip\_rx\_buff() is put after the xdp\_do\_redirect() call,
the page refcount can have one of 3 values. It can also be 0, if there
is no owner of the other page half, and xdp\_do\_redirect() for this
buffer ran so far that it triggered a flush of the devmap/cpumap bulk
queue, and the consumers of those bulk queues also freed the buffer,
all by the time xdp\_do\_redirect() returns the execution back to enetc.

This is the reason why enetc\_flip\_rx\_buff() is called before
xdp\_do\_redirect(), but there is a big flaw with that reasoning:
enetc\_flip\_rx\_buff() will set rx\_swbd-\>page = NULL on both sides of the
enetc\_page\_reusable() branch, and if xdp\_do\_redirect() returns an error,
we call enetc\_xdp\_free(), which does not deal gracefully with that.

In fact, what happens is quite special. The page refcounts start as 1.
enetc\_flip\_rx\_buff() figures they're reusable, transfers these
rx\_swbd-\>page pointers to a different rx\_swbd in enetc\_reuse\_page(), and
bumps the refcount to 2. When xdp\_do\_redirect() later returns an error,
we call the no-op enetc\_xdp\_free(), but we still haven't lost the
reference to that page. A copy of it is still at rx\_ring-\>next\_to\_alloc,
but that has refcount 2 (and there are no concurrent owners of it in
flight, to drop the refcount). What really kills the system is when
we'll flip the rx\_swbd-\>page the second time around. With an updated
refcount of 2, the page will not be reusable and we'll really leak it.
Then enetc\_new\_page() will have to allocate more pages, which will then
eventually leak again on further errors from xdp\_do\_redirect().

The problem, summarized, is that we zeroize rx\_swbd-\>page before we're
completely done with it, and this makes it impossible for the error path
to do something with it.

Since the packet is potentially multi-buffer and therefore the
rx\_swbd-\>page is potentially an array, manual passing of the old
pointers between enetc\_flip\_rx\_buff() and enetc\_xdp\_free() is a bit
difficult.

For the sake of going with a simple solution, we accept the possibility
of racing with xdp\_do\_redirect(), and we move the flip procedure to
execute only on the redirect success path. By racing, I mean that the
page may be deemed as not reusable by enetc (having a refcount of 0),
but there will be no leak in that case, either.

Once we accept that, we have something better to do with buffers on
XDP\_REDIRECT failure. Since we haven't performed half-page flipping yet,
we won't, either (and this way, we can avoid enetc\_xdp\_free()
completely, which gives the entire page to the slab allocator).
Instead, we'll call enetc\_xdp\_drop(), which will recycle this half of
the buffer back to the RX ring.

## Affected and fixed versions

- Linux: \>= 9d2b68cc108db2fdb35022ed2d88cfb305c441a6, \< bcf2c1dc5358dcf7e34a68cdb6b0bbf967801efa; \>= 9d2b68cc108db2fdb35022ed2d88cfb305c441a6, \< 7fba523b51ccce5f7981f8a43ad84d664da68131; \>= 9d2b68cc108db2fdb35022ed2d88cfb305c441a6, \< 306526331e7a37e714e11ab7c6d73eb004745224; \>= 9d2b68cc108db2fdb35022ed2d88cfb305c441a6, \< 628050ec952d2e2e46ec9fb6aa07e41139e030c8 (cvelist)
- Linux: 5.13 (cvelist)

## Mitigation

- Upgrade Linux to 628050ec952d2e2e46ec9fb6aa07e41139e030c8 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-50483. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2022-50483.md
Affected: Linux >= 9d2b68cc108db2fdb35022ed2d88cfb305c441a6, < bcf2c1dc5358dcf7e34a68cdb6b0bbf967801efa; >= 9d2b68cc108db2fdb35022ed2d88cfb305c441a6, < 7fba523b51ccce5f7981f8a43ad84d664da68131; >= 9d2b68cc108db2fdb35022ed2d88cfb305c441a6, < 306526331e7a37e714e11ab7c6d73eb004745224; >= 9d2b68cc108db2fdb35022e…
Fixed in: Linux 7fba523b51ccce5f7981f8a43ad84d664da68131, Linux 306526331e7a37e714e11ab7c6d73eb004745224, Linux 628050ec952d2e2e46ec9fb6aa07e41139e030c8

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

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

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

High: CVSS 7.5 (v3.1, scored by CNA). Remote, no login needed.

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

Linux \>= 9d2b68cc108db2fdb35022ed2d88cfb305c441a6, \< bcf2c1dc5358dcf7e34a68cdb6b0bbf967801efa; \>= 9d2b68cc108db2fdb35022ed2d88cfb305c441a6, \< 7fba523b51ccce5f7981f8a43ad84d664da68131; \>= 9d2b68cc108db2fdb35022ed2d88cfb305c441a6, \< 306526331e7a37e714e11ab7c6d73eb004745224; \>= 9d2b68cc108db2fdb35022ed2d88cfb305c441a6, \< 628050ec952d2e2e46ec9fb6aa07e41139e030c8; Linux 5.13.

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

Yes. Fixed in Linux 7fba523b51ccce5f7981f8a43ad84d664da68131, Linux 306526331e7a37e714e11ab7c6d73eb004745224, Linux 628050ec952d2e2e46ec9fb6aa07e41139e030c8. Upgrade Linux to 628050ec952d2e2e46ec9fb6aa07e41139e030c8 or later.

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

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/bcf2c1dc5358dcf7e34a68cdb6b0bbf967801efa>
- patch: <https://git.kernel.org/stable/c/7fba523b51ccce5f7981f8a43ad84d664da68131>
- patch: <https://git.kernel.org/stable/c/306526331e7a37e714e11ab7c6d73eb004745224>
- patch: <https://git.kernel.org/stable/c/628050ec952d2e2e46ec9fb6aa07e41139e030c8>

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

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