CVE-2022-50282

Source
https://cve.org/CVERecord?id=CVE-2022-50282
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-50282.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2022-50282
Downstream
CLSA (2)
DEBIAN (1)
SUSE (7)
UBUNTU (1)
Related
Published
2025-09-15T14:21:18Z
Modified
2026-10-20T10:31:08Z
Summary
chardev: fix error handling in cdev_device_add()
Details

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: 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.

Database specific
{
    "cna_assigner":  "Linux",
    "osv_generated_from":  "https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/50xxx/CVE-2022-50282.json"
}
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
da97a80a657d1b1b50ef633e8ff5dbf0d417fc8d
Fixed
5d2146889fad4cb9e6c13e790d4cfd871486eca8
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
233ed09d7fdacf592ee91e6c97ce5f4364fbe7c0
Fixed
6acf8597c5b04f455ee0649e11e5f3bcd28f381e
Fixed
34d17b39bceef25e4cf9805cd59250ae05d0a139
Fixed
d85b5247a79355b8432bfd9ac871f96117f750d4
Fixed
c46db6088bccff5115674d583fef46ede80077a2
Fixed
28dc61cc49c6e995121c6d86bef4b73df78dda80
Fixed
b5de1eac71fec1af7723f1083d23a24789fd795c
Fixed
85a5660491b507d33662b8e81c142e6041e642eb
Fixed
11fa7fefe3d8fac7da56bc9aa3dd5fb3081ca797
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
4.9.224
Fixed
4.9.337
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
3.16.83
Fixed
3.17
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
4.4.224
Fixed
4.5
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
f78b54e7d83c7879f9a6e49e6724019ca34177cc
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
d79d7d5c878809964da537336dad5ff55fa1605e

Affected versions

v3.*
v3.16.83
v3.16.84
v3.16.85
v4.*
v4.4.224
v4.4.225
v4.4.226
v4.4.227
v4.4.228
v4.4.229
v4.4.230
v4.4.231
v4.4.232
v4.4.233
v4.4.234
v4.4.235
v4.4.236
v4.4.237
v4.4.238
v4.4.239
v4.4.240
v4.4.241
v4.4.242
v4.4.243
v4.4.244
v4.4.245
v4.4.246
v4.4.247
v4.4.248
v4.4.249
v4.4.250
v4.4.251
v4.4.252
v4.4.253
v4.4.254
v4.4.255
v4.4.256
v4.4.257
v4.4.258
v4.4.259
v4.4.260
v4.4.261
v4.4.262
v4.4.263
v4.4.264
v4.4.265
v4.4.266
v4.4.267
v4.4.268
v4.4.269
v4.4.270
v4.4.271
v4.4.272
v4.4.273
v4.4.274
v4.4.275
v4.4.276
v4.4.277
v4.4.278
v4.4.279
v4.4.280
v4.4.281
v4.4.282
v4.4.283
v4.4.284
v4.4.285
v4.4.286
v4.4.287
v4.4.288
v4.4.289
v4.4.290
v4.4.291
v4.4.292
v4.4.293
v4.4.294
v4.4.295
v4.4.296
v4.4.297
v4.4.298
v4.4.299
v4.4.300
v4.4.301
v4.4.302
v4.9.224
v4.9.225
v4.9.226
v4.9.227
v4.9.228
v4.9.229
v4.9.230
v4.9.231
v4.9.232
v4.9.233
v4.9.234
v4.9.235
v4.9.236
v4.9.237
v4.9.238
v4.9.239
v4.9.240
v4.9.241
v4.9.242
v4.9.243
v4.9.244
v4.9.245
v4.9.246
v4.9.247
v4.9.248
v4.9.249
v4.9.250
v4.9.251
v4.9.252
v4.9.253
v4.9.254
v4.9.255
v4.9.256
v4.9.257
v4.9.258
v4.9.259
v4.9.260
v4.9.261
v4.9.262
v4.9.263
v4.9.264
v4.9.265
v4.9.266
v4.9.267
v4.9.268
v4.9.269
v4.9.270
v4.9.271
v4.9.272
v4.9.273
v4.9.274
v4.9.275
v4.9.276
v4.9.277
v4.9.278
v4.9.279
v4.9.280
v4.9.281
v4.9.282
v4.9.283
v4.9.284
v4.9.285
v4.9.286
v4.9.287
v4.9.288
v4.9.289
v4.9.290
v4.9.291
v4.9.292
v4.9.293
v4.9.294
v4.9.295
v4.9.296
v4.9.297
v4.9.298
v4.9.299
v4.9.300
v4.9.301
v4.9.302
v4.9.303
v4.9.304
v4.9.305
v4.9.306
v4.9.307
v4.9.308
v4.9.309
v4.9.310
v4.9.311
v4.9.312
v4.9.313
v4.9.314
v4.9.315
v4.9.316
v4.9.317
v4.9.318
v4.9.319
v4.9.320
v4.9.321
v4.9.322
v4.9.323
v4.9.324
v4.9.325
v4.9.326
v4.9.327
v4.9.328
v4.9.329
v4.9.330
v4.9.331
v4.9.332
v4.9.333
v4.9.334
v4.9.335
v4.9.336

Database specific

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

Linux / Kernel

Package

Name
Kernel

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0 Unknown introduced version / All previous versions are affected
Fixed
4.9.337
Type
ECOSYSTEM
Events
Introduced
4.10.0
Fixed
4.14.303
Type
ECOSYSTEM
Events
Introduced
4.12.0
Fixed
4.19.270
Type
ECOSYSTEM
Events
Introduced
4.15.0
Fixed
5.4.229
Type
ECOSYSTEM
Events
Introduced
4.20.0
Fixed
5.10.163
Type
ECOSYSTEM
Events
Introduced
5.5.0
Fixed
5.15.86
Type
ECOSYSTEM
Events
Introduced
5.11.0
Fixed
6.0.16
Type
ECOSYSTEM
Events
Introduced
5.16.0
Fixed
6.1.2

Database specific

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