CVE-2022-50634
JSON

Not scored

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

Severity
Not scored
Exploit likelihood
0.21% (higher than 12% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
Linux

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.

Affected

Product or packageVersionsReported by
Linux Linuxfrom b4c7715c10c106a041b0b3fabd26151c214ea394 before f7e2ba8ed08138102f21f3fe6414498c93177fd8, from b4c7715c10c106a041b0b3fabd26151c214ea394 before 5150b76aa2eb8bb8feb7f7a048417f9d39c3dd04, from b4c7715c10c106a041b0b3fabd26151c214ea394 before 97f2b4ddb0aa700d673691a7d5e44d226d22bab7, 5.8
Not affected: before 5.8, from 6.0.16 up to 6.0.*, from 6.1.2 up to 6.1.*, from 6.2 up to *
CVE List

What each source says

CVE List

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.

NVD (es)

En el kernel de Linux, la siguiente vulnerabilidad ha sido resuelta: power: supply: cw2015: Corregir posible desreferencia de puntero nulo en cw_bat_probe() cw_bat_probe() llama a create_singlethread_workqueue() y no verificó el valor de retorno, el cual puede devolver NULL. Y una desreferencia de puntero nulo puede ocurrir: cw_bat_probe() create_singlethread_workqueue() # falló, cw_bat -> wq es NULL queue_delayed_work() queue_delayed_work_on() __queue_delayed_work() # advertencia aquí, pero continúa __queue_work() # acceso a wq -> flags, desreferencia de puntero nulo Verificar el valor de retorno y devolver -ENOMEM si es NULL.

References

Sources

SourceRecordLicence
CVE ListCVE-2022-50634 changed 2026-05-11CVE Terms of Use
NVDCVE-2022-50634 changed 2026-11-11Public domain