CVE-2023-52439

Severity CVSS v4.0:
Pending analysis
Type:
CWE-415 Double Free
Publication date:
20/02/2024
Last modified:
27/12/2024

Description

In the Linux kernel, the following vulnerability has been resolved:<br /> <br /> uio: Fix use-after-free in uio_open<br /> <br /> core-1 core-2<br /> -------------------------------------------------------<br /> uio_unregister_device uio_open<br /> idev = idr_find()<br /> device_unregister(&amp;idev-&gt;dev)<br /> put_device(&amp;idev-&gt;dev)<br /> uio_device_release<br /> get_device(&amp;idev-&gt;dev)<br /> kfree(idev)<br /> uio_free_minor(minor)<br /> uio_release<br /> put_device(&amp;idev-&gt;dev)<br /> kfree(idev)<br /> -------------------------------------------------------<br /> <br /> In the core-1 uio_unregister_device(), the device_unregister will kfree<br /> idev when the idev-&gt;dev kobject ref is 1. But after core-1<br /> device_unregister, put_device and before doing kfree, the core-2 may<br /> get_device. Then:<br /> 1. After core-1 kfree idev, the core-2 will do use-after-free for idev.<br /> 2. When core-2 do uio_release and put_device, the idev will be double<br /> freed.<br /> <br /> To address this issue, we can get idev atomic &amp; inc idev reference with<br /> minor_lock.

Vulnerable products and versions

CPE From Up to
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 4.18.0 (excluding) 4.19.306 (excluding)
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 4.20.0 (including) 5.4.268 (excluding)
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 5.5.0 (including) 5.10.209 (excluding)
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 5.11.0 (including) 5.15.148 (excluding)
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 5.16.0 (including) 6.1.74 (excluding)
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 6.2.0 (including) 6.6.13 (excluding)
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 6.7.0 (including) 6.7.1 (excluding)
cpe:2.3:o:linux:linux_kernel:4.18:-:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:4.18:rc5:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:4.18:rc6:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:4.18:rc7:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:4.18:rc8:*:*:*:*:*:*