{"answers":{"affected":"","exploited":"There is no known exploitation of CVE-2025-40186 in the wild and no public exploit code.","fix":"Apply the vendor's patch.","what":"CVE-2025-40186 is a high-severity use after free vulnerability in Linux, published on 12 Nov 2025. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2025-40186 and fix it if it is affected.\n\nWhat it is: CVE-2025-40186 is a high-severity use after free vulnerability in Linux, published on 12 Nov 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.\nExploitation: There is no known exploitation of CVE-2025-40186 in the wild and no public exploit code.\n\nAffected product: Linux. No package-level version data is available, so check the vendor advisory linked from the reference page.\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2025-40186/ (Markdown: https://insights.sbomify.com/CVE-2025-40186/index.md)","id":"CVE-2025-40186","markdown":"https://insights.sbomify.com/CVE-2025-40186/index.md","name":"CVE-2025-40186","record":{"aliases":["BELL-CVE-2025-40186","DEBIAN-CVE-2025-40186","GHSA-qx52-pj36-489j","ROOT-OS-DEBIAN-11-CVE-2025-40186","ROOT-OS-DEBIAN-13-CVE-2025-40186","SUSE-SU-2026:0525-1","SUSE-SU-2026:20541-1","SUSE-SU-2026:20558-1","SUSE-SU-2026:20606-1","UBUNTU-CVE-2025-40186"],"analysis":{"component_type":"kernel","fix_type":"patch","impacts":["denial_of_service","code_execution"],"network_reachable":"yes","non_default_config":false,"product_category":"Linux kernel TCP","requires_auth":"none","summary":"A use-after-free vulnerability in the Linux kernel TCP stack allows attackers to cause a denial of service or potentially execute code via race conditions during connection handling.","user_interaction":"not_required","vuln_class":"use_after_free"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"Linux","cpe":[],"cvss":{"score":8.1,"severity":"high","source":"cna","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H","version":"3.1"},"cwes":[],"description":"In the Linux kernel, the following vulnerability has been resolved:\n\ntcp: Don't call reqsk_fastopen_remove() in tcp_conn_request().\n\nsyzbot reported the splat below in tcp_conn_request(). [0]\n\nIf a listener is close()d while a TFO socket is being processed in\ntcp_conn_request(), inet_csk_reqsk_queue_add() does not set reqsk-\u003esk\nand calls inet_child_forget(), which calls tcp_disconnect() for the\nTFO socket.\n\nAfter the cited commit, tcp_disconnect() calls reqsk_fastopen_remove(),\nwhere reqsk_put() is called due to !reqsk-\u003esk.\n\nThen, reqsk_fastopen_remove() in tcp_conn_request() decrements the\nlast req-\u003ersk_refcnt and frees reqsk, and __reqsk_free() at the\ndrop_and_free label causes the refcount underflow for the listener\nand double-free of the reqsk.\n\nLet's remove reqsk_fastopen_remove() in tcp_conn_request().\n\nNote that other callers make sure tp-\u003efastopen_rsk is not NULL.\n\n[0]:\nrefcount_t: underflow; use-after-free.\nWARNING: CPU: 12 PID: 5563 at lib/refcount.c:28 refcount_warn_saturate (lib/refcount.c:28)\nModules linked in:\nCPU: 12 UID: 0 PID: 5563 Comm: syz-executor Not tainted syzkaller #0 PREEMPT(full)\nHardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/2025\nRIP: 0010:refcount_warn_saturate (lib/refcount.c:28)\nCode: 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 \u003c0f\u003e 0b e9 03 5b 76 00 cc 80 3d 7d e4 d6 01 00 0f 85 74 ff ff ff c6\nRSP: 0018:ffffa79fc0304a98 EFLAGS: 00010246\nRAX: d83af4db1c6b3900 RBX: ffff9f65c7a69020 RCX: d83af4db1c6b3900\nRDX: 0000000000000000 RSI: 00000000ffff7fff RDI: ffffffffac78a280\nRBP: 000000009d781b60 R08: 0000000000007fff R09: ffffffffac6ca280\nR10: 0000000000017ffd R11: 0000000000000004 R12: ffff9f65c7b4f100\nR13: ffff9f65c7d23c00 R14: ffff9f65c7d26000 R15: ffff9f65c7a64ef8\nFS:  00007f9f962176c0(0000) GS:ffff9f65fcf00000(0000) knlGS:0000000000000000\nCS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033\nCR2: 0000200000000180 CR3: 000000000dbbe006 CR4: 0000000000372ef0\nCall Trace:\n \u003cIRQ\u003e\n 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)\n tcp_rcv_state_process (net/ipv4/tcp_input.c:6708)\n tcp_v6_do_rcv (net/ipv6/tcp_ipv6.c:1670)\n tcp_v6_rcv (net/ipv6/tcp_ipv6.c:1906)\n ip6_protocol_deliver_rcu (net/ipv6/ip6_input.c:438)\n ip6_input (net/ipv6/ip6_input.c:500)\n ipv6_rcv (net/ipv6/ip6_input.c:311)\n __netif_receive_skb (net/core/dev.c:6104)\n process_backlog (net/core/dev.c:6456)\n __napi_poll (net/core/dev.c:7506)\n net_rx_action (net/core/dev.c:7569 net/core/dev.c:7696)\n handle_softirqs (kernel/softirq.c:579)\n do_softirq (kernel/softirq.c:480)\n \u003c/IRQ\u003e","ecosystems":["SUSE:Linux Enterprise Live Patching 12 SP5","SUSE:Linux Enterprise Server 16.0","SUSE:Linux Enterprise Server for SAP applications 16.0","SUSE:Linux Micro 6.2"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"none_known"},"has_fix":true,"headline":"tcp: Don't call reqsk_fastopen_remove() in tcp_conn_request().","id":"CVE-2025-40186","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":null,"product":null,"products":[],"type":"use_after_free","year":"2025"},"n_packages":5,"n_references":8,"next":{"headline":"net/sctp: fix a null dereference in sctp_disposition sctp_sf_do_5_1D_ce()","id":"CVE-2025-40187"},"packages":[{"ecosystem":"SUSE:Linux Enterprise Live Patching 12 SP5","fixed":["3-2.1"],"introduced":["0"],"last_affected":[],"package":"kgraft-patch-SLE12-SP5_Update_73","purl":"pkg:rpm/suse/kgraft-patch-SLE12-SP5_Update_73\u0026distro=SUSE%20Linux%20Enterprise%20Live%20Patching%2012%20SP5","source":"SUSE-SU-2026:0525-1"},{"ecosystem":"SUSE:Linux Enterprise Server 16.0","fixed":["4-160000.1.1"],"introduced":["0"],"last_affected":[],"package":"kernel-livepatch-SLE16_Update_1","purl":"pkg:rpm/suse/kernel-livepatch-SLE16_Update_1\u0026distro=SUSE%20Linux%20Enterprise%20Server%2016.0","source":"SUSE-SU-2026:20606-1"},{"ecosystem":"SUSE:Linux Enterprise Server for SAP applications 16.0","fixed":["4-160000.1.1"],"introduced":["0"],"last_affected":[],"package":"kernel-livepatch-SLE16_Update_1","purl":"pkg:rpm/suse/kernel-livepatch-SLE16_Update_1\u0026distro=SUSE%20Linux%20Enterprise%20Server%20for%20SAP%20applications%2016.0","source":"SUSE-SU-2026:20606-1"},{"ecosystem":"SUSE:Linux Micro 6.2","fixed":["4-160000.1.1"],"introduced":["0"],"last_affected":[],"package":"kernel-livepatch-SLE16-RT_Update_1","purl":"pkg:rpm/suse/kernel-livepatch-SLE16-RT_Update_1\u0026distro=SUSE%20Linux%20Micro%206.2","source":"SUSE-SU-2026:20558-1"},{"ecosystem":"SUSE:Linux Micro 6.2","fixed":["4-160000.1.1"],"introduced":["0"],"last_affected":[],"package":"kernel-livepatch-SLE16_Update_1","purl":"pkg:rpm/suse/kernel-livepatch-SLE16_Update_1\u0026distro=SUSE%20Linux%20Micro%206.2","source":"SUSE-SU-2026:20541-1"}],"prev":{"headline":"ice: ice_adapter: release xa entry on adapter allocation failure","id":"CVE-2025-40185"},"products":["Linux"],"published":"2025-11-12","related":[],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"SUSE","prefix":"SUSE"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"no","exploitation":"none","technical_impact":"total"},"state":"PUBLISHED","updated":"2026-10-15","vendors":["Linux"]},"summary":"A use-after-free vulnerability in the Linux kernel TCP stack allows attackers to cause a denial of service or potentially execute code via race conditions during connection handling.","url":"https://insights.sbomify.com/CVE-2025-40186/"}