Vulnerability · Published Dec 2, 2024 · Assigned by Linux
CVE-2024-53124net: fix data-races around sk->sk_forward_alloc
High 7.5
In plain English
A high-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.6% (higher than 48% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official description
In the Linux kernel, the following vulnerability has been resolved: net: fix data-races around sk->sk_forward_alloc Syzkaller reported this warning: ------------[ cut here ]------------ WARNING: CPU: 0 PID: 16 at net/ipv4/af_inet.c:156 inet_sock_destruct+0x1c5/0x1e0 Modules linked in: CPU: 0 UID: 0 PID: 16 Comm: ksoftirqd/0 Not tainted 6.12.0-rc5 #26 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.15.0-1 04/01/2014 RIP: 0010:inet_sock_destruct+0x1c5/0x1e0 Code: 24 12 4c 89 e2 5b 48 c7 c7 98 ec bb 82 41 5c e9 d1 18 17 ff 4c 89 e6 5b 48 c7 c7 d0 ec bb 82 41 5c e9 bf 18 17 ff 0f 0b eb 83 <0f> 0b eb 97 0f 0b eb 87 0f 0b e9 68 ff ff ff 66 66 2e 0f 1f 84 00 RSP: 0018:ffffc9000008bd90 EFLAGS: 00010206 RAX: 0000000000000300 RBX: ffff88810b172a90 RCX: 0000000000000007 RDX: 0000000000000002 RSI: 0000000000000300 RDI: ffff88810b172a00 RBP: ffff88810b172a00 R08: ffff888104273c00 R09: 0000000000100007 R10: 0000000000020000 R11: 0000000000000006 R12: ffff88810b172a00 R13: 0000000000000004 R14: 0000000000000000 R15: ffff888237c31f78 FS: 0000000000000000(0000) GS:ffff888237c00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007ffc63fecac8 CR3: 000000000342e000 CR4: 00000000000006f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: <TASK> ? __warn+0x88/0x130 ? inet_sock_destruct+0x1c5/0x1e0 ? report_bug+0x18e/0x1a0 ? handle_bug+0x53/0x90 ? exc_invalid_op+0x18/0x70 ? asm_exc_invalid_op+0x1a/0x20 ? inet_sock_destruct+0x1c5/0x1e0 __sk_destruct+0x2a/0x200 rcu_do_batch+0x1aa/0x530 ? rcu_do_batch+0x13b/0x530 rcu_core+0x159/0x2f0 handle_softirqs+0xd3/0x2b0 ? __pfx_smpboot_thread_fn+0x10/0x10 run_ksoftirqd+0x25/0x30 smpboot_thread_fn+0xdd/0x1d0 kthread+0xd3/0x100 ? __pfx_kthread+0x10/0x10 ret_from_fork+0x34/0x50 ? __pfx_kthread+0x10/0x10 ret_from_fork_asm+0x1a/0x30 </TASK> ---[ end trace 0000000000000000 ]--- Its possible that two threads call tcp_v6_do_rcv()/sk_forward_alloc_add() concurrently when sk->sk_state == TCP_LISTEN with sk->sk_lock unlocked, which triggers a data-race around sk->sk_forward_alloc: tcp_v6_rcv tcp_v6_do_rcv skb_clone_and_charge_r sk_rmem_schedule __sk_mem_schedule sk_forward_alloc_add() skb_set_owner_r sk_mem_charge sk_forward_alloc_add() __kfree_skb skb_release_all skb_release_head_state sock_rfree sk_mem_uncharge sk_forward_alloc_add() sk_mem_reclaim // set local var reclaimable __sk_mem_reclaim sk_forward_alloc_add() In this syzkaller testcase, two threads call tcp_v6_do_rcv() with skb->truesize=768, the sk_forward_alloc changes like this: (cpu 1) | (cpu 2) | sk_forward_alloc ... | ... | 0 __sk_mem_schedule() | | +4096 = 4096 | __sk_mem_schedule() | +4096 = 8192 sk_mem_charge() | | -768 = 7424 | sk_mem_charge() | -768 = 6656 ... | ... | sk_mem_uncharge() | | +768 = 7424 reclaimable=7424 | | | sk_mem_uncharge() | +768 = 8192 | reclaimable=8192 | __sk_mem_reclaim() | | -4096 = 4096 | __sk_mem_reclaim() | -8192 = -4096 != 0 The skb_clone_and_charge_r() should not be called in tcp_v6_do_rcv() when sk->sk_state is TCP_LISTEN, it happens later in tcp_v6_syn_recv_sock(). Fix the same issue in dccp_v6_do_rcv().
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian:12 | linux | 6.1.128-1 | DEBIAN-CVE-2024-53124 |
| Debian:12 | linux | 6.1.128-1 | DSA-5860-1 |
| Debian:13 | linux | 6.11.10-1 | DEBIAN-CVE-2024-53124 |
| Debian:14 | linux | 6.11.10-1 | DEBIAN-CVE-2024-53124 |
| Ubuntu:22.04:LTS | linux | 5.15.0-135.146 | USN-7387-1 |
| Ubuntu:22.04:LTS | linux | 5.15.0-135.146 | UBUNTU-CVE-2024-53124 |
| Ubuntu:24.04:LTS | linux | 6.8.0-62.65 | USN-7595-1 |
| Ubuntu:24.04:LTS | linux | 6.8.0-62.65 | UBUNTU-CVE-2024-53124 |
| Ubuntu:22.04:LTS | linux-allwinner-5.19 | no fix listed | UBUNTU-CVE-2024-53124 |
| Ubuntu:22.04:LTS | linux-aws | 5.15.0-1080.87 | USN-7387-1 |
| Ubuntu:22.04:LTS | linux-aws | 5.15.0-1080.87 | UBUNTU-CVE-2024-53124 |
| Ubuntu:24.04:LTS | linux-aws | 6.8.0-1030.32 | UBUNTU-CVE-2024-53124 |
| Ubuntu:24.04:LTS | linux-aws | 6.8.0-1030.32 | USN-7595-1 |
| Ubuntu:22.04:LTS | linux-aws-5.19 | no fix listed | UBUNTU-CVE-2024-53124 |
| Ubuntu:22.04:LTS | linux-aws-6.2 | no fix listed | UBUNTU-CVE-2024-53124 |
| Ubuntu:22.04:LTS | linux-aws-6.5 | no fix listed | UBUNTU-CVE-2024-53124 |
| Ubuntu:22.04:LTS | linux-aws-6.8 | 6.8.0-1030.32~22.04.1 | USN-7595-1 |
| Ubuntu:22.04:LTS | linux-aws-6.8 | 6.8.0-1030.32~22.04.1 | UBUNTU-CVE-2024-53124 |
| Ubuntu:22.04:LTS | linux-azure | 5.15.0-1084.93 | UBUNTU-CVE-2024-53124 |
| Ubuntu:22.04:LTS | linux-azure | 5.15.0-1084.93 | USN-7387-1 |
| Ubuntu:24.04:LTS | linux-azure | 6.8.0-1030.35 | UBUNTU-CVE-2024-53124 |
| Ubuntu:24.04:LTS | linux-azure | 6.8.0-1030.35 | USN-7596-1 |
| Ubuntu:22.04:LTS | linux-azure-5.19 | no fix listed | UBUNTU-CVE-2024-53124 |
| Ubuntu:24.04:LTS | linux-azure-6.11 | 6.11.0-1012.12~24.04.1 | UBUNTU-CVE-2024-53124 |
| Ubuntu:22.04:LTS | linux-azure-6.2 | no fix listed | UBUNTU-CVE-2024-53124 |
| Ubuntu:22.04:LTS | linux-azure-6.5 | no fix listed | UBUNTU-CVE-2024-53124 |
| Ubuntu:22.04:LTS | linux-azure-6.8 | 6.8.0-1030.35~22.04.1 | USN-7596-1 |
| Ubuntu:22.04:LTS | linux-azure-6.8 | 6.8.0-1030.35~22.04.1 | UBUNTU-CVE-2024-53124 |
| Ubuntu:22.04:LTS | linux-azure-fde | 5.15.0-1084.93.1 | UBUNTU-CVE-2024-53124 |
| Ubuntu:22.04:LTS | linux-azure-fde-5.19 | no fix listed | UBUNTU-CVE-2024-53124 |
| Ubuntu:22.04:LTS | linux-azure-fde-6.2 | no fix listed | UBUNTU-CVE-2024-53124 |
| Ubuntu:24.04:LTS | linux-azure-nvidia | 6.8.0-1018.19 | UBUNTU-CVE-2024-53124 |
| Ubuntu:24.04:LTS | linux-azure-nvidia | 6.8.0-1018.19 | USN-7596-2 |
| Ubuntu:22.04:LTS | linux-gcp | 5.15.0-1079.88 | USN-7387-1 |
| Ubuntu:22.04:LTS | linux-gcp | 5.15.0-1079.88 | UBUNTU-CVE-2024-53124 |
| Ubuntu:24.04:LTS | linux-gcp | 6.8.0-1031.33 | USN-7595-5 |
| Ubuntu:24.04:LTS | linux-gcp | 6.8.0-1031.33 | UBUNTU-CVE-2024-53124 |
| Ubuntu:22.04:LTS | linux-gcp-5.19 | no fix listed | UBUNTU-CVE-2024-53124 |
| Ubuntu:24.04:LTS | linux-gcp-6.11 | 6.11.0-1011.11~24.04.1 | UBUNTU-CVE-2024-53124 |
| Ubuntu:22.04:LTS | linux-gcp-6.2 | no fix listed | UBUNTU-CVE-2024-53124 |
| Ubuntu:22.04:LTS | linux-gcp-6.5 | no fix listed | UBUNTU-CVE-2024-53124 |
| Ubuntu:22.04:LTS | linux-gcp-6.8 | 6.8.0-1031.33~22.04.1 | UBUNTU-CVE-2024-53124 |
| Ubuntu:22.04:LTS | linux-gcp-6.8 | 6.8.0-1031.33~22.04.1 | USN-7595-5 |
| Ubuntu:22.04:LTS | linux-gke | 5.15.0-1077.83 | USN-7387-1 |
| Ubuntu:22.04:LTS | linux-gke | 5.15.0-1077.83 | UBUNTU-CVE-2024-53124 |
| Ubuntu:24.04:LTS | linux-gke | 6.8.0-1026.30 | UBUNTU-CVE-2024-53124 |
| Ubuntu:24.04:LTS | linux-gke | 6.8.0-1026.30 | USN-7595-1 |
| Ubuntu:22.04:LTS | linux-gkeop | 5.15.0-1062.70 | USN-7387-1 |
| Ubuntu:22.04:LTS | linux-gkeop | 5.15.0-1062.70 | UBUNTU-CVE-2024-53124 |
| Ubuntu:24.04:LTS | linux-gkeop | 6.8.0-1013.15 | UBUNTU-CVE-2024-53124 |
| Ubuntu:24.04:LTS | linux-gkeop | 6.8.0-1013.15 | USN-7595-1 |
| Ubuntu:22.04:LTS | linux-hwe-5.19 | no fix listed | UBUNTU-CVE-2024-53124 |
| Ubuntu:22.04:LTS | linux-hwe-6.2 | no fix listed | UBUNTU-CVE-2024-53124 |
| Ubuntu:22.04:LTS | linux-hwe-6.5 | no fix listed | UBUNTU-CVE-2024-53124 |
| Ubuntu:22.04:LTS | linux-hwe-6.8 | 6.8.0-64.67~22.04.1 | UBUNTU-CVE-2024-53124 |
| Ubuntu:22.04:LTS | linux-hwe-6.8 | 6.8.0-64.67~22.04.1 | USN-7653-1 |
| Ubuntu:22.04:LTS | linux-ibm | 5.15.0-1072.75 | USN-7387-1 |
| Ubuntu:22.04:LTS | linux-ibm | 5.15.0-1072.75 | UBUNTU-CVE-2024-53124 |
| Ubuntu:24.04:LTS | linux-ibm | 6.8.0-1027.27 | USN-7595-1 |
| Ubuntu:24.04:LTS | linux-ibm | 6.8.0-1027.27 | UBUNTU-CVE-2024-53124 |
| Ubuntu:22.04:LTS | linux-ibm-6.8 | 6.8.0-1027.27~22.04.1 | UBUNTU-CVE-2024-53124 |
| Ubuntu:22.04:LTS | linux-intel-iot-realtime | 5.15.0-1073.75 | UBUNTU-CVE-2024-53124 |
| Ubuntu:22.04:LTS | linux-intel-iotg | 5.15.0-1075.81 | UBUNTU-CVE-2024-53124 |
| Ubuntu:22.04:LTS | linux-intel-iotg | 5.15.0-1075.81 | USN-7387-1 |
| Ubuntu:22.04:LTS | linux-kvm | 5.15.0-1076.81 | UBUNTU-CVE-2024-53124 |
| Ubuntu:22.04:LTS | linux-lowlatency | 5.15.0-135.146 | USN-7387-1 |
| Ubuntu:22.04:LTS | linux-lowlatency | 5.15.0-135.146 | UBUNTU-CVE-2024-53124 |
| Ubuntu:24.04:LTS | linux-lowlatency | 6.8.0-62.65.1 | UBUNTU-CVE-2024-53124 |
| Ubuntu:24.04:LTS | linux-lowlatency | 6.8.0-62.65.1 | USN-7595-1 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-5.19 | no fix listed | UBUNTU-CVE-2024-53124 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.2 | no fix listed | UBUNTU-CVE-2024-53124 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.5 | no fix listed | UBUNTU-CVE-2024-53124 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.8 | 6.8.0-62.65.1~22.04.1 | USN-7595-1 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.8 | 6.8.0-62.65.1~22.04.1 | UBUNTU-CVE-2024-53124 |
| Ubuntu:22.04:LTS | linux-nvidia | 5.15.0-1074.75 | USN-7387-1 |
| Ubuntu:22.04:LTS | linux-nvidia | 5.15.0-1074.75 | UBUNTU-CVE-2024-53124 |
| Ubuntu:24.04:LTS | linux-nvidia | 6.8.0-1029.32 | USN-7595-1 |
| Ubuntu:24.04:LTS | linux-nvidia | 6.8.0-1029.32 | UBUNTU-CVE-2024-53124 |
| Ubuntu:24.04:LTS | linux-nvidia-6.11 | 6.11.0-1007.7 | UBUNTU-CVE-2024-53124 |
| Ubuntu:22.04:LTS | linux-nvidia-6.2 | no fix listed | UBUNTU-CVE-2024-53124 |
| Ubuntu:22.04:LTS | linux-nvidia-6.5 | no fix listed | UBUNTU-CVE-2024-53124 |
| Ubuntu:22.04:LTS | linux-nvidia-6.8 | 6.8.0-1029.32~22.04.1 | USN-7595-1 |
| Ubuntu:22.04:LTS | linux-nvidia-6.8 | 6.8.0-1029.32~22.04.1 | UBUNTU-CVE-2024-53124 |
| Ubuntu:24.04:LTS | linux-nvidia-lowlatency | 6.8.0-1029.32.1 | UBUNTU-CVE-2024-53124 |
| Ubuntu:24.04:LTS | linux-nvidia-lowlatency | 6.8.0-1029.32.1 | USN-7595-1 |
| Ubuntu:22.04:LTS | linux-nvidia-tegra | 5.15.0-1033.33 | UBUNTU-CVE-2024-53124 |
| Ubuntu:24.04:LTS | linux-nvidia-tegra | 6.8.0-1008.8 | UBUNTU-CVE-2024-53124 |
| Ubuntu:22.04:LTS | linux-nvidia-tegra-igx | 5.15.0-1021.21 | UBUNTU-CVE-2024-53124 |
| Ubuntu:22.04:LTS | linux-oem-5.17 | no fix listed | UBUNTU-CVE-2024-53124 |
| Ubuntu:22.04:LTS | linux-oem-6.0 | no fix listed | UBUNTU-CVE-2024-53124 |
| Ubuntu:22.04:LTS | linux-oem-6.1 | no fix listed | UBUNTU-CVE-2024-53124 |
| Ubuntu:24.04:LTS | linux-oem-6.11 | 6.11.0-1015.15 | UBUNTU-CVE-2024-53124 |
| Ubuntu:22.04:LTS | linux-oem-6.5 | no fix listed | UBUNTU-CVE-2024-53124 |
| Ubuntu:24.04:LTS | linux-oem-6.8 | 6.8.0-1029.29 | USN-7595-1 |
| Ubuntu:24.04:LTS | linux-oem-6.8 | 6.8.0-1029.29 | UBUNTU-CVE-2024-53124 |
| Ubuntu:22.04:LTS | linux-oracle | 5.15.0-1077.83 | UBUNTU-CVE-2024-53124 |
| Ubuntu:22.04:LTS | linux-oracle | 5.15.0-1077.83 | USN-7387-1 |
| Ubuntu:24.04:LTS | linux-oracle | 6.8.0-1027.28 | UBUNTU-CVE-2024-53124 |
| Ubuntu:24.04:LTS | linux-oracle | 6.8.0-1027.28 | USN-7595-4 |
| Ubuntu:22.04:LTS | linux-oracle-6.5 | no fix listed | UBUNTU-CVE-2024-53124 |
| Ubuntu:22.04:LTS | linux-oracle-6.8 | 6.8.0-1027.28~22.04.1 | USN-7595-4 |
| Ubuntu:22.04:LTS | linux-oracle-6.8 | 6.8.0-1027.28~22.04.1 | UBUNTU-CVE-2024-53124 |
| Ubuntu:22.04:LTS | linux-raspi | 5.15.0-1074.77 | UBUNTU-CVE-2024-53124 |
| Ubuntu:22.04:LTS | linux-raspi | 5.15.0-1074.77 | USN-7387-1 |
| Ubuntu:24.04:LTS | linux-raspi | 6.8.0-1029.33 | USN-7595-4 |
| Ubuntu:24.04:LTS | linux-raspi | 6.8.0-1029.33 | UBUNTU-CVE-2024-53124 |
| Ubuntu:24.04:LTS | linux-raspi-realtime | no fix listed | UBUNTU-CVE-2024-53124 |
| Ubuntu:22.04:LTS | linux-realtime | no fix listed | UBUNTU-CVE-2024-53124 |
| Ubuntu:24.04:LTS | linux-realtime | no fix listed | UBUNTU-CVE-2024-53124 |
| Ubuntu:22.04:LTS | linux-riscv | no fix listed | UBUNTU-CVE-2024-53124 |
| Ubuntu:24.04:LTS | linux-riscv | no fix listed | UBUNTU-CVE-2024-53124 |
| Ubuntu:22.04:LTS | linux-riscv-5.19 | no fix listed | UBUNTU-CVE-2024-53124 |
| Ubuntu:22.04:LTS | linux-riscv-6.5 | no fix listed | UBUNTU-CVE-2024-53124 |
| Ubuntu:22.04:LTS | linux-riscv-6.8 | 6.8.0-62.65~22.04.1 | UBUNTU-CVE-2024-53124 |
| Ubuntu:22.04:LTS | linux-starfive-5.19 | no fix listed | UBUNTU-CVE-2024-53124 |
| Ubuntu:22.04:LTS | linux-starfive-6.2 | no fix listed | UBUNTU-CVE-2024-53124 |
| Ubuntu:22.04:LTS | linux-starfive-6.5 | no fix listed | UBUNTU-CVE-2024-53124 |
| Ubuntu:24.04:LTS | linux-xilinx | 6.8.0-1017.18 | UBUNTU-CVE-2024-53124 |
| Ubuntu:22.04:LTS | linux-xilinx-zynqmp | 5.15.0-1044.48 | UBUNTU-CVE-2024-53124 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| Linux | Linux | e994b2f0fb9229aeff5eea9541320bd7b2ca8714 – before 695fb0b9aecfd5dd5b2946ba8897ac2c1eef654de994b2f0fb9229aeff5eea9541320bd7b2ca8714 – before fe2c0bd6d1e29ccefdc978b9a290571c93c27473e994b2f0fb9229aeff5eea9541320bd7b2ca8714 – before c3d052cae566ec2285f5999958a5deb415a0f59ee994b2f0fb9229aeff5eea9541320bd7b2ca8714 – before be7c61ea5f816168c38955eb4e898adc8b4b32fde994b2f0fb9229aeff5eea9541320bd7b2ca8714 – before 3f51f8c9d28954cf380100883a02eed35a8277e9e994b2f0fb9229aeff5eea9541320bd7b2ca8714 – before d285eb9d0641c8344f2836081b4ccb7b3c5cc1b6e994b2f0fb9229aeff5eea9541320bd7b2ca8714 – before 073d89808c065ac4c672c0a613a71b27a80691cb |
| Linux | Linux | 4.4 |
References
- https://git.kernel.org/stable/c/695fb0b9aecfd5dd5b2946ba8897ac2c1eef654d
- https://git.kernel.org/stable/c/fe2c0bd6d1e29ccefdc978b9a290571c93c27473
- https://git.kernel.org/stable/c/c3d052cae566ec2285f5999958a5deb415a0f59e
- https://git.kernel.org/stable/c/be7c61ea5f816168c38955eb4e898adc8b4b32fd
- https://git.kernel.org/stable/c/3f51f8c9d28954cf380100883a02eed35a8277e9
- https://git.kernel.org/stable/c/d285eb9d0641c8344f2836081b4ccb7b3c5cc1b6
- https://git.kernel.org/stable/c/073d89808c065ac4c672c0a613a71b27a80691cb
- https://lists.debian.org/debian-lts-announce/2025/03/msg00001.html
- https://lists.debian.org/debian-lts-announce/2025/03/msg00002.html
- https://cert-portal.siemens.com/productcert/html/ssa-398330.html
- https://cert-portal.siemens.com/productcert/html/ssa-265688.html
- https://cert-portal.siemens.com/productcert/html/ssa-503939.html
- https://cert-portal.siemens.com/productcert/html/ssa-019113.html
- https://cert-portal.siemens.com/productcert/html/ssa-457936.html