In the Linux kernel, the following vulnerability has been resolved:
power: supply: cw2015: Fix potential null-ptr-deref in cwbatprobe()
cwbatprobe() calls createsinglethreadworkqueue() and not checked the ret value, which may return NULL. And a null-ptr-deref may happen:
cwbatprobe() createsinglethreadworkqueue() # failed, cwbat->wq is NULL queuedelayedwork() queuedelayedworkon() __queuedelayedwork() # warning here, but continue _queuework() # access wq->flags, null-ptr-deref
Check the ret value and return -ENOMEM if it is NULL.
{
"cna_assigner": "Linux",
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/50xxx/CVE-2022-50634.json"
}