{"api_version":"1","generated_at":"2026-12-02T02:46:53+00:00","cve":"CVE-2026-139342","urls":{"html":"https://cve.report/CVE-2026-139342","api":"https://cve.report/api/cve/CVE-2026-139342.json","docs":"https://cve.report/api","cve_org":"https://www.cve.org/CVERecord?id=CVE-2026-139342","nvd":"https://nvd.nist.gov/vuln/detail/CVE-2026-139342"},"summary":{"title":"net: use the full socket in sk_mc_loop()","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nnet: use the full socket in sk_mc_loop()\n\nsk_mc_loop() is called from ip_mc_output() and ip6_finish_output2()\nwith skb->sk, which is not always a full socket:\n\n- Since commit ca6fb0651883 (\"tcp: attach SYNACK messages to request\n  sockets instead of listener\"), a SYNACK is attached to its request\n  socket.\n\n- Since commit 79636038d37e (\"ipv4: tcp: give socket pointer to control\n  skbs\"), an ACK or RST sent by ip_send_unicast_reply() on behalf of a\n  TIME_WAIT socket is attached to the timewait socket.\n\nWhen such a packet uses a multicast route, inet_test_bit(MC_LOOP, sk)\nreads inet_flags past the end of the request or timewait socket.\n\nThis happens for instance when a SYN with a multicast source address\nreaches a listener, after being looped back with its dst attached, so\nthat ip_rcv_finish_core() skips the martian source check. A raw\nIP_HDRINCL socket sending to a local address does this, as does\nre-injection by nft dup or the iptables TEE target. The destination\ncan also come from a source route option, or from a route of type\nmulticast covering a unicast prefix.\n\nBUG: KASAN: slab-out-of-bounds in sk_mc_loop+0x111/0x170\nRead of size 8 at addr ffff88800f2b7f10 by task repro-raw/470\nCall Trace:\n <IRQ>\n sk_mc_loop+0x111/0x170\n ip_mc_output+0x355/0x930\n ip_build_and_send_pkt+0xb87/0xc50\n tcp_v4_send_synack+0x500/0x6f0\n tcp_conn_request+0x2135/0x2d90\n tcp_v4_conn_request+0xa5/0x210\n tcp_rcv_state_process+0x136e/0x6920\n tcp_v4_do_rcv+0x339/0xb10\n tcp_v4_rcv+0x34ab/0x3ab0\n ip_protocol_deliver_rcu+0x6e/0x3e0\n ip_local_deliver_finish+0x34d/0x510\n ip_local_deliver+0x1bc/0x310\n ip_rcv+0x390/0x410\n __netif_receive_skb_one_core+0x199/0x1e0\n process_backlog+0x239/0x680\n __napi_poll+0xb5/0x650\n net_rx_action+0x980/0xd60\n handle_softirqs+0x17f/0x590\n do_softirq+0x3f/0x60\n </IRQ>\n\nThe buggy address belongs to the object at ffff88800f2b7d60\n which belongs to the cache request_sock_TCP of size 312\nThe buggy address is located 120 bytes to the right of\n allocated 312-byte region [ffff88800f2b7d60, ffff88800f2b7e98)\n\nUse sk_const_to_full_sk(), which restores the behavior from before\nthe two commits above: a request socket uses the setting of its\nlistener, and a timewait socket gets the default (loop back), as the\nper-cpu control socket used before had.\n\n[edumazet: rewrote the changelog, added the TIME_WAIT case]","state":"PUBLISHED","assigner":"Linux","published_at":"2026-11-30 14:18:59","updated_at":"2026-11-30 14:18:59"},"problem_types":[],"metrics":[],"references":[{"url":"https://git.kernel.org/stable/c/31b564f70d8819a1c11d0fd504fe582fc0e0f0cf","name":"https://git.kernel.org/stable/c/31b564f70d8819a1c11d0fd504fe582fc0e0f0cf","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/20627c3993c0452beeba5b1f3dda9804638d9662","name":"https://git.kernel.org/stable/c/20627c3993c0452beeba5b1f3dda9804638d9662","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/b8acee3bbe2da8af15b31b147bb1bd114dac8267","name":"https://git.kernel.org/stable/c/b8acee3bbe2da8af15b31b147bb1bd114dac8267","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/946a4fb99e14ac6c6ac9372ae29d48b4895340fc","name":"https://git.kernel.org/stable/c/946a4fb99e14ac6c6ac9372ae29d48b4895340fc","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/e1fbaccdf945b80665cb1694ba0aacd52ba46860","name":"https://git.kernel.org/stable/c/e1fbaccdf945b80665cb1694ba0aacd52ba46860","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://www.cve.org/CVERecord?id=CVE-2026-139342","name":"CVE Program record","refsource":"CVE.ORG","tags":["canonical"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-139342","name":"NVD vulnerability detail","refsource":"NVD","tags":["canonical","analysis"]}],"affected":[{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected ca6fb06518836ef9b65dc0aac02ff97704d52a05 e1fbaccdf945b80665cb1694ba0aacd52ba46860 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected ca6fb06518836ef9b65dc0aac02ff97704d52a05 b8acee3bbe2da8af15b31b147bb1bd114dac8267 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected ca6fb06518836ef9b65dc0aac02ff97704d52a05 20627c3993c0452beeba5b1f3dda9804638d9662 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected ca6fb06518836ef9b65dc0aac02ff97704d52a05 946a4fb99e14ac6c6ac9372ae29d48b4895340fc git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected ca6fb06518836ef9b65dc0aac02ff97704d52a05 31b564f70d8819a1c11d0fd504fe582fc0e0f0cf git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 4.4","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 4.4 semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.6.163 6.6.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.12.119 6.12.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.18.65 6.18.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 7.3.6 7.3.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 7.4-rc1 * original_commit_for_fix","platforms":[]}],"timeline":[],"solutions":[],"workarounds":[],"exploits":[],"credits":[],"nvd_cpes":[],"vendor_comments":[],"enrichments":{"kev":null,"epss":null,"legacy_qids":[]},"source_records":{"cve_program":{"containers":{"cna":{"affected":[{"defaultStatus":"unaffected","product":"Linux","programFiles":["net/core/sock.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","vendor":"Linux","versions":[{"lessThan":"e1fbaccdf945b80665cb1694ba0aacd52ba46860","status":"affected","version":"ca6fb06518836ef9b65dc0aac02ff97704d52a05","versionType":"git"},{"lessThan":"b8acee3bbe2da8af15b31b147bb1bd114dac8267","status":"affected","version":"ca6fb06518836ef9b65dc0aac02ff97704d52a05","versionType":"git"},{"lessThan":"20627c3993c0452beeba5b1f3dda9804638d9662","status":"affected","version":"ca6fb06518836ef9b65dc0aac02ff97704d52a05","versionType":"git"},{"lessThan":"946a4fb99e14ac6c6ac9372ae29d48b4895340fc","status":"affected","version":"ca6fb06518836ef9b65dc0aac02ff97704d52a05","versionType":"git"},{"lessThan":"31b564f70d8819a1c11d0fd504fe582fc0e0f0cf","status":"affected","version":"ca6fb06518836ef9b65dc0aac02ff97704d52a05","versionType":"git"}]},{"defaultStatus":"affected","product":"Linux","programFiles":["net/core/sock.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","vendor":"Linux","versions":[{"status":"affected","version":"4.4"},{"lessThan":"4.4","status":"unaffected","version":"0","versionType":"semver"},{"lessThanOrEqual":"6.6.*","status":"unaffected","version":"6.6.163","versionType":"semver"},{"lessThanOrEqual":"6.12.*","status":"unaffected","version":"6.12.119","versionType":"semver"},{"lessThanOrEqual":"6.18.*","status":"unaffected","version":"6.18.65","versionType":"semver"},{"lessThanOrEqual":"7.3.*","status":"unaffected","version":"7.3.6","versionType":"semver"},{"lessThanOrEqual":"*","status":"unaffected","version":"7.4-rc1","versionType":"original_commit_for_fix"}]}],"cpeApplicability":[{"nodes":[{"cpeMatch":[{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.6.163","versionStartIncluding":"4.4","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.12.119","versionStartIncluding":"4.4","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.18.65","versionStartIncluding":"4.4","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"7.3.6","versionStartIncluding":"4.4","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"7.4-rc1","versionStartIncluding":"4.4","vulnerable":true}],"negate":false,"operator":"OR"}]}],"descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nnet: use the full socket in sk_mc_loop()\n\nsk_mc_loop() is called from ip_mc_output() and ip6_finish_output2()\nwith skb->sk, which is not always a full socket:\n\n- Since commit ca6fb0651883 (\"tcp: attach SYNACK messages to request\n  sockets instead of listener\"), a SYNACK is attached to its request\n  socket.\n\n- Since commit 79636038d37e (\"ipv4: tcp: give socket pointer to control\n  skbs\"), an ACK or RST sent by ip_send_unicast_reply() on behalf of a\n  TIME_WAIT socket is attached to the timewait socket.\n\nWhen such a packet uses a multicast route, inet_test_bit(MC_LOOP, sk)\nreads inet_flags past the end of the request or timewait socket.\n\nThis happens for instance when a SYN with a multicast source address\nreaches a listener, after being looped back with its dst attached, so\nthat ip_rcv_finish_core() skips the martian source check. A raw\nIP_HDRINCL socket sending to a local address does this, as does\nre-injection by nft dup or the iptables TEE target. The destination\ncan also come from a source route option, or from a route of type\nmulticast covering a unicast prefix.\n\nBUG: KASAN: slab-out-of-bounds in sk_mc_loop+0x111/0x170\nRead of size 8 at addr ffff88800f2b7f10 by task repro-raw/470\nCall Trace:\n <IRQ>\n sk_mc_loop+0x111/0x170\n ip_mc_output+0x355/0x930\n ip_build_and_send_pkt+0xb87/0xc50\n tcp_v4_send_synack+0x500/0x6f0\n tcp_conn_request+0x2135/0x2d90\n tcp_v4_conn_request+0xa5/0x210\n tcp_rcv_state_process+0x136e/0x6920\n tcp_v4_do_rcv+0x339/0xb10\n tcp_v4_rcv+0x34ab/0x3ab0\n ip_protocol_deliver_rcu+0x6e/0x3e0\n ip_local_deliver_finish+0x34d/0x510\n ip_local_deliver+0x1bc/0x310\n ip_rcv+0x390/0x410\n __netif_receive_skb_one_core+0x199/0x1e0\n process_backlog+0x239/0x680\n __napi_poll+0xb5/0x650\n net_rx_action+0x980/0xd60\n handle_softirqs+0x17f/0x590\n do_softirq+0x3f/0x60\n </IRQ>\n\nThe buggy address belongs to the object at ffff88800f2b7d60\n which belongs to the cache request_sock_TCP of size 312\nThe buggy address is located 120 bytes to the right of\n allocated 312-byte region [ffff88800f2b7d60, ffff88800f2b7e98)\n\nUse sk_const_to_full_sk(), which restores the behavior from before\nthe two commits above: a request socket uses the setting of its\nlistener, and a timewait socket gets the default (loop back), as the\nper-cpu control socket used before had.\n\n[edumazet: rewrote the changelog, added the TIME_WAIT case]"}],"providerMetadata":{"dateUpdated":"2026-11-30T13:33:52.531Z","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","shortName":"Linux"},"references":[{"url":"https://git.kernel.org/stable/c/e1fbaccdf945b80665cb1694ba0aacd52ba46860"},{"url":"https://git.kernel.org/stable/c/b8acee3bbe2da8af15b31b147bb1bd114dac8267"},{"url":"https://git.kernel.org/stable/c/20627c3993c0452beeba5b1f3dda9804638d9662"},{"url":"https://git.kernel.org/stable/c/946a4fb99e14ac6c6ac9372ae29d48b4895340fc"},{"url":"https://git.kernel.org/stable/c/31b564f70d8819a1c11d0fd504fe582fc0e0f0cf"}],"title":"net: use the full socket in sk_mc_loop()","x_generator":{"engine":"bippy-1.2.0"}}},"cveMetadata":{"assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","assignerShortName":"Linux","cveId":"CVE-2026-139342","datePublished":"2026-11-30T13:33:52.531Z","dateReserved":"2026-11-30T13:22:15.928Z","dateUpdated":"2026-11-30T13:33:52.531Z","state":"PUBLISHED"},"dataType":"CVE_RECORD","dataVersion":"5.2"},"nvd":{"publishedDate":"2026-11-30 14:18:59","lastModifiedDate":"2026-11-30 14:18:59","problem_types":[],"metrics":[],"configurations":[]},"legacy_mitre":{"record":{"CveYear":"2026","CveId":"139342","Ordinal":"1","Title":"net: use the full socket in sk_mc_loop()","CVE":"CVE-2026-139342","Year":"2026"},"notes":[{"CveYear":"2026","CveId":"139342","Ordinal":"1","NoteData":"In the Linux kernel, the following vulnerability has been resolved:\n\nnet: use the full socket in sk_mc_loop()\n\nsk_mc_loop() is called from ip_mc_output() and ip6_finish_output2()\nwith skb->sk, which is not always a full socket:\n\n- Since commit ca6fb0651883 (\"tcp: attach SYNACK messages to request\n  sockets instead of listener\"), a SYNACK is attached to its request\n  socket.\n\n- Since commit 79636038d37e (\"ipv4: tcp: give socket pointer to control\n  skbs\"), an ACK or RST sent by ip_send_unicast_reply() on behalf of a\n  TIME_WAIT socket is attached to the timewait socket.\n\nWhen such a packet uses a multicast route, inet_test_bit(MC_LOOP, sk)\nreads inet_flags past the end of the request or timewait socket.\n\nThis happens for instance when a SYN with a multicast source address\nreaches a listener, after being looped back with its dst attached, so\nthat ip_rcv_finish_core() skips the martian source check. A raw\nIP_HDRINCL socket sending to a local address does this, as does\nre-injection by nft dup or the iptables TEE target. The destination\ncan also come from a source route option, or from a route of type\nmulticast covering a unicast prefix.\n\nBUG: KASAN: slab-out-of-bounds in sk_mc_loop+0x111/0x170\nRead of size 8 at addr ffff88800f2b7f10 by task repro-raw/470\nCall Trace:\n <IRQ>\n sk_mc_loop+0x111/0x170\n ip_mc_output+0x355/0x930\n ip_build_and_send_pkt+0xb87/0xc50\n tcp_v4_send_synack+0x500/0x6f0\n tcp_conn_request+0x2135/0x2d90\n tcp_v4_conn_request+0xa5/0x210\n tcp_rcv_state_process+0x136e/0x6920\n tcp_v4_do_rcv+0x339/0xb10\n tcp_v4_rcv+0x34ab/0x3ab0\n ip_protocol_deliver_rcu+0x6e/0x3e0\n ip_local_deliver_finish+0x34d/0x510\n ip_local_deliver+0x1bc/0x310\n ip_rcv+0x390/0x410\n __netif_receive_skb_one_core+0x199/0x1e0\n process_backlog+0x239/0x680\n __napi_poll+0xb5/0x650\n net_rx_action+0x980/0xd60\n handle_softirqs+0x17f/0x590\n do_softirq+0x3f/0x60\n </IRQ>\n\nThe buggy address belongs to the object at ffff88800f2b7d60\n which belongs to the cache request_sock_TCP of size 312\nThe buggy address is located 120 bytes to the right of\n allocated 312-byte region [ffff88800f2b7d60, ffff88800f2b7e98)\n\nUse sk_const_to_full_sk(), which restores the behavior from before\nthe two commits above: a request socket uses the setting of its\nlistener, and a timewait socket gets the default (loop back), as the\nper-cpu control socket used before had.\n\n[edumazet: rewrote the changelog, added the TIME_WAIT case]","Type":"Description","Title":"net: use the full socket in sk_mc_loop()"}]}}}