Vulnerability · Published Nov 12, 2025 · Assigned by Linux
CVE-2025-40186tcp: Don't call reqsk_fastopen_remove() in tcp_conn_request().
High 8.1
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: tcp: Don't call reqsk_fastopen_remove() in tcp_conn_request(). syzbot reported the splat below in tcp_conn_request(). [0] If a listener is close()d while a TFO socket is being processed in tcp_conn_request(), inet_csk_reqsk_queue_add() does not set reqsk->sk and calls inet_child_forget(), which calls tcp_disconnect() for the TFO socket. After the cited commit, tcp_disconnect() calls reqsk_fastopen_remove(), where reqsk_put() is called due to !reqsk->sk. Then, reqsk_fastopen_remove() in tcp_conn_request() decrements the last req->rsk_refcnt and frees reqsk, and __reqsk_free() at the drop_and_free label causes the refcount underflow for the listener and double-free of the reqsk. Let's remove reqsk_fastopen_remove() in tcp_conn_request(). Note that other callers make sure tp->fastopen_rsk is not NULL. [0]: refcount_t: underflow; use-after-free. WARNING: CPU: 12 PID: 5563 at lib/refcount.c:28 refcount_warn_saturate (lib/refcount.c:28) Modules linked in: CPU: 12 UID: 0 PID: 5563 Comm: syz-executor Not tainted syzkaller #0 PREEMPT(full) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/2025 RIP: 0010:refcount_warn_saturate (lib/refcount.c:28) Code: ab e8 8e b4 98 ff 0f 0b c3 cc cc cc cc cc 80 3d a4 e4 d6 01 00 75 9c c6 05 9b e4 d6 01 01 48 c7 c7 e8 df fb ab e8 6a b4 98 ff <0f> 0b e9 03 5b 76 00 cc 80 3d 7d e4 d6 01 00 0f 85 74 ff ff ff c6 RSP: 0018:ffffa79fc0304a98 EFLAGS: 00010246 RAX: d83af4db1c6b3900 RBX: ffff9f65c7a69020 RCX: d83af4db1c6b3900 RDX: 0000000000000000 RSI: 00000000ffff7fff RDI: ffffffffac78a280 RBP: 000000009d781b60 R08: 0000000000007fff R09: ffffffffac6ca280 R10: 0000000000017ffd R11: 0000000000000004 R12: ffff9f65c7b4f100 R13: ffff9f65c7d23c00 R14: ffff9f65c7d26000 R15: ffff9f65c7a64ef8 FS: 00007f9f962176c0(0000) GS:ffff9f65fcf00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000200000000180 CR3: 000000000dbbe006 CR4: 0000000000372ef0 Call Trace: <IRQ> tcp_conn_request (./include/linux/refcount.h:400 ./include/linux/refcount.h:432 ./include/linux/refcount.h:450 ./include/net/sock.h:1965 ./include/net/request_sock.h:131 net/ipv4/tcp_input.c:7301) tcp_rcv_state_process (net/ipv4/tcp_input.c:6708) tcp_v6_do_rcv (net/ipv6/tcp_ipv6.c:1670) tcp_v6_rcv (net/ipv6/tcp_ipv6.c:1906) ip6_protocol_deliver_rcu (net/ipv6/ip6_input.c:438) ip6_input (net/ipv6/ip6_input.c:500) ipv6_rcv (net/ipv6/ip6_input.c:311) __netif_receive_skb (net/core/dev.c:6104) process_backlog (net/core/dev.c:6456) __napi_poll (net/core/dev.c:7506) net_rx_action (net/core/dev.c:7569 net/core/dev.c:7696) handle_softirqs (kernel/softirq.c:579) do_softirq (kernel/softirq.c:480) </IRQ>
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| AlmaLinux:8 | bpftool | 4.18.0-553.87.1.el8_10 | ALSA-2025:22388 |
| AlmaLinux:8 | kernel | 4.18.0-553.87.1.el8_10 | ALSA-2025:22388 |
| AlmaLinux:8 | kernel-abi-stablelists | 4.18.0-553.87.1.el8_10 | ALSA-2025:22388 |
| AlmaLinux:8 | kernel-core | 4.18.0-553.87.1.el8_10 | ALSA-2025:22388 |
| AlmaLinux:8 | kernel-cross-headers | 4.18.0-553.87.1.el8_10 | ALSA-2025:22388 |
| AlmaLinux:8 | kernel-debug | 4.18.0-553.87.1.el8_10 | ALSA-2025:22388 |
| AlmaLinux:8 | kernel-debug-core | 4.18.0-553.87.1.el8_10 | ALSA-2025:22388 |
| AlmaLinux:8 | kernel-debug-devel | 4.18.0-553.87.1.el8_10 | ALSA-2025:22388 |
| AlmaLinux:8 | kernel-debug-modules | 4.18.0-553.87.1.el8_10 | ALSA-2025:22388 |
| AlmaLinux:8 | kernel-debug-modules-extra | 4.18.0-553.87.1.el8_10 | ALSA-2025:22388 |
| AlmaLinux:8 | kernel-devel | 4.18.0-553.87.1.el8_10 | ALSA-2025:22388 |
| AlmaLinux:8 | kernel-doc | 4.18.0-553.87.1.el8_10 | ALSA-2025:22388 |
| AlmaLinux:8 | kernel-headers | 4.18.0-553.87.1.el8_10 | ALSA-2025:22388 |
| AlmaLinux:8 | kernel-modules | 4.18.0-553.87.1.el8_10 | ALSA-2025:22388 |
| AlmaLinux:8 | kernel-modules-extra | 4.18.0-553.87.1.el8_10 | ALSA-2025:22388 |
| AlmaLinux:8 | kernel-rt | 4.18.0-553.87.1.rt7.428.el8_10 | ALSA-2025:22387 |
| AlmaLinux:8 | kernel-rt-core | 4.18.0-553.87.1.rt7.428.el8_10 | ALSA-2025:22387 |
| AlmaLinux:8 | kernel-rt-debug | 4.18.0-553.87.1.rt7.428.el8_10 | ALSA-2025:22387 |
| AlmaLinux:8 | kernel-rt-debug-core | 4.18.0-553.87.1.rt7.428.el8_10 | ALSA-2025:22387 |
| AlmaLinux:8 | kernel-rt-debug-devel | 4.18.0-553.87.1.rt7.428.el8_10 | ALSA-2025:22387 |
| AlmaLinux:8 | kernel-rt-debug-modules | 4.18.0-553.87.1.rt7.428.el8_10 | ALSA-2025:22387 |
| AlmaLinux:8 | kernel-rt-debug-modules-extra | 4.18.0-553.87.1.rt7.428.el8_10 | ALSA-2025:22387 |
| AlmaLinux:8 | kernel-rt-devel | 4.18.0-553.87.1.rt7.428.el8_10 | ALSA-2025:22387 |
| AlmaLinux:8 | kernel-rt-modules | 4.18.0-553.87.1.rt7.428.el8_10 | ALSA-2025:22387 |
| AlmaLinux:8 | kernel-rt-modules-extra | 4.18.0-553.87.1.rt7.428.el8_10 | ALSA-2025:22387 |
| AlmaLinux:8 | kernel-tools | 4.18.0-553.87.1.el8_10 | ALSA-2025:22388 |
| AlmaLinux:8 | kernel-tools-libs | 4.18.0-553.87.1.el8_10 | ALSA-2025:22388 |
| AlmaLinux:8 | kernel-tools-libs-devel | 4.18.0-553.87.1.el8_10 | ALSA-2025:22388 |
| AlmaLinux:8 | kernel-zfcpdump | 4.18.0-553.87.1.el8_10 | ALSA-2025:22388 |
| AlmaLinux:8 | kernel-zfcpdump-core | 4.18.0-553.87.1.el8_10 | ALSA-2025:22388 |
| AlmaLinux:8 | kernel-zfcpdump-devel | 4.18.0-553.87.1.el8_10 | ALSA-2025:22388 |
| AlmaLinux:8 | kernel-zfcpdump-modules | 4.18.0-553.87.1.el8_10 | ALSA-2025:22388 |
| AlmaLinux:8 | kernel-zfcpdump-modules-extra | 4.18.0-553.87.1.el8_10 | ALSA-2025:22388 |
| AlmaLinux:8 | perf | 4.18.0-553.87.1.el8_10 | ALSA-2025:22388 |
| AlmaLinux:8 | python3-perf | 4.18.0-553.87.1.el8_10 | ALSA-2025:22388 |
| Debian:12 | linux | 6.1.158-1 | DEBIAN-CVE-2025-40186 |
| Debian:13 | linux | 6.12.57-1 | DEBIAN-CVE-2025-40186 |
| Debian:14 | linux | 6.17.6-1 | DEBIAN-CVE-2025-40186 |
| Ubuntu:25.10 | linux | 6.17.0-14.14 | UBUNTU-CVE-2025-40186 |
| Ubuntu:22.04:LTS | linux-allwinner-5.19 | no fix listed | UBUNTU-CVE-2025-40186 |
| Ubuntu:25.10 | linux-aws | 6.17.0-1007.7 | UBUNTU-CVE-2025-40186 |
| Ubuntu:22.04:LTS | linux-aws-5.19 | no fix listed | UBUNTU-CVE-2025-40186 |
| Ubuntu:24.04:LTS | linux-aws-6.17 | 6.17.0-1007.7~24.04.1 | UBUNTU-CVE-2025-40186 |
| Ubuntu:22.04:LTS | linux-aws-6.2 | no fix listed | UBUNTU-CVE-2025-40186 |
| Ubuntu:22.04:LTS | linux-aws-6.5 | no fix listed | UBUNTU-CVE-2025-40186 |
| Ubuntu:25.10 | linux-azure | 6.17.0-1008.8 | UBUNTU-CVE-2025-40186 |
| Ubuntu:22.04:LTS | linux-azure-5.19 | no fix listed | UBUNTU-CVE-2025-40186 |
| Ubuntu:24.04:LTS | linux-azure-6.11 | no fix listed | UBUNTU-CVE-2025-40186 |
| Ubuntu:22.04:LTS | linux-azure-6.2 | no fix listed | UBUNTU-CVE-2025-40186 |
| Ubuntu:22.04:LTS | linux-azure-6.5 | no fix listed | UBUNTU-CVE-2025-40186 |
| Ubuntu:25.10 | linux-azure-fde | no fix listed | UBUNTU-CVE-2025-40186 |
| Ubuntu:22.04:LTS | linux-azure-fde-5.19 | no fix listed | UBUNTU-CVE-2025-40186 |
| Ubuntu:22.04:LTS | linux-azure-fde-6.2 | no fix listed | UBUNTU-CVE-2025-40186 |
| Ubuntu:25.10 | linux-gcp | 6.17.0-1007.7 | UBUNTU-CVE-2025-40186 |
| Ubuntu:22.04:LTS | linux-gcp-5.19 | no fix listed | UBUNTU-CVE-2025-40186 |
| Ubuntu:24.04:LTS | linux-gcp-6.11 | no fix listed | UBUNTU-CVE-2025-40186 |
| Ubuntu:24.04:LTS | linux-gcp-6.17 | 6.17.0-1008.8~24.04.1 | UBUNTU-CVE-2025-40186 |
| Ubuntu:22.04:LTS | linux-gcp-6.2 | no fix listed | UBUNTU-CVE-2025-40186 |
| Ubuntu:22.04:LTS | linux-gcp-6.5 | no fix listed | UBUNTU-CVE-2025-40186 |
| Ubuntu:22.04:LTS | linux-hwe-5.19 | no fix listed | UBUNTU-CVE-2025-40186 |
| Ubuntu:24.04:LTS | linux-hwe-6.11 | no fix listed | UBUNTU-CVE-2025-40186 |
| Ubuntu:22.04:LTS | linux-hwe-6.2 | no fix listed | UBUNTU-CVE-2025-40186 |
| Ubuntu:22.04:LTS | linux-hwe-6.5 | no fix listed | UBUNTU-CVE-2025-40186 |
| Ubuntu:22.04:LTS | linux-intel-iot-realtime | no fix listed | UBUNTU-CVE-2025-40186 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-5.19 | no fix listed | UBUNTU-CVE-2025-40186 |
| Ubuntu:24.04:LTS | linux-lowlatency-hwe-6.11 | no fix listed | UBUNTU-CVE-2025-40186 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.2 | no fix listed | UBUNTU-CVE-2025-40186 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.5 | no fix listed | UBUNTU-CVE-2025-40186 |
| Ubuntu:24.04:LTS | linux-nvidia-6.17 | 6.17.0-1008.8 | UBUNTU-CVE-2025-40186 |
| Ubuntu:22.04:LTS | linux-nvidia-6.2 | no fix listed | UBUNTU-CVE-2025-40186 |
| Ubuntu:22.04:LTS | linux-nvidia-6.5 | no fix listed | UBUNTU-CVE-2025-40186 |
| Ubuntu:22.04:LTS | linux-oem-5.17 | no fix listed | UBUNTU-CVE-2025-40186 |
| Ubuntu:22.04:LTS | linux-oem-6.0 | no fix listed | UBUNTU-CVE-2025-40186 |
| Ubuntu:22.04:LTS | linux-oem-6.1 | no fix listed | UBUNTU-CVE-2025-40186 |
| Ubuntu:24.04:LTS | linux-oem-6.11 | no fix listed | UBUNTU-CVE-2025-40186 |
| Ubuntu:24.04:LTS | linux-oem-6.17 | 6.17.0-1011.11 | UBUNTU-CVE-2025-40186 |
| Ubuntu:22.04:LTS | linux-oem-6.5 | no fix listed | UBUNTU-CVE-2025-40186 |
| Ubuntu:24.04:LTS | linux-oem-6.8 | no fix listed | UBUNTU-CVE-2025-40186 |
| Ubuntu:25.10 | linux-oracle | 6.17.0-1007.7 | UBUNTU-CVE-2025-40186 |
| Ubuntu:24.04:LTS | linux-oracle-6.17 | 6.17.0-1007.7~24.04.1 | UBUNTU-CVE-2025-40186 |
| Ubuntu:22.04:LTS | linux-oracle-6.5 | no fix listed | UBUNTU-CVE-2025-40186 |
| Ubuntu:25.10 | linux-raspi | 6.17.0-1008.8 | UBUNTU-CVE-2025-40186 |
| Ubuntu:24.04:LTS | linux-raspi-realtime | no fix listed | UBUNTU-CVE-2025-40186 |
| Ubuntu:22.04:LTS | linux-realtime | no fix listed | UBUNTU-CVE-2025-40186 |
| Ubuntu:24.04:LTS | linux-realtime | no fix listed | UBUNTU-CVE-2025-40186 |
| Ubuntu:25.10 | linux-realtime | 6.17.0-1006.7 | UBUNTU-CVE-2025-40186 |
| Ubuntu:22.04:LTS | linux-riscv | no fix listed | UBUNTU-CVE-2025-40186 |
| Ubuntu:24.04:LTS | linux-riscv | no fix listed | UBUNTU-CVE-2025-40186 |
| Ubuntu:25.10 | linux-riscv | 6.17.0-14.14.1 | UBUNTU-CVE-2025-40186 |
| Ubuntu:22.04:LTS | linux-riscv-5.19 | no fix listed | UBUNTU-CVE-2025-40186 |
| Ubuntu:22.04:LTS | linux-riscv-6.5 | no fix listed | UBUNTU-CVE-2025-40186 |
| Ubuntu:22.04:LTS | linux-starfive-5.19 | no fix listed | UBUNTU-CVE-2025-40186 |
| Ubuntu:22.04:LTS | linux-starfive-6.2 | no fix listed | UBUNTU-CVE-2025-40186 |
| Ubuntu:22.04:LTS | linux-starfive-6.5 | no fix listed | UBUNTU-CVE-2025-40186 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| Linux | Linux | 7ec092a91ff351dcde89c23e795b73a328274db6 – before e359b742eac1eac75cff4e38ee2e8cea492acd9ba4378dedd6e07e62f2fccb17d78c9665718763d0 – before ff6a8883f96a5bc74241ce5b3d431a6dcfa2124d33a4fdf0b4a25f8ce65380c3b0136b407ca57609 – before eb85ad5f23268d64b037bfb545cbcba3752f90c717d699727577814198d744d6afe54735c6b54c99 – before 643a94b0cf767325e953591c212be2eb826b9d7fdfd06131107e7b699ef1e2a24ed2f7d17c917753 – before 422c1c173c39bbbae1e0eaaf8aefe40b2596233bfa4749c065644af4db496b338452a69a3e5147d9 – before c11ace909e873118295e9eb22dc8c58b0b50eb3245c8a6cc2bcd780e634a6ba8e46bffbdf1fc5c01 – before 64dc47a13aa3d9daf7cec29b44dca8e22a6aea1545c8a6cc2bcd780e634a6ba8e46bffbdf1fc5c01 – before 2e7cbbbe3d61c63606994b7ff73c72537afe2e1c |
| Linux | Linux | 6.17 |
References
- https://git.kernel.org/stable/c/e359b742eac1eac75cff4e38ee2e8cea492acd9b
- https://git.kernel.org/stable/c/ff6a8883f96a5bc74241ce5b3d431a6dcfa2124d
- https://git.kernel.org/stable/c/eb85ad5f23268d64b037bfb545cbcba3752f90c7
- https://git.kernel.org/stable/c/643a94b0cf767325e953591c212be2eb826b9d7f
- https://git.kernel.org/stable/c/422c1c173c39bbbae1e0eaaf8aefe40b2596233b
- https://git.kernel.org/stable/c/c11ace909e873118295e9eb22dc8c58b0b50eb32
- https://git.kernel.org/stable/c/64dc47a13aa3d9daf7cec29b44dca8e22a6aea15
- https://git.kernel.org/stable/c/2e7cbbbe3d61c63606994b7ff73c72537afe2e1c