{"id":"CVE-2022-50282","aliases":["CVE-2022-50282"],"related":[],"kind":"vulnerability","state":"published","title":"chardev: fix error handling in cdev_device_add()","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nchardev: fix error handling in cdev_device_add()\n\nWhile doing fault injection test, I got the following report:\n\n------------[ cut here ]------------\nkobject: '(null)' (0000000039956980): is not initialized, yet kobject_put() is being called.\nWARNING: CPU: 3 PID: 6306 at kobject_put+0x23d/0x4e0\nCPU: 3 PID: 6306 Comm: 283 Tainted: G        W          6.1.0-rc2-00005-g307c1086d7c9 #1253\nHardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.13.0-1ubuntu1.1 04/01/2014\nRIP: 0010:kobject_put+0x23d/0x4e0\nCall Trace:\n <TASK>\n cdev_device_add+0x15e/0x1b0\n __iio_device_register+0x13b4/0x1af0 [industrialio]\n __devm_iio_device_register+0x22/0x90 [industrialio]\n max517_probe+0x3d8/0x6b4 [max517]\n i2c_device_probe+0xa81/0xc00\n\nWhen device_add() is injected fault and returns error, if dev->devt is not set,\ncdev_add() is not called, cdev_del() is not needed. Fix this by checking dev->devt\nin error path.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\nchardev: fix error handling in cdev_device_add()\n\nWhile doing fault injection test, I got the following report:\n\n------------[ cut here ]------------\nkobject: '(null)' (0000000039956980): is not initialized, yet kobject_put() is being called.\nWARNING: CPU: 3 PID: 6306 at kobject_put+0x23d/0x4e0\nCPU: 3 PID: 6306 Comm: 283 Tainted: G        W          6.1.0-rc2-00005-g307c1086d7c9 #1253\nHardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.13.0-1ubuntu1.1 04/01/2014\nRIP: 0010:kobject_put+0x23d/0x4e0\nCall Trace:\n <TASK>\n cdev_device_add+0x15e/0x1b0\n __iio_device_register+0x13b4/0x1af0 [industrialio]\n __devm_iio_device_register+0x22/0x90 [industrialio]\n max517_probe+0x3d8/0x6b4 [max517]\n i2c_device_probe+0xa81/0xc00\n\nWhen device_add() is injected fault and returns error, if dev->devt is not set,\ncdev_add() is not called, cdev_del() is not needed. Fix this by checking dev->devt\nin error path.","source":"cvelist"}],"published":"2025-09-15T14:21:18.658Z","modified":"2026-11-05T20:17:32.370Z","severity":{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"},"severities":[{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"}],"cwes":["CWE-908"],"affected":[{"ranges":[{"type":"git","introduced":"da97a80a657d1b1b50ef633e8ff5dbf0d417fc8d","fixed":"5d2146889fad4cb9e6c13e790d4cfd871486eca8","status":"affected"},{"type":"git","introduced":"233ed09d7fdacf592ee91e6c97ce5f4364fbe7c0","fixed":"6acf8597c5b04f455ee0649e11e5f3bcd28f381e","status":"affected"},{"type":"git","introduced":"233ed09d7fdacf592ee91e6c97ce5f4364fbe7c0","fixed":"34d17b39bceef25e4cf9805cd59250ae05d0a139","status":"affected"},{"type":"git","introduced":"233ed09d7fdacf592ee91e6c97ce5f4364fbe7c0","fixed":"d85b5247a79355b8432bfd9ac871f96117f750d4","status":"affected"},{"type":"git","introduced":"233ed09d7fdacf592ee91e6c97ce5f4364fbe7c0","fixed":"c46db6088bccff5115674d583fef46ede80077a2","status":"affected"},{"type":"git","introduced":"233ed09d7fdacf592ee91e6c97ce5f4364fbe7c0","fixed":"28dc61cc49c6e995121c6d86bef4b73df78dda80","status":"affected"},{"type":"git","introduced":"233ed09d7fdacf592ee91e6c97ce5f4364fbe7c0","fixed":"b5de1eac71fec1af7723f1083d23a24789fd795c","status":"affected"},{"type":"git","introduced":"233ed09d7fdacf592ee91e6c97ce5f4364fbe7c0","fixed":"85a5660491b507d33662b8e81c142e6041e642eb","status":"affected"},{"type":"git","introduced":"233ed09d7fdacf592ee91e6c97ce5f4364fbe7c0","fixed":"11fa7fefe3d8fac7da56bc9aa3dd5fb3081ca797","status":"affected"},{"type":"git","version":"f78b54e7d83c7879f9a6e49e6724019ca34177cc","status":"affected"},{"type":"git","version":"d79d7d5c878809964da537336dad5ff55fa1605e","status":"affected"},{"type":"semver","introduced":"4.9.224","fixed":"4.9.337","status":"affected"},{"type":"semver","introduced":"3.16.83","fixed":"3.17","status":"affected"},{"type":"semver","introduced":"4.4.224","fixed":"4.5","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"4.12","status":"affected"},{"type":"semver","introduced":"0","fixed":"4.12","status":"unaffected"},{"type":"semver","introduced":"4.9.337","lastAffected":"4.9.*","status":"unaffected"},{"type":"semver","introduced":"4.14.303","lastAffected":"4.14.*","status":"unaffected"},{"type":"semver","introduced":"4.19.270","lastAffected":"4.19.*","status":"unaffected"},{"type":"semver","introduced":"5.4.229","lastAffected":"5.4.*","status":"unaffected"},{"type":"semver","introduced":"5.10.163","lastAffected":"5.10.*","status":"unaffected"},{"type":"semver","introduced":"5.15.86","lastAffected":"5.15.*","status":"unaffected"},{"type":"semver","introduced":"6.0.16","lastAffected":"6.0.*","status":"unaffected"},{"type":"semver","introduced":"6.1.2","lastAffected":"6.1.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"6.2","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"status":"affected","introduced":"3.16.83","fixed":"3.17"},{"status":"affected","introduced":"4.4.224","fixed":"4.5"},{"status":"affected","introduced":"4.9.224","fixed":"4.9.337"},{"status":"affected","introduced":"4.12","fixed":"4.14.303"},{"status":"affected","introduced":"4.15","fixed":"4.19.270"},{"status":"affected","introduced":"4.20","fixed":"5.4.229"},{"status":"affected","introduced":"5.5","fixed":"5.10.163"},{"status":"affected","introduced":"5.11","fixed":"5.15.86"},{"status":"affected","introduced":"5.16","fixed":"6.0.16"},{"status":"affected","introduced":"6.1","fixed":"6.1.2"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://git.kernel.org/stable/c/5d2146889fad4cb9e6c13e790d4cfd871486eca8","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/6acf8597c5b04f455ee0649e11e5f3bcd28f381e","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/34d17b39bceef25e4cf9805cd59250ae05d0a139","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/d85b5247a79355b8432bfd9ac871f96117f750d4","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/c46db6088bccff5115674d583fef46ede80077a2","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/28dc61cc49c6e995121c6d86bef4b73df78dda80","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/b5de1eac71fec1af7723f1083d23a24789fd795c","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/85a5660491b507d33662b8e81c142e6041e642eb","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/11fa7fefe3d8fac7da56bc9aa3dd5fb3081ca797","tags":["patch"],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2026-11-05T20:08:55.622Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2022-50282","url":"https://www.cve.org/CVERecord?id=CVE-2022-50282","licence":"CVE Terms of Use","modified":"2026-11-05T20:10:33.031Z"},{"source":"nvd","name":"NVD","id":"CVE-2022-50282","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-50282","licence":"Public domain","modified":"2026-11-05T20:17:32.370Z"}],"updatedAt":"2026-11-25T22:58:21.146Z","epss":{"score":0.00193,"percentile":0.09345,"date":"2026-12-02T12:00:21.000Z"}}