CVE-2022-50282: chardev: fix error handling in cdev_device_add()
In the Linux kernel, the following vulnerability has been resolved:
chardev: fix error handling in cdev_device_add()
While doing fault injection test, I got the following report:
------------[ cut here ]------------
kobject: '(null)' (0000000039956980): is not initialized, yet kobject_put() is being called.
WARNING: CPU: 3 PID: 6306 at kobject_put+0x23d/0x4e0
CPU: 3 PID: 6306 Comm: 283 Tainted: G W 6.1.0-rc2-00005-g307c1086d7c9 #1253
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.13.0-1ubuntu1.1 04/01/2014
RIP: 0010:kobject_put+0x23d/0x4e0
Call Trace:
<TASK>
cdev_device_add+0x15e/0x1b0
__iio_device_register+0x13b4/0x1af0 [industrialio]
__devm_iio_device_register+0x22/0x90 [industrialio]
max517_probe+0x3d8/0x6b4 [max517]
i2c_device_probe+0xa81/0xc00
When device_add() is injected fault and returns error, if dev->devt is not set,
cdev_add() is not called, cdev_del() is not needed. Fix this by checking dev->devt
in error path.
Security readout for executives and security teams
Plain-English summary
This Linux kernel issue is an error-handling bug in character-device registration. Under an injected device_add() failure path, cleanup can call kobject_put() on an uninitialized object, causing a kernel warning. The provided sources do not show remote exploitation, privilege impact, or data exposure.
Executive priority
Treat as a kernel maintenance item unless your environment has unusual exposure through custom drivers or unsupported kernels. There is insufficient source evidence to rank it as urgent exploitation-driven work, but kernel updates should remain scheduled and tracked.
Technical view
cdev_device_add() may enter an incorrect error path when device_add() fails and dev->devt is unset. In that case cdev_add() was not called, so cdev_del() should not run. The fix checks dev->devt before cleanup. Evidence comes from Linux stable commits and the CVE record.
Likely exposure
Exposure is limited to systems running affected Linux kernel versions or downstream kernels carrying the vulnerable chardev code. The bundle lists Linux kernel versions including 4.12, 4.9.337, 4.14.303, 4.19.270, 5.4.229, 5.10.163, 5.15.86, 6.0.16, 6.1.2, and 6.2.
Exploitation context
The source bundle describes discovery during fault-injection testing, not real-world exploitation. KEV status is false, and no cited source reports active exploitation, weaponized use, or a practical attack path.
Researcher notes
The provided evidence is narrow: a warning triggered by fault injection and a cleanup-path correction. Impact boundaries, attacker prerequisites, and exploitability are not established in the bundle. Validate by source diff review and downstream backport confirmation, not by assuming CVSS-like severity.
Mitigation direction
Map running kernels against the CVE record and vendor kernel advisories.
Apply Linux stable or distribution kernel updates containing the referenced fixes.
Prioritize hosts using custom kernels or device-driver-heavy workloads for review.
If patch timing is uncertain, follow your Linux distribution vendor guidance.
Validation and detection
Record kernel versions across servers, containers hosts, appliances, and embedded Linux assets.
Confirm installed kernel packages include the relevant stable fix or vendor backport.
Review kernel logs for related kobject or cdev_device_add warnings.
Track remediation status by kernel lineage, not only distribution version.
Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.
Potential ATT&CK relevance
Conservative CVE-to-ATT&CK context
These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.
ATT&CK lookup starting points
Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.
cve · low confidence lookup
CVE-2022-50282 mapping review
Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.
These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.
0CVSS vectors
3Timeline events
0ADP providers
10Source links
Vulnerability timeline
Timeline events are normalized from CVE metadata, CNA source timelines, ADP timelines, and KEV metadata when present.
CVE reservedCVE Program
The CVE ID was reserved by the assigning CNA.
CVE publishedCVE Program
The CVE record was published.
Sep 15, 2025, 14:21 UTC (UTC+00:00)
CVE updatedCVE Program
The CVE record metadata indicates this as the latest update time.