CVE-2022-50282

chardev: fix error handling in cdev_device_add()

No CVSS score yet EPSS 0.19%

Published 15 Sep 2025 Updated 5 Nov 2026 CNA: Linux

Check your servers for CVE-2022-50282

The Vulnpocalypse collector sends the package list of each Linux server and of its container images once a day. Vulnpocalypse shows every server where CVE-2022-50282 affects the running kernel, with the command that installs the fix. The free plan covers one server and one domain and does not need a credit card.

Check my servers

Description

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.

Exploitation

EPSS 0.19%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 9.35% of all scored CVEs. Scores of 1 Dec 2026.

The assessment of CISA (SSVC, 5 Nov 2026):

Exploitation
none: CISA did not find evidence of exploitation or a public proof of concept
Automatable
no: each attack takes manual steps
Technical impact
partial: limited control or limited data

Affected products

As the CNA lists them.

ProductVersions
Linux
affected from da97a80a657d1b1b50ef633e8ff5dbf0d417fc8d, before 5d2146889fad4cb9e6c13e790d4cfd871486eca8
affected from 233ed09d7fdacf592ee91e6c97ce5f4364fbe7c0, before 6acf8597c5b04f455ee0649e11e5f3bcd28f381e
affected from 233ed09d7fdacf592ee91e6c97ce5f4364fbe7c0, before 34d17b39bceef25e4cf9805cd59250ae05d0a139
affected from 233ed09d7fdacf592ee91e6c97ce5f4364fbe7c0, before d85b5247a79355b8432bfd9ac871f96117f750d4
affected from 233ed09d7fdacf592ee91e6c97ce5f4364fbe7c0, before c46db6088bccff5115674d583fef46ede80077a2
affected from 233ed09d7fdacf592ee91e6c97ce5f4364fbe7c0, before 28dc61cc49c6e995121c6d86bef4b73df78dda80
affected from 233ed09d7fdacf592ee91e6c97ce5f4364fbe7c0, before b5de1eac71fec1af7723f1083d23a24789fd795c
affected from 233ed09d7fdacf592ee91e6c97ce5f4364fbe7c0, before 85a5660491b507d33662b8e81c142e6041e642eb
affected from 233ed09d7fdacf592ee91e6c97ce5f4364fbe7c0, before 11fa7fefe3d8fac7da56bc9aa3dd5fb3081ca797
affected f78b54e7d83c7879f9a6e49e6724019ca34177cc
affected d79d7d5c878809964da537336dad5ff55fa1605e
affected from 4.9.224, before 4.9.337
affected from 3.16.83, before 3.17
affected from 4.4.224, before 4.5
Other versions: unaffected
Linux
affected 4.12
unaffected before 4.12
unaffected from 4.9.337 up to and including 4.9.*
unaffected from 4.14.303 up to and including 4.14.*
unaffected from 4.19.270 up to and including 4.19.*
unaffected from 5.4.229 up to and including 5.4.*
unaffected from 5.10.163 up to and including 5.10.*
unaffected from 5.15.86 up to and including 5.15.*
unaffected from 6.0.16 up to and including 6.0.*
unaffected from 6.1.2 up to and including 6.1.*
unaffected 6.2 and later
Other versions: affected

Is my server affected?

This CVE is in the Linux kernel. Compare the running kernel with the fixed kernel version of your distribution, and reboot after a kernel update:

uname -r
# Debian, Ubuntu: does the changelog of the running kernel name the CVE?
zgrep -l CVE-2022-50282 /usr/share/doc/linux-image-$(uname -r)/changelog.Debian.gz
# RHEL, Rocky, Alma
rpm -q --changelog kernel | grep CVE-2022-50282

With Trivy, on the host and for a container image. When a package is affected, it prints the installed and the fixed version:

trivy rootfs --scanners vuln / | grep CVE-2022-50282
trivy image --scanners vuln IMAGE | grep CVE-2022-50282

Vulnpocalypse makes this comparison every day for the package lists of your servers and container images, including language packages (npm, PyPI, Go, Maven and others), and sends the command that installs the fix. Start free with one server and one domain or read how to install the collector.

References

Other references

Source: the record CVE-2022-50282 of the CVE List (CVE Program), CVE Terms of Use; the CISA KEV catalog and the CISA ADP container; EPSS of FIRST. The text of the record is shown as published. Data sources and licences.