CVE-2022-50634 power: supply: cw2015: Fix potential null-ptr-deref in cw_bat_probe()

Not scored Published Updated

A null pointer dereference in the Linux kernel cw2015 battery driver can cause a system crash, requiring a kernel patch.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Local or same network only
Victim action needed
Not needed
Fix
Available

What is CVE-2022-50634?

CVE-2022-50634 is a vulnerability in Linux, published on 9 Dec 2025. It can only be exploited from the same machine or local network, with no action from the victim.

Official description

In the Linux kernel, the following vulnerability has been resolved:

power: supply: cw2015: Fix potential null-ptr-deref in cw_bat_probe()

cw_bat_probe() calls create_singlethread_workqueue() and not checked the ret value, which may return NULL. And a null-ptr-deref may happen:

cw_bat_probe() create_singlethread_workqueue() # failed, cw_bat->wq is NULL queue_delayed_work() queue_delayed_work_on() __queue_delayed_work() # warning here, but continue __queue_work() # access wq->flags, null-ptr-deref

Check the ret value and return -ENOMEM if it is NULL.

Which versions are affected by CVE-2022-50634?

How do I fix CVE-2022-50634?

Apply the vendor's patch.

Is CVE-2022-50634 being exploited?

There is no known exploitation of CVE-2022-50634 in the wild and no public exploit code.

Sources

Also known as DEBIAN-CVE-2022-50634, GHSA-r4h8-r7w5-jf6v, ROOT-OS-DEBIAN-11-CVE-2022-50634, ROOT-OS-UBUNTU-2204-CVE-2022-50634, UBUNTU-CVE-2022-50634.

Is CVE-2022-50634 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free