CVE-2026-53361 AF_Unix GC 与 MSG_PEEK 导致的释放后重用(Use-after-free)容器逃逸
CVE-2026-53361 AF_Unix GC vs. MSG_PEEK use-after-free container escape

原始链接: https://github.com/sgkdev/bad_garbage

CVE-2026-53361 是 Linux 内核 AF_UNIX 套接字垃圾回收器(GC)中一个严重的释放后使用(Use-After-Free)漏洞。该缺陷源于竞争条件:对传输中文件描述符执行并发 `MSG_PEEK` 操作时,会绕过 GC 的引用跟踪。由于 `gc_in_progress` 标志位可能被错误读取,导致回收器过早释放仍在使用中的套接字,从而留下悬空指针 `sk_buff`。 此问题属于反复出现的安全弱点,此前已在 CVE-2021-0920 和 CVE-2026-23394 中得到修补。当前的漏洞利用针对各种 6.x 内核上的 `MSG_PEEK` 向量,包括 RHEL 10、Debian Trixie 和 Ubuntu 24.04 HWE 中使用的版本。 该漏洞允许无特权容器逃逸。所提供的概念验证(PoC)针对 2-7 个 CPU 的系统进行了优化,且未包含高级 SLUB 缓存保护。虽然该利用有效,但提醒用户:它可能与现有的内核缓存分配发生冲突,若需达到最高可靠性,可能需要额外的加固措施。多个发行版已发布补丁,包括稳定内核分支的 6.12.95 版本。

Hacker News 最新 | 过往 | 评论 | 提问 | 展示 | 招聘 | 提交 登录 CVE-2026-53361 AF_Unix GC 与 MSG_PEEK 导致的 UAF 容器逃逸 (github.com/sgkdev) 12 分,由 eyberg 于 4 小时前发布 | 隐藏 | 过往 | 收藏 | 讨论 帮助 指南 | 常见问题 | 列表 | API | 安全 | 法律 | 申请 YC | 联系 搜索:
相关文章

原文

CVE-2026-53361 — an unprivileged, container-escapable use-after-free in the AF_UNIX socket garbage collector. This is the single-vector (MSG_PEEK only) version.

The AF_UNIX GC reclaims "in-flight" sockets that form unreachable reference cycles. A concurrent MSG_PEEK on an in-flight fd takes a reference the GC's census never counts, so the collector can free a socket that is still alive and leave a dangling sk_buff. The peek is supposed to back off while a collection runs, but the gc_in_progress flag it checks can read false mid-run, so the peek slips through and the race is open.

Same interaction, fixed three times:

  • CVE-2021-0920cbcf01128d0a "af_unix: fix garbage collect vs MSG_PEEK"
  • CVE-2026-23394e5b31d988a41 "af_unix: Give up GC if MSG_PEEK intervened"
  • CVE-2026-53361d82ba05263c6 "af_unix: Set gc_in_progress to true in unix_gc()"

Vulnerable = affected by the bug. Targeted = covered by this exploit (single MSG_PEEK vector). The 7.x kernels and the Ubuntu 6.8 GA kernel are vulnerable but out of scope here.

Target Kernel Vulnerable Patched Targeted
Stable 6.12 6.12 Y 6.12.95 up to 6.12.94
Ubuntu 24.04 HWE 6.17 Y N up to 6.17.0-41
Ubuntu 24.04 GA 6.8 Y N N (non-PEEK vector)
RHEL 10 6.12 Y N Y
Debian trixie 6.12 Y DSA-6381-1 up to 6.12.94+deb13-cloud-amd64
Line Latest tested kernel Build date
Debian 13 (trixie) 6.12.94+deb13-cloud-amd64 Jun 20, 2026
Ubuntu 24.04 (6.17) 6.17.0-41-generic Jun 30, 2026
Ubuntu 24.04 (6.14) 6.14.0-37-generic Nov 20, 2025 (old HWE)
CentOS Stream 10 6.12.0-257.el10 Aug 6, 2026 13:25 GMT
RHEL 10.2 / AlmaLinux 6.12.0-211.43.1.el10_2 Aug 6, 2026 17:19 GMT
  • CPU count — designed for fewer than 8 CPUs (2–7). A choice, not a reliability quirk: the clean order-N strategy is left out on purpose, not worth exposing it for a -1 day bug.
  • SLUB Cache Armoring — most cache-armoring/shadowing code was stripped from the PoC. The SID-leak phase can occasionally collide with a spurious low-order kmalloc() or a specific per-cache PCP reuse (anon_vma, kmalloc-64, and friends); the higher buckets are safe, the dedicated caches and lower buckets are not. Add your own armoring to push it toward ~100%.
联系我们 contact @ memedata.com