Cloudanix VulnDB

CVE-2024-46740

High · 7.8

CVSS

7.8

EPSS

0.3%

Published

Sep 18, 2024

CISA due date

—

Cloudanix analysis

Schedule a fix SSVC: Track

A flaw in the way Linux handles internal messages between processes can let someone already on the machine crash the system or gain higher privileges.

Exploitation
Local Privilege
Attacker needs
Local User
Complexity
Moderate
Impact
Full Compromise
Component
OS kernel
Class
Use After Free
Remediation
Upgrade
Effort
Medium
Patch risk
Low

What it actually does

The vulnerability allows a raw data copy in binder transactions to exceed the data section size and overwrite the offsets array. This corrupts object indexing so that error unwinding decrements arbitrary binder nodes, freeing them while other references still exist and producing a use-after-free.

Why it matters to the business

Local attackers on affected Linux systems can trigger kernel crashes or escalate privileges, risking data exposure, service disruption, and potential ransomware deployment on servers, containers, and embedded devices that rely on the binder IPC mechanism.

How an attack unfolds

An attacker invokes binder_thread_write with a crafted transaction containing raw data larger than the declared data section. The missing bounds check overwrites offsets, causing subsequent error handling in binder_free_buf to release arbitrary nodes. The resulting dangling pointers are later dereferenced, yielding a use-after-free that can be turned into code execution. Public reports reference exploitation activity by espionage and financially motivated actors in 2024 zero-day campaigns against Linux kernel components.

How to fix it

Upgrade the Linux kernel to version 5.4.284 or later, or apply commit 5a32bfd23022ffa7e152f273fa3fa29befb7d929. Rebuild and reboot all affected hosts; prioritize systems that expose binder to untrusted local processes.

How to confirm the fix worked

Verify the running kernel version contains the fix, confirm the patch is present in the binder transaction copy logic, and run the original KASAN reproducer to ensure no use-after-free is reported.

Typical attack path

  1. Obtain local access to a system running a vulnerable Linux kernel
  2. Open /dev/binder and prepare a malicious transaction buffer with oversized raw data between objects
  3. Issue binder_thread_write ioctl that triggers the out-of-bounds copy and offsets corruption
  4. Force an error path that unwinds using the corrupted offsets, freeing arbitrary nodes
  5. Reuse the dangling pointers to achieve use-after-free and escalate privileges or crash the kernel

How to detect it

Search kernel logs and KASAN reports for binder_free_buf, binder_thread_write, and slab-use-after-free messages referencing binder nodes. Correlate with process names invoking binder ioctl calls and look for transaction buffers that trigger early error unwinding.

  • BUG: KASAN: slab-use-after-free in _raw_spin_lock
  • binder_free_buf+0x128/0x434
  • binder_thread_write+0x8a4/0x3260
  • binder_new_node+0x50/0x700

What your security team should do

  • Immediately schedule kernel upgrades to 5.4.284+ on all production and edge Linux systems
  • Restrict local access to /dev/binder where feasible until patches are deployed
  • Monitor EPSS and threat-intel feeds for any rise in public exploits targeting this class of binder flaw
  • Include the fix in the next maintenance window for high-value or internet-facing hosts

The record

In the Linux kernel, the following vulnerability has been resolved: binder: fix UAF caused by offsets overwrite Binder objects are processed and copied individually into the target buffer during transactions. Any raw data in-between these objects is copied as well. However, this raw data copy lacks an out-of-bounds check. If the raw data exceeds the data section size then the copy overwrites the offsets section. This eventually triggers an error that attempts to unwind the processed objects. However, at this point the offsets used to index these objects are now corrupted. Unwinding with corrupted offsets can result in decrements of arbitrary nodes and lead to their premature release. Other users of such nodes are left with a dangling pointer triggering a use-after-free. This issue is made evident by the following KASAN report (trimmed): ================================================================== BUG: KASAN: slab-use-after-free in _raw_spin_lock+0xe4/0x19c Write of size 4 at addr ffff47fc91598f04 by task binder-util/743 CPU: 9 UID: 0 PID: 743 Comm: binder-util Not tainted 6.11.0-rc4 #1 Hardware name: linux,dummy-virt (DT) Call trace: _raw_spin_lock+0xe4/0x19c binder_free_buf+0x128/0x434 binder_thread_write+0x8a4/0x3260 binder_ioctl+0x18f0/0x258c [...] Allocated by task 743: __kmalloc_cache_noprof+0x110/0x270 binder_new_node+0x50/0x700 binder_transaction+0x413c/0x6da8 binder_thread_write+0x978/0x3260 binder_ioctl+0x18f0/0x258c [...] Freed by task 745: kfree+0xbc/0x208 binder_thread_read+0x1c5c/0x37d4 binder_ioctl+0x16d8/0x258c [...] ================================================================== To avoid this issue, let's check that the raw data copy is within the boundaries of the data section.

Affected packages

Ecosystem Package Introduced Fixed
Android :linux_kernel: :0 :2024-11-05
Debian:11 linux 0 No fix
Debian:11 linux 0 5.10.226-1
Debian:11 linux-6.1 0 6.1.119-1~deb11u1
Debian:12 linux 0 6.1.112-1
Debian:13 linux 0 6.10.11-1
Linux Kernel 0 5.4.284
Mageia:9 kernel 0 6.6.52-1.mga9
Mageia:9 kernel-linus 0 6.6.52-1.mga9
Mageia:9 kmod-virtualbox 0 7.0.20-54.mga9
Mageia:9 kmod-xtables-addons 0 3.24-62.mga9
Ubuntu:14.04:LTS linux 0 3.11.0-12.19
Ubuntu:14.04:LTS linux-aws 0 4.4.0-1002.2
Ubuntu:14.04:LTS linux-azure 0 4.15.0-1023.24~14.04.1
Ubuntu:14.04:LTS linux-lts-xenial 0 4.4.0-13.29~14.04.1
Ubuntu:16.04:LTS linux 0 4.4.0-2.16
Ubuntu:16.04:LTS linux-aws 0 4.4.0-1001.10
Ubuntu:16.04:LTS linux-aws-hwe 0 4.15.0-1030.31~16.04.1
Ubuntu:16.04:LTS linux-azure 0 4.11.0-1009.9
Ubuntu:16.04:LTS linux-gcp 0 4.10.0-1004.4
Ubuntu:16.04:LTS linux-hwe 0 4.8.0-39.42~16.04.1
Ubuntu:16.04:LTS linux-hwe-edge 0 No fix
Ubuntu:16.04:LTS linux-kvm 0 4.4.0-1004.9
Ubuntu:16.04:LTS linux-oracle 0 4.15.0-1007.9~16.04.1
Ubuntu:18.04:LTS linux 0 4.13.0-16.19
Ubuntu:18.04:LTS linux-aws 0 4.15.0-1001.1
Ubuntu:18.04:LTS linux-aws-5.0 0 No fix
Ubuntu:18.04:LTS linux-aws-5.3 0 No fix
Ubuntu:18.04:LTS linux-azure 0 No fix
Ubuntu:18.04:LTS linux-azure-4.15 0 4.15.0-1082.92
Ubuntu:18.04:LTS linux-azure-5.3 0 No fix
Ubuntu:18.04:LTS linux-azure-edge 0 No fix
Ubuntu:18.04:LTS linux-gcp 0 No fix
Ubuntu:18.04:LTS linux-gcp-4.15 0 4.15.0-1071.81
Ubuntu:18.04:LTS linux-gcp-5.3 0 No fix
Ubuntu:18.04:LTS linux-gke-4.15 0 No fix
Ubuntu:18.04:LTS linux-gke-5.4 0 No fix
Ubuntu:18.04:LTS linux-gkeop-5.4 0 No fix
Ubuntu:18.04:LTS linux-hwe 0 No fix
Ubuntu:18.04:LTS linux-hwe-edge 0 5.0.0-15.16~18.04.1
Ubuntu:18.04:LTS linux-kvm 0 4.15.0-1002.2
Ubuntu:18.04:LTS linux-oem 0 No fix
Ubuntu:18.04:LTS linux-oracle 0 4.15.0-1007.9
Ubuntu:18.04:LTS linux-oracle-5.0 0 No fix
Ubuntu:18.04:LTS linux-oracle-5.3 0 No fix
Ubuntu:20.04:LTS linux 0 5.4.0-200.220
Ubuntu:20.04:LTS linux-aws 0 5.4.0-1135.145
Ubuntu:20.04:LTS linux-aws-5.11 0 No fix
Ubuntu:20.04:LTS linux-aws-5.13 0 No fix
Ubuntu:20.04:LTS linux-aws-5.15 0 5.15.0-1072.78~20.04.1
Ubuntu:20.04:LTS linux-aws-5.8 0 No fix
Ubuntu:20.04:LTS linux-azure 0 5.4.0-1140.147
Ubuntu:20.04:LTS linux-azure-5.11 0 No fix
Ubuntu:20.04:LTS linux-azure-5.13 0 No fix
Ubuntu:20.04:LTS linux-azure-5.15 0 5.15.0-1078.87~20.04.1
Ubuntu:20.04:LTS linux-azure-5.8 0 No fix
Ubuntu:20.04:LTS linux-azure-fde 0 No fix
Ubuntu:20.04:LTS linux-azure-fde-5.15 0 No fix
Ubuntu:20.04:LTS linux-bluefield 0 5.4.0-1095.102
Ubuntu:20.04:LTS linux-gcp 0 5.4.0-1139.148
Ubuntu:20.04:LTS linux-gcp-5.11 0 No fix
Ubuntu:20.04:LTS linux-gcp-5.13 0 No fix
Ubuntu:20.04:LTS linux-gcp-5.15 0 5.15.0-1071.79~20.04.1
Ubuntu:20.04:LTS linux-gcp-5.8 0 No fix
Ubuntu:20.04:LTS linux-gke 0 No fix
Ubuntu:20.04:LTS linux-gke-5.15 0 No fix
Ubuntu:20.04:LTS linux-gkeop 0 5.4.0-1102.106
Ubuntu:20.04:LTS linux-gkeop-5.15 0 5.15.0-1055.62~20.04.1
Ubuntu:20.04:LTS linux-hwe-5.11 0 No fix
Ubuntu:20.04:LTS linux-hwe-5.13 0 No fix
Ubuntu:20.04:LTS linux-hwe-5.15 0 5.15.0-125.135~20.04.1
Ubuntu:20.04:LTS linux-hwe-5.8 0 No fix
Ubuntu:20.04:LTS linux-ibm 0 5.4.0-1082.87
Ubuntu:20.04:LTS linux-ibm-5.15 0 5.15.0-1065.68~20.04.1
Ubuntu:20.04:LTS linux-intel-5.13 0 No fix
Ubuntu:20.04:LTS linux-intel-iotg-5.15 0 5.15.0-1067.73~20.04.1
Ubuntu:20.04:LTS linux-iot 0 5.4.0-1044.45
Ubuntu:20.04:LTS linux-kvm 0 5.4.0-1123.131
Ubuntu:20.04:LTS linux-lowlatency-hwe-5.15 0 5.15.0-125.135~20.04.1
Ubuntu:20.04:LTS linux-nvidia-tegra-5.15 0 5.15.0-1032.32~20.04.1
Ubuntu:20.04:LTS linux-oem-5.10 0 No fix
Ubuntu:20.04:LTS linux-oem-5.13 0 No fix
Ubuntu:20.04:LTS linux-oem-5.14 0 No fix
Ubuntu:20.04:LTS linux-oem-5.6 0 No fix
Ubuntu:20.04:LTS linux-oracle 0 5.4.0-1134.143
Ubuntu:20.04:LTS linux-oracle-5.11 0 No fix
Ubuntu:20.04:LTS linux-oracle-5.13 0 No fix
Ubuntu:20.04:LTS linux-oracle-5.15 0 5.15.0-1070.76~20.04.1
Ubuntu:20.04:LTS linux-oracle-5.8 0 No fix
Ubuntu:20.04:LTS linux-raspi 0 5.4.0-1119.131
Ubuntu:20.04:LTS linux-raspi2 0 No fix
Ubuntu:20.04:LTS linux-riscv 0 No fix
Ubuntu:20.04:LTS linux-riscv-5.11 0 No fix
Ubuntu:20.04:LTS linux-riscv-5.15 0 5.15.0-1068.72~20.04.1
Ubuntu:20.04:LTS linux-riscv-5.8 0 No fix
Ubuntu:20.04:LTS linux-xilinx-zynqmp 0 5.4.0-1054.58
Ubuntu:22.04:LTS linux 0 5.15.0-125.135
Ubuntu:22.04:LTS linux-allwinner-5.19 0 No fix
Ubuntu:22.04:LTS linux-aws 0 5.15.0-1072.78
Ubuntu:22.04:LTS linux-aws-5.19 0 No fix
Ubuntu:22.04:LTS linux-aws-6.2 0 No fix
Ubuntu:22.04:LTS linux-aws-6.5 0 No fix
Ubuntu:22.04:LTS linux-aws-6.8 0 6.8.0-1020.22~22.04.1
Ubuntu:22.04:LTS linux-azure 0 5.15.0-1075.84
Ubuntu:22.04:LTS linux-azure-5.19 0 No fix
Ubuntu:22.04:LTS linux-azure-6.2 0 No fix
Ubuntu:22.04:LTS linux-azure-6.5 0 No fix
Ubuntu:22.04:LTS linux-azure-6.8 0 6.8.0-1020.23~22.04.1
Ubuntu:22.04:LTS linux-azure-fde 0 No fix
Ubuntu:22.04:LTS linux-azure-fde-5.19 0 No fix
Ubuntu:22.04:LTS linux-azure-fde-6.2 0 No fix
Ubuntu:22.04:LTS linux-gcp 0 5.15.0-1071.79
Ubuntu:22.04:LTS linux-gcp-5.19 0 No fix
Ubuntu:22.04:LTS linux-gcp-6.2 0 No fix
Ubuntu:22.04:LTS linux-gcp-6.5 0 No fix
Ubuntu:22.04:LTS linux-gcp-6.8 0 6.8.0-1019.21~22.04.1
Ubuntu:22.04:LTS linux-gke 0 5.15.0-1069.75
Ubuntu:22.04:LTS linux-gkeop 0 5.15.0-1055.62
Ubuntu:22.04:LTS linux-hwe-5.19 0 No fix
Ubuntu:22.04:LTS linux-hwe-6.2 0 No fix
Ubuntu:22.04:LTS linux-hwe-6.5 0 No fix
Ubuntu:22.04:LTS linux-hwe-6.8 0 6.8.0-50.51~22.04.1
Ubuntu:22.04:LTS linux-ibm 0 5.15.0-1065.68
Ubuntu:22.04:LTS linux-ibm-6.8 0 6.8.0-1017.17~22.04.1
Ubuntu:22.04:LTS linux-intel-iot-realtime 0 No fix
Ubuntu:22.04:LTS linux-intel-iotg 0 5.15.0-1067.73
Ubuntu:22.04:LTS linux-kvm 0 5.15.0-1069.74
Ubuntu:22.04:LTS linux-lowlatency 0 5.15.0-125.135
Ubuntu:22.04:LTS linux-lowlatency-hwe-5.19 0 No fix
Ubuntu:22.04:LTS linux-lowlatency-hwe-6.2 0 No fix
Ubuntu:22.04:LTS linux-lowlatency-hwe-6.5 0 No fix
Ubuntu:22.04:LTS linux-lowlatency-hwe-6.8 0 6.8.0-50.51.1~22.04.1
Ubuntu:22.04:LTS linux-nvidia 0 5.15.0-1067.68
Ubuntu:22.04:LTS linux-nvidia-6.2 0 No fix
Ubuntu:22.04:LTS linux-nvidia-6.5 0 No fix
Ubuntu:22.04:LTS linux-nvidia-6.8 0 6.8.0-1019.21~22.04.1
Ubuntu:22.04:LTS linux-nvidia-tegra 0 5.15.0-1032.32
Ubuntu:22.04:LTS linux-nvidia-tegra-igx 0 5.15.0-1020.20
Ubuntu:22.04:LTS linux-oem-5.17 0 No fix
Ubuntu:22.04:LTS linux-oem-6.0 0 No fix
Ubuntu:22.04:LTS linux-oem-6.1 0 No fix
Ubuntu:22.04:LTS linux-oem-6.5 0 No fix
Ubuntu:22.04:LTS linux-oracle 0 5.15.0-1070.76
Ubuntu:22.04:LTS linux-oracle-6.5 0 No fix
Ubuntu:22.04:LTS linux-oracle-6.8 0 6.8.0-1017.18~22.04.1
Ubuntu:22.04:LTS linux-raspi 0 5.15.0-1065.68
Ubuntu:22.04:LTS linux-realtime 0 No fix
Ubuntu:22.04:LTS linux-riscv 0 No fix
Ubuntu:22.04:LTS linux-riscv-5.19 0 No fix
Ubuntu:22.04:LTS linux-riscv-6.5 0 No fix
Ubuntu:22.04:LTS linux-riscv-6.8 0 6.8.0-50.51.1~22.04.1
Ubuntu:22.04:LTS linux-starfive-5.19 0 No fix
Ubuntu:22.04:LTS linux-starfive-6.2 0 No fix
Ubuntu:22.04:LTS linux-starfive-6.5 0 No fix
Ubuntu:22.04:LTS linux-xilinx-zynqmp 0 5.15.0-1038.42
Ubuntu:22.04:LTS:for:NVIDIA:BlueField linux-bluefield 0 No fix
Ubuntu:24.04:LTS linux 0 6.8.0-50.51
Ubuntu:24.04:LTS linux-aws 0 6.8.0-1020.22
Ubuntu:24.04:LTS linux-azure 0 6.8.0-1020.23
Ubuntu:24.04:LTS linux-gcp 0 6.8.0-1019.21
Ubuntu:24.04:LTS linux-gke 0 6.8.0-1015.19
Ubuntu:24.04:LTS linux-gkeop 0 6.8.0-1002.4
Ubuntu:24.04:LTS linux-ibm 0 6.8.0-1017.17
Ubuntu:24.04:LTS linux-lowlatency 0 6.8.0-50.51.1
Ubuntu:24.04:LTS linux-nvidia 0 6.8.0-1019.21
Ubuntu:24.04:LTS linux-nvidia-lowlatency 0 6.8.0-1019.21.1
Ubuntu:24.04:LTS linux-oem-6.11 0 6.11.0-1007.7
Ubuntu:24.04:LTS linux-oem-6.8 0 6.8.0-1018.18
Ubuntu:24.04:LTS linux-oracle 0 6.8.0-1017.18
Ubuntu:24.04:LTS linux-raspi 0 6.8.0-1016.18
Ubuntu:24.04:LTS linux-raspi-realtime 0 No fix
Ubuntu:24.04:LTS linux-realtime 0 No fix
Ubuntu:24.04:LTS linux-riscv 0 6.8.0-50.51.1
Ubuntu:24.04:LTS linux-xilinx 0 6.8.0-1017.18
Ubuntu:24.10 linux 0 6.11.0-7.7
Ubuntu:24.10 linux-aws 0 6.11.0-1002.2
Ubuntu:24.10 linux-azure 0 6.11.0-1003.3
Ubuntu:24.10 linux-gcp 0 6.11.0-1001.1
Ubuntu:24.10 linux-lowlatency 0 6.11.0-1002.2
Ubuntu:24.10 linux-oracle 0 6.11.0-1004.4
Ubuntu:24.10 linux-raspi 0 6.11.0-1003.3
Ubuntu:24.10 linux-realtime 0 6.11.0-1001.1
Ubuntu:24.10 linux-riscv 0 6.11.0-8.8.1
Ubuntu:Nvidia-BlueField:22.04:LTS linux-bluefield 0 5.15.0-1056.58
Ubuntu:Pro:16.04:LTS linux-hwe-edge 0 No fix
Ubuntu:Pro:18.04:LTS linux-aws-5.0 0 No fix
Ubuntu:Pro:18.04:LTS linux-aws-5.3 0 No fix
Ubuntu:Pro:18.04:LTS linux-aws-5.4 0 5.4.0-1135.145~18.04.1
Ubuntu:Pro:18.04:LTS linux-azure 0 No fix
Ubuntu:Pro:18.04:LTS linux-azure-5.3 0 No fix
Ubuntu:Pro:18.04:LTS linux-azure-5.4 0 5.4.0-1140.147~18.04.1
Ubuntu:Pro:18.04:LTS linux-azure-edge 0 No fix
Ubuntu:Pro:18.04:LTS linux-gcp 0 No fix
Ubuntu:Pro:18.04:LTS linux-gcp-5.3 0 No fix
Ubuntu:Pro:18.04:LTS linux-gcp-5.4 0 5.4.0-1139.148~18.04.1
Ubuntu:Pro:18.04:LTS linux-gke-4.15 0 No fix
Ubuntu:Pro:18.04:LTS linux-gke-5.4 0 No fix
Ubuntu:Pro:18.04:LTS linux-gkeop-5.4 0 No fix
Ubuntu:Pro:18.04:LTS linux-hwe 0 No fix
Ubuntu:Pro:18.04:LTS linux-hwe-5.4 0 5.4.0-200.220~18.04.1

Related vulnerabilities