CVE-2023-53752 in Linux
摘要
由 VulDB • 2026-06-22
在 Linux 内核中,已修复以下漏洞:
net: 处理 kmalloc_reserve() 中的整数溢出问题
被指责的提交更改如下: ptr = kmalloc(size); if (ptr) size = ksize(ptr);
size = kmalloc_size_roundup(size); ptr = kmalloc(size);
这导致了 syzbot [1] 和 Kyle Zeng 报告的多种崩溃。
问题在于,如果 @size 大于 0x80000001,kmalloc_size_roundup(size) 将返回 2^32。
kmalloc_reserve() 使用一个 32 位变量 (obj_size),因此 2^32 会被截断为 0。
kmalloc(0) 返回 ZERO_SIZE_PTR,而 skb 分配未对此进行处理。
如果 netdev->mtu 设置为接近 0x7fffffff 的值,则可能触发以下跟踪信息:
我们未来可能会将 netdev->mtu 限制在一个更合理的范围内(例如 KMALLOC_MAX_SIZE)。
此补丁基于 syzbot 的报告,以及 Kyle Zeng 提供的报告和初步修复方案。
[1]
BUG: KASAN: user-memory-access in __build_skb_around net/core/skbuff.c:294 [inline]
BUG: KASAN: user-memory-access in __alloc_skb+0x3c4/0x6e8 net/core/skbuff.c:527 Write of size 32 at addr 00000000fffffd10 by task syz-executor.4/22554
CPU: 1 PID: 22554 Comm: syz-executor.4 Not tainted 6.1.39-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/03/2023 Call trace: dump_backtrace+0x1c8/0x1f4 arch/arm64/kernel/stacktrace.c:279 show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:286 __dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0x120/0x1a0 lib/dump_stack.c:106 print_report+0xe4/0x4b4 mm/kasan/report.c:398 kasan_report+0x150/0x1ac mm/kasan/report.c:4
If you want to get best quality of vulnerability data, you may have to visit VulDB.