CVE-2026-99039 (GCVE-0-2026-99039)

Vulnerability from cvelistv5 – Published: 2026-10-23 12:21 – Updated: 2026-10-23 12:21
VLAI
Title
memstick: core: wait for request completion before freeing card
Summary
In the Linux kernel, the following vulnerability has been resolved: memstick: core: wait for request completion before freeing card In memstick_alloc_card() and memstick_set_rw_addr(), wait_for_completion_timeout() is used to wait for device identification and address configuration requests to complete. The memstick subsystem does not provide an abort or cancellation callback in struct memstick_host for in-flight requests. If wait_for_completion_timeout() expires (for instance, when a USB transfer or command retry is delayed), memstick_alloc_card() returns an error and frees the memstick_dev structure via kfree(card). However, the host controller driver (such as rtsx_usb_ms) is still running the request asynchronously in worker context. When the transfer eventually finishes, the driver writes into host->req->data, which points to memory inside the already freed card structure. This leads to a KASAN slab-use-after-free write: BUG: KASAN: slab-use-after-free in ms_read_bytes+0x8fe/0x990 Write of size 1 at addr ffff88813c188079 by task kworker/1:5/5239 Workqueue: events rtsx_usb_ms_handle_req Call Trace: ms_read_bytes+0x8fe/0x990 drivers/memstick/host/rtsx_usb_ms.c:450 rtsx_usb_ms_issue_cmd drivers/memstick/host/rtsx_usb_ms.c:477 [inline] rtsx_usb_ms_handle_req+0x557/0x1a00 drivers/memstick/host/rtsx_usb_ms.c:531 process_one_work+0xac7/0x1b10 kernel/workqueue.c:3396 worker_thread+0x5ef/0xe50 kernel/workqueue.c:3560 kthread+0x373/0x450 kernel/kthread.c:436 Allocated by task 1662: memstick_alloc_card drivers/memstick/core/memstick.c:383 [inline] memstick_check+0x2c1/0x10d0 drivers/memstick/core/memstick.c:452 process_one_work+0xac7/0x1b10 kernel/workqueue.c:3396 Freed by task 1662: kfree+0x20c/0x650 mm/slub.c:6792 memstick_alloc_card drivers/memstick/core/memstick.c:420 [inline] memstick_check+0x72b/0x10d0 drivers/memstick/core/memstick.c:452 process_one_work+0xac7/0x1b10 kernel/workqueue.c:3396 Host controller drivers (rtsx_usb_ms, jmb38x_ms, tifm_ms, r592) already implement their own hardware and bus timeouts, and callers in mspro_block and ms_block already rely on wait_for_completion() unconditionally. Replace wait_for_completion_timeout() with wait_for_completion() in memstick_set_rw_addr() and memstick_alloc_card() so that the card structure is never freed while an asynchronous request is in flight.
Severity
No CVSS data available.
Assigner
Linux CNA under the mitre root
CNA scorecard D 53/100 over 7056 records in the last 180 days details
Impacted products
Vendor Product Version CPE status
Linux Linux Affected: baf8532a147d5b76681ce040e2c8f25a3f0e718d , < c3ab92542475d59ae685cbb294e70ca4d0ba38e9 (git)
Affected: baf8532a147d5b76681ce040e2c8f25a3f0e718d , < 810580cf60edc75c9891c2de3225e4cda78e4d9f (git)
Affected: baf8532a147d5b76681ce040e2c8f25a3f0e718d , < f2795c50144d528dabc2cf2fd53c0f0c63a823a1 (git)
Affected: baf8532a147d5b76681ce040e2c8f25a3f0e718d , < 3af81770e2011c6ac7bb597a4af2e4f3591f928c (git)
Affected: baf8532a147d5b76681ce040e2c8f25a3f0e718d , < aa0a37b5024d921e96ac4f8f487c8bfbf1f1a582 (git)
guessed Create a notification for this product.
Linux Linux Affected: 2.6.25
Unaffected: 0 , < 2.6.25 (semver)
Unaffected: 6.6.160 , ≤ 6.6.* (semver)
Unaffected: 6.12.113 , ≤ 6.12.* (semver)
Unaffected: 6.18.57 , ≤ 6.18.* (semver)
Unaffected: 7.2.11 , ≤ 7.2.* (semver)
Unaffected: 7.3 , ≤ * (original_commit_for_fix)
guessed Create a notification for this product.
Show details on NVD website

{
  "containers": {
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "drivers/memstick/core/memstick.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "c3ab92542475d59ae685cbb294e70ca4d0ba38e9",
              "status": "affected",
              "version": "baf8532a147d5b76681ce040e2c8f25a3f0e718d",
              "versionType": "git"
            },
            {
              "lessThan": "810580cf60edc75c9891c2de3225e4cda78e4d9f",
              "status": "affected",
              "version": "baf8532a147d5b76681ce040e2c8f25a3f0e718d",
              "versionType": "git"
            },
            {
              "lessThan": "f2795c50144d528dabc2cf2fd53c0f0c63a823a1",
              "status": "affected",
              "version": "baf8532a147d5b76681ce040e2c8f25a3f0e718d",
              "versionType": "git"
            },
            {
              "lessThan": "3af81770e2011c6ac7bb597a4af2e4f3591f928c",
              "status": "affected",
              "version": "baf8532a147d5b76681ce040e2c8f25a3f0e718d",
              "versionType": "git"
            },
            {
              "lessThan": "aa0a37b5024d921e96ac4f8f487c8bfbf1f1a582",
              "status": "affected",
              "version": "baf8532a147d5b76681ce040e2c8f25a3f0e718d",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "drivers/memstick/core/memstick.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "2.6.25"
            },
            {
              "lessThan": "2.6.25",
              "status": "unaffected",
              "version": "0",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.6.*",
              "status": "unaffected",
              "version": "6.6.160",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.12.*",
              "status": "unaffected",
              "version": "6.12.113",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.18.*",
              "status": "unaffected",
              "version": "6.18.57",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "7.2.*",
              "status": "unaffected",
              "version": "7.2.11",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "7.3",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "cpeApplicability": [
        {
          "nodes": [
            {
              "cpeMatch": [
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.6.160",
                  "versionStartIncluding": "2.6.25",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.12.113",
                  "versionStartIncluding": "2.6.25",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.18.57",
                  "versionStartIncluding": "2.6.25",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "7.2.11",
                  "versionStartIncluding": "2.6.25",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "7.3",
                  "versionStartIncluding": "2.6.25",
                  "vulnerable": true
                }
              ],
              "negate": false,
              "operator": "OR"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nmemstick: core: wait for request completion before freeing card\n\nIn memstick_alloc_card() and memstick_set_rw_addr(),\nwait_for_completion_timeout() is used to wait for device identification\nand address configuration requests to complete.\n\nThe memstick subsystem does not provide an abort or cancellation\ncallback in struct memstick_host for in-flight requests. If\nwait_for_completion_timeout() expires (for instance, when a USB transfer\nor command retry is delayed), memstick_alloc_card() returns an error and\nfrees the memstick_dev structure via kfree(card).\n\nHowever, the host controller driver (such as rtsx_usb_ms) is still\nrunning the request asynchronously in worker context. When the transfer\neventually finishes, the driver writes into host-\u003ereq-\u003edata, which\npoints to memory inside the already freed card structure. This leads to\na KASAN slab-use-after-free write:\n\n  BUG: KASAN: slab-use-after-free in ms_read_bytes+0x8fe/0x990\n  Write of size 1 at addr ffff88813c188079 by task kworker/1:5/5239\n  Workqueue: events rtsx_usb_ms_handle_req\n  Call Trace:\n   ms_read_bytes+0x8fe/0x990 drivers/memstick/host/rtsx_usb_ms.c:450\n   rtsx_usb_ms_issue_cmd drivers/memstick/host/rtsx_usb_ms.c:477 [inline]\n   rtsx_usb_ms_handle_req+0x557/0x1a00 drivers/memstick/host/rtsx_usb_ms.c:531\n   process_one_work+0xac7/0x1b10 kernel/workqueue.c:3396\n   worker_thread+0x5ef/0xe50 kernel/workqueue.c:3560\n   kthread+0x373/0x450 kernel/kthread.c:436\n\n  Allocated by task 1662:\n   memstick_alloc_card drivers/memstick/core/memstick.c:383 [inline]\n   memstick_check+0x2c1/0x10d0 drivers/memstick/core/memstick.c:452\n   process_one_work+0xac7/0x1b10 kernel/workqueue.c:3396\n\n  Freed by task 1662:\n   kfree+0x20c/0x650 mm/slub.c:6792\n   memstick_alloc_card drivers/memstick/core/memstick.c:420 [inline]\n   memstick_check+0x72b/0x10d0 drivers/memstick/core/memstick.c:452\n   process_one_work+0xac7/0x1b10 kernel/workqueue.c:3396\n\nHost controller drivers (rtsx_usb_ms, jmb38x_ms, tifm_ms, r592) already\nimplement their own hardware and bus timeouts, and callers in\nmspro_block and ms_block already rely on wait_for_completion()\nunconditionally.\n\nReplace wait_for_completion_timeout() with wait_for_completion() in\nmemstick_set_rw_addr() and memstick_alloc_card() so that the card\nstructure is never freed while an asynchronous request is in flight."
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2026-10-23T12:21:57.421Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/c3ab92542475d59ae685cbb294e70ca4d0ba38e9"
        },
        {
          "url": "https://git.kernel.org/stable/c/810580cf60edc75c9891c2de3225e4cda78e4d9f"
        },
        {
          "url": "https://git.kernel.org/stable/c/f2795c50144d528dabc2cf2fd53c0f0c63a823a1"
        },
        {
          "url": "https://git.kernel.org/stable/c/3af81770e2011c6ac7bb597a4af2e4f3591f928c"
        },
        {
          "url": "https://git.kernel.org/stable/c/aa0a37b5024d921e96ac4f8f487c8bfbf1f1a582"
        }
      ],
      "title": "memstick: core: wait for request completion before freeing card",
      "x_generator": {
        "engine": "bippy-1.2.0"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2026-99039",
    "datePublished": "2026-10-23T12:21:57.421Z",
    "dateReserved": "2026-09-25T10:25:14.387Z",
    "dateUpdated": "2026-10-23T12:21:57.421Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.2",
  "vulnerability-lookup:meta": {
    "epss": {
      "cve": "CVE-2026-99039",
      "date": "2026-10-25",
      "epss": "0.00168",
      "percentile": "0.06163"
    },
    "microsoft_vex": {
      "current_release_date": "2026-10-25T01:05:20.000Z",
      "cve": "CVE-2026-99039",
      "id": "msrc_CVE-2026-99039",
      "initial_release_date": "2026-10-25T01:04:18.000Z",
      "product_status:under_investigation": "2",
      "source": "Microsoft CSAF VEX",
      "status": "final",
      "title": "memstick: core: wait for request completion before freeing card",
      "url": "https://msrc.microsoft.com/csaf/vex/2026/msrc_cve-2026-99039.json",
      "version": "2"
    },
    "nvd": {
      "cve": {
        "affected": [
          {
            "affectedData": [
              {
                "defaultStatus": "unaffected",
                "product": "Linux",
                "programFiles": [
                  "drivers/memstick/core/memstick.c"
                ],
                "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                "vendor": "Linux",
                "versions": [
                  {
                    "lessThan": "c3ab92542475d59ae685cbb294e70ca4d0ba38e9",
                    "status": "affected",
                    "version": "baf8532a147d5b76681ce040e2c8f25a3f0e718d",
                    "versionType": "git"
                  },
                  {
                    "lessThan": "810580cf60edc75c9891c2de3225e4cda78e4d9f",
                    "status": "affected",
                    "version": "baf8532a147d5b76681ce040e2c8f25a3f0e718d",
                    "versionType": "git"
                  },
                  {
                    "lessThan": "f2795c50144d528dabc2cf2fd53c0f0c63a823a1",
                    "status": "affected",
                    "version": "baf8532a147d5b76681ce040e2c8f25a3f0e718d",
                    "versionType": "git"
                  },
                  {
                    "lessThan": "3af81770e2011c6ac7bb597a4af2e4f3591f928c",
                    "status": "affected",
                    "version": "baf8532a147d5b76681ce040e2c8f25a3f0e718d",
                    "versionType": "git"
                  },
                  {
                    "lessThan": "aa0a37b5024d921e96ac4f8f487c8bfbf1f1a582",
                    "status": "affected",
                    "version": "baf8532a147d5b76681ce040e2c8f25a3f0e718d",
                    "versionType": "git"
                  }
                ]
              },
              {
                "defaultStatus": "affected",
                "product": "Linux",
                "programFiles": [
                  "drivers/memstick/core/memstick.c"
                ],
                "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                "vendor": "Linux",
                "versions": [
                  {
                    "status": "affected",
                    "version": "2.6.25"
                  },
                  {
                    "lessThan": "2.6.25",
                    "status": "unaffected",
                    "version": "0",
                    "versionType": "semver"
                  },
                  {
                    "lessThanOrEqual": "6.6.*",
                    "status": "unaffected",
                    "version": "6.6.160",
                    "versionType": "semver"
                  },
                  {
                    "lessThanOrEqual": "6.12.*",
                    "status": "unaffected",
                    "version": "6.12.113",
                    "versionType": "semver"
                  },
                  {
                    "lessThanOrEqual": "6.18.*",
                    "status": "unaffected",
                    "version": "6.18.57",
                    "versionType": "semver"
                  },
                  {
                    "lessThanOrEqual": "7.2.*",
                    "status": "unaffected",
                    "version": "7.2.11",
                    "versionType": "semver"
                  },
                  {
                    "lessThanOrEqual": "*",
                    "status": "unaffected",
                    "version": "7.3",
                    "versionType": "original_commit_for_fix"
                  }
                ]
              }
            ],
            "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67"
          }
        ],
        "cveTags": [],
        "descriptions": [
          {
            "lang": "en",
            "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nmemstick: core: wait for request completion before freeing card\n\nIn memstick_alloc_card() and memstick_set_rw_addr(),\nwait_for_completion_timeout() is used to wait for device identification\nand address configuration requests to complete.\n\nThe memstick subsystem does not provide an abort or cancellation\ncallback in struct memstick_host for in-flight requests. If\nwait_for_completion_timeout() expires (for instance, when a USB transfer\nor command retry is delayed), memstick_alloc_card() returns an error and\nfrees the memstick_dev structure via kfree(card).\n\nHowever, the host controller driver (such as rtsx_usb_ms) is still\nrunning the request asynchronously in worker context. When the transfer\neventually finishes, the driver writes into host-\u003ereq-\u003edata, which\npoints to memory inside the already freed card structure. This leads to\na KASAN slab-use-after-free write:\n\n  BUG: KASAN: slab-use-after-free in ms_read_bytes+0x8fe/0x990\n  Write of size 1 at addr ffff88813c188079 by task kworker/1:5/5239\n  Workqueue: events rtsx_usb_ms_handle_req\n  Call Trace:\n   ms_read_bytes+0x8fe/0x990 drivers/memstick/host/rtsx_usb_ms.c:450\n   rtsx_usb_ms_issue_cmd drivers/memstick/host/rtsx_usb_ms.c:477 [inline]\n   rtsx_usb_ms_handle_req+0x557/0x1a00 drivers/memstick/host/rtsx_usb_ms.c:531\n   process_one_work+0xac7/0x1b10 kernel/workqueue.c:3396\n   worker_thread+0x5ef/0xe50 kernel/workqueue.c:3560\n   kthread+0x373/0x450 kernel/kthread.c:436\n\n  Allocated by task 1662:\n   memstick_alloc_card drivers/memstick/core/memstick.c:383 [inline]\n   memstick_check+0x2c1/0x10d0 drivers/memstick/core/memstick.c:452\n   process_one_work+0xac7/0x1b10 kernel/workqueue.c:3396\n\n  Freed by task 1662:\n   kfree+0x20c/0x650 mm/slub.c:6792\n   memstick_alloc_card drivers/memstick/core/memstick.c:420 [inline]\n   memstick_check+0x72b/0x10d0 drivers/memstick/core/memstick.c:452\n   process_one_work+0xac7/0x1b10 kernel/workqueue.c:3396\n\nHost controller drivers (rtsx_usb_ms, jmb38x_ms, tifm_ms, r592) already\nimplement their own hardware and bus timeouts, and callers in\nmspro_block and ms_block already rely on wait_for_completion()\nunconditionally.\n\nReplace wait_for_completion_timeout() with wait_for_completion() in\nmemstick_set_rw_addr() and memstick_alloc_card() so that the card\nstructure is never freed while an asynchronous request is in flight."
          }
        ],
        "id": "CVE-2026-99039",
        "lastModified": "2026-10-23T13:17:27.223",
        "metrics": {},
        "published": "2026-10-23T13:17:27.223",
        "references": [
          {
            "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
            "url": "https://git.kernel.org/stable/c/3af81770e2011c6ac7bb597a4af2e4f3591f928c"
          },
          {
            "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
            "url": "https://git.kernel.org/stable/c/810580cf60edc75c9891c2de3225e4cda78e4d9f"
          },
          {
            "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
            "url": "https://git.kernel.org/stable/c/aa0a37b5024d921e96ac4f8f487c8bfbf1f1a582"
          },
          {
            "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
            "url": "https://git.kernel.org/stable/c/c3ab92542475d59ae685cbb294e70ca4d0ba38e9"
          },
          {
            "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
            "url": "https://git.kernel.org/stable/c/f2795c50144d528dabc2cf2fd53c0f0c63a823a1"
          }
        ],
        "sourceIdentifier": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "vulnStatus": "Received"
      }
    }
  }
}



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
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.