Vulnerability · Published Aug 26, 2024 · Assigned by Linux

CVE-2024-43887net/tcp: Disable TCP-AO static key after RCU grace period

Medium 4.7

In plain English

A medium-severity security flaw in Linux from Linux. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.2% (higher than 9% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS NVD)4.7Medium
Exploit odds (30 days)0.2%top 91.4% of all CVEs
Exploited in the wildNo reportsCISA SSVC: none
Attack toolingNoneno public tooling known

Official description

In the Linux kernel, the following vulnerability has been resolved: net/tcp: Disable TCP-AO static key after RCU grace period The lifetime of TCP-AO static_key is the same as the last tcp_ao_info. On the socket destruction tcp_ao_info ceases to be with RCU grace period, while tcp-ao static branch is currently deferred destructed. The static key definition is : DEFINE_STATIC_KEY_DEFERRED_FALSE(tcp_ao_needed, HZ); which means that if RCU grace period is delayed by more than a second and tcp_ao_needed is in the process of disablement, other CPUs may yet see tcp_ao_info which atent dead, but soon-to-be. And that breaks the assumption of static_key_fast_inc_not_disabled(). See the comment near the definition: > * The caller must make sure that the static key can't get disabled while > * in this function. It doesn't patch jump labels, only adds a user to > * an already enabled static key. Originally it was introduced in commit eb8c507296f6 ("jump_label: Prevent key->enabled int overflow"), which is needed for the atomic contexts, one of which would be the creation of a full socket from a request socket. In that atomic context, it's known by the presence of the key (md5/ao) that the static branch is already enabled. So, the ref counter for that static branch is just incremented instead of holding the proper mutex. static_key_fast_inc_not_disabled() is just a helper for such usage case. But it must not be used if the static branch could get disabled in parallel as it's not protected by jump_label_mutex and as a result, races with jump_label_update() implementation details. Happened on netdev test-bot[1], so not a theoretical issue: [] jump_label: Fatal kernel bug, unexpected op at tcp_inbound_hash+0x1a7/0x870 [ffffffffa8c4e9b7] (eb 50 0f 1f 44 != 66 90 0f 1f 00)) size:2 type:1 [] ------------[ cut here ]------------ [] kernel BUG at arch/x86/kernel/jump_label.c:73! [] Oops: invalid opcode: 0000 [#1] PREEMPT SMP KASAN NOPTI [] CPU: 3 PID: 243 Comm: kworker/3:3 Not tainted 6.10.0-virtme #1 [] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.16.3-0-ga6ed6b701f0a-prebuilt.qemu.org 04/01/2014 [] Workqueue: events jump_label_update_timeout [] RIP: 0010:__jump_label_patch+0x2f6/0x350 ... [] Call Trace: [] <TASK> [] arch_jump_label_transform_queue+0x6c/0x110 [] __jump_label_update+0xef/0x350 [] __static_key_slow_dec_cpuslocked.part.0+0x3c/0x60 [] jump_label_update_timeout+0x2c/0x40 [] process_one_work+0xe3b/0x1670 [] worker_thread+0x587/0xce0 [] kthread+0x28a/0x350 [] ret_from_fork+0x31/0x70 [] ret_from_fork_asm+0x1a/0x30 [] </TASK> [] Modules linked in: veth [] ---[ end trace 0000000000000000 ]--- [] RIP: 0010:__jump_label_patch+0x2f6/0x350 [1]: https://netdev-3.bots.linux.dev/vmksft-tcp-ao-dbg/results/696681/5-connect-deny-ipv6/stderr

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
Debian:13linux6.10.6-1DEBIAN-CVE-2024-43887
Debian:14linux6.10.6-1DEBIAN-CVE-2024-43887
Ubuntu:24.04:LTSlinux6.8.0-50.51UBUNTU-CVE-2024-43887
Ubuntu:22.04:LTSlinux-allwinner-5.19no fix listedUBUNTU-CVE-2024-43887
Ubuntu:24.04:LTSlinux-aws6.8.0-1020.22UBUNTU-CVE-2024-43887
Ubuntu:22.04:LTSlinux-aws-5.19no fix listedUBUNTU-CVE-2024-43887
Ubuntu:22.04:LTSlinux-aws-6.2no fix listedUBUNTU-CVE-2024-43887
Ubuntu:22.04:LTSlinux-aws-6.5no fix listedUBUNTU-CVE-2024-43887
Ubuntu:22.04:LTSlinux-aws-6.86.8.0-1020.22~22.04.1UBUNTU-CVE-2024-43887
Ubuntu:24.04:LTSlinux-azure6.8.0-1020.23UBUNTU-CVE-2024-43887
Ubuntu:22.04:LTSlinux-azure-5.19no fix listedUBUNTU-CVE-2024-43887
Ubuntu:22.04:LTSlinux-azure-6.2no fix listedUBUNTU-CVE-2024-43887
Ubuntu:22.04:LTSlinux-azure-6.5no fix listedUBUNTU-CVE-2024-43887
Ubuntu:22.04:LTSlinux-azure-6.86.8.0-1020.23~22.04.1UBUNTU-CVE-2024-43887
Ubuntu:22.04:LTSlinux-azure-fde-5.19no fix listedUBUNTU-CVE-2024-43887
Ubuntu:22.04:LTSlinux-azure-fde-6.2no fix listedUBUNTU-CVE-2024-43887
Ubuntu:24.04:LTSlinux-gcp6.8.0-1019.21UBUNTU-CVE-2024-43887
Ubuntu:22.04:LTSlinux-gcp-5.19no fix listedUBUNTU-CVE-2024-43887
Ubuntu:22.04:LTSlinux-gcp-6.2no fix listedUBUNTU-CVE-2024-43887
Ubuntu:22.04:LTSlinux-gcp-6.5no fix listedUBUNTU-CVE-2024-43887
Ubuntu:22.04:LTSlinux-gcp-6.86.8.0-1019.21~22.04.1UBUNTU-CVE-2024-43887
Ubuntu:24.04:LTSlinux-gke6.8.0-1015.19UBUNTU-CVE-2024-43887
Ubuntu:24.04:LTSlinux-gkeop6.8.0-1002.4UBUNTU-CVE-2024-43887
Ubuntu:22.04:LTSlinux-hwe-5.19no fix listedUBUNTU-CVE-2024-43887
Ubuntu:22.04:LTSlinux-hwe-6.2no fix listedUBUNTU-CVE-2024-43887
Ubuntu:22.04:LTSlinux-hwe-6.5no fix listedUBUNTU-CVE-2024-43887
Ubuntu:22.04:LTSlinux-hwe-6.86.8.0-50.51~22.04.1UBUNTU-CVE-2024-43887
Ubuntu:24.04:LTSlinux-ibm6.8.0-1017.17UBUNTU-CVE-2024-43887
Ubuntu:22.04:LTSlinux-intel-iot-realtimeno fix listedUBUNTU-CVE-2024-43887
Ubuntu:24.04:LTSlinux-lowlatency6.8.0-50.51.1UBUNTU-CVE-2024-43887
Ubuntu:22.04:LTSlinux-lowlatency-hwe-5.19no fix listedUBUNTU-CVE-2024-43887
Ubuntu:22.04:LTSlinux-lowlatency-hwe-6.2no fix listedUBUNTU-CVE-2024-43887
Ubuntu:22.04:LTSlinux-lowlatency-hwe-6.5no fix listedUBUNTU-CVE-2024-43887
Ubuntu:22.04:LTSlinux-lowlatency-hwe-6.86.8.0-50.51.1~22.04.1UBUNTU-CVE-2024-43887
Ubuntu:24.04:LTSlinux-nvidia6.8.0-1019.21UBUNTU-CVE-2024-43887
Ubuntu:22.04:LTSlinux-nvidia-6.2no fix listedUBUNTU-CVE-2024-43887
Ubuntu:22.04:LTSlinux-nvidia-6.86.8.0-1019.21~22.04.1UBUNTU-CVE-2024-43887
Ubuntu:24.04:LTSlinux-nvidia-lowlatency6.8.0-1019.21.1UBUNTU-CVE-2024-43887
Ubuntu:22.04:LTSlinux-oem-5.17no fix listedUBUNTU-CVE-2024-43887
Ubuntu:22.04:LTSlinux-oem-6.0no fix listedUBUNTU-CVE-2024-43887
Ubuntu:22.04:LTSlinux-oem-6.1no fix listedUBUNTU-CVE-2024-43887
Ubuntu:22.04:LTSlinux-oem-6.5no fix listedUBUNTU-CVE-2024-43887
Ubuntu:24.04:LTSlinux-oem-6.86.8.0-1018.18UBUNTU-CVE-2024-43887
Ubuntu:24.04:LTSlinux-oracle6.8.0-1017.18UBUNTU-CVE-2024-43887
Ubuntu:22.04:LTSlinux-oracle-6.5no fix listedUBUNTU-CVE-2024-43887
Ubuntu:22.04:LTSlinux-oracle-6.86.8.0-1017.18~22.04.1UBUNTU-CVE-2024-43887
Ubuntu:24.04:LTSlinux-raspi6.8.0-1016.18UBUNTU-CVE-2024-43887
Ubuntu:22.04:LTSlinux-realtimeno fix listedUBUNTU-CVE-2024-43887
Ubuntu:22.04:LTSlinux-riscvno fix listedUBUNTU-CVE-2024-43887
Ubuntu:24.04:LTSlinux-riscv6.8.0-50.51.1UBUNTU-CVE-2024-43887
Ubuntu:22.04:LTSlinux-riscv-5.19no fix listedUBUNTU-CVE-2024-43887
Ubuntu:22.04:LTSlinux-riscv-6.5no fix listedUBUNTU-CVE-2024-43887
Ubuntu:22.04:LTSlinux-riscv-6.86.8.0-50.51.1~22.04.1UBUNTU-CVE-2024-43887
Ubuntu:22.04:LTSlinux-starfive-5.19no fix listedUBUNTU-CVE-2024-43887
Ubuntu:22.04:LTSlinux-starfive-6.2no fix listedUBUNTU-CVE-2024-43887
Ubuntu:22.04:LTSlinux-starfive-6.5no fix listedUBUNTU-CVE-2024-43887

Affected products (as reported)

VendorProductVersions
Linux Linux 67fa83f7c86a86913ab9cd5a13b4bebd8d2ebb43 – before 954d55a59b2501f4a9bd693b40ce45a1c46cb2b367fa83f7c86a86913ab9cd5a13b4bebd8d2ebb43 – before 14ab4792ee120c022f276a7e4768f4dcb08f0cdd
Linux Linux 6.7

References