cve.bz

CVE-2024-26629 linux linux kernel: Improper Locking

5.5 mediumEPSS 0.2%Fix available

Medium (5.5) in linux linux kernel. EPSS 0.2% estimated probability of exploitation activity in the next 30 days.

On this page
In the Linux kernel, the following vulnerability has been resolved: nfsd: fix RELEASE_LOCKOWNER The test on so_count in nfsd4_release_lockowner() is nonsense and harmful. Revert to using check_for_locks(), changing that to not sleep. First: harmful. As is documented in the kdoc comment for nfsd4_release_lockowner(), the test on so_count can transiently return a false positive resulting in a return of NFS4ERR_LOCKS_HELD when in fact no locks are held. This is clearly a protocol violation and with the Linux NFS client it can cause incorrect behaviour. If RELEASE_LOCKOWNER is sent while some other thread is still processing a LOCK request which failed because, at the time that request was received, the given owner held a conflicting lock, then the nfsd thread processing that LOCK request can hold a reference (conflock) to the lock owner that causes nfsd4_release_lockowner() to return an incorrect error. The Linux NFS client ignores that NFS4ERR_LOCKS_HELD error because it never sends NFS4_RELEASE_LOCKOWNER without first releasing any locks, so it knows that the error is impossible. It assumes the lock owner was in fact released so it feels free to use the same lock owner identifier in some later locking request. When it does reuse a lock owner identifier for which a previous RELEASE failed, it will naturally use a lock_seqid of zero. However the server, which didn't release the lock owner, will expect a larger lock_seqid and so will respond with NFS4ERR_BAD_SEQID. So clearly it is harmful to allow a false positive, which testing so_count allows. The test is nonsense because ... well... it doesn't mean anything. so_count is the sum of three different counts. 1/ the set of states listed on so_stateids 2/ the set of active vfs locks owned by any of those states 3/ various transient counts such as for conflicting locks. When it is tested against '2' it is clear that one of these is the transient reference obtained by find_lockowner_str_locked(). It is not clear what the other one is expected to be. In practice, the count is often 2 because there is precisely one state on so_stateids. If there were more, this would fail. In my testing I see two circumstances when RELEASE_LOCKOWNER is called. In one case, CLOSE is called before RELEASE_LOCKOWNER. That results in all the lock states being removed, and so the lockowner being discarded (it is removed when there are no more references which usually happens when the lock state is discarded). When nfsd4_release_lockowner() finds that the lock owner doesn't exist, it returns success. The other case shows an so_count of '2' and precisely one state listed in so_stateid. It appears that the Linux client uses a separate lock owner for each file resulting in one lock state per lock owner, so this test on '2' is safe. For another client it might not be safe. So this patch changes check_for_locks() to use the (newish) find_any_file_locked() so that it doesn't take a reference on the nfs4_file and so never calls nfsd_file_put(), and so never sleeps. With this check is it safe to restore the use of check_for_locks() rather than testing so_count against the mysterious '2'.

Severity

CVSS 3.1

5.5 medium
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
EPSS
0.2% (unchanged from 0.2% a week ago; 0.2% 30 days ago) estimated probability of exploitation activity in the next 30 days; 9th percentile. Scored 2026-11-15. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: none · Automatable: no · Technical impact: partial, assessed 2024-06-21. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWE
CWE-667 Improper Locking
Published
Modified
NVD analysis
Analyzed, since modified
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2024-26629 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2024-26629?via=ask-ai-copy and https://cve.bz/cve/CVE-2024-26629?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2024-26629 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Badge for a README or a site

CVE-2024-26629

An image that stays current: it is drawn from the data each time it is fetched (a host that proxies images, as GitHub does, may show its copy for a while). Markdown:

[![CVE-2024-26629](https://cve.bz/cve/badge/CVE-2024-26629.svg)](https://cve.bz/cve/CVE-2024-26629)

HTML:

<a href="https://cve.bz/cve/CVE-2024-26629"><img src="https://cve.bz/cve/badge/CVE-2024-26629.svg" alt="CVE-2024-26629"></a>

Affected

Versions

From the CNA's record in the CVE List.

ProductAffected
Linuxfrom 4.19.246 before 4.19.306
Linuxfrom 5.10.120 before 5.10.220
Linuxfrom 5.15.45 before 5.15.154
Linuxfrom 4.9.317 before 4.10
Linuxfrom 4.14.282 before 4.15
Linuxfrom 5.4.197 before 5.5
Linuxfrom 5.17.13 before 5.18
Linuxfrom 5.18.2 before 5.19
Linux5.19 and later

Fixed in

ProductRelease lineFixed in
Linux4.194.19.306
Linux5.105.10.220
Linux5.155.15.154
Linux6.16.1.79
Linux6.66.6.15
Linux6.76.7.3
Linuxlater releases6.8

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian11linux5.10.221-1DSA-5730-1
Debian12linux6.1.82-1DEBIAN-CVE-2024-26629
Debian13, 14linux6.6.15-1DEBIAN-CVE-2024-26629
Ubuntu16.04:LTSlinux-hwe-edgeno fix listedUBUNTU-CVE-2024-26629
Ubuntu18.04:LTSlinux-gcp, linux-hwe, linux-oem and 11 moreno fix listedUBUNTU-CVE-2024-26629
Ubuntu20.04:LTSlinux-aws-5.155.15.0-1065.71~20.04.1UBUNTU-CVE-2024-26629 USN-6898-4
Ubuntu20.04:LTSlinux-azure-5.155.15.0-1068.77~20.04.1UBUNTU-CVE-2024-26629 USN-6917-1
Ubuntu20.04:LTSlinux-azure-fde-5.155.15.0-1068.77~20.04.1.1USN-6917-1
Ubuntu20.04:LTSlinux-gcp-5.155.15.0-1065.73~20.04.1UBUNTU-CVE-2024-26629 USN-6927-1
Ubuntu20.04:LTSlinux-gke, linux-gkeop, linux-riscv and 25 moreno fix listedUBUNTU-CVE-2024-26629
Ubuntu20.04:LTSlinux-gkeop-5.155.15.0-1048.55~20.04.1UBUNTU-CVE-2024-26629 USN-6898-1
Ubuntu20.04:LTSlinux-hwe-5.15, linux-lowlatency-hwe-5.155.15.0-116.126~20.04.1UBUNTU-CVE-2024-26629 USN-6898-2 USN-6898-3
Ubuntu20.04:LTSlinux-ibm-5.155.15.0-1058.61~20.04.1UBUNTU-CVE-2024-26629 USN-6898-2
Ubuntu20.04:LTSlinux-intel-iotg-5.155.15.0-1060.66~20.04.1UBUNTU-CVE-2024-26629 USN-6898-1
Ubuntu20.04:LTSlinux-nvidia-tegra-5.155.15.0-1027.27~20.04.1UBUNTU-CVE-2024-26629
40 more for Ubuntu in the JSON and on Ubuntu's page.
Red Hatenterprise_linux:9::appstreamrv, perf, rtla and 26 more0:5.14.0-427.35.1.el9_4RHSA-2024:6567
Red Hatenterprise_linux:9::appstream, enterprise_linux:9::crb, enterprise_linux:9::nfv and 1 morebpftool-debuginfo0:7.3.0-427.35.1.el9_4RHSA-2024:6567
Red Hatenterprise_linux:9::baseosbpftool, bpftool-debuginfo0:7.3.0-427.35.1.el9_4RHSA-2024:6567
Red Hatenterprise_linux:9::baseoskernel, kernel-64k, kernel-core and 43 more0:5.14.0-427.35.1.el9_4RHSA-2024:6567
Red Hatenterprise_linux:9::crblibperf, perf-debuginfo, kernel-debuginfo and 14 more0:5.14.0-427.35.1.el9_4RHSA-2024:6567
Red Hatenterprise_linux:9::nfvkernel-rt, kernel-rt-kvm, kernel-rt-core and 20 more0:5.14.0-427.35.1.el9_4RHSA-2024:6567
Red Hatenterprise_linux:9::realtimekernel-rt, kernel-rt-core, perf-debuginfo and 18 more0:5.14.0-427.35.1.el9_4RHSA-2024:6567
SUSELinux Enterprise High Availability Extension 15 SP5, Linux Enterprise Live Patching 15 SP5, Linux Enterprise Micro 5.5 and 2 morekernel-default5.14.21-150500.55.59.1SUSE-SU-2024:1480-1
SUSELinux Enterprise Live Patching 15 SP5kernel-livepatch-SLE15-SP5-RT_Update_131-150500.11.3.1SUSE-SU-2024:1466-1
SUSELinux Enterprise Live Patching 15 SP5kernel-livepatch-SLE15-SP5_Update_121-150500.11.7.1SUSE-SU-2024:1480-1
SUSELinux Enterprise Micro 5.5kernel-rt, kernel-source-rt5.14.21-150500.13.47.1SUSE-SU-2024:1466-1
SUSELinux Enterprise Micro 5.5, Linux Enterprise Module for Basesystem 15 SP5kernel-default-base5.14.21-150500.55.59.1.150500.6.25.7SUSE-SU-2024:1480-1
SUSELinux Enterprise Module for Basesystem 15 SP5kernel-64kb, kernel-source, kernel-default and 1 more5.14.21-150500.55.59.1SUSE-SU-2024:1480-1
SUSELinux Enterprise Module for Development Tools 15 SP5kernel-docs, kernel-syms, kernel-source and 1 more5.14.21-150500.55.59.1SUSE-SU-2024:1480-1
SUSELinux Enterprise Module for Public Cloud 15 SP5kernel-azure, kernel-syms-azure, kernel-source-azure5.14.21-150500.33.48.1SUSE-SU-2024:1490-1
SUSEReal Time Module 15 SP5kernel-rt, kernel-syms-rt, kernel-rt_debug and 1 more5.14.21-150500.13.47.1SUSE-SU-2024:1466-1
openSUSELeap 15.5dtb-aarch64, kernel-64kb, kernel-docs and 8 more5.14.21-150500.55.59.1SUSE-SU-2024:1480-1
openSUSELeap 15.5kernel-azure, kernel-syms-azure, kernel-source-azure5.14.21-150500.33.48.1SUSE-SU-2024:1490-1
openSUSELeap 15.5kernel-default-base5.14.21-150500.55.59.1.150500.6.25.7SUSE-SU-2024:1480-1
openSUSELeap 15.5kernel-rt, kernel-syms-rt, kernel-rt_debug and 1 more5.14.21-150500.13.47.1SUSE-SU-2024:1466-1
AlmaLinux9bpftool7.3.0-427.35.1.el9_4ALSA-2024:6567
AlmaLinux9rv, perf, rtla and 58 more5.14.0-427.35.1.el9_4ALSA-2024:6567
Rocky Linux9kernel0:5.14.0-427.35.1.el9_4RLSA-2024:6567
Rocky Linux9kernel0:5.14.0-427.35.1.el9_4.cloud.1.0RXSA-2024:6567
Alpaquita23linux-lts6.1.81-r0BELL-CVE-2024-26629
Alpaquita25, streamlinux-lts6.12.41-r0BELL-CVE-2024-26629

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; Red Hat Security Data © Red Hat, Inc., CC BY 4.0; SUSE security data, CC BY 4.0; AlmaLinux's OSV database, MIT; Rocky Linux's errata, BSD-3-Clause; BellSoft's OSV database, MIT. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu · Red Hat · SUSE · openSUSE · Alpaquita.

Red Hat

Red Hat rates this Moderate.

ProductPackageStateAdvisory
Red Hat Enterprise Linux 9kernel-0:5.14.0-427.35.1.el9_4Fixed 2024-09-11RHSA-2024:6567
Red Hat Enterprise Linux 6kernelNot affected
Red Hat Enterprise Linux 7kernelNot affected
Red Hat Enterprise Linux 7kernel-rtNot affected
Red Hat Enterprise Linux 8kernelNot affected
Red Hat Enterprise Linux 8kernel-rtNot affected
Red Hat Enterprise Linux 9kernel-rtWill not fix

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2024-26629.

ICS advisories (CISA)

AdvisoryTitlePublishedSectorsAffectedFixed
ICSA-24-102-01Siemens SIMATIC S7-1500 TM MFP2024-04-09Critical ManufacturingSIMATIC S7-1500 TM MFP - GNU/Linux subsystemnone listed

From CISA's ICS advisories (CSAF), provided under CISA's notification. Only the facts are shown; each advisory is on CISA's page. Credits.

Attack patterns (CAPEC)

  • CAPEC-25 Forced Deadlock Likelihood: Low · Severity: High
  • CAPEC-26 Leveraging Race Conditions Likelihood: High · Severity: High
  • CAPEC-27 Leveraging Race Conditions via Symbolic Links Likelihood: Medium · Severity: High

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits.

References

Check your stackJSON