CVE-2022-49315
JSON

5.5medium

drivers: staging: rtl8192e: Fix deadlock in rtllib_beacons_stop()

Severity
5.5medium CVSS:3.1 by CISA-ADP
Exploit likelihood
0.21% (higher than 11% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
Linux

Description

In the Linux kernel, the following vulnerability has been resolved: drivers: staging: rtl8192e: Fix deadlock in rtllib_beacons_stop() There is a deadlock in rtllib_beacons_stop(), which is shown below: (Thread 1) | (Thread 2) | rtllib_send_beacon() rtllib_beacons_stop() | mod_timer() spin_lock_irqsave() //(1) | (wait a time) ... | rtllib_send_beacon_cb() del_timer_sync() | spin_lock_irqsave() //(2) (wait timer to stop) | ... We hold ieee->beacon_lock in position (1) of thread 1 and use del_timer_sync() to wait timer to stop, but timer handler also need ieee->beacon_lock in position (2) of thread 2. As a result, rtllib_beacons_stop() will block forever. This patch extracts del_timer_sync() from the protection of spin_lock_irqsave(), which could let timer handler to obtain the needed lock.

Affected

Product or packageVersionsReported by
Linux Linuxfrom 94a799425eee8225a1e3fbe5f473d2ef04002577 before 4681129fda9e8555392eaaadb239ec6a6e2b3e12, from 94a799425eee8225a1e3fbe5f473d2ef04002577 before 381045dc64d23a2229c47c5524c06bfc33d34446, from 94a799425eee8225a1e3fbe5f473d2ef04002577 before 08bacf871c019163ccd1389d0bc957a43324967a, from 94a799425eee8225a1e3fbe5f473d2ef04002577 before 64b05fa212c7e4d057676e8b7e7120c6eb2f615b, from 94a799425eee8225a1e3fbe5f473d2ef04002577 before 0f69d7d5e918aa43423d86bd17ddb11b1b5e8ada, from 94a799425eee8225a1e3fbe5f473d2ef04002577 before fef451f0fbbe85dbd2962b18379d02e2965610db, from 94a799425eee8225a1e3fbe5f473d2ef04002577 before 46c861009bf437a18417df24cea0d181741b7d72, from 94a799425eee8225a1e3fbe5f473d2ef04002577 before ffd4c4d5293e4985092ea45ba21cad9326e2e434 and 2 more
Not affected: before 3.2, from 4.9.318 up to 4.9.*, from 4.14.283 up to 4.14.*, from 4.19.247 up to 4.19.*, from 5.4.198 up to 5.4.*, from 5.10.122 up to 5.10.*
CVE List
linux linux_kernelbefore 4.9.318, from 4.10 before 4.14.283, from 4.15 before 4.19.247, from 4.20 before 5.4.198, from 5.5 before 5.10.122, from 5.11 before 5.15.47, from 5.16 before 5.17.15, from 5.18 before 5.18.4NVD

All scores

CISA-ADP5.5medium CVSS:3.1CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
NVD5.5medium CVSS:3.1CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H

Classification

CWE-667

SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.

What each source says

CVE List

In the Linux kernel, the following vulnerability has been resolved: drivers: staging: rtl8192e: Fix deadlock in rtllib_beacons_stop() There is a deadlock in rtllib_beacons_stop(), which is shown below: (Thread 1) | (Thread 2) | rtllib_send_beacon() rtllib_beacons_stop() | mod_timer() spin_lock_irqsave() //(1) | (wait a time) ... | rtllib_send_beacon_cb() del_timer_sync() | spin_lock_irqsave() //(2) (wait timer to stop) | ... We hold ieee->beacon_lock in position (1) of thread 1 and use del_timer_sync() to wait timer to stop, but timer handler also need ieee->beacon_lock in position (2) of thread 2. As a result, rtllib_beacons_stop() will block forever. This patch extracts del_timer_sync() from the protection of spin_lock_irqsave(), which could let timer handler to obtain the needed lock.

NVD (es)

En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: drivers: staging: rtl8192e: Corregir bloqueo en rtllib_beacons_stop() Hay un bloqueo en rtllib_beacons_stop(), que se muestra a continuación: (Hilo 1) | (Hilo 2) | rtllib_send_beacon() rtllib_beacons_stop() | mod_timer() spin_lock_irqsave() //(1) | (esperar un tiempo) ... | rtllib_send_beacon_cb() del_timer_sync() | spin_lock_irqsave() //(2) (esperar que el temporizador se detenga) | ... Mantenemos ieee->beacon_lock en la posición (1) del hilo 1 y usamos del_timer_sync() para esperar a que el temporizador se detenga, pero el controlador del temporizador también necesita ieee->beacon_lock en la posición (2) del hilo 2. Como resultado, rtllib_beacons_stop() se bloqueará para siempre. Este parche extrae del_timer_sync() de la protección de spin_lock_irqsave(), lo que podría permitir que el controlador del temporizador obtenga el bloqueo necesario.

References

Sources

SourceRecordLicence
CVE ListCVE-2022-49315 changed 2026-05-11CVE Terms of Use
NVDCVE-2022-49315 changed 2026-06-17Public domain