GHSA-8JJR-72XV-XCRC

Vulnerability from github – Published: 2026-11-30 15:32 – Updated: 2026-11-30 15:32
VLAI
Details

In the Linux kernel, the following vulnerability has been resolved:

Bluetooth: msft: Lock failed probe cleanup against feature readers

The MSFT data must remain allocated while msft_get_features() reads its features. read_adv_mon_features() protects that access with hdev->lock, but msft_do_open() clears hdev->msft_data and frees the object without that lock when read_supported_features() fails.

After a successful probe, the data survives a normal close. A later open can fail the probe while a management feature request is running. hci_mgmt_cmd() permits requests during HCI_INIT, and the opener's hdev->req_lock does not serialize the management reader:

Management feature request HCI open hold hdev->req_lock msft_do_open() hold hdev->lock msft_get_features(): save msft read_supported_features() fails hdev->msft_data = NULL kfree(msft) read msft->features release hdev->lock release hdev->req_lock

The saved pointer then refers to freed memory, causing a use-after-free read. Advertisement reporting through mgmt_device_found() also reads the features with hdev->lock held.

Take hdev->lock around clearing and freeing msft_data in the failure branch. An existing feature reader finishes before the free, while a reader starting after cleanup sees NULL. Keep the synchronous probe outside this critical section, following the existing req_lock to hdev->lock ordering.

KASAN report as below:

==================================================================
BUG: KASAN: slab-use-after-free in msft_monitor_supported+0xa9/0xb0
Read of size 8 at addr ffff88811573ee00 by task mgmt-read-adv-m/532

    CPU: 2 UID: 0 PID: 532 Comm: mgmt-read-adv-m Not tainted
7.2.0-rc6-pmb-bt-functional-v1+ #1 PREEMPT(lazy)
    Hardware name: QEMU Ubuntu 24.04 PC v2 (i440FX + PIIX, arch_caps
fix, 1996), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
Call Trace:
 <TASK>
 dump_stack_lvl+0x93/0xd0
 print_report+0xce/0x630
 ? msft_monitor_supported+0xa9/0xb0
 ? srso_alias_return_thunk+0x5/0xfbef5
 ? __virt_addr_valid+0x20d/0x410
 ? msft_monitor_supported+0xa9/0xb0
 kasan_report+0xe0/0x110
 ? msft_monitor_supported+0xa9/0xb0
 msft_monitor_supported+0xa9/0xb0
 read_adv_mon_features+0xdf/0x640
 ? trace_hardirqs_on+0x18/0x160
 ? srso_alias_return_thunk+0x5/0xfbef5
 ? __pfx_read_adv_mon_features+0x10/0x10
 ? srso_alias_return_thunk+0x5/0xfbef5
 ? srso_alias_return_thunk+0x5/0xfbef5
 ? do_raw_read_unlock+0x49/0xe0
 ? srso_alias_return_thunk+0x5/0xfbef5
 ? _raw_read_unlock+0x23/0x40
 hci_sock_sendmsg+0x12b5/0x2270
 ? __pfx_hci_sock_sendmsg+0x10/0x10
 ? srso_alias_return_thunk+0x5/0xfbef5
 ? selinux_socket_sendmsg+0x160/0x280
 __sys_sendto+0x425/0x470
 ? __pfx_hci_sock_sendmsg+0x10/0x10
 ? __pfx___sys_sendto+0x10/0x10
 ? srso_alias_return_thunk+0x5/0xfbef5
 ? srso_alias_return_thunk+0x5/0xfbef5
 ? srso_alias_return_thunk+0x5/0xfbef5
 ? __sys_setsockopt+0x119/0x180
 __x64_sys_sendto+0xe5/0x1c0
 ? lockdep_hardirqs_on_prepare+0xea/0x1a0
 ? srso_alias_return_thunk+0x5/0xfbef5
 ? trace_hardirqs_on+0x18/0x160
 do_syscall_64+0x115/0x6a0
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f9ceb04a687
    Code: 48 89 fa 4c 89 df e8 58 b3 00 00 8b 93 08 03 00 00 59 5e 48
83 f8 fc 74 1a 5b c3 0f 1f 84 00 00 00 00 00 48 8b 44 24 10 0f 05 <5b>
c3 0f 1f 80 00 00 00 00 83 e2 39 83 fa 08 75 de e8 23 ff ff ff
RSP: 002b:00007ffe6ab96a70 EFLAGS: 00000202 ORIG_RAX: 000000000000002c
RAX: ffffffffffffffda RBX: 00007f9ceafb8780 RCX: 00007f9ceb04a687
RDX: 0000000000000006 RSI: 00007ffe6ab96aea RDI: 0000000000000003
RBP: 0000000000000002 R08:

---truncated---

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2026-139376"
  ],
  "database_specific": {
    "cwe_ids": [],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2026-11-30T14:19:04Z",
    "severity": null
  },
  "details": "In the Linux kernel, the following vulnerability has been resolved:\n\nBluetooth: msft: Lock failed probe cleanup against feature readers\n\nThe MSFT data must remain allocated while msft_get_features() reads\nits features. read_adv_mon_features() protects that access with\nhdev-\u003elock, but msft_do_open() clears hdev-\u003emsft_data and frees the\nobject without that lock when read_supported_features() fails.\n\nAfter a successful probe, the data survives a normal close. A later\nopen can fail the probe while a management feature request is running.\nhci_mgmt_cmd() permits requests during HCI_INIT, and the opener\u0027s\nhdev-\u003ereq_lock does not serialize the management reader:\n\n  Management feature request            HCI open\n                                        hold hdev-\u003ereq_lock\n                                        msft_do_open()\n  hold hdev-\u003elock\n  msft_get_features(): save msft\n                                        read_supported_features() fails\n                                        hdev-\u003emsft_data = NULL\n                                        kfree(msft)\n  read msft-\u003efeatures\n  release hdev-\u003elock                     release hdev-\u003ereq_lock\n\nThe saved pointer then refers to freed memory, causing a use-after-free\nread. Advertisement reporting through mgmt_device_found() also reads\nthe features with hdev-\u003elock held.\n\nTake hdev-\u003elock around clearing and freeing msft_data in the failure\nbranch. An existing feature reader finishes before the free, while a\nreader starting after cleanup sees NULL. Keep the synchronous probe\noutside this critical section, following the existing req_lock to\nhdev-\u003elock ordering.\n\nKASAN report as below:\n\n    ==================================================================\n    BUG: KASAN: slab-use-after-free in msft_monitor_supported+0xa9/0xb0\n    Read of size 8 at addr ffff88811573ee00 by task mgmt-read-adv-m/532\n\n        CPU: 2 UID: 0 PID: 532 Comm: mgmt-read-adv-m Not tainted\n    7.2.0-rc6-pmb-bt-functional-v1+ #1 PREEMPT(lazy)\n        Hardware name: QEMU Ubuntu 24.04 PC v2 (i440FX + PIIX, arch_caps\n    fix, 1996), BIOS 1.16.3-debian-1.16.3-2 04/01/2014\n    Call Trace:\n     \u003cTASK\u003e\n     dump_stack_lvl+0x93/0xd0\n     print_report+0xce/0x630\n     ? msft_monitor_supported+0xa9/0xb0\n     ? srso_alias_return_thunk+0x5/0xfbef5\n     ? __virt_addr_valid+0x20d/0x410\n     ? msft_monitor_supported+0xa9/0xb0\n     kasan_report+0xe0/0x110\n     ? msft_monitor_supported+0xa9/0xb0\n     msft_monitor_supported+0xa9/0xb0\n     read_adv_mon_features+0xdf/0x640\n     ? trace_hardirqs_on+0x18/0x160\n     ? srso_alias_return_thunk+0x5/0xfbef5\n     ? __pfx_read_adv_mon_features+0x10/0x10\n     ? srso_alias_return_thunk+0x5/0xfbef5\n     ? srso_alias_return_thunk+0x5/0xfbef5\n     ? do_raw_read_unlock+0x49/0xe0\n     ? srso_alias_return_thunk+0x5/0xfbef5\n     ? _raw_read_unlock+0x23/0x40\n     hci_sock_sendmsg+0x12b5/0x2270\n     ? __pfx_hci_sock_sendmsg+0x10/0x10\n     ? srso_alias_return_thunk+0x5/0xfbef5\n     ? selinux_socket_sendmsg+0x160/0x280\n     __sys_sendto+0x425/0x470\n     ? __pfx_hci_sock_sendmsg+0x10/0x10\n     ? __pfx___sys_sendto+0x10/0x10\n     ? srso_alias_return_thunk+0x5/0xfbef5\n     ? srso_alias_return_thunk+0x5/0xfbef5\n     ? srso_alias_return_thunk+0x5/0xfbef5\n     ? __sys_setsockopt+0x119/0x180\n     __x64_sys_sendto+0xe5/0x1c0\n     ? lockdep_hardirqs_on_prepare+0xea/0x1a0\n     ? srso_alias_return_thunk+0x5/0xfbef5\n     ? trace_hardirqs_on+0x18/0x160\n     do_syscall_64+0x115/0x6a0\n     entry_SYSCALL_64_after_hwframe+0x77/0x7f\n    RIP: 0033:0x7f9ceb04a687\n        Code: 48 89 fa 4c 89 df e8 58 b3 00 00 8b 93 08 03 00 00 59 5e 48\n    83 f8 fc 74 1a 5b c3 0f 1f 84 00 00 00 00 00 48 8b 44 24 10 0f 05 \u003c5b\u003e\n    c3 0f 1f 80 00 00 00 00 83 e2 39 83 fa 08 75 de e8 23 ff ff ff\n    RSP: 002b:00007ffe6ab96a70 EFLAGS: 00000202 ORIG_RAX: 000000000000002c\n    RAX: ffffffffffffffda RBX: 00007f9ceafb8780 RCX: 00007f9ceb04a687\n    RDX: 0000000000000006 RSI: 00007ffe6ab96aea RDI: 0000000000000003\n    RBP: 0000000000000002 R08:\n---truncated---",
  "id": "GHSA-8jjr-72xv-xcrc",
  "modified": "2026-11-30T15:32:29Z",
  "published": "2026-11-30T15:32:28Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-139376"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/21895f20fedc4504474bcb1022850b532ea4358e"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/46a6d2207a02869314420d46ac3060b5d5a6238d"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/6773d9471b23d81fa896edd5e0bcb801330ca72c"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/6ff38c6cc6945d9fa5fe3c6b5938caddba69e5ea"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/9b5539d669d338177a2410af65f8f74a47b4cefa"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/bd28655ef601711fb541513b6ad809aa7d8ff2a6"
    }
  ],
  "schema_version": "1.4.0",
  "severity": []
}



Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Drag nodes to arrange them. Double-click a related vulnerability to open it, or a source to visit its link. The Physics button on the left tunes the layout and the simulation; the legend at the bottom left hides or shows nodes by kind and by sighting type.

Forecast uses a logistic model when the trend is rising, or an exponential decay model when the trend is falling. Fitted via linearized least squares.

Sightings

Author Source Type Date Other

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or observed by the user.
  • Confirmed: The vulnerability has been validated from an analyst's perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
  • Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
  • Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
  • Not confirmed: The user expressed doubt about the validity of the vulnerability.
  • Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.
Vulnerability timeline

Sightings and recorded dates, grouped by day · UTC

JSON
How durations are calculated

Following the VTEM framework (Black Hat USA 2015), time to patch starts when the vendor or a coordinator was informed, total time to patch at discovery, and disclosure to patch at public disclosure; vendor response time runs from the report to its acknowledgement. Time to exploit and time unpatched start at the earliest discovery or report, falling back to public disclosure. Unpatched time ends at the first recorded patch, or the calculation time when no patch is recorded. Exploitation to patch shows the interval between those two events; a published proof of concept is a public exploit, not exploitation. The method is described in a publication.

Each result shows its source dates. A negative interval means the end event came first; when date-only inputs leave the order open, the result says so. Date-only inputs are approximate. The earliest evidence wins: KEV report dates and sightings are labelled as such. Records describing another vulnerability are listed but never calculated from, and a PoC alone does not establish exploitation. Missing patch evidence does not prove that no patch exists. Filters below change the event list only.

Events included in the timeline

Loading timeline…


    Loading…

    Loading…

    Loading…

    Related by attack behaviour

    Vulnerabilities whose description is nearest to this one in the vector space of the CIRCL/vulnerability-attack-technique-biencoder model. This is a similarity search over the bi-encoder space (plain cosine), not a classification, and it has no measured accuracy.