# CVE-2023-52730: mmc: sdio: fix possible resource leaks in some error paths

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** MEDIUM 5.5
- **CVSS:** 5.5 (v3.1, NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: None; Integrity impact: None; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.31% (percentile 16, 2026-11-28)
- **CWE:** CWE-401
- **Published:** 2024-05-21T15:22:56.633Z
- **Modified:** 2026-06-17T06:43:27.000Z

## Who should check

- Anyone running Linux \>= 3d10a1ba0d37c8f5fd5afcdda00613fbb8a90bf5, \< 92ff03c2563c9b57a027c744750f3b7d2f261c58; \>= 3d10a1ba0d37c8f5fd5afcdda00613fbb8a90bf5, \< 5c7858adada31dbed042448cff6997dd6efc472a; \>= 3d10a1ba0d37c8f5fd5afcdda00613fbb8a90bf5, \< 761db46b29b496946046d8cb33c7ea6de6bef36e; \>= 3d10a1ba0d37c8f5fd5afcdda00613fbb8a90bf5, \< 30716d9f0fa1766e522cf24c8a456244e4fc9931; \>= 3d10a1ba0d37c8f5fd5afcdda00613fbb8a90bf5, \< 1e06cf04239e202248c8fa356bf11449dc73cfbd; \>= 3d10a1ba0d37c8f5fd5afcdda00613fbb8a90bf5, \< f855d31bb38d663c3ba672345d7cce9324ba3b72; \>= 3d10a1ba0d37c8f5fd5afcdda00613fbb8a90bf5, \< 605d9fb9556f8f5fb4566f4df1480f280f308ded
- Anyone running Linux 2.6.33

## Description

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

mmc: sdio: fix possible resource leaks in some error paths

If sdio\_add\_func() or sdio\_init\_func() fails, sdio\_remove\_func() can
not release the resources, because the sdio function is not presented
in these two cases, it won't call of\_node\_put() or put\_device().

To fix these leaks, make sdio\_func\_present() only control whether
device\_del() needs to be called or not, then always call of\_node\_put()
and put\_device().

In error case in sdio\_init\_func(), the reference of 'card-\>dev' is
not get, to avoid redundant put in sdio\_free\_func\_cis(), move the
get\_device() to sdio\_alloc\_func() and put\_device() to sdio\_release\_func(),
it can keep the get/put function be balanced.

Without this patch, while doing fault inject test, it can get the
following leak reports, after this fix, the leak is gone.

unreferenced object 0xffff888112514000 (size 2048):
  comm "kworker/3:2", pid 65, jiffies 4294741614 (age 124.774s)
  hex dump (first 32 bytes):
    00 e0 6f 12 81 88 ff ff 60 58 8d 06 81 88 ff ff  ..o.....\`X......
    10 40 51 12 81 88 ff ff 10 40 51 12 81 88 ff ff  .@Q......@Q.....
  backtrace:
    \[\<000000009e5931da\>\] kmalloc\_trace+0x21/0x110
    \[\<000000002f839ccb\>\] mmc\_alloc\_card+0x38/0xb0 \[mmc\_core\]
    \[\<0000000004adcbf6\>\] mmc\_sdio\_init\_card+0xde/0x170 \[mmc\_core\]
    \[\<000000007538fea0\>\] mmc\_attach\_sdio+0xcb/0x1b0 \[mmc\_core\]
    \[\<00000000d4fdeba7\>\] mmc\_rescan+0x54a/0x640 \[mmc\_core\]

unreferenced object 0xffff888112511000 (size 2048):
  comm "kworker/3:2", pid 65, jiffies 4294741623 (age 124.766s)
  hex dump (first 32 bytes):
    00 40 51 12 81 88 ff ff e0 58 8d 06 81 88 ff ff  .@Q......X......
    10 10 51 12 81 88 ff ff 10 10 51 12 81 88 ff ff  ..Q.......Q.....
  backtrace:
    \[\<000000009e5931da\>\] kmalloc\_trace+0x21/0x110
    \[\<00000000fcbe706c\>\] sdio\_alloc\_func+0x35/0x100 \[mmc\_core\]
    \[\<00000000c68f4b50\>\] mmc\_attach\_sdio.cold.18+0xb1/0x395 \[mmc\_core\]
    \[\<00000000d4fdeba7\>\] mmc\_rescan+0x54a/0x640 \[mmc\_core\]

## Affected and fixed versions

- Linux: \>= 3d10a1ba0d37c8f5fd5afcdda00613fbb8a90bf5, \< 92ff03c2563c9b57a027c744750f3b7d2f261c58; \>= 3d10a1ba0d37c8f5fd5afcdda00613fbb8a90bf5, \< 5c7858adada31dbed042448cff6997dd6efc472a; \>= 3d10a1ba0d37c8f5fd5afcdda00613fbb8a90bf5, \< 761db46b29b496946046d8cb33c7ea6de6bef36e; \>= 3d10a1ba0d37c8f5fd5afcdda00613fbb8a90bf5, \< 30716d9f0fa1766e522cf24c8a456244e4fc9931; \>= 3d10a1ba0d37c8f5fd5afcdda00613fbb8a90bf5, \< 1e06cf04239e202248c8fa356bf11449dc73cfbd; \>= 3d10a1ba0d37c8f5fd5afcdda00613fbb8a90bf5, \< f855d31bb38d663c3ba672345d7cce9324ba3b72; \>= 3d10a1ba0d37c8f5fd5afcdda00613fbb8a90bf5, \< 605d9fb9556f8f5fb4566f4df1480f280f308ded (cvelist)
- Linux: 2.6.33 (cvelist)

## Mitigation

- Upgrade Linux to 605d9fb9556f8f5fb4566f4df1480f280f308ded or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2023-52730. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2023-52730.md
Affected: Linux >= 3d10a1ba0d37c8f5fd5afcdda00613fbb8a90bf5, < 92ff03c2563c9b57a027c744750f3b7d2f261c58; >= 3d10a1ba0d37c8f5fd5afcdda00613fbb8a90bf5, < 5c7858adada31dbed042448cff6997dd6efc472a; >= 3d10a1ba0d37c8f5fd5afcdda00613fbb8a90bf5, < 761db46b29b496946046d8cb33c7ea6de6bef36e; >= 3d10a1ba0d37c8f5fd5afcd…
Fixed in: Linux 92ff03c2563c9b57a027c744750f3b7d2f261c58, Linux 5c7858adada31dbed042448cff6997dd6efc472a, Linux 761db46b29b496946046d8cb33c7ea6de6bef36e, Linux 30716d9f0fa1766e522cf24c8a456244e4fc9931, Linux 1e06cf04239e202248c8fa356bf11449dc73cfbd, Linux 605d9fb9556f8f5fb4566f4df1480f280f308ded

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2023-52730 being exploited?

There is no confirmed exploitation: CVE-2023-52730 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.31% chance of exploitation in the next 30 days (as of 2026-11-28).

### How serious is CVE-2023-52730?

Medium: CVSS 5.5 (v3.1, scored by NVD). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2023-52730?

Linux \>= 3d10a1ba0d37c8f5fd5afcdda00613fbb8a90bf5, \< 92ff03c2563c9b57a027c744750f3b7d2f261c58; \>= 3d10a1ba0d37c8f5fd5afcdda00613fbb8a90bf5, \< 5c7858adada31dbed042448cff6997dd6efc472a; \>= 3d10a1ba0d37c8f5fd5afcdda00613fbb8a90bf5, \< 761db46b29b496946046d8cb33c7ea6de6bef36e; \>= 3d10a1ba0d37c8f5fd5afcdda00613fbb8a90bf5, \< 30716d9f0fa1766e522cf24c8a456244e4fc9931; \>= 3d10a1ba0d37c8f5fd5afcdda00613fbb8a90bf5, \< 1e06cf04239e202248c8fa356bf11449dc73cfbd; \>= 3d10a1ba0d37c8f5fd5afcdda00613fbb8a90bf5, \< f855d31bb38d663c3ba672345d7cce9324ba3b72; \>= 3d10a1ba0d37c8f5fd5afcdda00613fbb8a90bf5, \< 605d9fb9556f8f5fb4566f4df1480f280f308ded; Linux 2.6.33.

### Is there a fix for CVE-2023-52730?

Yes. Fixed in Linux 92ff03c2563c9b57a027c744750f3b7d2f261c58, Linux 5c7858adada31dbed042448cff6997dd6efc472a, Linux 761db46b29b496946046d8cb33c7ea6de6bef36e, Linux 30716d9f0fa1766e522cf24c8a456244e4fc9931, Linux 1e06cf04239e202248c8fa356bf11449dc73cfbd, Linux 605d9fb9556f8f5fb4566f4df1480f280f308ded. Upgrade Linux to 605d9fb9556f8f5fb4566f4df1480f280f308ded or later.

### How do I check if I'm affected by CVE-2023-52730?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- patch: <https://git.kernel.org/stable/c/92ff03c2563c9b57a027c744750f3b7d2f261c58>
- patch: <https://git.kernel.org/stable/c/5c7858adada31dbed042448cff6997dd6efc472a>
- patch: <https://git.kernel.org/stable/c/761db46b29b496946046d8cb33c7ea6de6bef36e>
- patch: <https://git.kernel.org/stable/c/30716d9f0fa1766e522cf24c8a456244e4fc9931>
- patch: <https://git.kernel.org/stable/c/1e06cf04239e202248c8fa356bf11449dc73cfbd>
- patch: <https://git.kernel.org/stable/c/f855d31bb38d663c3ba672345d7cce9324ba3b72>
- patch: <https://git.kernel.org/stable/c/605d9fb9556f8f5fb4566f4df1480f280f308ded>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2023-52730>

HTML: <https://flawdb.com/CVE-2023-52730> · JSON: <https://flawdb.com/api/v1/entries/CVE-2023-52730>
