{"id":"CVE-2022-50282","summary":"chardev: fix error handling in cdev_device_add()","details":"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 \u003cTASK\u003e\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-\u003edevt is not set,\ncdev_add() is not called, cdev_del() is not needed. Fix this by checking dev-\u003edevt\nin error path.","modified":"2026-05-18T05:56:22.686562735Z","published":"2025-09-15T14:21:18.658Z","related":["SUSE-SU-2025:03614-1","SUSE-SU-2025:03615-1","SUSE-SU-2025:03628-1","SUSE-SU-2025:3716-1","SUSE-SU-2025:3761-1","SUSE-SU-2026:0350-1","SUSE-SU-2026:0369-1"],"database_specific":{"cna_assigner":"Linux","osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/50xxx/CVE-2022-50282.json"},"references":[{"type":"WEB","url":"https://git.kernel.org/stable/c/11fa7fefe3d8fac7da56bc9aa3dd5fb3081ca797"},{"type":"WEB","url":"https://git.kernel.org/stable/c/28dc61cc49c6e995121c6d86bef4b73df78dda80"},{"type":"WEB","url":"https://git.kernel.org/stable/c/34d17b39bceef25e4cf9805cd59250ae05d0a139"},{"type":"WEB","url":"https://git.kernel.org/stable/c/5d2146889fad4cb9e6c13e790d4cfd871486eca8"},{"type":"WEB","url":"https://git.kernel.org/stable/c/6acf8597c5b04f455ee0649e11e5f3bcd28f381e"},{"type":"WEB","url":"https://git.kernel.org/stable/c/85a5660491b507d33662b8e81c142e6041e642eb"},{"type":"WEB","url":"https://git.kernel.org/stable/c/b5de1eac71fec1af7723f1083d23a24789fd795c"},{"type":"WEB","url":"https://git.kernel.org/stable/c/c46db6088bccff5115674d583fef46ede80077a2"},{"type":"WEB","url":"https://git.kernel.org/stable/c/d85b5247a79355b8432bfd9ac871f96117f750d4"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/50xxx/CVE-2022-50282.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-50282"},{"type":"PACKAGE","url":"https://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":"0"},{"last_affected":"f78b54e7d83c7879f9a6e49e6724019ca34177cc"},{"last_affected":"d79d7d5c878809964da537336dad5ff55fa1605e"}]}],"versions":["v4.9.336","v4.9.335","v4.9.334","v4.9.333","v4.9.332","v4.9.331","v4.9.330","v4.9.329","v4.9.328","v4.9.327","v4.9.326","v4.9.325","v4.9.324","v4.9.323","v4.9.322","v4.9.321","v4.9.320","v4.9.319","v4.9.318","v4.9.317","v4.9.316","v4.9.315","v4.9.314","v4.9.313","v4.9.312","v4.9.311","v4.9.310","v4.9.309","v4.9.308","v4.9.307","v4.9.306","v4.9.305","v4.9.304","v4.9.303","v4.9.302","v4.9.301","v4.9.300","v4.9.299","v4.9.298","v4.9.297","v4.9.296","v4.9.295","v4.9.294","v4.9.293","v4.9.292","v4.9.291","v4.9.290","v4.9.289","v4.9.288","v4.9.287","v4.9.286","v4.9.285","v4.9.284","v4.9.283","v4.9.282","v4.9.281","v4.9.280","v4.9.279","v4.9.278","v4.9.277","v4.9.276","v4.9.275","v4.9.274","v4.9.273","v4.9.272","v4.9.271","v4.9.270","v4.9.269","v4.9.268","v4.9.267","v4.9.266","v4.9.265","v4.9.264","v4.9.263","v4.9.262","v4.9.261","v4.9.260","v4.9.259","v4.9.258","v4.9.257","v4.9.256","v4.9.255","v4.9.254","v4.9.253","v4.9.252","v4.9.251","v4.9.250","v4.9.249","v4.9.248","v4.9.247","v4.9.246","v4.9.245","v4.9.244","v4.9.243","v4.9.242","v4.9.241","v4.9.240","v4.9.239","v4.9.238","v4.9.237","v4.9.236","v4.9.235","v4.9.234","v4.9.233","v4.9.232","v4.9.231","v4.9.230","v4.9.229","v4.9.228","v4.9.227","v4.9.226","v4.9.225","v4.9.224","v4.4.223","v4.4.222","v4.4.221","v4.4.220","v3.16.82","v4.4.219","v4.4.218","v4.4.217","v4.4.216","v4.4.215","v4.4.214","v4.4.213","v3.16.81","v4.4.212","v4.4.211","v4.4.210","v4.4.209","v4.4.208","v3.16.80","v4.4.207","v4.4.206","v3.16.79","v3.16.78","v4.4.205","v4.4.204","v4.4.203","v4.4.202","v3.16.77","v4.4.201","v3.16.76","v4.4.200","v4.4.199","v4.4.198","v3.16.75","v4.4.197","v4.4.196","v4.4.195","v3.16.74","v4.4.194","v3.16.73","v4.4.193","v4.4.192","v4.4.191","v4.4.190","v4.4.189","v3.16.72","v3.16.71","v4.4.188","v4.4.187","v4.4.186","v3.16.70","v4.4.185","v4.4.184","v3.16.69","v4.4.183","v4.4.182","v3.16.68","v4.4.181","v4.4.180","v3.16.67","v4.4.179","v3.16.66","v3.16.65","v4.4.178","v3.16.64","v4.4.177","v3.16.63","v4.4.176","v4.4.175","v4.4.174","v3.16.62","v4.4.173","v4.4.172","v4.4.171","v4.4.170","v4.4.169","v4.4.168","v4.4.167","v3.16.61","v4.4.166","v4.4.165","v4.4.164","v4.4.163","v3.16.60","v4.4.162","v3.16.59","v4.4.161","v4.4.160","v4.4.159","v3.16.58","v4.4.158","v4.4.157","v3.16.57","v4.4.156","v4.4.155","v4.4.154","v4.4.153","v4.4.152","v4.4.151","v4.4.150","v4.4.149","v4.4.148","v4.4.147","v4.4.146","v4.4.145","v4.4.144","v4.4.143","v4.4.142","v4.4.141","v4.4.140","v4.4.139","v4.4.138","v3.16.56","v4.4.137","v4.4.136","v4.4.135","v4.4.134","v4.4.133","v4.4.132","v4.4.131","v4.4.130","v4.4.129","v4.4.128","v4.4.127","v4.4.126","v4.4.125","v4.4.124","v4.4.123","v4.4.122","v3.16.55","v4.4.121","v4.4.120","v3.16.54","v4.4.119","v4.4.118","v4.4.117","v4.4.116","v4.4.115","v3.16.53","v4.4.114","v4.4.113","v4.4.112","v4.4.111","v4.4.110","v3.16.52","v4.4.109","v4.4.108","v3.16.51","v4.4.107","v4.4.106","v4.4.105","v4.4.104","v4.4.103","v4.4.102","v3.16.50","v4.4.101","v4.4.100","v4.4.99","v4.4.98","v4.4.97","v3.16.49","v4.4.96","v4.4.95","v4.4.94","v4.4.93","v4.4.92","v3.16.48","v4.4.91","v4.4.90","v4.4.89","v4.4.88","v3.16.47","v4.4.87","v4.4.86","v4.4.85","v4.4.84","v3.16.46","v4.4.83","v4.4.82","v4.4.81","v4.4.80","v4.4.79","v4.4.78","v4.4.77","v3.16.45","v4.4.76","v4.4.75","v3.16.44","v4.4.74","v4.4.73","v4.4.72","v4.4.71","v4.4.70","v3.16.43","v4.4.69","v4.4.68","v4.4.67","v4.4.66","v4.4.65","v4.4.64","v4.4.63","v4.4.62","v4.4.61","v4.4.60","v4.4.59","v3.16.42","v4.4.58","v4.4.57","v4.4.56","v4.4.55","v4.4.54","v3.16.41","v4.4.53","v4.4.52","v3.16.40","v4.4.51","v4.4.50","v3.16.39","v4.4.49","v4.4.48","v4.4.47","v4.4.46","v4.4.45","v4.4.44","v4.4.43","v4.4.42","v4.4.41","v4.4.40","v4.4.39","v4.4.38","v4.4.37","v4.4.36","v4.4.35","v4.4.34","v4.4.33","v3.16.38","v4.4.32","v4.4.31","v4.4.30","v4.4.29","v4.4.28","v4.4.27","v4.4.26","v3.16.37","v4.4.25","v4.4.24","v4.4.23","v4.4.22","v4.4.21","v4.4.20","v4.4.19","v3.16.36","v4.4.18","v4.4.17","v4.4.16","v4.4.15","v4.4.14","v4.4.13","v3.16.35","v4.4.12","v4.4.11","v4.4.10","v4.4.9","v4.4.8","v4.4.7","v4.4.6","v4.4","v4.4.5","v4.4.4","v4.4.3","v4.4.2","v4.4.1","v4.4-rc1","v4.4-rc2","v4.4-rc8","v4.4-rc3","v4.4-rc7","v4.4-rc5","v4.4-rc6","v4.4-rc4","v4.3","v4.3-rc1","v4.3-rc6","v4.3-rc4","v4.3-rc2","v4.3-rc7","v4.3-rc5","v4.3-rc3","v4.2","v4.2-rc2","v4.2-rc1","v4.2-rc8","v4.2-rc4","v4.2-rc6","v4.2-rc7","v4.0-rc5","v4.2-rc5","v4.2-rc3","v4.1-rc2","v4.1","v4.1-rc1","v4.1-rc8","v4.1-rc7","v4.1-rc6","v4.1-rc3","v4.1-rc4","v4.0","v4.1-rc5","v4.0-rc1","v4.0-rc2","v4.0-rc7","v4.0-rc3","v4.0-rc6","v4.0-rc4","v3.19","v3.19-rc7","v3.19-rc5","v3.19-rc1","v3.19-rc6","v3.19-rc4","v3.18-rc1","v3.19-rc3","v3.19-rc2","v3.18","v3.18-rc7","v3.18-rc6","v3.18-rc2","v3.18-rc3","v3.18-rc4","v3.18-rc5","v3.17","v3.16.7","v3.16.6","v3.17-rc1","v3.16.5","v3.17-rc7","v3.16.4","v3.17-rc2","v3.16.3","v3.17-rc4","v3.16","v3.17-rc5","v3.17-rc6","v3.16.2","v3.17-rc3","v3.16.1","v3.16-rc7","v3.16-rc1","v3.16-rc3","v3.16-rc5","v3.16-rc6","v3.16-rc2","v3.16-rc4","v3.13","v3.15","v3.15-rc5","v3.15-rc8","v3.15-rc1","v3.15-rc6","v3.15-rc3","v3.15-rc7","v3.15-rc2","v3.15-rc4","v3.14","v3.14-rc4","v3.14-rc8","v3.14-rc7","v3.14-rc6","v3.14-rc1","v3.14-rc2","v3.14-rc5","v3.14-rc3","v3.13-rc6","v3.13-rc8","v3.12","v3.13-rc7","v3.13-rc1","v3.13-rc4","v3.13-rc3","v3.13-rc5","v3.13-rc2","v3.12-rc7","v3.12-rc3","v3.12-rc6","v3.12-rc1","v3.12-rc5","v3.11","v3.12-rc2","v3.12-rc4","v3.11-rc7","v3.11-rc2","v3.11-rc5","v3.11-rc1","v3.11-rc3","v3.11-rc4","v3.11-rc6","v3.10-rc2","v3.10","v3.10-rc7","v3.10-rc6","v3.10-rc1","v3.10-rc5","v3.10-rc3","v3.10-rc4","v3.9","v3.9-rc2","v3.9-rc7","v3.9-rc8","v3.9-rc3","v3.9-rc6","v3.9-rc5","v3.9-rc4","v3.9-rc1","v3.8","v3.8-rc7","v3.8-rc6","v3.8-rc5","v3.8-rc2","v3.8-rc1","v3.8-rc3","v3.8-rc4","v3.7","v3.7-rc1","v3.6","v3.7-rc6","v3.7-rc7","v3.7-rc3","v3.7-rc8","v3.7-rc2","v3.7-rc4","v3.7-rc5","v3.6-rc7","v3.6-rc1","v3.5-rc3","v3.6-rc6","v3.6-rc5","v3.5","v3.6-rc3","v3.6-rc4","v3.6-rc2","v3.4-rc4","v3.5-rc7","v3.5-rc5","v3.5-rc6","v3.5-rc2","v3.5-rc1","v3.5-rc4","v3.4","v3.4-rc2","v3.4-rc1","v3.4-rc7","v3.4-rc6","v3.4-rc3","v3.4-rc5","v3.3","v3.3-rc6","v3.3-rc3","v3.3-rc7","v3.3-rc2","v3.3-rc5","v3.2","v3.3-rc4","v3.3-rc1","v3.2-rc4","v3.2-rc7","v3.2-rc6","v3.2-rc5","v3.2-rc3","v3.1","v3.2-rc2","v3.2-rc1","v3.1-rc1","v3.1-rc9","v3.1-rc8","v3.1-rc10","v3.1-rc7","v3.1-rc3","v3.1-rc2","v3.1-rc4","v3.1-rc5","v3.0","v3.1-rc6","v3.0-rc7","v3.0-rc4","v3.0-rc6","v3.0-rc5","v3.0-rc3","v3.0-rc1","v2.6.39","v3.0-rc2","v2.6.38","v2.6.39-rc2","v2.6.39-rc7","v2.6.39-rc5","v2.6.39-rc1","v2.6.38-rc7","v2.6.39-rc6","v2.6.39-rc4","v2.6.39-rc3","v2.6.37","v2.6.38-rc1","v2.6.38-rc8","v2.6.38-rc2","v2.6.38-rc6","v2.6.38-rc5","v2.6.38-rc4","v2.6.38-rc3","v2.6.37-rc4","v2.6.37-rc2","v2.6.36","v2.6.37-rc5","v2.6.37-rc8","v2.6.37-rc7","v2.6.37-rc6","v2.6.37-rc1","v2.6.37-rc3","v2.6.36-rc6","v2.6.35-rc4","v2.6.36-rc8","v2.6.35","v2.6.36-rc7","v2.6.36-rc3","v2.6.36-rc5","v2.6.36-rc4","v2.6.36-rc2","v2.6.36-rc1","v2.6.35-rc5","v2.6.35-rc6","v2.6.34","v2.6.35-rc3","v2.6.35-rc1","v2.6.35-rc2","v2.6.34-rc7","v2.6.34-rc6","v2.6.34-rc5","v2.6.34-rc4","v2.6.34-rc3","v2.6.34-rc2","v2.6.34-rc1","v2.6.33","v2.6.33-rc6","v2.6.33-rc8","v2.6.33-rc4","v2.6.33-rc5","v2.6.33-rc3","v2.6.33-rc7","v2.6.33-rc2","v2.6.32","v2.6.33-rc1","v2.6.32-rc8","v2.6.32-rc7","v2.6.32-rc6","v2.6.31","v2.6.32-rc5","v2.6.32-rc4","v2.6.32-rc2","v2.6.32-rc1","v2.6.32-rc3","v2.6.31-rc9","v2.6.31-rc1","v2.6.31-rc7","v2.6.31-rc8","v2.6.31-rc6","v2.6.30-rc6","v2.6.30","v2.6.31-rc4","v2.6.31-rc5","v2.6.31-rc3","v2.6.31-rc2","v2.6.30-rc7","v2.6.30-rc8","v2.6.30-rc5","v2.6.30-rc3","v2.6.30-rc4","v2.6.30-rc1","v2.6.30-rc2","v2.6.29","v2.6.29-rc8","v2.6.29-rc7","v2.6.29-rc5","v2.6.29-rc1","v2.6.29-rc6","v2.6.29-rc4","v2.6.29-rc3","v2.6.29-rc2","v2.6.28","v2.6.28-rc7","v2.6.28-rc9","v2.6.28-rc8","v2.6.28-rc6","v2.6.28-rc5","v2.6.28-rc4","v2.6.28-rc2","v2.6.28-rc3","v2.6.28-rc1","v2.6.27","v2.6.27-rc7","v2.6.27-rc9","v2.6.27-rc8","v2.6.27-rc5","v2.6.27-rc6","v2.6.27-rc4","v2.6.27-rc1","v2.6.27-rc3","v2.6.27-rc2","v2.6.26","v2.6.26-rc9","v2.6.26-rc8","v2.6.26-rc3","v2.6.26-rc7","v2.6.26-rc6","v2.6.26-rc5","v2.6.26-rc4","v2.6.26-rc2","v2.6.26-rc1","v2.6.25","v2.6.25-rc7","v2.6.25-rc9","v2.6.25-rc8","v2.6.25-rc6","v2.6.25-rc5","v2.6.25-rc3","v2.6.25-rc4","v2.6.24","v2.6.25-rc2","v2.6.25-rc1","v2.6.24-rc8","v2.6.24-rc7","v2.6.24-rc6","v2.6.24-rc5","v2.6.24-rc4","v2.6.24-rc3","v2.6.24-rc2","v2.6.24-rc1","v2.6.23","v2.6.23-rc9","v2.6.23-rc8","v2.6.23-rc5","v2.6.23-rc7","v2.6.23-rc6","v2.6.23-rc4","v2.6.23-rc3","v2.6.23-rc2","v2.6.23-rc1","v2.6.22","v2.6.22-rc7","v2.6.22-rc6","v2.6.22-rc5","v2.6.22-rc4","v2.6.22-rc3","v2.6.22-rc2","v2.6.22-rc1","v2.6.21","v2.6.21-rc7","v2.6.21-rc6","v2.6.21-rc5","v2.6.21-rc4","v2.6.21-rc3","v2.6.21-rc2","v2.6.21-rc1","v2.6.20-rc7","v2.6.20-rc6","v2.6.20-rc5","v2.6.20-rc4","v2.6.20-rc3","v2.6.20-rc1","v2.6.20-rc2","v2.6.19-rc2","v2.6.18","v2.6.19-rc1","v2.6.18-rc6","v2.6.18-rc5","v2.6.18-rc3","v2.6.18-rc2","v2.6.18-rc1","v2.6.17","v2.6.17-rc4","v2.6.17-rc6","v2.6.17-rc5","v2.6.17-rc3","v2.6.17-rc2","v2.6.17-rc1","v2.6.16","v2.6.16-rc6","v2.6.16-rc4","v2.6.16-rc5","v2.6.16-rc3","v2.6.16-rc2","v2.6.16-rc1","v2.6.15-rc7","v2.6.15-rc5","v2.6.15-rc4","v2.6.15-rc2","v2.6.15-rc1","v2.6.14-rc3","v2.6.14-rc2","v2.6.14-rc1","v2.6.13","v2.6.13-rc7","v2.6.13-rc6","v2.6.13-rc5","v2.6.13-rc3","v2.6.13-rc4","v2.6.13-rc2","v2.6.13-rc1","v2.6.12-rc4","v2.6.12-rc3","v2.6.12-rc2"],"database_specific":{"source":"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2022-50282.json"}},{"package":{"name":"Kernel","ecosystem":"Linux"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"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/osv-test-cve-osv-conversion/osv-output/CVE-2022-50282.json"}}],"schema_version":"1.7.5"}