data built 2026-10-19T13:16:53Z

Look up another CVE · open CVE-2024-38570 in the interactive tracker

CVE-2024-38570

gfs2: Fix potential glock use-after-free on unmount

9.8 EPSS 0.7% AV:N

Published 2024-06-19 (2 years ago) by the Linux kernel CNA. Subsystem fs/gfs2. Debian urgency: not yet assigned.

What to do, per Debian release

Debian's own status for CVE-2024-38570 in every release this site tracks, and what each one means in practice. Every status below is the one the Debian Security Team publishes for this CVE. source

ReleaseStatus VersionWhat this means
Debian 12bookwormvulnerable6.1.190-1No fix published anywhere yet, neither in Debian nor upstream for the series bookworm tracks. Watch the Debian tracker page for this CVE. Advisories for bookworm have historically landed a median of 23 days after publication.
Debian 13trixiefixed6.8.12-1Update the kernel and reboot. Fixed in 6.8.12-1. A running kernel keeps the old code until the machine restarts.
Debian 14forkyfixed6.8.12-1Update the kernel and reboot. Fixed in 6.8.12-1. A running kernel keeps the old code until the machine restarts.
Debian unstablesidfixed6.8.12-1Update the kernel and reboot. Fixed in 6.8.12-1. A running kernel keeps the old code until the machine restarts.

The vulnerability

What the bug is

When a DLM lockspace is released and there ares still locks in that lockspace, DLM will unlock those locks automatically. Commit fb6791d100d1b started exploiting this behavior to speed up filesystem unmount: gfs2 would simply free glocks it didn't want to unlock and then release the lockspace. This didn't take the bast callbacks for asynchronous lock contention notifications into account, which remain active until until a lock is unlocked or its lockspace is released. To prevent those callbacks from accessing deallocated objects, put the glocks that should not be unlocked on the sd_dead_glocks list, release the lockspace, and only then free those glocks. As an additional measure, ignore unexpected ast and bast callbacks if the receiving glock is dead.

Where it lives

The fix touches these files. If the subsystem is one you do not use, the practical exposure is lower, though the package is still the vulnerable one.

fs/gfs2/glock.c
fs/gfs2/glock.h
fs/gfs2/incore.h
fs/gfs2/lock_dlm.c
fs/gfs2/ops_fstype.c
fs/gfs2/super.c

What this is
GFS2 FILE SYSTEMMAINTAINERS section matched on fs/gfs2/ · gfs2@lists.linux.dev · Supported
Kernel module
gfs2

Check it on the machine

grep -w CONFIG_GFS2_FS /boot/config-$(uname -r)

Reads the booted kernel's own configuration, on the machine and nowhere else. =y is built in, =m is a module, and an is not set line means the code is not there.

lsmod | grep -w gfs2

Prints a line if that module is loaded right now, and nothing if it is not. One that is not loaded can still be loaded later by anything that needs it.

Show whether Debian builds this, per release

Debian builds this, but not on every flavour. At least one release below builds the code on some of its kernel flavours and not on others, so the answer depends on the architecture and flavour installed.

  • bookworm, trixie, forky, sidMnot built on amd64/cloud-amd64, arm64/cloud-arm64
M
a module where it is built at all; some flavours do not build it
Build switch
CONFIG_GFS2_FS

From the configuration Debian publishes for every kernel flavour it builds. It covers only the architectures Debian ships a linux-config package for, and nothing about a kernel you built yourself. Debian's own status above stays authoritative about the source package.MAINTAINERS kbuild Makefiles Debian linux-config packages

Signals

Published
2024-06-19 (2 years ago)source
CVSS
9.8 critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:Hsource recompute it
Attack vector
network (AV:N)source
EPSS
0.68%, higher than 51.3% of all CVEssource
CISA KEV
not listedthe KEV catalogue
Debian urgency
not yet assignedsource
Subsystem
fs/gfs2

Upstream fixes

The versions the CNA records as introducing and fixing this, and the commit for each. source

IntroducedFixed inCommit
3.86.6.330636b34b4458
3.86.8.12e42e8a24d7f0
3.86.9.3501cd8fabf62
3.86.10d98779e68772

Why the CNA scored it this way

Quoted from the kernel CNA's own scoring file, word for word. A highlighted metric carries the most severe value CVSS v3.1 defines for it, which is what pushes the score up. source

AV:NAttack vector, network
The use-after-free is driven by a DLM protocol message from a remote cluster node (`receive_bast`/`receive_request` over the DLM TCP/SCTP interconnect), which dispatches `gdlm_bast()` on the already-freed glock. The DLM interconnect is routable IP, not restricted to a single L2 segment.
AC:LAttack complexity, low
The attacker fully controls the contention side and can hold conflicting locks on many resources continuously so that a bast is guaranteed to land in the unmount window, which is wide (it spans `truncate_inode_pages_final()` and `gfs2_delete_debugfs_file()`); unmounts of clustered GFS2 volumes are routine and repeatable events in pacemaker-managed clusters, so the race is reliably winnable.
PR:NPrivileges required, none
No credentials or privileges on the victim node are needed — the DLM peer's lock request is not authenticated per-user by the target, and an ordinary unprivileged user on any cluster node generates the required contention with plain file access on the shared filesystem.
UI:NUser interaction, none
No victim action is solicited by the attacker; the unmount is a routine cluster/administrative operation and the callback fires automatically from the DLM workqueue.
S:UScope, unchanged
The freed object and the corrupted state are both kernel memory in the same security authority; no VM, IOMMU, or sandbox boundary is crossed.
C:HConfidentiality impact, high
A use-after-free on a `gfs2_glock` slab object allows the freed allocation to be reclaimed by attacker-influenced data and then read/leaked through glock state and the subsequent `dump_glock_func` path, giving arbitrary kernel-memory disclosure potential.
I:HIntegrity impact, high
`gfs2_glock_cb()` writes into the freed object (lockref count, `gl_flags`, `gl_demote_state`) and then queues `&gl->gl_work`, so a reallocated object supplies the `delayed_work` timer/work function pointer — a control-flow hijack and arbitrary-write primitive.
A:HAvailability impact, high
Even unexploited, the UAF corrupts a spinlock and refcount in freed memory and reaches `BUG_ON`/`BUG()` in `gdlm_ast()`, causing kernel oops or panic on the unmounting node.