In the Linux kernel, the following vulnerability has been resolved:
mptcp: fix 'scheduling while atomic' in mptcppmnlappendnewlocaladdr
If multiple connection requests attempt to create an implicit mptcp endpoint in parallel, more than one caller may end up in mptcppmnlappendnewlocaladdr because none found the address in localaddrlist during their call to mptcppmnlgetlocalid. In this case, the concurrent newlocaladdr calls may delete the address entry created by the previous caller. These deletes use synchronizercu, but this is not permitted in some of the contexts where this function may be called. During packet recv, the caller may be in a rcu read critical section and have preemption disabled.
An example stack:
BUG: scheduling while atomic: swapper/2/0/0x00000302
Call Trace: <IRQ> dumpstacklvl (lib/dumpstack.c:117 (discriminator 1)) dumpstack (lib/dumpstack.c:124) _schedulebug (kernel/sched/core.c:5943) scheduledebug.constprop.0 (arch/x86/include/asm/preempt.h:33 kernel/sched/core.c:5970) _schedule (arch/x86/include/asm/jumplabel.h:27 include/linux/jumplabel.h:207 kernel/sched/features.h:29 kernel/sched/core.c:6621) schedule (arch/x86/include/asm/preempt.h:84 kernel/sched/core.c:6804 kernel/sched/core.c:6818) scheduletimeout (kernel/time/timer.c:2160) waitforcompletion (kernel/sched/completion.c:96 kernel/sched/completion.c:116 kernel/sched/completion.c:127 kernel/sched/completion.c:148) _waitrcugp (include/linux/rcupdate.h:311 kernel/rcu/update.c:444) synchronizercu (kernel/rcu/tree.c:3609) mptcppmnlappendnewlocaladdr (net/mptcp/pmnetlink.c:966 net/mptcp/pmnetlink.c:1061) mptcppmnlgetlocalid (net/mptcp/pmnetlink.c:1164) mptcppmgetlocalid (net/mptcp/pm.c:420) subflowcheckreq (net/mptcp/subflow.c:98 net/mptcp/subflow.c:213) subflowv4routereq (net/mptcp/subflow.c:305) tcpconnrequest (net/ipv4/tcpinput.c:7216) subflowv4connrequest (net/mptcp/subflow.c:651) tcprcvstateprocess (net/ipv4/tcpinput.c:6709) tcpv4dorcv (net/ipv4/tcpipv4.c:1934) tcpv4rcv (net/ipv4/tcpipv4.c:2334) ipprotocoldeliverrcu (net/ipv4/ipinput.c:205 (discriminator 1)) iplocaldeliverfinish (include/linux/rcupdate.h:813 net/ipv4/ipinput.c:234) iplocaldeliver (include/linux/netfilter.h:314 include/linux/netfilter.h:308 net/ipv4/ipinput.c:254) ipsublistrcvfinish (include/net/dst.h:461 net/ipv4/ipinput.c:580) ipsublistrcv (net/ipv4/ipinput.c:640) iplistrcv (net/ipv4/ipinput.c:675) _netifreceiveskblistcore (net/core/dev.c:5583 net/core/dev.c:5631) netifreceiveskblistinternal (net/core/dev.c:5685 net/core/dev.c:5774) napicompletedone (include/linux/list.h:37 include/net/gro.h:449 include/net/gro.h:444 net/core/dev.c:6114) igbpoll (drivers/net/ethernet/intel/igb/igbmain.c:8244) igb _napipoll (net/core/dev.c:6582) netrxaction (net/core/dev.c:6653 net/core/dev.c:6787) handlesoftirqs (kernel/softirq.c:553) _irqexitrcu (kernel/softirq.c:588 kernel/softirq.c:427 kernel/softirq.c:636) irqexitrcu (kernel/softirq.c:651) common_interrupt (arch/x86/kernel/irq.c:247 (discriminator 14)) </IRQ>
This problem seems particularly prevalent if the user advertises an endpoint that has a different external vs internal address. In the case where the external address is advertised and multiple connections already exist, multiple subflow SYNs arrive in parallel which tends to trigger the race during creation of the first localaddrlist entries which have the internal address instead.
Fix by skipping the replacement of an existing implicit local address if called via mptcppmnlgetlocal_id.
[ { "signature_type": "Function", "id": "CVE-2025-21938-0c43fb43", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@022bfe24aad8937705704ff2e414b100cf0f2e1a", "signature_version": "v1", "target": { "function": "mptcp_pm_nl_add_addr_doit", "file": "net/mptcp/pm_netlink.c" }, "digest": { "function_hash": "207060244869483060056507148413403057819", "length": 1302.0 }, "deprecated": false }, { "signature_type": "Function", "id": "CVE-2025-21938-0c9eef13", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@4b228dae3d2cc6d9dce167449cd8fa9f028e9376", "signature_version": "v1", "target": { "function": "mptcp_pm_nl_add_addr_doit", "file": "net/mptcp/pm_netlink.c" }, "digest": { "function_hash": "207060244869483060056507148413403057819", "length": 1302.0 }, "deprecated": false }, { "signature_type": "Function", "id": "CVE-2025-21938-1da2b7f0", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@4b228dae3d2cc6d9dce167449cd8fa9f028e9376", "signature_version": "v1", "target": { "function": "mptcp_pm_nl_append_new_local_addr", "file": "net/mptcp/pm_netlink.c" }, "digest": { "function_hash": "76444687438077326949648764090935588445", "length": 1893.0 }, "deprecated": false }, { "signature_type": "Function", "id": "CVE-2025-21938-2934ecdd", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@125ccafe6dd062901b5a0c31ee9038740fc8859e", "signature_version": "v1", "target": { "function": "mptcp_pm_nl_add_addr_doit", "file": "net/mptcp/pm_netlink.c" }, "digest": { "function_hash": "207060244869483060056507148413403057819", "length": 1302.0 }, "deprecated": false }, { "signature_type": "Line", "id": "CVE-2025-21938-39f794f5", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@4b228dae3d2cc6d9dce167449cd8fa9f028e9376", "signature_version": "v1", "target": { "file": "net/mptcp/pm_netlink.c" }, "digest": { "threshold": 0.9, "line_hashes": [ "253240053422894518511730502371707075668", "311241550951316717648333801321685560828", "28914707877658635909156074281763296168", "274407200115104289208607946740232365961", "91806704726310517262114403560568552957", "326203652982803410424159678957228569138", "173110670051635803254249451809984621687", "94919993958479980027224632303184695159", "282382210162714576187439590859032475080", "120697968059967697671633763664224955979", "40697934430552204409772738186560125363", "38728858048621265881223372134519830135", "201148420706602163367328441283639778349", "316912899011341752489614161524623085879", "67349983020401012985766670545051267094" ] }, "deprecated": false }, { "signature_type": "Function", "id": "CVE-2025-21938-4cf9231b", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@f1404f368c40fc6a068dad72e4ee0824ee6a78ee", "signature_version": "v1", "target": { "function": "mptcp_pm_nl_append_new_local_addr", "file": "net/mptcp/pm_netlink.c" }, "digest": { "function_hash": "290857337093701656260657976223602291330", "length": 1831.0 }, "deprecated": false }, { "signature_type": "Function", "id": "CVE-2025-21938-7270c52b", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@f3fcdb2de9fdbed9d8c6a8eb2c5fbd7d6f54a4d8", "signature_version": "v1", "target": { "function": "mptcp_nl_cmd_add_addr", "file": "net/mptcp/pm_netlink.c" }, "digest": { "function_hash": "79739095883055837124359479468449946992", "length": 1305.0 }, "deprecated": false }, { "signature_type": "Line", "id": "CVE-2025-21938-7d8fefe7", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@125ccafe6dd062901b5a0c31ee9038740fc8859e", "signature_version": "v1", "target": { "file": "net/mptcp/pm_netlink.c" }, "digest": { "threshold": 0.9, "line_hashes": [ "253240053422894518511730502371707075668", "311241550951316717648333801321685560828", "28914707877658635909156074281763296168", "274407200115104289208607946740232365961", "91806704726310517262114403560568552957", "326203652982803410424159678957228569138", "173110670051635803254249451809984621687", "94919993958479980027224632303184695159", "282382210162714576187439590859032475080", "120697968059967697671633763664224955979", "40697934430552204409772738186560125363", "38728858048621265881223372134519830135", "201148420706602163367328441283639778349", "316912899011341752489614161524623085879", "67349983020401012985766670545051267094" ] }, "deprecated": false }, { "signature_type": "Function", "id": "CVE-2025-21938-81840bc6", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@4b228dae3d2cc6d9dce167449cd8fa9f028e9376", "signature_version": "v1", "target": { "function": "mptcp_pm_nl_get_local_id", "file": "net/mptcp/pm_netlink.c" }, "digest": { "function_hash": "33637632087713145220712678165085438843", "length": 679.0 }, "deprecated": false }, { "signature_type": "Function", "id": "CVE-2025-21938-841a485a", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@f1404f368c40fc6a068dad72e4ee0824ee6a78ee", "signature_version": "v1", "target": { "function": "mptcp_pm_nl_get_local_id", "file": "net/mptcp/pm_netlink.c" }, "digest": { "function_hash": "33637632087713145220712678165085438843", "length": 679.0 }, "deprecated": false }, { "signature_type": "Function", "id": "CVE-2025-21938-874159bd", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@125ccafe6dd062901b5a0c31ee9038740fc8859e", "signature_version": "v1", "target": { "function": "mptcp_pm_nl_get_local_id", "file": "net/mptcp/pm_netlink.c" }, "digest": { "function_hash": "173125391707576991077875689930388054453", "length": 573.0 }, "deprecated": false }, { "signature_type": "Function", "id": "CVE-2025-21938-88fdedc1", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@f3fcdb2de9fdbed9d8c6a8eb2c5fbd7d6f54a4d8", "signature_version": "v1", "target": { "function": "mptcp_pm_nl_append_new_local_addr", "file": "net/mptcp/pm_netlink.c" }, "digest": { "function_hash": "76444687438077326949648764090935588445", "length": 1893.0 }, "deprecated": false }, { "signature_type": "Function", "id": "CVE-2025-21938-8cd8ccc9", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@125ccafe6dd062901b5a0c31ee9038740fc8859e", "signature_version": "v1", "target": { "function": "mptcp_pm_nl_append_new_local_addr", "file": "net/mptcp/pm_netlink.c" }, "digest": { "function_hash": "76444687438077326949648764090935588445", "length": 1893.0 }, "deprecated": false }, { "signature_type": "Line", "id": "CVE-2025-21938-8ff5d379", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@f3fcdb2de9fdbed9d8c6a8eb2c5fbd7d6f54a4d8", "signature_version": "v1", "target": { "file": "net/mptcp/pm_netlink.c" }, "digest": { "threshold": 0.9, "line_hashes": [ "253240053422894518511730502371707075668", "311241550951316717648333801321685560828", "28914707877658635909156074281763296168", "274407200115104289208607946740232365961", "91806704726310517262114403560568552957", "326203652982803410424159678957228569138", "173110670051635803254249451809984621687", "94919993958479980027224632303184695159", "282382210162714576187439590859032475080", "120697968059967697671633763664224955979", "40697934430552204409772738186560125363", "38728858048621265881223372134519830135", "201148420706602163367328441283639778349", "316912899011341752489614161524623085879", "67349983020401012985766670545051267094" ] }, "deprecated": false }, { "signature_type": "Line", "id": "CVE-2025-21938-96c6c83e", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@022bfe24aad8937705704ff2e414b100cf0f2e1a", "signature_version": "v1", "target": { "file": "net/mptcp/pm_netlink.c" }, "digest": { "threshold": 0.9, "line_hashes": [ "253240053422894518511730502371707075668", "311241550951316717648333801321685560828", "28914707877658635909156074281763296168", "274407200115104289208607946740232365961", "91806704726310517262114403560568552957", "326203652982803410424159678957228569138", "173110670051635803254249451809984621687", "94919993958479980027224632303184695159", "282382210162714576187439590859032475080", "120697968059967697671633763664224955979", "40697934430552204409772738186560125363", "38728858048621265881223372134519830135", "201148420706602163367328441283639778349", "316912899011341752489614161524623085879", "67349983020401012985766670545051267094" ] }, "deprecated": false }, { "signature_type": "Line", "id": "CVE-2025-21938-a94ebaae", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@f1404f368c40fc6a068dad72e4ee0824ee6a78ee", "signature_version": "v1", "target": { "file": "net/mptcp/pm_netlink.c" }, "digest": { "threshold": 0.9, "line_hashes": [ "253240053422894518511730502371707075668", "311241550951316717648333801321685560828", "28914707877658635909156074281763296168", "274407200115104289208607946740232365961", "148153299798641117596266306509148131054", "326203652982803410424159678957228569138", "173110670051635803254249451809984621687", "94919993958479980027224632303184695159", "282382210162714576187439590859032475080", "120697968059967697671633763664224955979", "40697934430552204409772738186560125363", "38728858048621265881223372134519830135", "201148420706602163367328441283639778349", "177361146490029149669039510830600111718", "89706011354595557203227546747153863098" ] }, "deprecated": false }, { "signature_type": "Function", "id": "CVE-2025-21938-ae10628b", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@f3fcdb2de9fdbed9d8c6a8eb2c5fbd7d6f54a4d8", "signature_version": "v1", "target": { "function": "mptcp_pm_nl_get_local_id", "file": "net/mptcp/pm_netlink.c" }, "digest": { "function_hash": "33637632087713145220712678165085438843", "length": 679.0 }, "deprecated": false }, { "signature_type": "Function", "id": "CVE-2025-21938-beffbc7d", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@022bfe24aad8937705704ff2e414b100cf0f2e1a", "signature_version": "v1", "target": { "function": "mptcp_pm_nl_get_local_id", "file": "net/mptcp/pm_netlink.c" }, "digest": { "function_hash": "173125391707576991077875689930388054453", "length": 573.0 }, "deprecated": false }, { "signature_type": "Function", "id": "CVE-2025-21938-cfe69b32", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@022bfe24aad8937705704ff2e414b100cf0f2e1a", "signature_version": "v1", "target": { "function": "mptcp_pm_nl_append_new_local_addr", "file": "net/mptcp/pm_netlink.c" }, "digest": { "function_hash": "76444687438077326949648764090935588445", "length": 1893.0 }, "deprecated": false }, { "signature_type": "Function", "id": "CVE-2025-21938-f9a9d941", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@f1404f368c40fc6a068dad72e4ee0824ee6a78ee", "signature_version": "v1", "target": { "function": "mptcp_nl_cmd_add_addr", "file": "net/mptcp/pm_netlink.c" }, "digest": { "function_hash": "95432948499751958725868265915867697768", "length": 1285.0 }, "deprecated": false } ]