CVE-2023-52730

Severity CVSS v4.0:
Pending analysis
Type:
Unavailable / Other
Publication date:
21/05/2024
Last modified:
23/09/2025

Description

In the Linux kernel, the following vulnerability has been resolved:<br /> <br /> mmc: sdio: fix possible resource leaks in some error paths<br /> <br /> If sdio_add_func() or sdio_init_func() fails, sdio_remove_func() can<br /> not release the resources, because the sdio function is not presented<br /> in these two cases, it won&amp;#39;t call of_node_put() or put_device().<br /> <br /> To fix these leaks, make sdio_func_present() only control whether<br /> device_del() needs to be called or not, then always call of_node_put()<br /> and put_device().<br /> <br /> In error case in sdio_init_func(), the reference of &amp;#39;card-&gt;dev&amp;#39; is<br /> not get, to avoid redundant put in sdio_free_func_cis(), move the<br /> get_device() to sdio_alloc_func() and put_device() to sdio_release_func(),<br /> it can keep the get/put function be balanced.<br /> <br /> Without this patch, while doing fault inject test, it can get the<br /> following leak reports, after this fix, the leak is gone.<br /> <br /> unreferenced object 0xffff888112514000 (size 2048):<br /> comm "kworker/3:2", pid 65, jiffies 4294741614 (age 124.774s)<br /> hex dump (first 32 bytes):<br /> 00 e0 6f 12 81 88 ff ff 60 58 8d 06 81 88 ff ff ..o.....`X......<br /> 10 40 51 12 81 88 ff ff 10 40 51 12 81 88 ff ff .@Q......@Q.....<br /> backtrace:<br /> [] kmalloc_trace+0x21/0x110<br /> [] mmc_alloc_card+0x38/0xb0 [mmc_core]<br /> [] mmc_sdio_init_card+0xde/0x170 [mmc_core]<br /> [] mmc_attach_sdio+0xcb/0x1b0 [mmc_core]<br /> [] mmc_rescan+0x54a/0x640 [mmc_core]<br /> <br /> unreferenced object 0xffff888112511000 (size 2048):<br /> comm "kworker/3:2", pid 65, jiffies 4294741623 (age 124.766s)<br /> hex dump (first 32 bytes):<br /> 00 40 51 12 81 88 ff ff e0 58 8d 06 81 88 ff ff .@Q......X......<br /> 10 10 51 12 81 88 ff ff 10 10 51 12 81 88 ff ff ..Q.......Q.....<br /> backtrace:<br /> [] kmalloc_trace+0x21/0x110<br /> [] sdio_alloc_func+0x35/0x100 [mmc_core]<br /> [] mmc_attach_sdio.cold.18+0xb1/0x395 [mmc_core]<br /> [] mmc_rescan+0x54a/0x640 [mmc_core]

Vulnerable products and versions

CPE From Up to
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 2.6.33 (including) 4.14.306 (excluding)
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 4.15 (including) 4.19.273 (excluding)
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 4.20 (including) 5.4.232 (excluding)
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 5.5 (including) 5.10.169 (excluding)
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 5.11 (including) 5.15.95 (excluding)
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 5.16 (including) 6.1.13 (excluding)
cpe:2.3:o:linux:linux_kernel:6.2:rc1:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.2:rc2:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.2:rc3:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.2:rc4:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.2:rc5:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.2:rc6:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.2:rc7:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.2:rc8:*:*:*:*:*:*