Skip to content
OpenAdvisories
Critical · 9.8 CVE-2024-50106 EUVD-2024-45142GHSA-5wrv-fw78-wwh3

nfsd: fix race between laundromat and free_stateid

Published Nov 5, 2024 · Updated Aug 5, 2026 · Assigned by Linux

Vendor: Linux Product: Linux Package: linux Package: linux Package: linux-allwinner-5.19 Package: linux-aws Package: linux-aws-5.0 Package: linux-aws-5.11 Package: linux-aws-5.13 Package: linux-aws-5.15 Package: linux-aws-5.19 Package: linux-aws-5.3 Package: linux-aws-5.4 Package: linux-aws-5.8 Package: linux-aws-6.2 Package: linux-aws-6.5 Package: linux-aws-6.8 Package: linux-aws-fips Package: linux-aws-hwe Package: linux-azure Package: linux-azure-4.15 Package: linux-azure-5.11 Package: linux-azure-5.13 Package: linux-azure-5.15 Package: linux-azure-5.19 Package: linux-azure-5.3 Package: linux-azure-5.4 Package: linux-azure-5.8 Package: linux-azure-6.11 Package: linux-azure-6.2 Package: linux-azure-6.5 Package: linux-azure-6.8 Package: linux-azure-edge Package: linux-azure-fde Package: linux-azure-fde-5.15 Package: linux-azure-fde-5.19 Package: linux-azure-fde-6.2 Package: linux-azure-fde-6.8 Package: linux-azure-fips Package: linux-azure-nvidia Package: linux-bluefield Package: linux-fips Package: linux-gcp Package: linux-gcp-4.15 Package: linux-gcp-5.11 Package: linux-gcp-5.13 Package: linux-gcp-5.15 Package: linux-gcp-5.19 Package: linux-gcp-5.3 Package: linux-gcp-5.4 Package: linux-gcp-5.8 Package: linux-gcp-6.11 Package: linux-gcp-6.2 Package: linux-gcp-6.5 Package: linux-gcp-6.8 Package: linux-gcp-fips Package: linux-gke Package: linux-gke-4.15 Package: linux-gke-5.15 Package: linux-gke-5.4 Package: linux-gkeop Package: linux-gkeop-5.15 Package: linux-gkeop-5.4 Package: linux-hwe Package: linux-hwe-5.11 Package: linux-hwe-5.13 Package: linux-hwe-5.15 Package: linux-hwe-5.19 Package: linux-hwe-5.4 Package: linux-hwe-5.8 Package: linux-hwe-6.2 Package: linux-hwe-6.5 Package: linux-hwe-6.8 Package: linux-hwe-edge Package: linux-ibm Package: linux-ibm-5.15 Package: linux-ibm-5.4 Package: linux-ibm-6.8 Package: linux-intel Package: linux-intel-5.13 Package: linux-intel-iot-realtime Package: linux-intel-iotg Package: linux-intel-iotg-5.15 Package: linux-iot Package: linux-kvm Package: linux-lowlatency Package: linux-lowlatency-hwe-5.15 Package: linux-lowlatency-hwe-5.19 Package: linux-lowlatency-hwe-6.2 Package: linux-lowlatency-hwe-6.5 Package: linux-lowlatency-hwe-6.8 Package: linux-lts-xenial Package: linux-nvidia Package: linux-nvidia-6.11 Package: linux-nvidia-6.2 Package: linux-nvidia-6.5 Package: linux-nvidia-6.8 Package: linux-nvidia-lowlatency Package: linux-nvidia-tegra Package: linux-nvidia-tegra-5.15 Package: linux-nvidia-tegra-igx Package: linux-oem Package: linux-oem-5.10 Package: linux-oem-5.13 Package: linux-oem-5.14 Package: linux-oem-5.17 Package: linux-oem-5.6 Package: linux-oem-6.0 Package: linux-oem-6.1 Package: linux-oem-6.11 Package: linux-oem-6.5 Package: linux-oem-6.8 Package: linux-oracle Package: linux-oracle-5.0 Package: linux-oracle-5.11 Package: linux-oracle-5.13 Package: linux-oracle-5.15 Package: linux-oracle-5.3 Package: linux-oracle-5.4 Package: linux-oracle-5.8 Package: linux-oracle-6.5 Package: linux-oracle-6.8 Package: linux-raspi Package: linux-raspi-5.4 Package: linux-raspi-realtime Package: linux-raspi2 Package: linux-realtime Package: linux-realtime-6.8 Package: linux-riscv Package: linux-riscv-5.11 Package: linux-riscv-5.15 Package: linux-riscv-5.19 Package: linux-riscv-5.8 Package: linux-riscv-6.5 Package: linux-riscv-6.8 Package: linux-starfive-5.19 Package: linux-starfive-6.2 Package: linux-starfive-6.5 Package: linux-vmware Package: linux-xilinx Package: linux-xilinx-zynqmp Platform: Linux Ecosystem: Debian Ecosystem: Ubuntu

Description

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

nfsd: fix race between laundromat and free_stateid

There is a race between laundromat handling of revoked delegations
and a client sending free_stateid operation. Laundromat thread
finds that delegation has expired and needs to be revoked so it
marks the delegation stid revoked and it puts it on a reaper list
but then it unlock the state lock and the actual delegation revocation
happens without the lock. Once the stid is marked revoked a racing
free_stateid processing thread does the following (1) it calls
list_del_init() which removes it from the reaper list and (2) frees
the delegation stid structure. The laundromat thread ends up not
calling the revoke_delegation() function for this particular delegation
but that means it will no release the lock lease that exists on
the file.

Now, a new open for this file comes in and ends up finding that
lease list isn't empty and calls nfsd_breaker_owns_lease() which ends
up trying to derefence a freed delegation stateid. Leading to the
followint use-after-free KASAN warning:

kernel: ==================================================================
kernel: BUG: KASAN: slab-use-after-free in nfsd_breaker_owns_lease+0x140/0x160 [nfsd]
kernel: Read of size 8 at addr ffff0000e73cd0c8 by task nfsd/6205
kernel:
kernel: CPU: 2 UID: 0 PID: 6205 Comm: nfsd Kdump: loaded Not tainted 6.11.0-rc7+ #9
kernel: Hardware name: Apple Inc. Apple Virtualization Generic Platform, BIOS 2069.0.0.0.0 08/03/2024
kernel: Call trace:
kernel: dump_backtrace+0x98/0x120
kernel: show_stack+0x1c/0x30
kernel: dump_stack_lvl+0x80/0xe8
kernel: print_address_description.constprop.0+0x84/0x390
kernel: print_report+0xa4/0x268
kernel: kasan_report+0xb4/0xf8
kernel: __asan_report_load8_noabort+0x1c/0x28
kernel: nfsd_breaker_owns_lease+0x140/0x160 [nfsd]
kernel: nfsd_file_do_acquire+0xb3c/0x11d0 [nfsd]
kernel: nfsd_file_acquire_opened+0x84/0x110 [nfsd]
kernel: nfs4_get_vfs_file+0x634/0x958 [nfsd]
kernel: nfsd4_process_open2+0xa40/0x1a40 [nfsd]
kernel: nfsd4_open+0xa08/0xe80 [nfsd]
kernel: nfsd4_proc_compound+0xb8c/0x2130 [nfsd]
kernel: nfsd_dispatch+0x22c/0x718 [nfsd]
kernel: svc_process_common+0x8e8/0x1960 [sunrpc]
kernel: svc_process+0x3d4/0x7e0 [sunrpc]
kernel: svc_handle_xprt+0x828/0xe10 [sunrpc]
kernel: svc_recv+0x2cc/0x6a8 [sunrpc]
kernel: nfsd+0x270/0x400 [nfsd]
kernel: kthread+0x288/0x310
kernel: ret_from_fork+0x10/0x20

This patch proposes a fixed that's based on adding 2 new additional
stid's sc_status values that help coordinate between the laundromat
and other operations (nfsd4_free_stateid() and nfsd4_delegreturn()).

First to make sure, that once the stid is marked revoked, it is not
removed by the nfsd4_free_stateid(), the laundromat take a reference
on the stateid. Then, coordinating whether the stid has been put
on the cl_revoked list or we are processing FREE_STATEID and need to
make sure to remove it from the list, each check that state and act
accordingly. If laundromat has added to the cl_revoke list before
the arrival of FREE_STATEID, then nfsd4_free_stateid() knows to remove
it from the list. If nfsd4_free_stateid() finds that operations arrived
before laundromat has placed it on cl_revoke list, it marks the state
freed and then laundromat will no longer add it to the list.

Also, for nfsd4_delegreturn() when looking for the specified stid,
we need to access stid that are marked removed or freeable, it means
the laundromat has started processing it but hasn't finished and this
delegreturn needs to return nfserr_deleg_revoked and not
nfserr_bad_stateid. The latter will not trigger a FREE_STATEID and the
lack of it will leave this stid on the cl_revoked list indefinitely.

Affected products

VendorProductAffectedFixed
Linux Linux 6.9 6.11.6

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 14 linux 6.11.6-1 —
Debian 13 linux 6.11.6-1 —
ReleasePackageFixed inAdvisory
Ubuntu Nvidia-BlueField 24.04 LTS linux-bluefield No fix yet —
Ubuntu Nvidia-BlueField 22.04 LTS linux-bluefield No fix yet —
Ubuntu 24.04 LTS linux +20 No fix yet —
Ubuntu 24.04 LTS linux-azure-6.11 6.11.0-1012.12~24.04.1 —
Ubuntu 24.04 LTS linux-gcp-6.11 6.11.0-1011.11~24.04.1 —
Ubuntu 24.04 LTS linux-nvidia-6.11 6.11.0-1007.7 —
Ubuntu 24.04 LTS linux-nvidia-tegra 6.8.0-1035.38 USN-8781-1
Ubuntu 24.04 LTS linux-oem-6.11 6.11.0-1015.15 USN-7310-1
Ubuntu 22.04 LTS linux +59 No fix yet —
Ubuntu 20.04 LTS linux-gke +28 No fix yet —
Show 17 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Ubuntu 18.04 LTS linux-gcp +14 No fix yet —
Ubuntu 16.04 LTS linux-hwe-edge No fix yet —
Ubuntu Pro Realtime 24.04 LTS linux-realtime +1 No fix yet —
Ubuntu Pro Realtime 22.04 LTS linux-realtime +2 No fix yet —
Ubuntu Pro FIPS 20.04 LTS linux-fips +3 No fix yet —
Ubuntu Pro FIPS 18.04 LTS linux-fips +3 No fix yet —
Ubuntu Pro FIPS 16.04 LTS linux-fips No fix yet —
Ubuntu Pro FIPS-updates 24.04 LTS linux-fips +3 No fix yet —
Ubuntu Pro FIPS-updates 22.04 LTS linux-fips +3 No fix yet —
Ubuntu Pro FIPS-updates 20.04 LTS linux-fips +3 No fix yet —
Ubuntu Pro FIPS-updates 18.04 LTS linux-fips +3 No fix yet —
Ubuntu Pro FIPS-updates 16.04 LTS linux-fips No fix yet —
Ubuntu Pro FIPS-preview 22.04 LTS linux-fips +3 No fix yet —
Ubuntu Pro 20.04 LTS linux +21 No fix yet —
Ubuntu Pro 18.04 LTS linux +12 No fix yet —
Ubuntu Pro 16.04 LTS linux +7 No fix yet —
Ubuntu Pro 14.04 LTS linux-aws +2 No fix yet —
ReleasePackageFixed inAdvisory
RHEL 9 rv +77 5.14.0-570.12.1.el9_6 RHSA-2025:6966
ReleasePackageFixed inAdvisory
SLES 15 SP7 kernel-64kb +6 6.4.0-150700.53.3.1 SUSE-SU-2025:02307-1, SUSE-SU-2025:01951-1
SLES 15 SP7 kernel-azure +2 6.4.0-150700.20.3.1 SUSE-SU-2025:02254-1, SUSE-SU-2025:01967-1
SLES 15 SP7 kernel-default-base 6.4.0-150700.53.3.1.150700.17.2.1 SUSE-SU-2025:02307-1, SUSE-SU-2025:01951-1
SLES 15 SP6 kernel-64kb +6 6.4.0-150600.23.38.1 SUSE-SU-2025:0499-1, SUSE-SU-2025:02538-1, SUSE-SU-2025:02000-1
SLES 15 SP6 kernel-azure +2 6.4.0-150600.8.26.1 SUSE-SU-2025:0428-1, SUSE-SU-2025:02249-1, SUSE-SU-2025:01965-1
SLES 15 SP6 kernel-coco +3 6.4.0-15061.12.coco15sp6.1 SUSE-SU-2025:02923-1, SUSE-SU-2025:0289-1, SUSE-SU-2025:01919-1
SLES 15 SP6 kernel-default-base 6.4.0-150600.23.38.1.150600.12.16.2 SUSE-SU-2025:0499-1, SUSE-SU-2025:02538-1, SUSE-SU-2025:02000-1
SLES 12 SP5 kernel-syms +2 4.12.14-122.261.1 SUSE-SU-2025:01983-1
Show 7 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
SLE Micro 6.1 kernel-default-base 6.4.0-24.1.21.4 SUSE-SU-2025:20419-1, SUSE-SU-2025:20248-1
SLE Micro 6.1 kernel-livepatch-MICRO-6-0-RT_Update_5 1-1.1 SUSE-SU-2025:20249-1
SLE Micro 6.1 kernel-livepatch-MICRO-6-0_Update_5 1-1.2 SUSE-SU-2025:20248-1
SLE Micro 6.1 kernel-rt +4 6.4.0-25.1 SUSE-SU-2025:20421-1, SUSE-SU-2025:20419-1, SUSE-SU-2025:20249-1
SLE Micro 6.0 kernel-default-base 6.4.0-24.1.21.4 SUSE-SU-2025:20408-1, SUSE-SU-2025:20165-1
SLE Micro 6.0 kernel-livepatch-MICRO-6-0-RT_Update_5 1-1.1 SUSE-SU-2025:20166-1
SLE Micro 6.0 kernel-livepatch-MICRO-6-0_Update_5 1-1.2 SUSE-SU-2025:20165-1
SLE Micro 6.0 kernel-rt +4 6.4.0-25.1 SUSE-SU-2025:20413-1, SUSE-SU-2025:20408-1, SUSE-SU-2025:20166-1
SLE Live Patching 15 SP7 kernel-default 6.4.0-150700.53.3.1 SUSE-SU-2025:02307-1, SUSE-SU-2025:01951-1
SLE Live Patching 15 SP7 kernel-livepatch-SLE15-SP7-RT_Update_1 1-150700.1.3.1 SUSE-SU-2025:01972-1
SLE Live Patching 15 SP7 kernel-livepatch-SLE15-SP7-RT_Update_2 1-150700.1.5.1 SUSE-SU-2025:02333-1
SLE Live Patching 15 SP7 kernel-livepatch-SLE15-SP7_Update_1 +1 1-150700.15.3.1 SUSE-SU-2025:02307-1, SUSE-SU-2025:01951-1
SLE Live Patching 15 SP6 kernel-default 6.4.0-150600.23.38.1 SUSE-SU-2025:0499-1, SUSE-SU-2025:02538-1, SUSE-SU-2025:02000-1
SLE Live Patching 15 SP6 kernel-livepatch-SLE15-SP6-RT_Update_11 1-150600.1.3.2 SUSE-SU-2025:01964-1
SLE Live Patching 15 SP6 kernel-livepatch-SLE15-SP6-RT_Update_13 1-150600.1.5.1 SUSE-SU-2025:02335-1
SLE Live Patching 15 SP6 kernel-livepatch-SLE15-SP6-RT_Update_8 1-150600.1.3.1 SUSE-SU-2025:0557-1
SLE Live Patching 15 SP6 kernel-livepatch-SLE15-SP6_Update_12 1-150600.13.3.1 SUSE-SU-2025:02000-1
SLE Live Patching 15 SP6 kernel-livepatch-SLE15-SP6_Update_13 1-150600.13.6.4 SUSE-SU-2025:02538-1
SLE Live Patching 15 SP6 kernel-livepatch-SLE15-SP6_Update_8 1-150600.13.3.2 SUSE-SU-2025:0499-1
SLE Live Patching 12 SP5 kernel-default 4.12.14-122.261.1 SUSE-SU-2025:01983-1
SLE Live Patching 12 SP5 kgraft-patch-SLE12-SP5_Update_69 1-8.3.1 SUSE-SU-2025:01983-1
SUSE Real Time Module 15 SP7 kernel-rt +3 6.4.0-150700.7.3.1 SUSE-SU-2025:02333-1, SUSE-SU-2025:01972-1
SUSE Real Time Module 15 SP6 kernel-rt +3 6.4.0-150600.10.26.1 SUSE-SU-2025:0557-1, SUSE-SU-2025:02335-1, SUSE-SU-2025:01964-1
ReleasePackageFixed inAdvisory
openSUSE Tumbleweed kernel-source 6.11.8-1.1 openSUSE-SU-2024:14500-1
openSUSE Tumbleweed kernel-source-longterm 6.12.11-1.1 openSUSE-SU-2025:14705-1
openSUSE Leap 15.6 dtb-aarch64 +10 6.4.0-150600.23.38.1 SUSE-SU-2025:0499-1, SUSE-SU-2025:02538-1, SUSE-SU-2025:02000-1
openSUSE Leap 15.6 kernel-azure +2 6.4.0-150600.8.26.1 SUSE-SU-2025:0428-1, SUSE-SU-2025:02249-1, SUSE-SU-2025:01965-1
openSUSE Leap 15.6 kernel-default-base 6.4.0-150600.23.38.1.150600.12.16.2 SUSE-SU-2025:0499-1, SUSE-SU-2025:02538-1, SUSE-SU-2025:02000-1
openSUSE Leap 15.6 kernel-rt +3 6.4.0-150600.10.26.1 SUSE-SU-2025:0557-1, SUSE-SU-2025:02335-1, SUSE-SU-2025:01964-1

Oracle Linux

ReleasePackageFixed inAdvisory
Oracle Linux 9 bpftool 7.5.0-802.el9_6 ELSA-2025-6966
Oracle Linux 9 rv +28 5.14.0-570.12.1.0.1.el9_6 ELSA-2025-6966

Advisories 35

References