In the Linux kernel, the following vulnerability has been resolved:
tcp: drop secpath at the same time as we currently drop dst
Xiumei reported hitting the WARN in xfrm6tunnelnet_exit while running tests that boil down to: - create a pair of netns - run a basic TCP test over ipcomp6 - delete the pair of netns
The xfrmstate found on spibyaddr was not deleted at the time we delete the netns, because we still have a reference on it. This lingering reference comes from a secpath (which holds a ref on the xfrmstate), which is still attached to an skb. This skb is not leaked, it ends up on skreceivequeue and then gets defer-free'd by skbattemptdeferfree.
The problem happens when we defer freeing an skb (push it on one CPU's deferlist), and don't flush that list before the netns is deleted. In that case, we still have a reference on the xfrmstate that we don't expect at this point.
We already drop the skb's dst in the TCP receive path when it's no longer needed, so let's also drop the secpath. At this point, tcp_filter has already called into the LSM hooks that may require the secpath, so it should not be needed anymore. However, in some of those places, the MPTCP extension has just been attached to the skb, so we cannot simply drop all extensions.
[
{
"deprecated": false,
"target": {
"file": "net/ipv4/tcp_ipv4.c"
},
"digest": {
"threshold": 0.9,
"line_hashes": [
"281036985110759975392557721206013801146",
"206971151587237986839801621348997038886",
"201973351618511627083987073515990740701",
"326803920925431319361769260137653812960"
]
},
"id": "CVE-2025-21864-1e1549f7",
"signature_type": "Line",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@cd34a07f744451e2ecf9005bb7d24d0b2fb83656",
"signature_version": "v1"
},
{
"deprecated": false,
"target": {
"file": "net/ipv4/tcp_ipv4.c"
},
"digest": {
"threshold": 0.9,
"line_hashes": [
"281036985110759975392557721206013801146",
"206971151587237986839801621348997038886",
"201973351618511627083987073515990740701",
"326803920925431319361769260137653812960"
]
},
"id": "CVE-2025-21864-2a33a66d",
"signature_type": "Line",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@87858bbf21da239ace300d61dd209907995c0491",
"signature_version": "v1"
},
{
"deprecated": false,
"target": {
"file": "net/ipv4/tcp_fastopen.c"
},
"digest": {
"threshold": 0.9,
"line_hashes": [
"222617021479271947546600767590039171877",
"286654314085155106638600666990231759665",
"207253263912207183689347711895659926107",
"105086394927151358970404411204786766124",
"39698980941047083157874700503269581324",
"72812408243174631070956953514643950542",
"52383197099624940321665608306714849378",
"232618876156787130859432253302904645432"
]
},
"id": "CVE-2025-21864-2df14711",
"signature_type": "Line",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@f1d5e6a5e468308af7759cf5276779d3155c5e98",
"signature_version": "v1"
},
{
"deprecated": false,
"target": {
"file": "include/net/tcp.h"
},
"digest": {
"threshold": 0.9,
"line_hashes": [
"207621494374337583337954037414808262917",
"206328888772146235479418386773671680150",
"8890647121921488689231529546740253722",
"309649142979302524837468307260451105915",
"338211138665045994709600224274343835050",
"241377810298197725316477753375365580460",
"296430841605372565549063276164660419030"
]
},
"id": "CVE-2025-21864-34d55ee6",
"signature_type": "Line",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@69cafd9413084cd5012cf5d7c7ec6f3d493726d9",
"signature_version": "v1"
},
{
"deprecated": false,
"target": {
"file": "net/ipv4/tcp_fastopen.c",
"function": "tcp_fastopen_add_skb"
},
"digest": {
"length": 718.0,
"function_hash": "129639135005446605019083059988149824768"
},
"id": "CVE-2025-21864-352ef8bf",
"signature_type": "Function",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@f1d5e6a5e468308af7759cf5276779d3155c5e98",
"signature_version": "v1"
},
{
"deprecated": false,
"target": {
"file": "net/ipv4/tcp_fastopen.c",
"function": "tcp_fastopen_add_skb"
},
"digest": {
"length": 718.0,
"function_hash": "129639135005446605019083059988149824768"
},
"id": "CVE-2025-21864-3542c8f3",
"signature_type": "Function",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@87858bbf21da239ace300d61dd209907995c0491",
"signature_version": "v1"
},
{
"deprecated": false,
"target": {
"file": "net/ipv4/tcp_fastopen.c"
},
"digest": {
"threshold": 0.9,
"line_hashes": [
"222617021479271947546600767590039171877",
"286654314085155106638600666990231759665",
"207253263912207183689347711895659926107",
"105086394927151358970404411204786766124",
"39698980941047083157874700503269581324",
"72812408243174631070956953514643950542",
"52383197099624940321665608306714849378",
"232618876156787130859432253302904645432"
]
},
"id": "CVE-2025-21864-3e432987",
"signature_type": "Line",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@cd34a07f744451e2ecf9005bb7d24d0b2fb83656",
"signature_version": "v1"
},
{
"deprecated": false,
"target": {
"file": "net/ipv4/tcp_input.c",
"function": "tcp_queue_rcv"
},
"digest": {
"length": 388.0,
"function_hash": "31538387340150128950981280239991607161"
},
"id": "CVE-2025-21864-42300265",
"signature_type": "Function",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@cd34a07f744451e2ecf9005bb7d24d0b2fb83656",
"signature_version": "v1"
},
{
"deprecated": false,
"target": {
"file": "net/ipv4/tcp_input.c"
},
"digest": {
"threshold": 0.9,
"line_hashes": [
"202007361990544886956573234438284738149",
"20465081459969702190373694122473172282",
"200671296071803460237078024157545414806",
"36458714811776732728503663670783109527",
"325363794441136918030571261227175943949",
"248466031050535631280598442529743196216",
"127453661112447412501841624180659981299",
"69050883589279645114537393322096091916",
"213822990202657584117669034181302935010",
"282767166511907239808423150227893838305",
"126795519571985503943592321861907017251",
"59494079312246807247415674750115028421",
"139552200706303669828246904217912764120",
"339001245079887707191081236326324103423",
"297491708066274046052878626230607106802",
"298638686706315759217888366905330734911"
]
},
"id": "CVE-2025-21864-46c562b8",
"signature_type": "Line",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@f1d5e6a5e468308af7759cf5276779d3155c5e98",
"signature_version": "v1"
},
{
"deprecated": false,
"target": {
"file": "net/ipv4/tcp_input.c",
"function": "tcp_ofo_queue"
},
"digest": {
"length": 1134.0,
"function_hash": "81607696785254007220516415021582162728"
},
"id": "CVE-2025-21864-4a2973e6",
"signature_type": "Function",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@69cafd9413084cd5012cf5d7c7ec6f3d493726d9",
"signature_version": "v1"
},
{
"deprecated": false,
"target": {
"file": "net/ipv4/tcp_input.c",
"function": "tcp_ofo_queue"
},
"digest": {
"length": 1134.0,
"function_hash": "81607696785254007220516415021582162728"
},
"id": "CVE-2025-21864-4a83cd3c",
"signature_type": "Function",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@f1d5e6a5e468308af7759cf5276779d3155c5e98",
"signature_version": "v1"
},
{
"deprecated": false,
"target": {
"file": "net/ipv4/tcp_fastopen.c"
},
"digest": {
"threshold": 0.9,
"line_hashes": [
"222617021479271947546600767590039171877",
"286654314085155106638600666990231759665",
"207253263912207183689347711895659926107",
"105086394927151358970404411204786766124",
"39698980941047083157874700503269581324",
"72812408243174631070956953514643950542",
"52383197099624940321665608306714849378",
"232618876156787130859432253302904645432"
]
},
"id": "CVE-2025-21864-4eb33078",
"signature_type": "Line",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@87858bbf21da239ace300d61dd209907995c0491",
"signature_version": "v1"
},
{
"deprecated": false,
"target": {
"file": "net/ipv4/tcp_input.c",
"function": "tcp_queue_rcv"
},
"digest": {
"length": 388.0,
"function_hash": "31538387340150128950981280239991607161"
},
"id": "CVE-2025-21864-5ecb29f4",
"signature_type": "Function",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@f1d5e6a5e468308af7759cf5276779d3155c5e98",
"signature_version": "v1"
},
{
"deprecated": false,
"target": {
"file": "net/ipv4/tcp_input.c",
"function": "tcp_ofo_queue"
},
"digest": {
"length": 1134.0,
"function_hash": "81607696785254007220516415021582162728"
},
"id": "CVE-2025-21864-6c254bb8",
"signature_type": "Function",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@cd34a07f744451e2ecf9005bb7d24d0b2fb83656",
"signature_version": "v1"
},
{
"deprecated": false,
"target": {
"file": "net/ipv4/tcp_input.c",
"function": "tcp_queue_rcv"
},
"digest": {
"length": 388.0,
"function_hash": "31538387340150128950981280239991607161"
},
"id": "CVE-2025-21864-75dc5c1d",
"signature_type": "Function",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@87858bbf21da239ace300d61dd209907995c0491",
"signature_version": "v1"
},
{
"deprecated": false,
"target": {
"file": "include/net/tcp.h"
},
"digest": {
"threshold": 0.9,
"line_hashes": [
"152856454999750482653147374046859031117",
"206328888772146235479418386773671680150",
"8890647121921488689231529546740253722",
"309649142979302524837468307260451105915",
"338211138665045994709600224274343835050",
"241377810298197725316477753375365580460",
"296430841605372565549063276164660419030"
]
},
"id": "CVE-2025-21864-8d5d7e9e",
"signature_type": "Line",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@87858bbf21da239ace300d61dd209907995c0491",
"signature_version": "v1"
},
{
"deprecated": false,
"target": {
"file": "net/ipv4/tcp_input.c",
"function": "tcp_queue_rcv"
},
"digest": {
"length": 388.0,
"function_hash": "31538387340150128950981280239991607161"
},
"id": "CVE-2025-21864-a77deca4",
"signature_type": "Function",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@69cafd9413084cd5012cf5d7c7ec6f3d493726d9",
"signature_version": "v1"
},
{
"deprecated": false,
"target": {
"file": "net/ipv4/tcp_fastopen.c",
"function": "tcp_fastopen_add_skb"
},
"digest": {
"length": 718.0,
"function_hash": "129639135005446605019083059988149824768"
},
"id": "CVE-2025-21864-b11745b0",
"signature_type": "Function",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@69cafd9413084cd5012cf5d7c7ec6f3d493726d9",
"signature_version": "v1"
},
{
"deprecated": false,
"target": {
"file": "include/net/tcp.h"
},
"digest": {
"threshold": 0.9,
"line_hashes": [
"152856454999750482653147374046859031117",
"206328888772146235479418386773671680150",
"8890647121921488689231529546740253722",
"309649142979302524837468307260451105915",
"338211138665045994709600224274343835050",
"241377810298197725316477753375365580460",
"296430841605372565549063276164660419030"
]
},
"id": "CVE-2025-21864-b61c55c3",
"signature_type": "Line",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@f1d5e6a5e468308af7759cf5276779d3155c5e98",
"signature_version": "v1"
},
{
"deprecated": false,
"target": {
"file": "net/ipv4/tcp_fastopen.c"
},
"digest": {
"threshold": 0.9,
"line_hashes": [
"222617021479271947546600767590039171877",
"286654314085155106638600666990231759665",
"207253263912207183689347711895659926107",
"105086394927151358970404411204786766124",
"39698980941047083157874700503269581324",
"72812408243174631070956953514643950542",
"52383197099624940321665608306714849378",
"232618876156787130859432253302904645432"
]
},
"id": "CVE-2025-21864-bebebd8d",
"signature_type": "Line",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@69cafd9413084cd5012cf5d7c7ec6f3d493726d9",
"signature_version": "v1"
},
{
"deprecated": false,
"target": {
"file": "net/ipv4/tcp_ipv4.c"
},
"digest": {
"threshold": 0.9,
"line_hashes": [
"281036985110759975392557721206013801146",
"206971151587237986839801621348997038886",
"201973351618511627083987073515990740701",
"326803920925431319361769260137653812960"
]
},
"id": "CVE-2025-21864-cdc8e35b",
"signature_type": "Line",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@69cafd9413084cd5012cf5d7c7ec6f3d493726d9",
"signature_version": "v1"
},
{
"deprecated": false,
"target": {
"file": "net/ipv4/tcp_input.c"
},
"digest": {
"threshold": 0.9,
"line_hashes": [
"202007361990544886956573234438284738149",
"20465081459969702190373694122473172282",
"200671296071803460237078024157545414806",
"36458714811776732728503663670783109527",
"325363794441136918030571261227175943949",
"248466031050535631280598442529743196216",
"127453661112447412501841624180659981299",
"69050883589279645114537393322096091916",
"213822990202657584117669034181302935010",
"282767166511907239808423150227893838305",
"126795519571985503943592321861907017251",
"59494079312246807247415674750115028421",
"139552200706303669828246904217912764120",
"339001245079887707191081236326324103423",
"297491708066274046052878626230607106802",
"298638686706315759217888366905330734911"
]
},
"id": "CVE-2025-21864-d1dd9ae8",
"signature_type": "Line",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@69cafd9413084cd5012cf5d7c7ec6f3d493726d9",
"signature_version": "v1"
},
{
"deprecated": false,
"target": {
"file": "net/ipv4/tcp_ipv4.c"
},
"digest": {
"threshold": 0.9,
"line_hashes": [
"281036985110759975392557721206013801146",
"206971151587237986839801621348997038886",
"201973351618511627083987073515990740701",
"326803920925431319361769260137653812960"
]
},
"id": "CVE-2025-21864-d262850b",
"signature_type": "Line",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@f1d5e6a5e468308af7759cf5276779d3155c5e98",
"signature_version": "v1"
},
{
"deprecated": false,
"target": {
"file": "net/ipv4/tcp_input.c",
"function": "tcp_ofo_queue"
},
"digest": {
"length": 1134.0,
"function_hash": "81607696785254007220516415021582162728"
},
"id": "CVE-2025-21864-dabc71dd",
"signature_type": "Function",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@87858bbf21da239ace300d61dd209907995c0491",
"signature_version": "v1"
},
{
"deprecated": false,
"target": {
"file": "net/ipv4/tcp_fastopen.c",
"function": "tcp_fastopen_add_skb"
},
"digest": {
"length": 718.0,
"function_hash": "129639135005446605019083059988149824768"
},
"id": "CVE-2025-21864-eb14faee",
"signature_type": "Function",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@cd34a07f744451e2ecf9005bb7d24d0b2fb83656",
"signature_version": "v1"
},
{
"deprecated": false,
"target": {
"file": "include/net/tcp.h"
},
"digest": {
"threshold": 0.9,
"line_hashes": [
"207621494374337583337954037414808262917",
"206328888772146235479418386773671680150",
"8890647121921488689231529546740253722",
"309649142979302524837468307260451105915",
"338211138665045994709600224274343835050",
"241377810298197725316477753375365580460",
"296430841605372565549063276164660419030"
]
},
"id": "CVE-2025-21864-ed7c88f7",
"signature_type": "Line",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@cd34a07f744451e2ecf9005bb7d24d0b2fb83656",
"signature_version": "v1"
},
{
"deprecated": false,
"target": {
"file": "net/ipv4/tcp_input.c"
},
"digest": {
"threshold": 0.9,
"line_hashes": [
"202007361990544886956573234438284738149",
"20465081459969702190373694122473172282",
"200671296071803460237078024157545414806",
"36458714811776732728503663670783109527",
"325363794441136918030571261227175943949",
"248466031050535631280598442529743196216",
"127453661112447412501841624180659981299",
"69050883589279645114537393322096091916",
"213822990202657584117669034181302935010",
"282767166511907239808423150227893838305",
"126795519571985503943592321861907017251",
"59494079312246807247415674750115028421",
"139552200706303669828246904217912764120",
"339001245079887707191081236326324103423",
"297491708066274046052878626230607106802",
"298638686706315759217888366905330734911"
]
},
"id": "CVE-2025-21864-eda2df38",
"signature_type": "Line",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@cd34a07f744451e2ecf9005bb7d24d0b2fb83656",
"signature_version": "v1"
},
{
"deprecated": false,
"target": {
"file": "net/ipv4/tcp_input.c"
},
"digest": {
"threshold": 0.9,
"line_hashes": [
"202007361990544886956573234438284738149",
"20465081459969702190373694122473172282",
"200671296071803460237078024157545414806",
"36458714811776732728503663670783109527",
"325363794441136918030571261227175943949",
"248466031050535631280598442529743196216",
"127453661112447412501841624180659981299",
"69050883589279645114537393322096091916",
"213822990202657584117669034181302935010",
"282767166511907239808423150227893838305",
"126795519571985503943592321861907017251",
"59494079312246807247415674750115028421",
"139552200706303669828246904217912764120",
"339001245079887707191081236326324103423",
"297491708066274046052878626230607106802",
"298638686706315759217888366905330734911"
]
},
"id": "CVE-2025-21864-fb6709a8",
"signature_type": "Line",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@87858bbf21da239ace300d61dd209907995c0491",
"signature_version": "v1"
}
]