KernelScan.io

HIGH

wifi libertas Timer UAF

CVE-2026-23281

CVSS 7.8 / 10.0 NVD

CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

KernelScan AI7.8HIGH

01

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.

02

Engine v0.2.0

Risk summary

Local attackers with low privileges can trigger a use-after-free vulnerability in the libertas WiFi driver during device cleanup. This can lead to arbitrary code execution, privilege escalation, or system crashes when timer callbacks access freed memory structures.

Affecteddrivers/net/wireless/marvell/libertas/main.c (libertas WiFi driver)

Vulnerability analysis

The vulnerability occurs in lbs_free_adapter() where timer_delete() is used instead of timer_delete_sync() for command_timer and tx_lockup_timer cleanup. Since timer_delete() is non-synchronous, it doesn't wait for running timer callbacks to complete before returning. If timer callbacks (lbs_cmd_timeout_handler or lbs_tx_lockup_handler) are executing when the adapter structure is freed by lbs_cfg_free(), they will access freed memory including priv->driver_lock, priv->cur_cmd, and priv->dev fields. The fix replaces timer_delete() with timer_delete_sync() to ensure all timer callbacks complete before the structure is freed, preventing the race condition.

03

BranchFixed inPatch commit
5.105.10.253b15e0fa7adb4
5.155.15.20309f3c30ab3b1
6.16.1.1673f9dec4a6d95
6.126.12.78d0155fe68f31
6.186.18.17ed7d30f90b77
6.196.19.7a9f55b144864
6.66.6.1303c5c818c78b0
mainline7.003cc8f90d053