中危 bpf:修复 32 位架构上的堆栈映射溢出检查 (CVE-2024-26883)

CVE编号

CVE-2024-26883

利用情况

暂无

补丁情况

官方补丁

披露时间

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

bpf: Fix stackmap overflow check on 32-bit arches

The stackmap code relies on roundup_pow_of_two() to compute the number
of hash buckets, and contains an overflow check by checking if the
resulting value is 0. However, on 32-bit arches, the roundup code itself
can overflow by doing a 32-bit left-shift of an unsigned long value,
which is undefined behaviour, so it is not guaranteed to truncate
neatly. This was triggered by syzbot on the DEVMAP_HASH type, which
contains the same check, copied from the hashtab code.

The commit in the fixes tag actually attempted to fix this, but the fix
did not account for the UB, so the fix only works on CPUs where an
overflow does result in a neat truncation to zero, which is not
guaranteed. Checking the value before rounding does not have this
problem.
解决建议
建议您更新当前系统或软件至最新版,完成漏洞的修复。
受影响软件情况
# 类型 厂商 产品 版本 影响面
1
运行在以下环境
系统 debian_12 linux * Up to
(excluding)
6.1.85-1
运行在以下环境
系统 linux linux_kernel * Up to
(excluding)
4.19.311
运行在以下环境
系统 linux linux_kernel * From
(including)
4.20
Up to
(excluding)
5.4.273
运行在以下环境
系统 linux linux_kernel * From
(including)
5.11
Up to
(excluding)
5.15.153
运行在以下环境
系统 linux linux_kernel * From
(including)
5.16
Up to
(excluding)
6.1.83
运行在以下环境
系统 linux linux_kernel * From
(including)
5.5
Up to
(excluding)
5.10.214
运行在以下环境
系统 linux linux_kernel * From
(including)
6.2
Up to
(excluding)
6.6.23
运行在以下环境
系统 linux linux_kernel * From
(including)
6.7
Up to
(excluding)
6.7.11
运行在以下环境
系统 linux linux_kernel * From
(including)
6.8
Up to
(excluding)
6.8.2
阿里云评分
6.5
  • 攻击路径
    本地
  • 攻击复杂度
    复杂
  • 权限要求
    普通权限
  • 影响范围
    越权影响
  • EXP成熟度
    未验证
  • 补丁情况
    官方补丁
  • 数据保密性
    无影响
  • 数据完整性
    无影响
  • 服务器危害
    无影响
  • 全网数量
    N/A
CWE-ID 漏洞类型
CWE-119 内存缓冲区边界内操作的限制不恰当
阿里云安全产品覆盖情况