Description (CNA)
In the Linux kernel, the following vulnerability has been resolved: wifi: libertas_tf: fix use-after-free in lbtf_free_adapter() lbtf_free_adapter() calls timer_delete(&priv->command_timer), which does not wait for a running command_timer_fn() callback. lbtf_free_adapter() runs on the teardown path right before ieee80211_free_hw() frees priv, both in lbtf_remove_card() and in the probe error path. command_timer is armed by mod_timer() in lbtf_cmd() whenever a firmware command is sent. command_timer_fn() dereferences priv. If a command times out as the device is removed, command_timer_fn() runs concurrently with teardown and dereferences priv after it has been freed. This is the same use-after-free that commit 03cc8f90d053 ("wifi: libertas: fix use-after-free in lbs_free_adapter()") fixed in the sibling libertas driver. The libertas_tf variant has the identical pattern and was left unchanged. Use timer_delete_sync() so any in-flight callback completes before priv is freed.
Affected (CNA)
| Vendor / product | Versions |
|---|---|
| Linux / Linux | affected 06b16ae5319251c26377afcb401e46056d5673f4 before bd75636681588c67006279abdb9a76a708b3ce29; affected 06b16ae5319251c26377afcb401e46056d5673f4 before 2fba1d3b2f031a2c68e566a6d45cc5b7a8d6683d; affected 06b16ae5319251c26377afcb401e46056d5673f4 before 9392fd5de555272449d3d8c63410ea00f8ec853a; affected 06b16ae5319251c26377afcb401e46056d5673f4 before 4714e95f5d61cb9c5c7c6c4e68b618f37bc6ffcf; affected 06b16ae5319251c26377afcb401e46056d5673f4 before 066b59e84f90d270cc15f0370166155aca507630; affected 06b16ae5319251c26377afcb401e46056d5673f4 before fcff712d0e3d183843ec3916470ee6cc3455baad; affected 06b16ae5319251c26377afcb401e46056d5673f4 before bcf7968cb97ce4312588042cf2712f04caff6d8f; affected 06b16ae5319251c26377afcb401e46056d5673f4 before aa6dcd5c8dd9ba1d7d0f60093bcda41c0d6d438d |
| Linux / Linux | affected 2.6.28; unaffected 0 before 2.6.28; unaffected 5.10.266 through 5.10.*; unaffected 5.15.217 through 5.15.*; unaffected 6.1.184 through 6.1.*; unaffected 6.6.148 through 6.6.*; unaffected 6.12.101 through 6.12.*; unaffected 6.18.40 through 6.18.*; unaffected 7.1.5 through 7.1.*; unaffected 7.2 through * |
CWE
No CWE identifiers supplied.
References
- https://git.kernel.org/stable/c/bd75636681588c67006279abdb9a76a708b3ce29
- https://git.kernel.org/stable/c/2fba1d3b2f031a2c68e566a6d45cc5b7a8d6683d
- https://git.kernel.org/stable/c/9392fd5de555272449d3d8c63410ea00f8ec853a
- https://git.kernel.org/stable/c/4714e95f5d61cb9c5c7c6c4e68b618f37bc6ffcf
- https://git.kernel.org/stable/c/066b59e84f90d270cc15f0370166155aca507630
- https://git.kernel.org/stable/c/fcff712d0e3d183843ec3916470ee6cc3455baad
- https://git.kernel.org/stable/c/bcf7968cb97ce4312588042cf2712f04caff6d8f
- https://git.kernel.org/stable/c/aa6dcd5c8dd9ba1d7d0f60093bcda41c0d6d438d