中危 uio:修复 uio_open 中的释放后使用 (CVE-2023-52439)

CVE编号

CVE-2023-52439

利用情况

暂无

补丁情况

官方补丁

披露时间

2024-02-21
漏洞描述
In the Linux kernel, the following vulnerability has been resolved:

uio: Fix use-after-free in uio_open

core-1 core-2
-------------------------------------------------------
uio_unregister_device uio_open
idev = idr_find()
device_unregister(&idev->dev)
put_device(&idev->dev)
uio_device_release
get_device(&idev->dev)
kfree(idev)
uio_free_minor(minor)
uio_release
put_device(&idev->dev)
kfree(idev)
-------------------------------------------------------

In the core-1 uio_unregister_device(), the device_unregister will kfree
idev when the idev->dev kobject ref is 1. But after core-1
device_unregister, put_device and before doing kfree, the core-2 may
get_device. Then:
1. After core-1 kfree idev, the core-2 will do use-after-free for idev.
2. When core-2 do uio_release and put_device, the idev will be double
freed.

To address this issue, we can get idev atomic & inc idev reference with
minor_lock.
解决建议
建议您更新当前系统或软件至最新版,完成漏洞的修复。
受影响软件情况
# 类型 厂商 产品 版本 影响面
1
运行在以下环境
系统 debian_11 linux * Up to
(excluding)
5.10.209-1
运行在以下环境
系统 debian_12 linux * Up to
(excluding)
6.1.76-1
运行在以下环境
系统 linux linux_kernel * From
(excluding)
4.18.0
Up to
(excluding)
4.19.306
运行在以下环境
系统 linux linux_kernel * From
(including)
4.20.0
Up to
(excluding)
5.4.268
运行在以下环境
系统 linux linux_kernel * From
(including)
5.11.0
Up to
(excluding)
5.15.148
运行在以下环境
系统 linux linux_kernel * From
(including)
5.16.0
Up to
(excluding)
6.1.74
运行在以下环境
系统 linux linux_kernel * From
(including)
5.5.0
Up to
(excluding)
5.10.209
运行在以下环境
系统 linux linux_kernel * From
(including)
6.2.0
Up to
(excluding)
6.6.13
运行在以下环境
系统 linux linux_kernel * From
(including)
6.7.0
Up to
(excluding)
6.7.1
运行在以下环境
系统 linux linux_kernel 4.18 -
阿里云评分
6.5
  • 攻击路径
    本地
  • 攻击复杂度
    复杂
  • 权限要求
    普通权限
  • 影响范围
    越权影响
  • EXP成熟度
    未验证
  • 补丁情况
    官方补丁
  • 数据保密性
    无影响
  • 数据完整性
    无影响
  • 服务器危害
    无影响
  • 全网数量
    N/A
CWE-ID 漏洞类型
CWE-415 双重释放
阿里云安全产品覆盖情况