nday
CVE-2023-54157

binder: fix UAF of alloc->vma in race with munmap()

Linux / Linux

披露于 。本站尚未获取修复依据,不能据此认为没有补丁。四个 PoC 来源都还没有收录。尚未列入 CISA KEV。

标签 攻击途径本地无需用户交互 产品Linux kernel 产品类型操作系统
这些标签的依据

这些标签由 nday 按固定规则从下列事实自动推导,不是 NVD、编号分配方或其他来源给出的。全部标签和规则见 ~/tags。

本地
编号分配方 Linux 给出的 CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H(CVSS 3.1)中的 AV:L
无需用户交互
编号分配方 Linux 给出的 CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H(CVSS 3.1)中的 UI:N
Linux kernel
CVE 记录列出的受影响产品:Linux · Linux
操作系统
CVE 记录列出的受影响产品:Linux · Linuxnday 产品登记表中 Linux kernel 的产品类型
当前阶段
DIS
披露
CVSS
7.8 HIGH v3.1

生命周期

横轴 UTC;点=精确到分钟,宽条=仅日期,空心=未知或推定。
时间未知
DIS披露
2025-12-24T13:07Z
PAT补丁
尚无记录
ANA分析
尚无记录
POCPoC
尚无记录
ITW在野
尚无记录
KEVKEV
尚无记录

摘要

In the Linux kernel, the following vulnerability has been resolved:

binder: fix UAF of alloc->vma in race with munmap()

[ cmllamas: clean forward port from commit 015ac18be7de ("binder: fix UAF of alloc->vma in race with munmap()") in 5.10 stable. It is needed in mainline after the revert of commit a43cfc87caaf ("android: binder: stop saving a pointer to the VMA") as pointed out by Liam. The commit log and tags have been tweaked to reflect this. ]

In commit 720c24192404 ("ANDROID: binder: change down_write to down_read") binder assumed the mmap read lock is sufficient to protect alloc->vma inside binder_update_page_range(). This used to be accurate until commit dd2283f2605e ("mm: mmap: zap pages with read mmap_sem in munmap"), which now downgrades the mmap_lock after detaching the vma from the rbtree in munmap(). Then it proceeds to teardown and free the vma with only the read lock held.

This means that accesses to alloc->vma in binder_update_page_range() now will race with vm_area_free() in munmap() and can cause a UAF as shown in the following KASAN trace:

==================================================================
BUG: KASAN: use-after-free in vm_insert_page+0x7c/0x1f0
Read of size 8 at addr ffff16204ad00600 by task server/558

CPU: 3 PID: 558 Comm: server Not tainted 5.10.150-00001-gdc8dcf942daa #1
Hardware name: linux,dummy-virt (DT)
Call trace:
 dump_backtrace+0x0/0x2a0
 show_stack+0x18/0x2c
 dump_stack+0xf8/0x164
 print_address_description.constprop.0+0x9c/0x538
 kasan_report+0x120/0x200
 __asan_load8+0xa0/0xc4
 vm_insert_page+0x7c/0x1f0
 binder_update_page_range+0x278/0x50c
 binder_alloc_new_buf+0x3f0/0xba0
 binder_transaction+0x64c/0x3040
 binder_thread_write+0x924/0x2020
 binder_ioctl+0x1610/0x2e5c
 __arm64_sys_ioctl+0xd4/0x120
 el0_svc_common.constprop.0+0xac/0x270
 do_el0_svc+0x38/0xa0
 el0_svc+0x1c/0x2c
 el0_sync_handler+0xe8/0x114
 el0_sync+0x180/0x1c0

Allocated by task 559:
 kasan_save_stack+0x38/0x6c
 __kasan_kmalloc.constprop.0+0xe4/0xf0
 kasan_slab_alloc+0x18/0x2c
 kmem_cache_alloc+0x1b0/0x2d0
 vm_area_alloc+0x28/0x94
 mmap_region+0x378/0x920
 do_mmap+0x3f0/0x600
 vm_mmap_pgoff+0x150/0x17c
 ksys_mmap_pgoff+0x284/0x2dc
 __arm64_sys_mmap+0x84/0xa4
 el0_svc_common.constprop.0+0xac/0x270
 do_el0_svc+0x38/0xa0
 el0_svc+0x1c/0x2c
 el0_sync_handler+0xe8/0x114
 el0_sync+0x180/0x1c0

Freed by task 560:
 kasan_save_stack+0x38/0x6c
 kasan_set_track+0x28/0x40
 kasan_set_free_info+0x24/0x4c
 __kasan_slab_free+0x100/0x164
 kasan_slab_free+0x14/0x20
 kmem_cache_free+0xc4/0x34c
 vm_area_free+0x1c/0x2c
 remove_vma+0x7c/0x94
 __do_munmap+0x358/0x710
 __vm_munmap+0xbc/0x130
 __arm64_sys_munmap+0x4c/0x64
 el0_svc_common.constprop.0+0xac/0x270
 do_el0_svc+0x38/0xa0
 el0_svc+0x1c/0x2c
 el0_sync_handler+0xe8/0x114
 el0_sync+0x180/0x1c0

[...]
==================================================================

To prevent the race above, revert back to taking the mmap write lock inside binder_update_page_range(). One might expect an increase of mmap lock contention. However, binder already serializes these calls via top level alloc->mutex. Also, there was no performance impact shown when running the binder benchmark tests.

以上是 CVE 记录(cvelist)中的原文,未经改写。

利用条件

按 CVSS 向量说明攻击需要的条件。
攻击途径 AV:L
本地:需要本地或 SSH 会话,或诱使用户在本机上操作
攻击复杂度 AC:L
低:不依赖特殊条件,攻击者可预期重复成功
所需权限 PR:L
低:普通用户权限
用户交互 UI:N
无:除攻击者外不需要任何人配合

CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

CVSS 3.1 向量,来自 CVE 记录,由 CNA Linux 评定。

事件记录

+DIS披露

CVE 记录发布,编号分配方是 Linux。CVSS 7.8,高危。

来源 cvelist · 本站 批量导入 · 原始记录
{
  "id": 310252,
  "type": "disclosed",
  "source": "cvelist",
  "url": "https://www.cve.org/CVERecord?id=CVE-2023-54157",
  "occurred_at": "2025-12-24T13:07:06.764Z",
  "observed_at": "2026-11-13T05:38:14.046808Z",
  "is_backfill": true,
  "dedupe_key": "",
  "detail": {
    "cvss": {
      "source": "cna",
      "vector": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
      "version": "3.1",
      "base_score": 7.8,
      "base_severity": "HIGH"
    },
    "state": "PUBLISHED",
    "date_published": "2025-12-24T13:07:06.764Z",
    "assigner_short_name": "Linux"
  }
}

纠错

报告错误或缺失

页面有误或缺失?告诉编辑;采纳后在本页修订记录公开说明,上游数据不会被改动。

研究员讨论

近 7 天有 0 位研究员提到

研究员在 X 上提到此 CVE 的帖子,原文照录,nday 不核实。

尚未采集到名单内研究员在 X 上提到此 CVE 的帖子。

讨论

0 条评论

还没有评论。