cve.bz

CVE-2024-35870 linux linux kernel: Use After Free

9.8 criticalEPSS 0.6%Fix available

Critical (9.8) in linux linux kernel. EPSS 0.6% estimated probability of exploitation activity in the next 30 days.

On this page
In the Linux kernel, the following vulnerability has been resolved: smb: client: fix UAF in smb2_reconnect_server() The UAF bug is due to smb2_reconnect_server() accessing a session that is already being teared down by another thread that is executing __cifs_put_smb_ses(). This can happen when (a) the client has connection to the server but no session or (b) another thread ends up setting @ses->ses_status again to something different than SES_EXITING. To fix this, we need to make sure to unconditionally set @ses->ses_status to SES_EXITING and prevent any other threads from setting a new status while we're still tearing it down. The following can be reproduced by adding some delay to right after the ipc is freed in __cifs_put_smb_ses() - which will give smb2_reconnect_server() worker a chance to run and then accessing @ses->ipc: kinit ... mount.cifs //srv/share /mnt/1 -o sec=krb5,nohandlecache,echo_interval=10 [disconnect srv] ls /mnt/1 &>/dev/null sleep 30 kdestroy [reconnect srv] sleep 10 umount /mnt/1 ... CIFS: VFS: Verify user has a krb5 ticket and keyutils is installed CIFS: VFS: \\srv Send error in SessSetup = -126 CIFS: VFS: Verify user has a krb5 ticket and keyutils is installed CIFS: VFS: \\srv Send error in SessSetup = -126 general protection fault, probably for non-canonical address 0x6b6b6b6b6b6b6b6b: 0000 [#1] PREEMPT SMP NOPTI CPU: 3 PID: 50 Comm: kworker/3:1 Not tainted 6.9.0-rc2 #1 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-1.fc39 04/01/2014 Workqueue: cifsiod smb2_reconnect_server [cifs] RIP: 0010:__list_del_entry_valid_or_report+0x33/0xf0 Code: 4f 08 48 85 d2 74 42 48 85 c9 74 59 48 b8 00 01 00 00 00 00 ad de 48 39 c2 74 61 48 b8 22 01 00 00 00 00 74 69 <48> 8b 01 48 39 f8 75 7b 48 8b 72 08 48 39 c6 0f 85 88 00 00 00 b8 RSP: 0018:ffffc900001bfd70 EFLAGS: 00010a83 RAX: dead000000000122 RBX: ffff88810da53838 RCX: 6b6b6b6b6b6b6b6b RDX: 6b6b6b6b6b6b6b6b RSI: ffffffffc02f6878 RDI: ffff88810da53800 RBP: ffff88810da53800 R08: 0000000000000001 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000001 R12: ffff88810c064000 R13: 0000000000000001 R14: ffff88810c064000 R15: ffff8881039cc000 FS: 0000000000000000(0000) GS:ffff888157c00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007fe3728b1000 CR3: 000000010caa4000 CR4: 0000000000750ef0 PKRU: 55555554 Call Trace: <TASK> ? die_addr+0x36/0x90 ? exc_general_protection+0x1c1/0x3f0 ? asm_exc_general_protection+0x26/0x30 ? __list_del_entry_valid_or_report+0x33/0xf0 __cifs_put_smb_ses+0x1ae/0x500 [cifs] smb2_reconnect_server+0x4ed/0x710 [cifs] process_one_work+0x205/0x6b0 worker_thread+0x191/0x360 ? __pfx_worker_thread+0x10/0x10 kthread+0xe2/0x110 ? __pfx_kthread+0x10/0x10 ret_from_fork+0x34/0x50 ? __pfx_kthread+0x10/0x10 ret_from_fork_asm+0x1a/0x30 </TASK>

Severity

CVSS 3.1

9.8 critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
EPSS
0.6% (unchanged from 0.6% a week ago; 0.6% 30 days ago) estimated probability of exploitation activity in the next 30 days; 51st percentile. Scored 2026-11-22. 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-17. 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-416 Use After Free
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-35870 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2024-35870?via=ask-ai-copy and https://cve.bz/cve/CVE-2024-35870?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-35870 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.

Affected

Versions

From the CNA's record in the CVE List.

ProductAffected
Linux4.16 and later

Fixed in

ProductRelease lineFixed in
Linux6.16.1.121
Linux6.66.6.29
Linux6.86.8.5
Linuxlater releases6.9

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian11linux-6.16.1.128-1~deb11u1DLA-4076-1
Debian12linux6.1.123-1DEBIAN-CVE-2024-35870
Debian13, 14linux6.8.9-1DEBIAN-CVE-2024-35870
Ubuntu16.04:LTSlinux-hwe-edgeno fix listedUBUNTU-CVE-2024-35870
Ubuntu18.04:LTSlinux-gcp, linux-hwe, linux-oem and 12 moreno fix listedUBUNTU-CVE-2024-35870
Ubuntu20.04:LTSlinux-gke, linux-gkeop, linux-riscv and 26 moreno fix listedUBUNTU-CVE-2024-35870
Ubuntu22.04:LTSlinux, linux-aws, linux-gcp and 47 moreno fix listedUBUNTU-CVE-2024-35870
Ubuntu22.04:LTSlinux-aws-6.86.8.0-1011.12~22.04.1UBUNTU-CVE-2024-35870
Ubuntu22.04:LTSlinux-azure-6.86.8.0-1010.10~22.04.1UBUNTU-CVE-2024-35870
Ubuntu22.04:LTSlinux-nvidia-6.86.8.0-1009.9~22.04.1UBUNTU-CVE-2024-35870
Ubuntu22.04:LTSlinux-oracle-6.86.8.0-1008.8~22.04.1UBUNTU-CVE-2024-35870
Ubuntu24.04:LTSlinux6.8.0-38.38UBUNTU-CVE-2024-35870 USN-6893-1
Ubuntu24.04:LTSlinux-aws6.8.0-1011.12UBUNTU-CVE-2024-35870 USN-6893-3
Ubuntu24.04:LTSlinux-azure6.8.0-1010.10UBUNTU-CVE-2024-35870 USN-6893-1
Ubuntu24.04:LTSlinux-gcp6.8.0-1010.11UBUNTU-CVE-2024-35870 USN-6893-1
15 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.24.1.el9_4RHSA-2024:4349
Red Hatenterprise_linux:9::appstream, enterprise_linux:9::crb, enterprise_linux:9::nfv and 1 morebpftool-debuginfo0:7.3.0-427.24.1.el9_4RHSA-2024:4349
Red Hatenterprise_linux:9::baseosbpftool, bpftool-debuginfo0:7.3.0-427.24.1.el9_4RHSA-2024:4349
Red Hatenterprise_linux:9::baseoskernel, kernel-64k, kernel-core and 43 more0:5.14.0-427.24.1.el9_4RHSA-2024:4349
Red Hatenterprise_linux:9::crblibperf, perf-debuginfo, kernel-debuginfo and 14 more0:5.14.0-427.24.1.el9_4RHSA-2024:4349
Red Hatenterprise_linux:9::nfvkernel-rt, kernel-rt-kvm, kernel-rt-core and 20 more0:5.14.0-427.24.1.el9_4RHSA-2024:4349
Red Hatenterprise_linux:9::realtimekernel-rt, kernel-rt-core, perf-debuginfo and 18 more0:5.14.0-427.24.1.el9_4RHSA-2024:4349
Red Hatrhel_eus:9.2::appstreamperf, rtla, kernel-doc and 22 more0:5.14.0-284.71.1.el9_2RHSA-2024:4108
Red Hatrhel_eus:9.2::appstream, rhel_eus:9.2::crbbpftool-debuginfo0:7.0.0-284.71.1.el9_2RHSA-2024:4108
Red Hatrhel_eus:9.2::baseosbpftool, bpftool-debuginfo0:7.0.0-284.71.1.el9_2RHSA-2024:4108
Red Hatrhel_eus:9.2::baseoskernel, kernel-64k, kernel-core and 40 more0:5.14.0-284.71.1.el9_2RHSA-2024:4108
Red Hatrhel_eus:9.2::crbperf-debuginfo, kernel-debuginfo, kernel-64k-debuginfo and 10 more0:5.14.0-284.71.1.el9_2RHSA-2024:4108
2 more for Red Hat in the JSON and on Red Hat's page.
SUSELinux Enterprise High Availability Extension 12 SP5, Linux Enterprise Live Patching 12 SP5, Linux Enterprise Workstation Extension 12 SP5kernel-default4.12.14-122.222.1SUSE-SU-2024:2561-1
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.68.1SUSE-SU-2024:2190-1
SUSELinux Enterprise High Availability Extension 15 SP6, Linux Enterprise Live Patching 15 SP6, Linux Enterprise Module for Legacy 15 SP6 and 1 morekernel-default6.4.0-150600.23.7.3SUSE-SU-2024:2203-1
SUSELinux Enterprise Live Patching 12 SP5kgraft-patch-SLE12-SP5_Update_581-8.3.1SUSE-SU-2024:2561-1
SUSELinux Enterprise Live Patching 15 SP5kernel-livepatch-SLE15-SP5-RT_Update_161-150500.11.3.1SUSE-SU-2024:2008-1
SUSELinux Enterprise Live Patching 15 SP5kernel-livepatch-SLE15-SP5_Update_151-150500.11.3.1SUSE-SU-2024:2190-1
SUSELinux Enterprise Live Patching 15 SP6kernel-livepatch-SLE15-SP6_Update_11-150600.13.3.7SUSE-SU-2024:2203-1
SUSELinux Enterprise Micro 5.5kernel-rt, kernel-source-rt5.14.21-150500.13.58.1SUSE-SU-2024:2008-1
SUSELinux Enterprise Micro 5.5, Linux Enterprise Module for Basesystem 15 SP5kernel-default-base5.14.21-150500.55.68.1.150500.6.31.1SUSE-SU-2024:2190-1
SUSELinux Enterprise Module for Basesystem 15 SP5kernel-64kb, kernel-source, kernel-default and 1 more5.14.21-150500.55.68.1SUSE-SU-2024:2190-1
SUSELinux Enterprise Module for Basesystem 15 SP6kernel-64kb, kernel-default, kernel-zfcpdump6.4.0-150600.23.7.3SUSE-SU-2024:2203-1
SUSELinux Enterprise Module for Basesystem 15 SP6kernel-default-base6.4.0-150600.23.7.3.150600.12.2.7SUSE-SU-2024:2203-1
16 more for SUSE in the JSON and on SUSE's page.
openSUSELeap 15.5dtb-aarch64, kernel-64kb, kernel-docs and 8 more5.14.21-150500.55.68.1SUSE-SU-2024:2190-1
openSUSELeap 15.5kernel-azure, kernel-syms-azure, kernel-source-azure5.14.21-150500.33.57.1SUSE-SU-2024:2019-1
openSUSELeap 15.5kernel-default-base5.14.21-150500.55.68.1.150500.6.31.1SUSE-SU-2024:2190-1
openSUSELeap 15.5kernel-rt, kernel-syms-rt, kernel-rt_debug and 1 more5.14.21-150500.13.58.1SUSE-SU-2024:2008-1
openSUSELeap 15.6dtb-aarch64, kernel-syms, kernel-obs-qa6.4.0-150600.23.7.1SUSE-SU-2024:2203-1
openSUSELeap 15.6kernel-64kb, kernel-debug, kernel-default and 3 more6.4.0-150600.23.7.3SUSE-SU-2024:2203-1
openSUSELeap 15.6kernel-azure, kernel-source-azure6.4.0-150600.8.5.4SUSE-SU-2024:2135-1
openSUSELeap 15.6kernel-default-base6.4.0-150600.23.7.3.150600.12.2.7SUSE-SU-2024:2203-1
openSUSELeap 15.6kernel-docs6.4.0-150600.23.7.4SUSE-SU-2024:2203-1
openSUSELeap 15.6kernel-source6.4.0-150600.23.7.2SUSE-SU-2024:2203-1
openSUSELeap 15.6kernel-syms-azure6.4.0-150600.8.5.1SUSE-SU-2024:2135-1
AlmaLinux9bpftool7.3.0-427.24.1.el9_4ALSA-2024:4349
AlmaLinux9rv, perf, rtla and 58 more5.14.0-427.24.1.el9_4ALSA-2024:4349
Rocky Linux9kernel0:5.14.0-427.24.1.el9_4RLSA-2024:4349
Rocky Linux9kernel0:5.14.0-427.24.1.el9_4.cloud.3.0RXSA-2024:4349
Alpaquita23linux-lts6.1.121-r0BELL-CVE-2024-35870
Alpaquita25, streamlinux-lts6.12.41-r0BELL-CVE-2024-35870

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.

Red Hat's statement

This vulnerability considered being Moderate impact because of limitations for attack scenario.

Red Hat's mitigation

To mitigate this issue, prevent module cifs from being loaded. Please see https://access.redhat.com/solutions/41278 for how to blacklist a kernel module to prevent it from loading automatically.

ProductPackageStateAdvisory
Red Hat Enterprise Linux 9kernel-0:5.14.0-427.24.1.el9_4Fixed 2024-07-08RHSA-2024:4349
Red Hat Enterprise Linux 9.2 Extended Update Supportkernel-0:5.14.0-284.71.1.el9_2Fixed 2024-06-26RHSA-2024:4108
Red Hat Enterprise Linux 9.2 Extended Update Supportkernel-rt-0:5.14.0-284.71.1.rt14.356.el9_2Fixed 2024-06-26RHSA-2024:4106
Red Hat Enterprise Linux 6kernelNot affected
Red Hat Enterprise Linux 7kernelNot affected
Red Hat Enterprise Linux 7kernel-rtNot affected
Red Hat Enterprise Linux 8kernelWill not fix
Red Hat Enterprise Linux 8kernel-rtWill not fix
Red Hat Enterprise Linux 9kernel-rtAffected

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-35870.

References

Check your stackJSON