Skip to content
Heist/ feed
Back to feed
UnratedFix available

mmc: hsq: Fix use-after-free in retry work

Type: advisorySources: OSV

In the Linux kernel, the following vulnerability has been resolved: mmc: hsq: Fix use-after-free in retry work mmc_hsq_pump_requests() queues retry_work when request_atomic() returns -EBUSY; today sdhci-sprd is the only consumer that implements request_atomic(). The work is embedded in a devm-allocated mmc_hsq, but is never cancelled during driver removal. Work still pending at unbind can therefore run after the devm allocation has been released and dereference hsq->mmc and hsq->mrq. Use devm_work_autocancel() to cancel and drain retry_work before the devm allocation is released. By the time devres cleanup begins, mmc_remove_host() has already stopped the host, so no new requests can arm the work. This issue was found by an in-house static analysis tool.

Products
Kernel
Affected versions
Not specified
Fixed versions
6.12.112, 6.18.54, 6.6.158, 7.2.8
CVEs
CVE-2026-98212
Confirmed fixed CVEs
Not specified
Updated in this feed
3 Nov 2026, 11:15 UTC · Revision 1

Source evidence

mmc: hsq: Fix use-after-free in retry work

core-osv · Original source

Published 6 Oct 2026, 08:44 UTC

In the Linux kernel, the following vulnerability has been resolved: mmc: hsq: Fix use-after-free in retry work mmc_hsq_pump_requests() queues retry_work when request_atomic() returns -EBUSY; today sdhci-sprd is the only consumer that implements request_atomic(). The work is embedded in a devm-allocated mmc_hsq, but is never cancelled during driver removal. Work still pending at unbind can therefore run after the devm allocation has been released and dereference hsq->mmc and hsq->mrq. Use devm_work_autocancel() to cancel and drain retry_work before the devm allocation is released. By the time devres cleanup begins, mmc_remove_host() has already stopped the host, so no new requests can arm the work. This issue was found by an in-house static analysis tool.

osv:CVE-2026-98212

Kernel

Fixed versions: 6.6.158, 6.12.112, 6.18.54, 7.2.8

Complete source record
{
  "id": "8fa4a6866f76f4b2aa94fd115c7e4c5263a0eea66ae5be479c900645e632c2ae",
  "url": "https://osv.dev/vulnerability/CVE-2026-98212",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "mmc: hsq: Fix use-after-free in retry work",
    "summary": "In the Linux kernel, the following vulnerability has been resolved: mmc: hsq: Fix use-after-free in retry work mmc_hsq_pump_requests() queues retry_work when request_atomic() returns -EBUSY; today sdhci-sprd is the only consumer that implements request_atomic(). The work is embedded in a devm-allocated mmc_hsq, but is never cancelled during driver removal. Work still pending at unbind can therefore run after the devm allocation has been released and dereference hsq->mmc and hsq->mrq. Use devm_work_autocancel() to cancel and drain retry_work before the devm allocation is released. By the time devres cleanup begins, mmc_remove_host() has already stopped the host, so no new requests can arm the work. This issue was found by an in-house static analysis tool.",
    "evidence": "osv:CVE-2026-98212",
    "products": [
      {
        "name": {
          "value": "Kernel",
          "evidence": "/affected/1/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "6.6.158",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.12.112",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.18.54",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "7.2.8",
            "evidence": "/affected/1/ranges"
          }
        ],
        "affected_versions": []
      }
    ],
    "severity": "unknown",
    "structured": {
      "id": "CVE-2026-98212",
      "aliases": [
        "CVE-2026-98212"
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
              "type": "GIT",
              "events": [
                {
                  "introduced": "6db96e5810e0a6a345b7d78549de7676ae5b2662"
                },
                {
                  "fixed": "c50d6515bffb148c2c12be6d587ec201dfab4c34"
                },
                {
                  "fixed": "df2eb59fd9eb33663dc1053f5a4ed851e0aa1f67"
                },
                {
                  "fixed": "8439bf262ce3267bcfee29d3c61605f1731a2271"
                },
                {
                  "fixed": "45341b341642c377192c95e4d48e0a859cf85f42"
                },
                {
                  "fixed": "5d132990475f02cfa1debe03d50b479432864ebd"
                }
              ]
            }
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-98212.json"
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "5.8.0"
                },
                {
                  "fixed": "6.6.158"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.7.0"
                },
                {
                  "fixed": "6.12.112"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.13.0"
                },
                {
                  "fixed": "6.18.54"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.19.0"
                },
                {
                  "fixed": "7.2.8"
                }
              ]
            }
          ],
          "package": {
            "name": "Kernel",
            "ecosystem": "Linux"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-98212.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:28.024109737Z",
      "provider": "osv",
      "references": [
        "https://git.kernel.org/stable/c/45341b341642c377192c95e4d48e0a859cf85f42",
        "https://git.kernel.org/stable/c/5d132990475f02cfa1debe03d50b479432864ebd",
        "https://git.kernel.org/stable/c/8439bf262ce3267bcfee29d3c61605f1731a2271",
        "https://git.kernel.org/stable/c/c50d6515bffb148c2c12be6d587ec201dfab4c34",
        "https://git.kernel.org/stable/c/df2eb59fd9eb33663dc1053f5a4ed851e0aa1f67",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/98xxx/CVE-2026-98212.json",
        "https://nvd.nist.gov/vuln/detail/CVE-2026-98212",
        "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"
      ],
      "provider_metadata": {
        "cna_assigner": "Linux",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/98xxx/CVE-2026-98212.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2026-98212",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": null
  },
  "source_id": "core-osv",
  "document_id": 494872,
  "published_at": "2026-10-06T08:44:48.498+00:00"
}