CVE-2022-49926 json
net: dsa: Fix possible memory leaks in dsa_loop_init()
published 2025-05-01 18 mo ago modified 2026-06-17 4 mo ago also EUVD-2025-12861
- cvss
- 5.5
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 0.2%
- EPSS 0.2% chance of exploitation in 30 days, percentile 8%
- public exploits
- 0
- none known
Summary
In the Linux kernel, the following vulnerability has been resolved:
net: dsa: Fix possible memory leaks in dsa_loop_init()
kmemleak reported memory leaks in dsa_loop_init():
kmemleak: 12 new suspected memory leaks
unreferenced object 0xffff8880138ce000 (size 2048): comm "modprobe", pid 390, jiffies 4295040478 (age 238.976s) backtrace: [<000000006a94f1d5>] kmalloc_trace+0x26/0x60 [<00000000a9c44622>] phy_device_create+0x5d/0x970 [<00000000d0ee2afc>] get_phy_device+0xf3/0x2b0 [<00000000dca0c71f>] __fixed_phy_register.part.0+0x92/0x4e0 [<000000008a834798>] fixed_phy_register+0x84/0xb0 [<0000000055223fcb>] dsa_loop_init+0xa9/0x116 [dsa_loop] ...
There are two reasons for memleak in dsa_loop_init().
First, fixed_phy_register() create and register phy_device:
fixed_phy_register() get_phy_device() phy_device_create() # freed by phy_device_free() phy_device_register() # freed by phy_device_remove()
But fixed_phy_unregister() only calls phy_device_remove(). So the memory allocated in phy_device_create() is leaked.
Second, when mdio_driver_register() fail in dsa_loop_init(), it just returns and there is no cleanup for phydevs.
Fix the problems by catching the error of mdio_driver_register() in dsa_loop_init(), then calling both fixed_phy_unregister() and phy_device_free() to release phydevs. Also add a function for phydevs cleanup to avoid duplacate.
Patch / fix
- Linux Linux 4.14.299, 4.19.265, 5.4.224, 5.10.154, 5.15.78, 6.0.8, 6.1
- linux Debian 14, Debian 13, Debian 12 6.0.8-1
debian advisories DEBIAN-CVE-2022-49926
- linux Ubuntu 18.04 LTS 4.15.0-206.217
- linux Ubuntu 20.04 LTS 5.4.0-139.156
- linux Ubuntu 22.04 LTS 5.15.0-60.66
- linux-aws Ubuntu 18.04 LTS 4.15.0-1151.164
- linux-aws Ubuntu 20.04 LTS 5.4.0-1096.104
- linux-aws Ubuntu 22.04 LTS 5.15.0-1030.34
- linux-gcp Ubuntu 20.04 LTS 5.4.0-1100.109
- linux-gcp Ubuntu 22.04 LTS 5.15.0-1029.36
ubuntu advisories UBUNTU-CVE-2022-49926
Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0
- git.kernel.org/stable/c/935b4beb724946a37cebf97191592d4879d3a3a3 commit
- git.kernel.org/stable/c/d593e1ede655b74c42e4e4fe285ea64aee96fb5c commit
- git.kernel.org/stable/c/bbc5d7b46a729bfcbb5544f6612b7a67dd4f4d6f commit
- git.kernel.org/stable/c/37a098fc9b42bd7fce66764866aa514639667b6e commit
- git.kernel.org/stable/c/9f555b1584fc2d5d16ee3c4d9438e93ac7c502c7 commit
- git.kernel.org/stable/c/4d2024b138d9f7b02ae13ee997fd3a71e9e46254 commit
- git.kernel.org/stable/c/633efc8b3dc96f56f5a57f2a49764853a2fa3f50 commit
Vendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2022-49926 updated cvss 5.5
kernel: net: dsa: Fix possible memory leaks in dsa_loop_init()
-
Red Hat Enterprise Linux 6 perf, kernel, python-perf, kernel-kdump, kernel-firmware, kernel-bootwrapper, +1 more Red Hat Enterprise Linux 7 perf, kernel, bpftool, kernel-rt, python-perf, kernel-kdump, +8 more Red Hat Enterprise Linux 8 perf, kernel, bpftool, kernel-rt, kernel-core, kernel-tools, +29 more Red Hat Enterprise Linux 9 rv, perf, rtla, kernel, bpftool, libperf, +83 more Red Hat Enterprise Linux 10 kernelnot affected: vulnerable code not present
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
CISA SSVC
- Exploitation
- none
- Automatable
- no
- Technical impact
- partial
- Assessed
- 13 mo ago
Exploit prediction
0.19% chance of exploitation in the next 30 days, higher than 8% of all scored CVEs (FIRST EPSS, 2026-11-08).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CISA ADP | 3.1 | 5.5 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H |
| NVD | 3.1 | 5.5 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H |
| CNA | 3.1 | 5.5 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H |
Affected products
- Linux Linux
Classification
- Weakness
-
- CWE-401 Missing Release of Memory after Effective Lifetime
- Technology feeds
References
-
git.kernel.org
/stable/c/935b4beb724946a37cebf97191592d4879d3a3a3
patch
-
git.kernel.org
/stable/c/d593e1ede655b74c42e4e4fe285ea64aee96fb5c
patch
-
git.kernel.org
/stable/c/bbc5d7b46a729bfcbb5544f6612b7a67dd4f4d6f
patch
-
git.kernel.org
/stable/c/37a098fc9b42bd7fce66764866aa514639667b6e
patch
-
git.kernel.org
/stable/c/9f555b1584fc2d5d16ee3c4d9438e93ac7c502c7
patch
-
git.kernel.org
/stable/c/4d2024b138d9f7b02ae13ee997fd3a71e9e46254
patch
-
git.kernel.org
/stable/c/633efc8b3dc96f56f5a57f2a49764853a2fa3f50
patch
Sources
- CVE List CVE-2022-49926
- NVD CVE-2022-49926
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.