{"id":"CVE-2022-50634","state":"PUBLISHED","title":"power: supply: cw2015: Fix potential null-ptr-deref in cw_bat_probe()","description":"In the Linux kernel, the following vulnerability has been resolved:\n\npower: supply: cw2015: Fix potential null-ptr-deref in cw_bat_probe()\n\ncw_bat_probe() calls create_singlethread_workqueue() and not checked the\nret value, which may return NULL. And a null-ptr-deref may happen:\n\ncw_bat_probe()\n    create_singlethread_workqueue() # failed, cw_bat->wq is NULL\n    queue_delayed_work()\n        queue_delayed_work_on()\n            __queue_delayed_work()  # warning here, but continue\n                __queue_work()      # access wq->flags, null-ptr-deref\n\nCheck the ret value and return -ENOMEM if it is NULL.","publishedAt":"2025-12-09T00:00:06.318Z","updatedAt":"2026-05-11T19:22:38.474Z","severity":null,"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"b4c7715c10c106a041b0b3fabd26151c214ea394","status":"affected","lessThan":"f7e2ba8ed08138102f21f3fe6414498c93177fd8","versionType":"git"},{"version":"b4c7715c10c106a041b0b3fabd26151c214ea394","status":"affected","lessThan":"5150b76aa2eb8bb8feb7f7a048417f9d39c3dd04","versionType":"git"},{"version":"b4c7715c10c106a041b0b3fabd26151c214ea394","status":"affected","lessThan":"97f2b4ddb0aa700d673691a7d5e44d226d22bab7","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/power/supply/cw2015_battery.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.8","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.8","versionType":"semver"},{"version":"6.0.16","status":"unaffected","lessThanOrEqual":"6.0.*","versionType":"semver"},{"version":"6.1.2","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.2","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/power/supply/cw2015_battery.c"]}],"references":["https://git.kernel.org/stable/c/f7e2ba8ed08138102f21f3fe6414498c93177fd8","https://git.kernel.org/stable/c/5150b76aa2eb8bb8feb7f7a048417f9d39c3dd04","https://git.kernel.org/stable/c/97f2b4ddb0aa700d673691a7d5e44d226d22bab7"],"weaknesses":[],"ingestedAt":"2026-10-29T20:05:26.763Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2022/50xxx/CVE-2022-50634.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2022-50634","state":"PUBLISHED","datePublished":"2025-12-09T00:00:06.318Z","dateUpdated":"2026-05-11T19:22:38.474Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2025-12-08T23:57:43.369Z"},"containers":{"cna":{"title":"power: supply: cw2015: Fix potential null-ptr-deref in cw_bat_probe()","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\npower: supply: cw2015: Fix potential null-ptr-deref in cw_bat_probe()\n\ncw_bat_probe() calls create_singlethread_workqueue() and not checked the\nret value, which may return NULL. And a null-ptr-deref may happen:\n\ncw_bat_probe()\n    create_singlethread_workqueue() # failed, cw_bat->wq is NULL\n    queue_delayed_work()\n        queue_delayed_work_on()\n            __queue_delayed_work()  # warning here, but continue\n                __queue_work()      # access wq->flags, null-ptr-deref\n\nCheck the ret value and return -ENOMEM if it is NULL."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"b4c7715c10c106a041b0b3fabd26151c214ea394","status":"affected","lessThan":"f7e2ba8ed08138102f21f3fe6414498c93177fd8","versionType":"git"},{"version":"b4c7715c10c106a041b0b3fabd26151c214ea394","status":"affected","lessThan":"5150b76aa2eb8bb8feb7f7a048417f9d39c3dd04","versionType":"git"},{"version":"b4c7715c10c106a041b0b3fabd26151c214ea394","status":"affected","lessThan":"97f2b4ddb0aa700d673691a7d5e44d226d22bab7","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/power/supply/cw2015_battery.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.8","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.8","versionType":"semver"},{"version":"6.0.16","status":"unaffected","lessThanOrEqual":"6.0.*","versionType":"semver"},{"version":"6.1.2","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.2","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/power/supply/cw2015_battery.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/f7e2ba8ed08138102f21f3fe6414498c93177fd8"},{"url":"https://git.kernel.org/stable/c/5150b76aa2eb8bb8feb7f7a048417f9d39c3dd04"},{"url":"https://git.kernel.org/stable/c/97f2b4ddb0aa700d673691a7d5e44d226d22bab7"}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-05-11T19:22:38.474Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.8","versionEndExcluding":"6.0.16"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.8","versionEndExcluding":"6.1.2"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.8","versionEndExcluding":"6.2"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}