CVE-2022-50070

Source
https://nvd.nist.gov/vuln/detail/CVE-2022-50070
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2022-50070.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2022-50070
Downstream
Published
2025-06-18T11:02:15Z
Modified
2025-10-14T00:02:05.068236Z
Summary
mptcp: do not queue data on closed subflows
Details

In the Linux kernel, the following vulnerability has been resolved:

mptcp: do not queue data on closed subflows

Dipanjan reported a syzbot splat at close time:

WARNING: CPU: 1 PID: 10818 at net/ipv4/afinet.c:153 inetsockdestruct+0x6d0/0x8e0 net/ipv4/afinet.c:153 Modules linked in: uioivshmem(OE) uio(E) CPU: 1 PID: 10818 Comm: kworker/1:16 Tainted: G OE 5.19.0-rc6-g2eae0556bb9d #2 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.13.0-1ubuntu1.1 04/01/2014 Workqueue: events mptcpworker RIP: 0010:inetsockdestruct+0x6d0/0x8e0 net/ipv4/afinet.c:153 Code: 21 02 00 00 41 8b 9c 24 28 02 00 00 e9 07 ff ff ff e8 34 4d 91 f9 89 ee 4c 89 e7 e8 4a 47 60 ff e9 a6 fc ff ff e8 20 4d 91 f9 <0f> 0b e9 84 fe ff ff e8 14 4d 91 f9 0f 0b e9 d4 fd ff ff e8 08 4d RSP: 0018:ffffc9001b35fa78 EFLAGS: 00010246 RAX: 0000000000000000 RBX: 00000000002879d0 RCX: ffff8881326f3b00 RDX: 0000000000000000 RSI: ffff8881326f3b00 RDI: 0000000000000002 RBP: ffff888179662674 R08: ffffffff87e983a0 R09: 0000000000000000 R10: 0000000000000005 R11: 00000000000004ea R12: ffff888179662400 R13: ffff888179662428 R14: 0000000000000001 R15: ffff88817e38e258 FS: 0000000000000000(0000) GS:ffff8881f5f00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000020007bc0 CR3: 0000000179592000 CR4: 0000000000150ee0 Call Trace: <TASK> _skdestruct+0x4f/0x8e0 net/core/sock.c:2067 skdestruct+0xbd/0xe0 net/core/sock.c:2112 _skfree+0xef/0x3d0 net/core/sock.c:2123 skfree+0x78/0xa0 net/core/sock.c:2134 sockput include/net/sock.h:1927 [inline] _mptcpclosessk+0x50f/0x780 net/mptcp/protocol.c:2351 _mptcpdestroysock+0x332/0x760 net/mptcp/protocol.c:2828 mptcpworker+0x5d2/0xc90 net/mptcp/protocol.c:2586 processonework+0x9cc/0x1650 kernel/workqueue.c:2289 workerthread+0x623/0x1070 kernel/workqueue.c:2436 kthread+0x2e9/0x3a0 kernel/kthread.c:376 retfromfork+0x1f/0x30 arch/x86/entry/entry_64.S:302 </TASK>

The root cause of the problem is that an mptcp-level (re)transmit can race with mptcp_close() and the packet scheduler checks the subflow state before acquiring the socket lock: we can try to (re)transmit on an already closed ssk.

Fix the issue checking again the subflow socket status under the subflow socket lock protection. Additionally add the missing check for the fallback-to-tcp case.

References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
d5f49190def61c47b2faff170ba8fbc48bac4371
Fixed
fb9c73ef2ac2ec816efdc8b9267bc04e1369c20b
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
d5f49190def61c47b2faff170ba8fbc48bac4371
Fixed
8caf5c15b5288d52d9c89374d6c10fa32ee84ec5
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
d5f49190def61c47b2faff170ba8fbc48bac4371
Fixed
c886d70286bf3ad411eb3d689328a67f7102c6ae

Affected versions

v5.*

v5.10
v5.10-rc1
v5.10-rc2
v5.10-rc3
v5.10-rc4
v5.10-rc5
v5.10-rc6
v5.10-rc7
v5.11
v5.11-rc1
v5.11-rc2
v5.11-rc3
v5.11-rc4
v5.11-rc5
v5.11-rc6
v5.11-rc7
v5.12
v5.12-rc1
v5.12-rc1-dontuse
v5.12-rc2
v5.12-rc3
v5.12-rc4
v5.12-rc5
v5.12-rc6
v5.12-rc7
v5.12-rc8
v5.13
v5.13-rc1
v5.13-rc2
v5.13-rc3
v5.13-rc4
v5.13-rc5
v5.13-rc6
v5.13-rc7
v5.14
v5.14-rc1
v5.14-rc2
v5.14-rc3
v5.14-rc4
v5.14-rc5
v5.14-rc6
v5.14-rc7
v5.15
v5.15-rc1
v5.15-rc2
v5.15-rc3
v5.15-rc4
v5.15-rc5
v5.15-rc6
v5.15-rc7
v5.15.1
v5.15.10
v5.15.100
v5.15.101
v5.15.102
v5.15.103
v5.15.104
v5.15.105
v5.15.106
v5.15.107
v5.15.108
v5.15.109
v5.15.11
v5.15.110
v5.15.111
v5.15.112
v5.15.113
v5.15.114
v5.15.115
v5.15.116
v5.15.117
v5.15.118
v5.15.119
v5.15.12
v5.15.120
v5.15.121
v5.15.122
v5.15.123
v5.15.124
v5.15.125
v5.15.126
v5.15.127
v5.15.128
v5.15.129
v5.15.13
v5.15.130
v5.15.131
v5.15.132
v5.15.133
v5.15.134
v5.15.135
v5.15.136
v5.15.137
v5.15.138
v5.15.139
v5.15.14
v5.15.140
v5.15.141
v5.15.142
v5.15.143
v5.15.144
v5.15.145
v5.15.146
v5.15.147
v5.15.148
v5.15.149
v5.15.15
v5.15.150
v5.15.151
v5.15.152
v5.15.153
v5.15.154
v5.15.155
v5.15.156
v5.15.157
v5.15.158
v5.15.159
v5.15.16
v5.15.160
v5.15.161
v5.15.162
v5.15.163
v5.15.164
v5.15.165
v5.15.166
v5.15.167
v5.15.168
v5.15.169
v5.15.17
v5.15.170
v5.15.171
v5.15.172
v5.15.173
v5.15.174
v5.15.175
v5.15.176
v5.15.177
v5.15.178
v5.15.179
v5.15.18
v5.15.180
v5.15.181
v5.15.182
v5.15.183
v5.15.184
v5.15.185
v5.15.186
v5.15.187
v5.15.188
v5.15.189
v5.15.19
v5.15.2
v5.15.20
v5.15.21
v5.15.22
v5.15.23
v5.15.24
v5.15.25
v5.15.26
v5.15.27
v5.15.28
v5.15.29
v5.15.3
v5.15.30
v5.15.31
v5.15.32
v5.15.33
v5.15.34
v5.15.35
v5.15.36
v5.15.37
v5.15.38
v5.15.39
v5.15.4
v5.15.40
v5.15.41
v5.15.42
v5.15.43
v5.15.44
v5.15.45
v5.15.46
v5.15.47
v5.15.48
v5.15.49
v5.15.5
v5.15.50
v5.15.51
v5.15.52
v5.15.53
v5.15.54
v5.15.55
v5.15.56
v5.15.57
v5.15.58
v5.15.59
v5.15.6
v5.15.60
v5.15.61
v5.15.62
v5.15.63
v5.15.64
v5.15.65
v5.15.66
v5.15.67
v5.15.68
v5.15.69
v5.15.7
v5.15.70
v5.15.71
v5.15.72
v5.15.73
v5.15.74
v5.15.75
v5.15.76
v5.15.77
v5.15.78
v5.15.79
v5.15.8
v5.15.80
v5.15.81
v5.15.82
v5.15.83
v5.15.84
v5.15.85
v5.15.86
v5.15.87
v5.15.88
v5.15.89
v5.15.9
v5.15.90
v5.15.91
v5.15.92
v5.15.93
v5.15.94
v5.15.95
v5.15.96
v5.15.97
v5.15.98
v5.15.99
v5.16
v5.16-rc1
v5.16-rc2
v5.16-rc3
v5.16-rc4
v5.16-rc5
v5.16-rc6
v5.16-rc7
v5.16-rc8
v5.17
v5.17-rc1
v5.17-rc2
v5.17-rc3
v5.17-rc4
v5.17-rc5
v5.17-rc6
v5.17-rc7
v5.17-rc8
v5.18
v5.18-rc1
v5.18-rc2
v5.18-rc3
v5.18-rc4
v5.18-rc5
v5.18-rc6
v5.18-rc7
v5.19
v5.19-rc1
v5.19-rc2
v5.19-rc3
v5.19-rc4
v5.19-rc5
v5.19-rc6
v5.19-rc7
v5.19-rc8
v5.19.1
v5.19.2
v5.19.3
v5.9
v5.9-rc4
v5.9-rc5
v5.9-rc6
v5.9-rc7
v5.9-rc8

Database specific

{
    "vanir_signatures": [
        {
            "id": "CVE-2022-50070-0267d111",
            "target": {
                "function": "__mptcp_subflow_active",
                "file": "net/mptcp/protocol.h"
            },
            "digest": {
                "length": 240.0,
                "function_hash": "186089258649498391414999218285536426172"
            },
            "signature_type": "Function",
            "deprecated": false,
            "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@fb9c73ef2ac2ec816efdc8b9267bc04e1369c20b",
            "signature_version": "v1"
        },
        {
            "id": "CVE-2022-50070-206f6e3a",
            "target": {
                "file": "net/mptcp/protocol.c"
            },
            "digest": {
                "line_hashes": [
                    "49370424934072537658137943679403271711",
                    "269794476778522528850005130385214308849",
                    "260392779339572237951665391895980914371",
                    "214073836130037445828645169961351422988",
                    "6883812748262140568678046518076744759",
                    "71665737271378465964638924471810379966",
                    "54651352045788880908607260100439958793",
                    "87461205073086072537782783825777367587",
                    "10202364278117705075389339931125403465",
                    "12551710621531769894754984848675472501",
                    "326821799857929034174357363502491290932"
                ],
                "threshold": 0.9
            },
            "signature_type": "Line",
            "deprecated": false,
            "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@8caf5c15b5288d52d9c89374d6c10fa32ee84ec5",
            "signature_version": "v1"
        },
        {
            "id": "CVE-2022-50070-233258d0",
            "target": {
                "function": "mptcp_sendmsg_frag",
                "file": "net/mptcp/protocol.c"
            },
            "digest": {
                "length": 2941.0,
                "function_hash": "74907942483107892473274190016678397035"
            },
            "signature_type": "Function",
            "deprecated": false,
            "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@8caf5c15b5288d52d9c89374d6c10fa32ee84ec5",
            "signature_version": "v1"
        },
        {
            "id": "CVE-2022-50070-26d28492",
            "target": {
                "file": "net/mptcp/protocol.h"
            },
            "digest": {
                "line_hashes": [
                    "218316355256721695046927090160413903352",
                    "106212123658015591106838832863015506459",
                    "237008259186865522970034150850792488312",
                    "125781963265393601473738712302687010018",
                    "321557918414718612971263362478001019670",
                    "272691996838333151887267852531998933225",
                    "186914078545144600016418882745063980872",
                    "252256179009099133416513130785855753344",
                    "103666527250019182060540689451593879728"
                ],
                "threshold": 0.9
            },
            "signature_type": "Line",
            "deprecated": false,
            "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@c886d70286bf3ad411eb3d689328a67f7102c6ae",
            "signature_version": "v1"
        },
        {
            "id": "CVE-2022-50070-3096d7a9",
            "target": {
                "function": "mptcp_subflow_get_send",
                "file": "net/mptcp/protocol.c"
            },
            "digest": {
                "length": 1814.0,
                "function_hash": "1913345926875650705584069896438409888"
            },
            "signature_type": "Function",
            "deprecated": false,
            "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@8caf5c15b5288d52d9c89374d6c10fa32ee84ec5",
            "signature_version": "v1"
        },
        {
            "id": "CVE-2022-50070-6314e400",
            "target": {
                "function": "__mptcp_subflow_active",
                "file": "net/mptcp/protocol.h"
            },
            "digest": {
                "length": 240.0,
                "function_hash": "186089258649498391414999218285536426172"
            },
            "signature_type": "Function",
            "deprecated": false,
            "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@8caf5c15b5288d52d9c89374d6c10fa32ee84ec5",
            "signature_version": "v1"
        },
        {
            "id": "CVE-2022-50070-67babe9b",
            "target": {
                "function": "__mptcp_push_pending",
                "file": "net/mptcp/protocol.c"
            },
            "digest": {
                "length": 910.0,
                "function_hash": "233075240260607210823088046122123888096"
            },
            "signature_type": "Function",
            "deprecated": false,
            "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@8caf5c15b5288d52d9c89374d6c10fa32ee84ec5",
            "signature_version": "v1"
        },
        {
            "id": "CVE-2022-50070-7019dc66",
            "target": {
                "function": "mptcp_sendmsg_frag",
                "file": "net/mptcp/protocol.c"
            },
            "digest": {
                "length": 2913.0,
                "function_hash": "256717924836780296331325276756011946984"
            },
            "signature_type": "Function",
            "deprecated": false,
            "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@fb9c73ef2ac2ec816efdc8b9267bc04e1369c20b",
            "signature_version": "v1"
        },
        {
            "id": "CVE-2022-50070-72acba77",
            "target": {
                "file": "net/mptcp/protocol.c"
            },
            "digest": {
                "line_hashes": [
                    "49370424934072537658137943679403271711",
                    "269794476778522528850005130385214308849",
                    "260392779339572237951665391895980914371",
                    "214073836130037445828645169961351422988",
                    "6883812748262140568678046518076744759",
                    "71665737271378465964638924471810379966",
                    "54651352045788880908607260100439958793",
                    "87461205073086072537782783825777367587",
                    "10202364278117705075389339931125403465",
                    "12551710621531769894754984848675472501",
                    "326821799857929034174357363502491290932"
                ],
                "threshold": 0.9
            },
            "signature_type": "Line",
            "deprecated": false,
            "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@fb9c73ef2ac2ec816efdc8b9267bc04e1369c20b",
            "signature_version": "v1"
        },
        {
            "id": "CVE-2022-50070-7e4b95b6",
            "target": {
                "function": "mptcp_subflow_get_send",
                "file": "net/mptcp/protocol.c"
            },
            "digest": {
                "length": 1444.0,
                "function_hash": "190612907615524266965507947903082980161"
            },
            "signature_type": "Function",
            "deprecated": false,
            "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@fb9c73ef2ac2ec816efdc8b9267bc04e1369c20b",
            "signature_version": "v1"
        },
        {
            "id": "CVE-2022-50070-9552d7ea",
            "target": {
                "function": "__mptcp_push_pending",
                "file": "net/mptcp/protocol.c"
            },
            "digest": {
                "length": 910.0,
                "function_hash": "233075240260607210823088046122123888096"
            },
            "signature_type": "Function",
            "deprecated": false,
            "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@c886d70286bf3ad411eb3d689328a67f7102c6ae",
            "signature_version": "v1"
        },
        {
            "id": "CVE-2022-50070-97901ac1",
            "target": {
                "file": "net/mptcp/protocol.c"
            },
            "digest": {
                "line_hashes": [
                    "49370424934072537658137943679403271711",
                    "269794476778522528850005130385214308849",
                    "260392779339572237951665391895980914371",
                    "214073836130037445828645169961351422988",
                    "6883812748262140568678046518076744759",
                    "71665737271378465964638924471810379966",
                    "54651352045788880908607260100439958793",
                    "87461205073086072537782783825777367587",
                    "10202364278117705075389339931125403465",
                    "12551710621531769894754984848675472501",
                    "326821799857929034174357363502491290932"
                ],
                "threshold": 0.9
            },
            "signature_type": "Line",
            "deprecated": false,
            "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@c886d70286bf3ad411eb3d689328a67f7102c6ae",
            "signature_version": "v1"
        },
        {
            "id": "CVE-2022-50070-ac8e6d57",
            "target": {
                "function": "mptcp_subflow_get_send",
                "file": "net/mptcp/protocol.c"
            },
            "digest": {
                "length": 1814.0,
                "function_hash": "1913345926875650705584069896438409888"
            },
            "signature_type": "Function",
            "deprecated": false,
            "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@c886d70286bf3ad411eb3d689328a67f7102c6ae",
            "signature_version": "v1"
        },
        {
            "id": "CVE-2022-50070-c32d889a",
            "target": {
                "file": "net/mptcp/protocol.h"
            },
            "digest": {
                "line_hashes": [
                    "218316355256721695046927090160413903352",
                    "106212123658015591106838832863015506459",
                    "237008259186865522970034150850792488312",
                    "125781963265393601473738712302687010018",
                    "321557918414718612971263362478001019670",
                    "272691996838333151887267852531998933225",
                    "186914078545144600016418882745063980872",
                    "252256179009099133416513130785855753344",
                    "103666527250019182060540689451593879728"
                ],
                "threshold": 0.9
            },
            "signature_type": "Line",
            "deprecated": false,
            "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@8caf5c15b5288d52d9c89374d6c10fa32ee84ec5",
            "signature_version": "v1"
        },
        {
            "id": "CVE-2022-50070-ce536165",
            "target": {
                "function": "mptcp_sendmsg_frag",
                "file": "net/mptcp/protocol.c"
            },
            "digest": {
                "length": 2941.0,
                "function_hash": "74907942483107892473274190016678397035"
            },
            "signature_type": "Function",
            "deprecated": false,
            "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@c886d70286bf3ad411eb3d689328a67f7102c6ae",
            "signature_version": "v1"
        },
        {
            "id": "CVE-2022-50070-d5652ddc",
            "target": {
                "function": "__mptcp_push_pending",
                "file": "net/mptcp/protocol.c"
            },
            "digest": {
                "length": 929.0,
                "function_hash": "6891838200619002496220087753130756497"
            },
            "signature_type": "Function",
            "deprecated": false,
            "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@fb9c73ef2ac2ec816efdc8b9267bc04e1369c20b",
            "signature_version": "v1"
        },
        {
            "id": "CVE-2022-50070-e0eb8177",
            "target": {
                "function": "__mptcp_subflow_active",
                "file": "net/mptcp/protocol.h"
            },
            "digest": {
                "length": 240.0,
                "function_hash": "186089258649498391414999218285536426172"
            },
            "signature_type": "Function",
            "deprecated": false,
            "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@c886d70286bf3ad411eb3d689328a67f7102c6ae",
            "signature_version": "v1"
        },
        {
            "id": "CVE-2022-50070-e73a76e4",
            "target": {
                "file": "net/mptcp/protocol.h"
            },
            "digest": {
                "line_hashes": [
                    "218316355256721695046927090160413903352",
                    "106212123658015591106838832863015506459",
                    "237008259186865522970034150850792488312",
                    "125781963265393601473738712302687010018",
                    "321557918414718612971263362478001019670",
                    "272691996838333151887267852531998933225",
                    "186914078545144600016418882745063980872",
                    "252256179009099133416513130785855753344",
                    "103666527250019182060540689451593879728"
                ],
                "threshold": 0.9
            },
            "signature_type": "Line",
            "deprecated": false,
            "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@fb9c73ef2ac2ec816efdc8b9267bc04e1369c20b",
            "signature_version": "v1"
        }
    ]
}

Linux / Kernel

Package

Name
Kernel

Affected ranges

Type
ECOSYSTEM
Events
Introduced
5.10.0
Fixed
5.15.190
Type
ECOSYSTEM
Events
Introduced
5.16.0
Fixed
5.19.4