In the Linux kernel, the following vulnerability has been resolved:
mptcp: fix NULL pointer in canacceptnew_subflow
When testing valkey benchmark tool with MPTCP, the kernel panics in 'mptcpcanacceptnewsubflow' because subflow_req->msk is NULL.
Call trace:
mptcpcanacceptnewsubflow (./net/mptcp/subflow.c:63 (discriminator 4)) (P) subflowsynrecvsock (./net/mptcp/subflow.c:854) tcpcheckreq (./net/ipv4/tcpminisocks.c:863) tcpv4rcv (./net/ipv4/tcpipv4.c:2268) ipprotocoldeliverrcu (./net/ipv4/ipinput.c:207) iplocaldeliverfinish (./net/ipv4/ipinput.c:234) iplocaldeliver (./net/ipv4/ipinput.c:254) iprcvfinish (./net/ipv4/ip_input.c:449) ...
According to the debug log, the same req received two SYN-ACK in a very short time, very likely because the client retransmits the syn ack due to multiple reasons.
Even if the packets are transmitted with a relevant time interval, they can be processed by the server on different CPUs concurrently). The 'subflow_req->msk' ownership is transferred to the subflow the first, and there will be a risk of a null pointer dereference here.
This patch fixes this issue by moving the 'subflow_req->msk' under the
own_req == true conditional.
Note that the !msk check in subflowhmacvalid() can be dropped, because the same check already exists under the own_req mpj branch where the code has been moved to.
[
{
"signature_type": "Function",
"id": "CVE-2025-23145-107a7341",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@8cf7fef1bb2ffea7792bcbf71ca00216cecc725d",
"signature_version": "v1",
"deprecated": false,
"target": {
"function": "subflow_syn_recv_sock",
"file": "net/mptcp/subflow.c"
},
"digest": {
"function_hash": "156740566503959515136251995494306653890",
"length": 2181.0
}
},
{
"signature_type": "Function",
"id": "CVE-2025-23145-1168e863",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@855bf0aacd51fced11ea9aa0d5101ee0febaeadb",
"signature_version": "v1",
"deprecated": false,
"target": {
"function": "subflow_syn_recv_sock",
"file": "net/mptcp/subflow.c"
},
"digest": {
"function_hash": "129757677996235055170742995299793925082",
"length": 2638.0
}
},
{
"signature_type": "Function",
"id": "CVE-2025-23145-11c71ef1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@7f9ae060ed64aef8f174c5f1ea513825b1be9af1",
"signature_version": "v1",
"deprecated": false,
"target": {
"function": "subflow_syn_recv_sock",
"file": "net/mptcp/subflow.c"
},
"digest": {
"function_hash": "53818713271188295480277158779726335478",
"length": 2625.0
}
},
{
"signature_type": "Line",
"id": "CVE-2025-23145-3128d1c2",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@443041deb5ef6a1289a99ed95015ec7442f141dc",
"signature_version": "v1",
"deprecated": false,
"target": {
"file": "net/mptcp/subflow.c"
},
"digest": {
"line_hashes": [
"330575720193969180339172818147186272149",
"291840523723373633342819708715973330712",
"306743391402948598269255148867479788510",
"99283543130737175999576482946763314961",
"205258220187354341366477168117782513756",
"206647398938572377008061930329876682148",
"280746739353251186103685147665479976798",
"249703363784353581244378555711191879385",
"138995599797390532524690089504081282957",
"322697125046159390120603890697486772568",
"135102219202007649351355399257848119636",
"268583409291221077902835873092665251442",
"182090870265443213615261890004941992468",
"166576059733663749617845957769075241942",
"164094830352698929123415719012782515497",
"96348490774386929501784062075636981943",
"313017451931283828724767220337956404625"
],
"threshold": 0.9
}
},
{
"signature_type": "Function",
"id": "CVE-2025-23145-38464ef2",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@efd58a8dd9e7a709a90ee486a4247c923d27296f",
"signature_version": "v1",
"deprecated": false,
"target": {
"function": "subflow_syn_recv_sock",
"file": "net/mptcp/subflow.c"
},
"digest": {
"function_hash": "46154309008969913615797684119858132930",
"length": 2793.0
}
},
{
"signature_type": "Function",
"id": "CVE-2025-23145-462c7907",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@dc81e41a307df523072186b241fa8244fecd7803",
"signature_version": "v1",
"deprecated": false,
"target": {
"function": "subflow_hmac_valid",
"file": "net/mptcp/subflow.c"
},
"digest": {
"function_hash": "308970115392658011597490177710528284375",
"length": 404.0
}
},
{
"signature_type": "Function",
"id": "CVE-2025-23145-47fa973c",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@efd58a8dd9e7a709a90ee486a4247c923d27296f",
"signature_version": "v1",
"deprecated": false,
"target": {
"function": "subflow_hmac_valid",
"file": "net/mptcp/subflow.c"
},
"digest": {
"function_hash": "308970115392658011597490177710528284375",
"length": 404.0
}
},
{
"signature_type": "Function",
"id": "CVE-2025-23145-5330b06b",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@4b2649b9717678aeb097893cc49f59311a1ecab0",
"signature_version": "v1",
"deprecated": false,
"target": {
"function": "subflow_hmac_valid",
"file": "net/mptcp/subflow.c"
},
"digest": {
"function_hash": "308970115392658011597490177710528284375",
"length": 404.0
}
},
{
"signature_type": "Function",
"id": "CVE-2025-23145-60cd2468",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@7f9ae060ed64aef8f174c5f1ea513825b1be9af1",
"signature_version": "v1",
"deprecated": false,
"target": {
"function": "subflow_hmac_valid",
"file": "net/mptcp/subflow.c"
},
"digest": {
"function_hash": "328522288265213773859138907043973124239",
"length": 378.0
}
},
{
"signature_type": "Function",
"id": "CVE-2025-23145-640bcf8e",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@855bf0aacd51fced11ea9aa0d5101ee0febaeadb",
"signature_version": "v1",
"deprecated": false,
"target": {
"function": "subflow_hmac_valid",
"file": "net/mptcp/subflow.c"
},
"digest": {
"function_hash": "328522288265213773859138907043973124239",
"length": 378.0
}
},
{
"signature_type": "Function",
"id": "CVE-2025-23145-83ad2c50",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@dc81e41a307df523072186b241fa8244fecd7803",
"signature_version": "v1",
"deprecated": false,
"target": {
"function": "subflow_syn_recv_sock",
"file": "net/mptcp/subflow.c"
},
"digest": {
"function_hash": "46154309008969913615797684119858132930",
"length": 2793.0
}
},
{
"signature_type": "Line",
"id": "CVE-2025-23145-8a1b3952",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@4b2649b9717678aeb097893cc49f59311a1ecab0",
"signature_version": "v1",
"deprecated": false,
"target": {
"file": "net/mptcp/subflow.c"
},
"digest": {
"line_hashes": [
"330575720193969180339172818147186272149",
"291840523723373633342819708715973330712",
"306743391402948598269255148867479788510",
"99283543130737175999576482946763314961",
"205258220187354341366477168117782513756",
"206647398938572377008061930329876682148",
"280746739353251186103685147665479976798",
"249703363784353581244378555711191879385",
"138995599797390532524690089504081282957",
"322697125046159390120603890697486772568",
"135102219202007649351355399257848119636",
"268583409291221077902835873092665251442",
"182090870265443213615261890004941992468",
"166576059733663749617845957769075241942",
"164094830352698929123415719012782515497",
"96348490774386929501784062075636981943",
"313017451931283828724767220337956404625"
],
"threshold": 0.9
}
},
{
"signature_type": "Function",
"id": "CVE-2025-23145-96caa3ff",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@443041deb5ef6a1289a99ed95015ec7442f141dc",
"signature_version": "v1",
"deprecated": false,
"target": {
"function": "subflow_hmac_valid",
"file": "net/mptcp/subflow.c"
},
"digest": {
"function_hash": "308970115392658011597490177710528284375",
"length": 404.0
}
},
{
"signature_type": "Line",
"id": "CVE-2025-23145-a30962c0",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@8cf7fef1bb2ffea7792bcbf71ca00216cecc725d",
"signature_version": "v1",
"deprecated": false,
"target": {
"file": "net/mptcp/subflow.c"
},
"digest": {
"line_hashes": [
"330575720193969180339172818147186272149",
"291840523723373633342819708715973330712",
"105788492159496311435169226703222691757",
"177616423195107799269531458809032915099",
"36186170891422091100199634216013275162",
"234775194715401872322757062715097085942",
"318496039518417303001971321249326077760",
"47101540970305782328701966013111573081",
"35755640996347690598643776500968749550",
"135102219202007649351355399257848119636",
"268583409291221077902835873092665251442",
"182090870265443213615261890004941992468",
"166576059733663749617845957769075241942",
"19242905594277974118099734694785383709",
"290317950949147138611359852149491538993",
"59352819016679573562121298611277864483"
],
"threshold": 0.9
}
},
{
"signature_type": "Line",
"id": "CVE-2025-23145-a43761a1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@efd58a8dd9e7a709a90ee486a4247c923d27296f",
"signature_version": "v1",
"deprecated": false,
"target": {
"file": "net/mptcp/subflow.c"
},
"digest": {
"line_hashes": [
"330575720193969180339172818147186272149",
"291840523723373633342819708715973330712",
"306743391402948598269255148867479788510",
"99283543130737175999576482946763314961",
"205258220187354341366477168117782513756",
"206647398938572377008061930329876682148",
"280746739353251186103685147665479976798",
"249703363784353581244378555711191879385",
"138995599797390532524690089504081282957",
"322697125046159390120603890697486772568",
"135102219202007649351355399257848119636",
"268583409291221077902835873092665251442",
"182090870265443213615261890004941992468",
"166576059733663749617845957769075241942",
"164094830352698929123415719012782515497",
"96348490774386929501784062075636981943",
"313017451931283828724767220337956404625"
],
"threshold": 0.9
}
},
{
"signature_type": "Line",
"id": "CVE-2025-23145-c3bd3cce",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@855bf0aacd51fced11ea9aa0d5101ee0febaeadb",
"signature_version": "v1",
"deprecated": false,
"target": {
"file": "net/mptcp/subflow.c"
},
"digest": {
"line_hashes": [
"330575720193969180339172818147186272149",
"291840523723373633342819708715973330712",
"105788492159496311435169226703222691757",
"177616423195107799269531458809032915099",
"36186170891422091100199634216013275162",
"206647398938572377008061930329876682148",
"280746739353251186103685147665479976798",
"249703363784353581244378555711191879385",
"138995599797390532524690089504081282957",
"322697125046159390120603890697486772568",
"135102219202007649351355399257848119636",
"268583409291221077902835873092665251442",
"182090870265443213615261890004941992468",
"166576059733663749617845957769075241942",
"164094830352698929123415719012782515497",
"96348490774386929501784062075636981943",
"313017451931283828724767220337956404625"
],
"threshold": 0.9
}
},
{
"signature_type": "Function",
"id": "CVE-2025-23145-c563f2ca",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@8cf7fef1bb2ffea7792bcbf71ca00216cecc725d",
"signature_version": "v1",
"deprecated": false,
"target": {
"function": "subflow_hmac_valid",
"file": "net/mptcp/subflow.c"
},
"digest": {
"function_hash": "328522288265213773859138907043973124239",
"length": 378.0
}
},
{
"signature_type": "Line",
"id": "CVE-2025-23145-d6d0d17c",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@dc81e41a307df523072186b241fa8244fecd7803",
"signature_version": "v1",
"deprecated": false,
"target": {
"file": "net/mptcp/subflow.c"
},
"digest": {
"line_hashes": [
"330575720193969180339172818147186272149",
"291840523723373633342819708715973330712",
"306743391402948598269255148867479788510",
"99283543130737175999576482946763314961",
"205258220187354341366477168117782513756",
"206647398938572377008061930329876682148",
"280746739353251186103685147665479976798",
"249703363784353581244378555711191879385",
"138995599797390532524690089504081282957",
"322697125046159390120603890697486772568",
"135102219202007649351355399257848119636",
"268583409291221077902835873092665251442",
"182090870265443213615261890004941992468",
"166576059733663749617845957769075241942",
"164094830352698929123415719012782515497",
"96348490774386929501784062075636981943",
"313017451931283828724767220337956404625"
],
"threshold": 0.9
}
},
{
"signature_type": "Function",
"id": "CVE-2025-23145-daa368cb",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@b3088bd2a6790c8efff139d86d7a9d0b1305977b",
"signature_version": "v1",
"deprecated": false,
"target": {
"function": "subflow_hmac_valid",
"file": "net/mptcp/subflow.c"
},
"digest": {
"function_hash": "328522288265213773859138907043973124239",
"length": 378.0
}
},
{
"signature_type": "Function",
"id": "CVE-2025-23145-df1cc499",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@443041deb5ef6a1289a99ed95015ec7442f141dc",
"signature_version": "v1",
"deprecated": false,
"target": {
"function": "subflow_syn_recv_sock",
"file": "net/mptcp/subflow.c"
},
"digest": {
"function_hash": "46154309008969913615797684119858132930",
"length": 2793.0
}
},
{
"signature_type": "Function",
"id": "CVE-2025-23145-e1e8867a",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@b3088bd2a6790c8efff139d86d7a9d0b1305977b",
"signature_version": "v1",
"deprecated": false,
"target": {
"function": "subflow_syn_recv_sock",
"file": "net/mptcp/subflow.c"
},
"digest": {
"function_hash": "25909081953525382499146850878321085361",
"length": 2847.0
}
},
{
"signature_type": "Line",
"id": "CVE-2025-23145-e446aa50",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@7f9ae060ed64aef8f174c5f1ea513825b1be9af1",
"signature_version": "v1",
"deprecated": false,
"target": {
"file": "net/mptcp/subflow.c"
},
"digest": {
"line_hashes": [
"330575720193969180339172818147186272149",
"291840523723373633342819708715973330712",
"105788492159496311435169226703222691757",
"177616423195107799269531458809032915099",
"36186170891422091100199634216013275162",
"206647398938572377008061930329876682148",
"280746739353251186103685147665479976798",
"249703363784353581244378555711191879385",
"138995599797390532524690089504081282957",
"322697125046159390120603890697486772568",
"135102219202007649351355399257848119636",
"268583409291221077902835873092665251442",
"182090870265443213615261890004941992468",
"166576059733663749617845957769075241942",
"164094830352698929123415719012782515497",
"96348490774386929501784062075636981943",
"313017451931283828724767220337956404625"
],
"threshold": 0.9
}
},
{
"signature_type": "Function",
"id": "CVE-2025-23145-e635b9b0",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@4b2649b9717678aeb097893cc49f59311a1ecab0",
"signature_version": "v1",
"deprecated": false,
"target": {
"function": "subflow_syn_recv_sock",
"file": "net/mptcp/subflow.c"
},
"digest": {
"function_hash": "46154309008969913615797684119858132930",
"length": 2793.0
}
},
{
"signature_type": "Line",
"id": "CVE-2025-23145-e653df9e",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@b3088bd2a6790c8efff139d86d7a9d0b1305977b",
"signature_version": "v1",
"deprecated": false,
"target": {
"file": "net/mptcp/subflow.c"
},
"digest": {
"line_hashes": [
"330575720193969180339172818147186272149",
"291840523723373633342819708715973330712",
"105788492159496311435169226703222691757",
"177616423195107799269531458809032915099",
"36186170891422091100199634216013275162",
"206647398938572377008061930329876682148",
"280746739353251186103685147665479976798",
"249703363784353581244378555711191879385",
"138995599797390532524690089504081282957",
"322697125046159390120603890697486772568",
"135102219202007649351355399257848119636",
"268583409291221077902835873092665251442",
"182090870265443213615261890004941992468",
"166576059733663749617845957769075241942",
"164094830352698929123415719012782515497",
"96348490774386929501784062075636981943",
"313017451931283828724767220337956404625"
],
"threshold": 0.9
}
}
]