Security Vulnerability Report
中文
CVE-2026-23281 CVSS 7.8 HIGH

CVE-2026-23281

Published: 2026-03-25 11:16:23
Last Modified: 2026-05-22 00:31:53
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67

Description

In the Linux kernel, the following vulnerability has been resolved: wifi: libertas: fix use-after-free in lbs_free_adapter() The lbs_free_adapter() function uses timer_delete() (non-synchronous) for both command_timer and tx_lockup_timer before the structure is freed. This is incorrect because timer_delete() does not wait for any running timer callback to complete. If a timer callback is executing when lbs_free_adapter() is called, the callback will access freed memory since lbs_cfg_free() frees the containing structure immediately after lbs_free_adapter() returns. Both timer callbacks (lbs_cmd_timeout_handler and lbs_tx_lockup_handler) access priv->driver_lock, priv->cur_cmd, priv->dev, and other fields, which would all be use-after-free violations. Use timer_delete_sync() instead to ensure any running timer callback has completed before returning. This bug was introduced in commit 8f641d93c38a ("libertas: detect TX lockups and reset hardware") where del_timer() was used instead of del_timer_sync() in the cleanup path. The command_timer has had the same issue since the driver was first written.

CVSS Details

CVSS Score
7.8
Severity
HIGH
CVSS Vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

Configurations (Affected Products)

cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* - VULNERABLE
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* - VULNERABLE
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* - VULNERABLE
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* - VULNERABLE
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* - VULNERABLE
Linux Kernel (包含commit 8f641d93c38a及之后版本,直至修复补丁发布前)

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
/* * Conceptual PoC for CVE-2026-23281 * This demonstrates the race condition logic. * It is not a full exploit but illustrates the vulnerability. */ #include <linux/module.h> #include <linux/timer.h> struct mock_device { struct timer_list cleanup_timer; int data; }; // Simulate the timer callback accessing device data void device_timer_callback(struct timer_list *t) { struct mock_device *dev = from_timer(dev, t, cleanup_timer); // Vulnerability point: Accessing dev after potential free printk(KERN_INFO "Accessing device data: %d\n", dev->data); } // Simulate the vulnerable cleanup function void vulnerable_cleanup(struct mock_device *dev) { // VULNERABILITY: Using timer_delete (non-sync) // If the callback is running here, it continues. timer_delete(&dev->cleanup_timer); // Free the structure immediately // If callback is still running, it will use freed memory (UAF) kfree(dev); printk(KERN_INFO "Device freed (Race condition possible)\n"); } // Correct fix: Use timer_delete_sync void fixed_cleanup(struct mock_device *dev) { // FIX: Wait for callback to finish timer_delete_sync(&dev->cleanup_timer); kfree(dev); }

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-23281", "sourceIdentifier": "416baaa9-dc9f-4396-8d5f-8c081fb06d67", "published": "2026-03-25T11:16:22.657", "lastModified": "2026-05-22T00:31:53.367", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nwifi: libertas: fix use-after-free in lbs_free_adapter()\n\nThe lbs_free_adapter() function uses timer_delete() (non-synchronous)\nfor both command_timer and tx_lockup_timer before the structure is\nfreed. This is incorrect because timer_delete() does not wait for\nany running timer callback to complete.\n\nIf a timer callback is executing when lbs_free_adapter() is called,\nthe callback will access freed memory since lbs_cfg_free() frees the\ncontaining structure immediately after lbs_free_adapter() returns.\n\nBoth timer callbacks (lbs_cmd_timeout_handler and lbs_tx_lockup_handler)\naccess priv->driver_lock, priv->cur_cmd, priv->dev, and other fields,\nwhich would all be use-after-free violations.\n\nUse timer_delete_sync() instead to ensure any running timer callback\nhas completed before returning.\n\nThis bug was introduced in commit 8f641d93c38a (\"libertas: detect TX\nlockups and reset hardware\") where del_timer() was used instead of\ndel_timer_sync() in the cleanup path. The command_timer has had the\nsame issue since the driver was first written."}, {"lang": "es", "value": "En el kernel de Linux, la siguiente vulnerabilidad ha sido resuelta:\n\nwifi: libertas: corregir uso después de liberación en lbs_free_adapter()\n\nLa función lbs_free_adapter() usa timer_delete() (no síncrono) para command_timer y tx_lockup_timer antes de que la estructura sea liberada. Esto es incorrecto porque timer_delete() no espera a que ninguna devolución de llamada de temporizador en ejecución se complete.\n\nSi una devolución de llamada de temporizador se está ejecutando cuando se llama a lbs_free_adapter(), la devolución de llamada accederá a memoria liberada ya que lbs_cfg_free() libera la estructura contenedora inmediatamente después de que lbs_free_adapter() retorna.\n\nAmbas devoluciones de llamada de temporizador (lbs_cmd_timeout_handler y lbs_tx_lockup_handler) acceden a priv-&gt;driver_lock, priv-&gt;cur_cmd, priv-&gt;dev y otros campos, lo que serían todas violaciones de uso después de liberación.\n\nUsar timer_delete_sync() en su lugar para asegurar que cualquier devolución de llamada de temporizador en ejecución se haya completado antes de retornar.\n\nEste error fue introducido en el commit 8f641d93c38a ('libertas: detectar bloqueos de TX y reiniciar hardware') donde se usó del_timer() en lugar de del_timer_sync() en la ruta de limpieza. El command_timer ha tenido el mismo problema desde que el controlador fue escrito por primera vez."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Primary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H", "baseScore": 7.8, "baseSeverity": "HIGH", "attackVector": "LOCAL", "attackComplexity": "LOW", "privilegesRequired": "LOW", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "HIGH", "availabilityImpact": "HIGH"}, "exploitabilityScore": 1.8, "impactScore": 5.9}]}, "weaknesses": [{"source": "[email protected]", "type": "Primary", "description": [{"lang": "en", "value": "CWE-416"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "2.6.24", "versionEndExcluding": "5.10.253", "matchCriteriaId": "23F88A56-E27D-46A7-B32C-65333C046B72"}, {"vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "5.11", "versionEndExcluding": "5.15.203", "matchCriteriaId": "20DDB3E9-AABF-4107-ADB0-5362AA067045"}, {"vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "5.16", "versionEndExcluding": "6.1.167", "matchCriteriaId": "2EDC6BAF-B710-4E26-B6AA-D68922EE7B43"}, {"vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "6.2", "versionEndExcluding": "6.6.130", "matchCriteriaId": "C57BB918-DF28-46B3-94F7-144176841267"}, {"vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "6.7", "versionEndExcluding": "6.12.78", "matchCriteriaId": "28D591F5-B196-4CC9-905C-DC80F116E7A8"}, {"vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "6.13", "versionEndExcluding": "6.18.17", "matchCriteriaId": "A5E006E4-59C7-43C1-9231-62A72219F2BA"}, {"vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "6.19", "versionEndExcluding": "6.19.7", "matchCriteriaId": "69245D10-0B71-485E-80C3-A64F077004D3"}, {"vulnerable": true, "criteria": "cpe:2.3:o:linux: ... (truncated)