CVE-2022-50474

macintosh: fix possible memory leak in macio_add_one_device()

MEDIUM
5.5
CVSS Score
Published: October 4, 2025 at 03:16 PM UTC
Updated: June 17, 2026 at 05:23 AM UTC
1 product affected across 1 vendorLinux Kernel

Using Linux by Linux?

Get instant alerts when new vulnerabilities affect Linux - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
MEDIUM5.5
Exploit prediction
EPSS 0.2%

Description

In the Linux kernel, the following vulnerability has been resolved: macintosh: fix possible memory leak in macio_add_one_device() Afer commit 1fa5ae857bb1 ("driver core: get rid of struct device's bus_id string array"), the name of device is allocated dynamically. It needs to be freed when of_device_register() fails. Call put_device() to give up the reference that's taken in device_initialize(), so that it can be freed in kobject_cleanup() when the refcount hits 0. macio device is freed in macio_release_dev(), so the kfree() can be removed.

Affected

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

2.6.30 ≤ v < 4.14.3032.6.30 ≤ v < 4.19.2702.6.30 ≤ v < 4.9.3372.6.30 ≤ v < 5.10.1632.6.30 ≤ v < 5.15.862.6.30 ≤ v < 5.4.2292.6.30 ≤ v < 6.0.162.6.30 ≤ v < 6.1.22.6.30 ≤ v < 6.24.10 ≤ v < 4.14.3034.15 ≤ v < 4.19.2704.20 ≤ v < 5.4.2295.11 ≤ v < 5.15.865.16 ≤ v < 6.0.165.5 ≤ v < 5.10.1636.1 ≤ v < 6.1.21fa5ae857bb14f6046205171d98506d8112dd74e2.6.30
Vendor states this is fixed in 19ded60b40e86b0903c8d5bd0161437ed5107a8b (fixed)
Vendor states this is fixed in 2ac0a7059b7bcbed35bfffa34a82c9a9e99638ef (fixed)
Vendor states this is fixed in 35858b87a943917fa30172aa4bf01ce7adbcb42c (fixed)
Vendor states this is fixed in 3a866ff6fc2232c8e393cdb55ffb8ce947349e03 (fixed)
Vendor states this is fixed in 5ca86eae55a2f006e6c1edd2029b2cacb6979515 (fixed)
Vendor states this is fixed in 76837e7f6b30da72ad59f56291e22804a219e015 (fixed)
Vendor states this is fixed in aa9054267366ff0a382d403d17728e21951ddbb9 (fixed)
Vendor states this is fixed in b29a2f1dd33ae9b94821ab2f4d398b9081786748 (fixed)
Vendor states this is fixed in ca765257feb89dacf604ced9cd233db5f865dee0 (fixed)
Vendor states this is fixed in 2.6.30 (unaffected)
Vendor states this is fixed in 4.14.303 (unaffected)
Vendor states this is fixed in 4.19.270 (unaffected)
Vendor states this is fixed in 4.9.337 (unaffected)
Vendor states this is fixed in 5.10.163 (unaffected)
Vendor states this is fixed in 5.15.86 (unaffected)
Vendor states this is fixed in 5.4.229 (unaffected)
Vendor states this is fixed in 6.0.16 (unaffected)
Vendor states this is fixed in 6.1.2 (unaffected)
Vendor states this is fixed in 6.2 (unaffected)

CVSS

Attack Vector
LOCAL
Complexity
LOW
Privileges
LOW
User Interaction
NONE
Scope
UNCHANGED
Confidentiality
NONE
Integrity
NONE
Availability
HIGH
Vector?

Quick Info

StatusANALYZED
CWE
CWE-401

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card