wwan_hwsim: fix possible memory leak in wwan_hwsim_dev_new()
Published Sep 15, 2025
5.5
MEDIUMCVSS 3.1
EPSS 0.15%
Description
Inject fault while probing module, if device_register() fails, but the refcount of kobject is not decreased to 0, the name allocated in dev_set_name() is leaked. Fix this by calling put_device(), so that name can be freed in callback function kobject_cleanup().
unreferenced object 0xffff88810152ad20 (size 8): comm "modprobe", pid 252, jiffies 4294849206 (age 22.713s) hex dump (first 8 bytes): 68 77 73 69 6d 30 00 ff hwsim0.. backtrace: [<000000009c3504ed>] __kmalloc_node_track_caller+0x44/0x1b0 [<00000000c0228a5e>] kvasprintf+0xb5/0x140 [<00000000cff8c21f>] kvasprintf_const+0x55/0x180 [<0000000055a1e073>] kobject_set_name_vargs+0x56/0x150 [<000000000a80b139>] dev_set_name+0xab/0xe0
Affected products
-
- Version StatusaffectedConstraints
- Version StatusaffectedConstraints
- Version StatusaffectedConstraints
- Version
-
- Version 5.14StatusaffectedConstraints-
- Version 0StatusunaffectedConstraints<5.14
- Version 5.15.76StatusunaffectedConstraints<=5.15.*
- Version 6.0.6StatusunaffectedConstraints<=6.0.*
- Version 6.1StatusunaffectedConstraints<=*
- Version
Default status is the baseline for the product, each version can override it (e.g. patched versions marked unaffected).
- ≥ 5.14 · < 5.15.76
- ≥ 5.16 · < 6.0.6
- 6.1
No data.
Red Hat Enterprise Linux 10
kernel
Not affected
Red Hat Enterprise Linux 6
kernel
Not affected
Red Hat Enterprise Linux 7
kernel
Not affected
Red Hat Enterprise Linux 7
kernel-rt
Not affected
Red Hat Enterprise Linux 8
kernel
Not affected
Red Hat Enterprise Linux 8
kernel-rt
Not affected
Red Hat Enterprise Linux 9
kernel
Fix deferred
Red Hat Enterprise Linux 9
kernel-rt
Fix deferred
| Product | Package | State | Advisory |
|---|---|---|---|
| Red Hat Enterprise Linux 10 | kernel | Not affected | n/a |
| Red Hat Enterprise Linux 6 | kernel | Not affected | n/a |
| Red Hat Enterprise Linux 7 | kernel | Not affected | n/a |
| Red Hat Enterprise Linux 7 | kernel-rt | Not affected | n/a |
| Red Hat Enterprise Linux 8 | kernel | Not affected | n/a |
| Red Hat Enterprise Linux 8 | kernel-rt | Not affected | n/a |
| Red Hat Enterprise Linux 9 | kernel | Fix deferred | n/a |
| Red Hat Enterprise Linux 9 | kernel-rt | Fix deferred | n/a |
No package ranges for this CVE.
Remediation
Red Hat statement
The bug causes a small memory leak in the wwan_hwsim simulator when device_register() fails, due to using kfree() instead of put_device(). This prevents proper cleanup of the kobject name. Exploitation is not realistic: it requires privileged module loading and only results in minor memory leakage on error paths, without impact on confidentiality or integrity.
Metrics
No CVSS v4.0 score for this CVE.
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
1 other source (Red Hat) ▾
CVSS:3.1/AV:L/AC:H/PR:H/UI:N/S:U/C:N/I:N/A:H
No CVSS v3.0 score for this CVE.
No CVSS v2.0 score for this CVE.
This CVE is not in the KEV list.
No CISA SSVC assessment for this CVE yet.
Estimated probability of exploitation in the wild in the next 30 days (FIRST EPSS). As of Oct 1, 2026.
Score over time
2025–2026- EPSS v4
- EPSS v5
Percentile over time
- EPSS v4
- EPSS v5
Table of values (3 key points)
Flat stretches are collapsed; showing up to 120 newest points.
| Date | Score | Percentile | Model |
|---|---|---|---|
| Oct 1, 2026 | 0.15% (0.00154) | 3.82th | v5 (v2026.06.15) |
| Jun 15, 2026 | 0.14% (0.00143) | 3.91th | v5 (v2026.06.15) |
| Sep 16, 2025 | 0.02% (0.00017) | 2.64th | v4 (v2025.03.14) |
References (8)
- https://access.redhat.com/security/cve/CVE-2022-50331 Vendor Advisory
- https://bugzilla.redhat.com/show_bug.cgi?id=2395385 Issue Tracking
- https://git.kernel.org/stable/c/258ad2fe5ede773625adfda88b173f4123e59f45 Patch
- https://git.kernel.org/stable/c/50c31fa952309536c6e4461ff815ddccc8dff9d5 Patch
- https://git.kernel.org/stable/c/d87973314aba6de80a49f4271dd9be4ddc08e729 Patch
- https://lore.kernel.org/linux-cve-announce/2025091555-CVE-2022-50331-53e1@gregkh/T
- https://nvd.nist.gov/vuln/detail/CVE-2022-50331
- https://www.cve.org/CVERecord?id=CVE-2022-50331
Change history (0)
No recorded changes yet.