# CVE-2025-40028: binder: fix double-free in dbitmap

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** HIGH 7.8
- **CVSS:** 7.8 (v3.1, CNA) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: High; Integrity impact: High; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.24% (percentile 9, 2026-11-26)
- **Published:** 2025-10-28T09:32:35.681Z
- **Modified:** 2026-10-19T21:10:00.160Z

## Who should check

- Anyone running Linux \>= 15d9da3f818cae676f822a04407d3c17b53357d2, \< c301ec61ce6f16e21a36b99225ca8a20c1591e10; \>= 15d9da3f818cae676f822a04407d3c17b53357d2, \< 0390633979969c54c0ce6a198d6f45cdbe2c84b1; \>= 15d9da3f818cae676f822a04407d3c17b53357d2, \< b781e5635a3398e2b64440371233c2c5102cd6cb; \>= 15d9da3f818cae676f822a04407d3c17b53357d2, \< 3ebcd3460cad351f198c39c6edb4af519a0ed934
- Anyone running Linux 6.11

## Description

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

binder: fix double-free in dbitmap

A process might fail to allocate a new bitmap when trying to expand its
proc-\>dmap. In that case, dbitmap\_grow() fails and frees the old bitmap
via dbitmap\_free(). However, the driver calls dbitmap\_free() again when
the same process terminates, leading to a double-free error:

  ==================================================================
  BUG: KASAN: double-free in binder\_proc\_dec\_tmpref+0x2e0/0x55c
  Free of addr ffff00000b7c1420 by task kworker/9:1/209

  CPU: 9 UID: 0 PID: 209 Comm: kworker/9:1 Not tainted 6.17.0-rc6-dirty \#5 PREEMPT
  Hardware name: linux,dummy-virt (DT)
  Workqueue: events binder\_deferred\_func
  Call trace:
   kfree+0x164/0x31c
   binder\_proc\_dec\_tmpref+0x2e0/0x55c
   binder\_deferred\_func+0xc24/0x1120
   process\_one\_work+0x520/0xba4
  \[...\]

  Allocated by task 448:
   \_\_kmalloc\_noprof+0x178/0x3c0
   bitmap\_zalloc+0x24/0x30
   binder\_open+0x14c/0xc10
  \[...\]

  Freed by task 449:
   kfree+0x184/0x31c
   binder\_inc\_ref\_for\_node+0xb44/0xe44
   binder\_transaction+0x29b4/0x7fbc
   binder\_thread\_write+0x1708/0x442c
   binder\_ioctl+0x1b50/0x2900
  \[...\]
  ==================================================================

Fix this issue by marking proc-\>map NULL in dbitmap\_free().

## Affected and fixed versions

- Linux: \>= 15d9da3f818cae676f822a04407d3c17b53357d2, \< c301ec61ce6f16e21a36b99225ca8a20c1591e10; \>= 15d9da3f818cae676f822a04407d3c17b53357d2, \< 0390633979969c54c0ce6a198d6f45cdbe2c84b1; \>= 15d9da3f818cae676f822a04407d3c17b53357d2, \< b781e5635a3398e2b64440371233c2c5102cd6cb; \>= 15d9da3f818cae676f822a04407d3c17b53357d2, \< 3ebcd3460cad351f198c39c6edb4af519a0ed934 (cvelist)
- Linux: 6.11 (cvelist)

## Mitigation

- Upgrade Linux to 3ebcd3460cad351f198c39c6edb4af519a0ed934 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2025-40028. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2025-40028.md
Affected: Linux >= 15d9da3f818cae676f822a04407d3c17b53357d2, < c301ec61ce6f16e21a36b99225ca8a20c1591e10; >= 15d9da3f818cae676f822a04407d3c17b53357d2, < 0390633979969c54c0ce6a198d6f45cdbe2c84b1; >= 15d9da3f818cae676f822a04407d3c17b53357d2, < b781e5635a3398e2b64440371233c2c5102cd6cb; >= 15d9da3f818cae676f822a0…
Fixed in: Linux 0390633979969c54c0ce6a198d6f45cdbe2c84b1, Linux 3ebcd3460cad351f198c39c6edb4af519a0ed934

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2025-40028 being exploited?

There is no confirmed exploitation: CVE-2025-40028 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.24% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2025-40028?

High: CVSS 7.8 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2025-40028?

Linux \>= 15d9da3f818cae676f822a04407d3c17b53357d2, \< c301ec61ce6f16e21a36b99225ca8a20c1591e10; \>= 15d9da3f818cae676f822a04407d3c17b53357d2, \< 0390633979969c54c0ce6a198d6f45cdbe2c84b1; \>= 15d9da3f818cae676f822a04407d3c17b53357d2, \< b781e5635a3398e2b64440371233c2c5102cd6cb; \>= 15d9da3f818cae676f822a04407d3c17b53357d2, \< 3ebcd3460cad351f198c39c6edb4af519a0ed934; Linux 6.11.

### Is there a fix for CVE-2025-40028?

Yes. Fixed in Linux 0390633979969c54c0ce6a198d6f45cdbe2c84b1, Linux 3ebcd3460cad351f198c39c6edb4af519a0ed934. Upgrade Linux to 3ebcd3460cad351f198c39c6edb4af519a0ed934 or later.

### How do I check if I'm affected by CVE-2025-40028?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- other: <https://git.kernel.org/stable/c/c301ec61ce6f16e21a36b99225ca8a20c1591e10>
- other: <https://git.kernel.org/stable/c/0390633979969c54c0ce6a198d6f45cdbe2c84b1>
- other: <https://git.kernel.org/stable/c/b781e5635a3398e2b64440371233c2c5102cd6cb>
- other: <https://git.kernel.org/stable/c/3ebcd3460cad351f198c39c6edb4af519a0ed934>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2025-40028>

HTML: <https://flawdb.com/CVE-2025-40028> · JSON: <https://flawdb.com/api/v1/entries/CVE-2025-40028>
