Bluetooth: MGMT: Fix dangling pointer on mgmt_add_adv_patterns_monitor_complete
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
87a1f16f07c6c43771754075e08f45b41d237421| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
Bluetooth: MGMT: Fix dangling pointer on mgmt_add_adv_patterns_monitor_complete
This fixes the condition checking so mgmt_pending_valid is executed whenever status != -ECANCELED otherwise calling mgmt_pending_free(cmd) would kfree(cmd) without unlinking it from the list first, leaving a dangling pointer. Any subsequent list traversal (e.g., mgmt_pending_foreach during __mgmt_power_off, or another mgmt_pending_valid call) would dereference freed memory.
From the CVE record · Linux
A condition-checking error in the Linux kernel’s Bluetooth MGMT code can free a pending command without removing it from its list when status is not -ECANCELED. A later list traversal can dereference the freed memory. The input does not specify how an attacker could trigger this, or whether network access, authentication, or user interaction is required.
Engineers running the Linux kernel should check their versions; affected versions are not specified.