CVE-2022-49223

Source
https://cve.org/CVERecord?id=CVE-2022-49223
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2022-49223.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2022-49223
Downstream
Published
2025-02-26T01:55:54.274Z
Modified
2026-03-20T12:22:16.213420Z
Severity
  • 7.8 (High) CVSS_V3 - CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H CVSS Calculator
Summary
cxl/port: Hold port reference until decoder release
Details

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

cxl/port: Hold port reference until decoder release

KASAN + DEBUGKOBJECTRELEASE reports a potential use-after-free in cxldecoderrelease() where it goes to reference its parent, a cxlport, to free its id back to port->decoderida.

BUG: KASAN: use-after-free in tocxlport+0x18/0x90 [cxl_core] Read of size 8 at addr ffff888119270908 by task kworker/35:2/379

CPU: 35 PID: 379 Comm: kworker/35:2 Tainted: G OE 5.17.0-rc2+ #198 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 0.0.0 02/06/2015 Workqueue: events kobjectdelayedcleanup Call Trace: <TASK> dumpstacklvl+0x59/0x73 printaddressdescription.constprop.0+0x1f/0x150 ? tocxlport+0x18/0x90 [cxlcore] kasanreport.cold+0x83/0xdf ? tocxlport+0x18/0x90 [cxlcore] tocxlport+0x18/0x90 [cxlcore] cxldecoderrelease+0x2a/0x60 [cxlcore] devicerelease+0x5f/0x100 kobject_cleanup+0x80/0x1c0

The device core only guarantees parent lifetime until all children are unregistered. If a child needs a parent to complete its ->release() callback that child needs to hold a reference to extend the lifetime of the parent.

Database specific
{
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/49xxx/CVE-2022-49223.json",
    "cna_assigner": "Linux"
}
References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
40ba17afdfabb01688c61565dbe02a916241bc05
Fixed
518bb96367123062b48b0a9842f2864249b565f6
Fixed
b0022ca445d5fc4d0c89d15dcd0f855977b22c1d
Fixed
49f2dab77a5e1354f5da6ccdc9346a8212697be2
Fixed
74be98774dfbc5b8b795db726bd772e735d2edd4

Database specific

source
"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2022-49223.json"