Skip to content
Fencer Vulns
critical 9.8

CVE-2024-35870 in the critical feed json

smb: client: fix UAF in smb2_reconnect_server()

published 2024-05-19 2 y ago modified 2026-08-05 3 mo ago also EUVD-2024-35588

cvss
9.8
version 3.1, CNA
cisa kev
Not listed
not in CISA's catalog
epss
0.6%
EPSS 0.6% chance of exploitation in 30 days, percentile 49%
public exploits
0
none known

Summary

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>

Patch / fix

  • Linux Linux 6.1.121, 6.6.29, 6.8.5, 6.9
  • linux Debian 12 6.1.123-1
  • linux Debian 14, Debian 13 6.8.9-1

debian advisories DEBIAN-CVE-2024-35870

  • linux Ubuntu 24.04 LTS 6.8.0-38.38
  • linux-aws Ubuntu 24.04 LTS 6.8.0-1011.12
  • linux-gcp Ubuntu 24.04 LTS 6.8.0-1010.11
  • linux-gke Ubuntu 24.04 LTS 6.8.0-1006.9
  • linux-ibm Ubuntu 24.04 LTS 6.8.0-1008.8
  • linux-azure Ubuntu 24.04 LTS 6.8.0-1010.10
  • linux-intel Ubuntu 24.04 LTS 6.8.0-1007.14
  • linux-raspi Ubuntu 24.04 LTS 6.8.0-1007.7

ubuntu advisories UBUNTU-CVE-2024-35870

Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0

  • kernel RHEL 9 5.14.0-427.24.1.el9_4
  • rv RHEL 9 5.14.0-427.24.1.el9_4
  • perf RHEL 9 5.14.0-427.24.1.el9_4
  • rtla RHEL 9 5.14.0-427.24.1.el9_4
  • bpftool RHEL 9 7.3.0-427.24.1.el9_4
  • libperf RHEL 9 5.14.0-427.24.1.el9_4
  • kernel-rt RHEL 9 5.14.0-427.24.1.el9_4
  • kernel-64k RHEL 9 5.14.0-427.24.1.el9_4

red hat advisories RHSA-2024:4349RHSA-2024:4106RHSA-2024:4108

  • kernel-rt Linux Micro 6.0 6.4.0-9.1
  • kernel-source-rt Linux Micro 6.0 6.4.0-9.1
  • kernel-source Linux Micro 6.0 6.4.0-18.1
  • kernel-default Linux Micro 6.0 6.4.0-18.1
  • kernel-kvmsmall Linux Micro 6.0 6.4.0-18.1
  • kernel-default-base Linux Micro 6.0 6.4.0-17.1.1.51
  • kernel-syms SLES for SAP 12 SP5, SLES 12 SP5 4.12.14-122.222.1
  • kernel-source SLES for SAP 12 SP5, SLES 12 SP5 4.12.14-122.222.1

suse advisories SUSE-SU-2025:20028-1SUSE-SU-2025:20008-1SUSE-SU-2024:2561-1SUSE-SU-2024:2381-1SUSE-SU-2024:2360-1SUSE-SU-2024:2203-1

  • kernel AlmaLinux 9 5.14.0-427.24.1.el9_4
  • rv AlmaLinux 9 5.14.0-427.24.1.el9_4
  • perf AlmaLinux 9 5.14.0-427.24.1.el9_4
  • rtla AlmaLinux 9 5.14.0-427.24.1.el9_4
  • bpftool AlmaLinux 9 7.3.0-427.24.1.el9_4
  • libperf AlmaLinux 9 5.14.0-427.24.1.el9_4
  • kernel-rt AlmaLinux 9 5.14.0-427.24.1.el9_4
  • kernel-64k AlmaLinux 9 5.14.0-427.24.1.el9_4

almalinux advisories ALSA-2024:4349

  • kernel Rocky Linux 9 5.14.0-427.24.1.el9_4.cloud.3.0
  • kernel Rocky Linux 9 5.14.0-427.24.1.el9_4

rocky linux advisories RXSA-2024:4349RLSA-2024:4349

Vendor advisories

What the vendors themselves say about their products: affected, fixed or not affected, and what to do.

red hat product security vex CVE-2024-35870 updated cvss 5.9

kernel: smb: client: fix UAF in smb2_reconnect_server()

  • Red Hat Enterprise Linux 8 perf, kernel, bpftool, kernel-rt, kernel-core, kernel-tools, +29 more
    affected: workaround, no fix planned “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.”
  • Red Hat Enterprise Linux 9 kernel-rt, kernel-rt-kvm, kernel-rt-core, kernel-rt-modules, kernel-rt-debug-kvm, kernel-rt-debug-core, +12 more
    affected: workaround, no fix available “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.”
  • Red Hat CodeReady Linux Builder EUS (v.9.2) kernel-debuginfo-common-s390x 5.14.0-284.71.1.el9_2, kernel-debuginfo-common-x86_64 5.14.0-284.71.1.el9_2, kernel-debuginfo-common-aarch64 5.14.0-284.71.1.el9_2, kernel-debuginfo-common-ppc64le 5.14.0-284.71.1.el9_2
    fixed: vendor fix “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.” RHSA-2024:4108
  • Red Hat Enterprise Linux AppStream (v. 9) rv 5.14.0-427.24.1.el9_4, perf 5.14.0-427.24.1.el9_4, rtla 5.14.0-427.24.1.el9_4, kernel-devel-matched 5.14.0-427.24.1.el9_4, kernel-64k-devel-matched 5.14.0-427.24.1.el9_4, kernel-debug-devel-matched 5.14.0-427.24.1.el9_4, +6 more
    fixed: vendor fix “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.” RHSA-2024:4349
  • Red Hat Enterprise Linux AppStream EUS (v.9.2) perf 5.14.0-284.71.1.el9_2, rtla 5.14.0-284.71.1.el9_2, kernel-devel-matched 5.14.0-284.71.1.el9_2, kernel-64k-devel-matched 5.14.0-284.71.1.el9_2, kernel-debug-devel-matched 5.14.0-284.71.1.el9_2, kernel-debuginfo-common-s390x 5.14.0-284.71.1.el9_2, +5 more
    fixed: vendor fix “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.” RHSA-2024:4108
  • Red Hat Enterprise Linux BaseOS (v. 9) bpftool 7.3.0-427.24.1.el9_4, kernel 5.14.0-427.24.1.el9_4, kernel-64k 5.14.0-427.24.1.el9_4, kernel-core 5.14.0-427.24.1.el9_4, kernel-tools 5.14.0-427.24.1.el9_4, python3-perf 5.14.0-427.24.1.el9_4, +28 more
    fixed: vendor fix “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.” RHSA-2024:4349
  • Red Hat Enterprise Linux BaseOS EUS (v.9.2) bpftool 7.0.0-284.71.1.el9_2, kernel 5.14.0-284.71.1.el9_2, kernel-64k 5.14.0-284.71.1.el9_2, kernel-core 5.14.0-284.71.1.el9_2, kernel-tools 5.14.0-284.71.1.el9_2, python3-perf 5.14.0-284.71.1.el9_2, +28 more
    fixed: vendor fix “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.” RHSA-2024:4108
  • Red Hat Enterprise Linux CRB (v. 9) libperf 5.14.0-427.24.1.el9_4, kernel-debuginfo-common-s390x 5.14.0-427.24.1.el9_4, kernel-debuginfo-common-x86_64 5.14.0-427.24.1.el9_4, kernel-debuginfo-common-aarch64 5.14.0-427.24.1.el9_4, kernel-debuginfo-common-ppc64le 5.14.0-427.24.1.el9_4 Red Hat Enterprise Linux NFV (v. 9) kernel-rt 5.14.0-427.24.1.el9_4, kernel-rt-kvm 5.14.0-427.24.1.el9_4, kernel-rt-core 5.14.0-427.24.1.el9_4, kernel-rt-modules 5.14.0-427.24.1.el9_4, kernel-rt-debug-kvm 5.14.0-427.24.1.el9_4, kernel-rt-debug-core 5.14.0-427.24.1.el9_4, +6 more
    fixed: vendor fix “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.” RHSA-2024:4349
show 3 more
  • Red Hat Enterprise Linux Real Time EUS (v.9.2) kernel-rt 5.14.0-284.71.1.rt14.356.el9_2, kernel-rt-core 5.14.0-284.71.1.rt14.356.el9_2, kernel-rt-modules 5.14.0-284.71.1.rt14.356.el9_2, kernel-rt-debug-core 5.14.0-284.71.1.rt14.356.el9_2, kernel-rt-modules-core 5.14.0-284.71.1.rt14.356.el9_2, kernel-rt-debug-modules 5.14.0-284.71.1.rt14.356.el9_2, +4 more Red Hat Enterprise Linux Real Time for NFV EUS (v.9.2) kernel-rt 5.14.0-284.71.1.rt14.356.el9_2, kernel-rt-kvm 5.14.0-284.71.1.rt14.356.el9_2, kernel-rt-core 5.14.0-284.71.1.rt14.356.el9_2, kernel-rt-modules 5.14.0-284.71.1.rt14.356.el9_2, kernel-rt-debug-kvm 5.14.0-284.71.1.rt14.356.el9_2, kernel-rt-debug-core 5.14.0-284.71.1.rt14.356.el9_2, +6 more
    fixed: vendor fix “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.” RHSA-2024:4106
  • Red Hat Enterprise Linux RT (v. 9) kernel-rt 5.14.0-427.24.1.el9_4, kernel-rt-core 5.14.0-427.24.1.el9_4, kernel-rt-modules 5.14.0-427.24.1.el9_4, kernel-rt-debug-core 5.14.0-427.24.1.el9_4, kernel-rt-modules-core 5.14.0-427.24.1.el9_4, kernel-rt-debug-modules 5.14.0-427.24.1.el9_4, +4 more
    fixed: vendor fix “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.” RHSA-2024:4349
  • Red Hat Enterprise Linux 6 perf, kernel, python-perf, kernel-kdump, kernel-firmware, kernel-bootwrapper, +1 more Red Hat Enterprise Linux 7 perf, kernel, bpftool, kernel-rt, python-perf, kernel-kdump, +8 more Red Hat Enterprise Linux AppStream EUS (v.9.2) kernel-doc 5.14.0-284.71.1.el9_2
    not affected: vulnerable code not present

Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf

CISA SSVC

Exploitation
none
Automatable
no
Technical impact
partial
Assessed
2 y ago

Exploit prediction

0.62% chance of exploitation in the next 30 days, higher than 49% of all scored CVEs (FIRST EPSS, 2026-11-08).

CVSS scores

assigned by version score vector
CNA 3.1 9.8 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
CISA ADP 3.1 4.4 CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:U/C:H/I:N/A:N
CNA 3.1 4.4 CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:U/C:H/I:N/A:N

Affected products

  • Linux Linux

Classification

Weakness
Technology feeds

References

Sources

Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.