Skip to content
FlawDB
Sign in
Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

CVE-2022-50483

HIGH 7.5EPSS 44%

net: enetc: avoid buffer leaks on xdp_do_redirect() failure

Mitigation

  • Upgrade Linux to 628050ec952d2e2e46ec9fb6aa07e41139e030c8 or later.

Who should check

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

Vulnerability facts

Affected
Linux >= 9d2b68cc108db2fdb35022ed2d88cfb305c441a6, < bcf2c1dc5358dcf7e34a68cdb6b0bbf967801efa; >= 9d2b68cc108db2fdb35022ed2d88cfb305c441a6, < 7fba523b51ccce5f7981f8a43ad84d664da68131; >= 9d2b68cc108db2fdb35022ed2d88cfb305c441a6, < 306526331e7a37e714e11ab7c6d73eb004745224; >= 9d2b68cc108db2fdb35022ed2d88cfb305c441a6, < 628050ec952d2e2e46ec9fb6aa07e41139e030c8; Linux 5.13
Fixed in
Linux 7fba523b51ccce5f7981f8a43ad84d664da68131, Linux 306526331e7a37e714e11ab7c6d73eb004745224, Linux 628050ec952d2e2e46ec9fb6aa07e41139e030c8
Exploited in the wild
Not in CISA KEV
Public exploit / PoC
None known
Remote exploitation
Remote, no login needed
CVSS
7.5 (v3.1, CNA)CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:HOpen in CVSS calculator
Show all 8 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
EPSS
0.63% chance of exploitation in 30 days (percentile 44, 2026-11-26)
Published
Modified

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

Package / productAffectedFixedSource
Linux>= 9d2b68cc108db2fdb35022ed2d88cfb305c441a6, < bcf2c1dc5358dcf7e34a68cdb6b0bbf967801efa; >= 9d2b68cc108db2fdb35022ed2d88cfb305c441a6, < 7fba523b51ccce5f7981f8a43ad84d664da68131; >= 9d2b68cc108db2fdb35022ed2d88cfb305c441a6, < 306526331e7a37e714e11ab7c6d73eb004745224; >= 9d2b68cc108db2fdb35022ed2d88cfb305c441a6, < 628050ec952d2e2e46ec9fb6aa07e41139e030c8—cvelist
Linux5.13—cvelist

Check your systems with an agent

Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.

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.

References

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.

Sponsors