CVE-2025-21853

MEDIUM

Linux Kernel - Deadlock via BPF Map Freeze Mutex During mmap

Title source: llm
STIX 2.1

Description

In the Linux kernel, the following vulnerability has been resolved: bpf: avoid holding freeze_mutex during mmap operation We use map->freeze_mutex to prevent races between map_freeze() and memory mapping BPF map contents with writable permissions. The way we naively do this means we'll hold freeze_mutex for entire duration of all the mm and VMA manipulations, which is completely unnecessary. This can potentially also lead to deadlocks, as reported by syzbot in [0]. So, instead, hold freeze_mutex only during writeability checks, bump (proactively) "write active" count for the map, unlock the mutex and proceed with mmap logic. And only if something went wrong during mmap logic, then undo that "write active" counter increment. [0] https://lore.kernel.org/bpf/[email protected]/

Scores

CVSS v3 5.5
EPSS 0.0022
EPSS Percentile 12.7%
Attack Vector LOCAL
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H

Details

Status published
Products (24)
linux/Kernel 5.11.0 - 5.15.181linux
linux/Kernel 5.16.0 - 6.1.135linux
linux/Kernel 5.5.0 - 5.10.237linux
linux/Kernel 6.13.0 - 6.13.5linux
linux/Kernel 6.2.0 - 6.6.80linux
linux/Kernel 6.7.0 - 6.12.17linux
Linux/Linux < 5.5
Linux/Linux 5.10.237 - 5.10.*
Linux/Linux 5.15.181 - 5.15.*
Linux/Linux 5.5
... and 14 more
Published Mar 12, 2025
Tracked Since Feb 18, 2026