# CVE-2022-50062: net: bgmac: Fix a BUG triggered by wrong bytes\_compl

> 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.67% (percentile 47, 2026-11-26)
- **CWE:** CWE-617
- **Published:** 2025-06-18T11:02:09.871Z
- **Modified:** 2026-08-05T08:57:16.315Z

## Who should check

- Anyone running Linux \>= b38c83dd08665a93e439c4ffd9eef31bc098a6ea, \< ac6d4482f29ab992b605c1b4bd1347f1f679f4e4; \>= b38c83dd08665a93e439c4ffd9eef31bc098a6ea, \< ab2b55bb25db289ba0b68e3d58494476bdb1041d; \>= b38c83dd08665a93e439c4ffd9eef31bc098a6ea, \< c506c9a97120f43257e9b3ce7b1f9a24eafc3787; \>= b38c83dd08665a93e439c4ffd9eef31bc098a6ea, \< da1421a29d3b8681ba6a7f686bd0b40dda5acaf3; \>= b38c83dd08665a93e439c4ffd9eef31bc098a6ea, \< 1b7680c6c1f6de9904f1d9b05c952f0c64a03350
- Anyone running Linux 4.1

## Description

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

net: bgmac: Fix a BUG triggered by wrong bytes\_compl

On one of our machines we got:

kernel BUG at lib/dynamic\_queue\_limits.c:27!
Internal error: Oops - BUG: 0 \[\#1\] PREEMPT SMP ARM
CPU: 0 PID: 1166 Comm: irq/41-bgmac Tainted: G        W  O    4.14.275-rt132 \#1
Hardware name: BRCM XGS iProc
task: ee3415c0 task.stack: ee32a000
PC is at dql\_completed+0x168/0x178
LR is at bgmac\_poll+0x18c/0x6d8
pc : \[\<c03b9430\>\]    lr : \[\<c04b5a18\>\]    psr: 800a0313
sp : ee32be14  ip : 000005ea  fp : 00000bd4
r10: ee558500  r9 : c0116298  r8 : 00000002
r7 : 00000000  r6 : ef128810  r5 : 01993267  r4 : 01993851
r3 : ee558000  r2 : 000070e1  r1 : 00000bd4  r0 : ee52c180
Flags: Nzcv  IRQs on  FIQs on  Mode SVC\_32  ISA ARM  Segment none
Control: 12c5387d  Table: 8e88c04a  DAC: 00000051
Process irq/41-bgmac (pid: 1166, stack limit = 0xee32a210)
Stack: (0xee32be14 to 0xee32c000)
be00:                                              ee558520 ee52c100 ef128810
be20: 00000000 00000002 c0116298 c04b5a18 00000000 c0a0c8c4 c0951780 00000040
be40: c0701780 ee558500 ee55d520 ef05b340 ef6f9780 ee558520 00000001 00000040
be60: ffffe000 c0a56878 ef6fa040 c0952040 0000012c c0528744 ef6f97b0 fffcfb6a
be80: c0a04104 2eda8000 c0a0c4ec c0a0d368 ee32bf44 c0153534 ee32be98 ee32be98
bea0: ee32bea0 ee32bea0 ee32bea8 ee32bea8 00000000 c01462e4 ffffe000 ef6f22a8
bec0: ffffe000 00000008 ee32bee4 c0147430 ffffe000 c094a2a8 00000003 ffffe000
bee0: c0a54528 00208040 0000000c c0a0c8c4 c0a65980 c0124d3c 00000008 ee558520
bf00: c094a23c c0a02080 00000000 c07a9910 ef136970 ef136970 ee30a440 ef136900
bf20: ee30a440 00000001 ef136900 ee30a440 c016d990 00000000 c0108db0 c012500c
bf40: ef136900 c016da14 ee30a464 ffffe000 00000001 c016dd14 00000000 c016db28
bf60: ffffe000 ee21a080 ee30a400 00000000 ee32a000 ee30a440 c016dbfc ee25fd70
bf80: ee21a09c c013edcc ee32a000 ee30a400 c013ec7c 00000000 00000000 00000000
bfa0: 00000000 00000000 00000000 c0108470 00000000 00000000 00000000 00000000
bfc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
bfe0: 00000000 00000000 00000000 00000000 00000013 00000000 00000000 00000000
\[\<c03b9430\>\] (dql\_completed) from \[\<c04b5a18\>\] (bgmac\_poll+0x18c/0x6d8)
\[\<c04b5a18\>\] (bgmac\_poll) from \[\<c0528744\>\] (net\_rx\_action+0x1c4/0x494)
\[\<c0528744\>\] (net\_rx\_action) from \[\<c0124d3c\>\] (do\_current\_softirqs+0x1ec/0x43c)
\[\<c0124d3c\>\] (do\_current\_softirqs) from \[\<c012500c\>\] (\_\_local\_bh\_enable+0x80/0x98)
\[\<c012500c\>\] (\_\_local\_bh\_enable) from \[\<c016da14\>\] (irq\_forced\_thread\_fn+0x84/0x98)
\[\<c016da14\>\] (irq\_forced\_thread\_fn) from \[\<c016dd14\>\] (irq\_thread+0x118/0x1c0)
\[\<c016dd14\>\] (irq\_thread) from \[\<c013edcc\>\] (kthread+0x150/0x158)
\[\<c013edcc\>\] (kthread) from \[\<c0108470\>\] (ret\_from\_fork+0x14/0x24)
Code: a83f15e0 0200001a 0630a0e1 c3ffffea (f201f0e7)

The issue seems similar to commit 90b3b339364c ("net: hisilicon: Fix a BUG
trigered by wrong bytes\_compl") and potentially introduced by commit
b38c83dd0866 ("bgmac: simplify tx ring index handling").

If there is an RX interrupt between setting ring-\>end
and netdev\_sent\_queue() we can hit the BUG\_ON as bgmac\_dma\_tx\_free()
can miscalculate the queue size while called from bgmac\_poll().

The machine which triggered the BUG runs a v4.14 RT kernel - but the issue
seems present in mainline too.

## Affected and fixed versions

- Linux: \>= b38c83dd08665a93e439c4ffd9eef31bc098a6ea, \< ac6d4482f29ab992b605c1b4bd1347f1f679f4e4; \>= b38c83dd08665a93e439c4ffd9eef31bc098a6ea, \< ab2b55bb25db289ba0b68e3d58494476bdb1041d; \>= b38c83dd08665a93e439c4ffd9eef31bc098a6ea, \< c506c9a97120f43257e9b3ce7b1f9a24eafc3787; \>= b38c83dd08665a93e439c4ffd9eef31bc098a6ea, \< da1421a29d3b8681ba6a7f686bd0b40dda5acaf3; \>= b38c83dd08665a93e439c4ffd9eef31bc098a6ea, \< 1b7680c6c1f6de9904f1d9b05c952f0c64a03350 (cvelist)
- Linux: 4.1 (cvelist)

## Mitigation

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

Details: https://flawdb.com/CVE-2022-50062.md
Affected: Linux >= b38c83dd08665a93e439c4ffd9eef31bc098a6ea, < ac6d4482f29ab992b605c1b4bd1347f1f679f4e4; >= b38c83dd08665a93e439c4ffd9eef31bc098a6ea, < ab2b55bb25db289ba0b68e3d58494476bdb1041d; >= b38c83dd08665a93e439c4ffd9eef31bc098a6ea, < c506c9a97120f43257e9b3ce7b1f9a24eafc3787; >= b38c83dd08665a93e439c4f…
Fixed in: Linux 1b7680c6c1f6de9904f1d9b05c952f0c64a03350

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

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

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

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

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

Linux \>= b38c83dd08665a93e439c4ffd9eef31bc098a6ea, \< ac6d4482f29ab992b605c1b4bd1347f1f679f4e4; \>= b38c83dd08665a93e439c4ffd9eef31bc098a6ea, \< ab2b55bb25db289ba0b68e3d58494476bdb1041d; \>= b38c83dd08665a93e439c4ffd9eef31bc098a6ea, \< c506c9a97120f43257e9b3ce7b1f9a24eafc3787; \>= b38c83dd08665a93e439c4ffd9eef31bc098a6ea, \< da1421a29d3b8681ba6a7f686bd0b40dda5acaf3; \>= b38c83dd08665a93e439c4ffd9eef31bc098a6ea, \< 1b7680c6c1f6de9904f1d9b05c952f0c64a03350; Linux 4.1.

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

Yes. Fixed in Linux 1b7680c6c1f6de9904f1d9b05c952f0c64a03350. Upgrade Linux to 1b7680c6c1f6de9904f1d9b05c952f0c64a03350 or later.

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

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/ac6d4482f29ab992b605c1b4bd1347f1f679f4e4>
- patch: <https://git.kernel.org/stable/c/ab2b55bb25db289ba0b68e3d58494476bdb1041d>
- patch: <https://git.kernel.org/stable/c/c506c9a97120f43257e9b3ce7b1f9a24eafc3787>
- patch: <https://git.kernel.org/stable/c/da1421a29d3b8681ba6a7f686bd0b40dda5acaf3>
- patch: <https://git.kernel.org/stable/c/1b7680c6c1f6de9904f1d9b05c952f0c64a03350>

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

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