{"id":"CVE-2022-49372","state":"PUBLISHED","title":"tcp: tcp_rtx_synack() can be called from process context","description":"In the Linux kernel, the following vulnerability has been resolved:\n\ntcp: tcp_rtx_synack() can be called from process context\n\nLaurent reported the enclosed report [1]\n\nThis bug triggers with following coditions:\n\n0) Kernel built with CONFIG_DEBUG_PREEMPT=y\n\n1) A new passive FastOpen TCP socket is created.\n   This FO socket waits for an ACK coming from client to be a complete\n   ESTABLISHED one.\n2) A socket operation on this socket goes through lock_sock()\n   release_sock() dance.\n3) While the socket is owned by the user in step 2),\n   a retransmit of the SYN is received and stored in socket backlog.\n4) At release_sock() time, the socket backlog is processed while\n   in process context.\n5) A SYNACK packet is cooked in response of the SYN retransmit.\n6) -> tcp_rtx_synack() is called in process context.\n\nBefore blamed commit, tcp_rtx_synack() was always called from BH handler,\nfrom a timer handler.\n\nFix this by using TCP_INC_STATS() & NET_INC_STATS()\nwhich do not assume caller is in non preemptible context.\n\n[1]\nBUG: using __this_cpu_add() in preemptible [00000000] code: epollpep/2180\ncaller is tcp_rtx_synack.part.0+0x36/0xc0\nCPU: 10 PID: 2180 Comm: epollpep Tainted: G           OE     5.16.0-0.bpo.4-amd64 #1  Debian 5.16.12-1~bpo11+1\nHardware name: Supermicro SYS-5039MC-H8TRF/X11SCD-F, BIOS 1.7 11/23/2021\nCall Trace:\n <TASK>\n dump_stack_lvl+0x48/0x5e\n check_preemption_disabled+0xde/0xe0\n tcp_rtx_synack.part.0+0x36/0xc0\n tcp_rtx_synack+0x8d/0xa0\n ? kmem_cache_alloc+0x2e0/0x3e0\n ? apparmor_file_alloc_security+0x3b/0x1f0\n inet_rtx_syn_ack+0x16/0x30\n tcp_check_req+0x367/0x610\n tcp_rcv_state_process+0x91/0xf60\n ? get_nohz_timer_target+0x18/0x1a0\n ? lock_timer_base+0x61/0x80\n ? preempt_count_add+0x68/0xa0\n tcp_v4_do_rcv+0xbd/0x270\n __release_sock+0x6d/0xb0\n release_sock+0x2b/0x90\n sock_setsockopt+0x138/0x1140\n ? __sys_getsockname+0x7e/0xc0\n ? aa_sk_perm+0x3e/0x1a0\n __sys_setsockopt+0x198/0x1e0\n __x64_sys_setsockopt+0x21/0x30\n do_syscall_64+0x38/0xc0\n entry_SYSCALL_64_after_hwframe+0x44/0xae","publishedAt":"2025-02-26T02:11:14.119Z","updatedAt":"2026-05-11T18:58:24.878Z","severity":null,"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"168a8f58059a22feb9e9a2dcc1b8053dbbbc12ef","status":"affected","lessThan":"3db889f883e65bbd3b1401279bfc1e9ed255c481","versionType":"git"},{"version":"168a8f58059a22feb9e9a2dcc1b8053dbbbc12ef","status":"affected","lessThan":"c348b0f8d035fc4bdc040796889beec7218bd1b8","versionType":"git"},{"version":"168a8f58059a22feb9e9a2dcc1b8053dbbbc12ef","status":"affected","lessThan":"58bd38cbc961fd799842b7be8c5222310f04b908","versionType":"git"},{"version":"168a8f58059a22feb9e9a2dcc1b8053dbbbc12ef","status":"affected","lessThan":"d05c2fdf8e10528bb6751bd95243e862d5402a9b","versionType":"git"},{"version":"168a8f58059a22feb9e9a2dcc1b8053dbbbc12ef","status":"affected","lessThan":"0a0f7f84148445c9f02f226928803a870139d820","versionType":"git"},{"version":"168a8f58059a22feb9e9a2dcc1b8053dbbbc12ef","status":"affected","lessThan":"88cd232146207ff1d41dededed5e77c0d4438113","versionType":"git"},{"version":"168a8f58059a22feb9e9a2dcc1b8053dbbbc12ef","status":"affected","lessThan":"bdc28a8fb43cc476e33b11519235adb816ce00e8","versionType":"git"},{"version":"168a8f58059a22feb9e9a2dcc1b8053dbbbc12ef","status":"affected","lessThan":"d8e1bc6029acac796293310aacef7b7336f35b6a","versionType":"git"},{"version":"168a8f58059a22feb9e9a2dcc1b8053dbbbc12ef","status":"affected","lessThan":"0a375c822497ed6ad6b5da0792a12a6f1af10c0b","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["net/ipv4/tcp_output.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"3.7","status":"affected"},{"version":"0","status":"unaffected","lessThan":"3.7","versionType":"semver"},{"version":"4.9.318","status":"unaffected","lessThanOrEqual":"4.9.*","versionType":"semver"},{"version":"4.14.283","status":"unaffected","lessThanOrEqual":"4.14.*","versionType":"semver"},{"version":"4.19.247","status":"unaffected","lessThanOrEqual":"4.19.*","versionType":"semver"},{"version":"5.4.198","status":"unaffected","lessThanOrEqual":"5.4.*","versionType":"semver"},{"version":"5.10.122","status":"unaffected","lessThanOrEqual":"5.10.*","versionType":"semver"},{"version":"5.15.47","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"5.17.15","status":"unaffected","lessThanOrEqual":"5.17.*","versionType":"semver"},{"version":"5.18.4","status":"unaffected","lessThanOrEqual":"5.18.*","versionType":"semver"},{"version":"5.19","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["net/ipv4/tcp_output.c"]}],"references":["https://git.kernel.org/stable/c/3db889f883e65bbd3b1401279bfc1e9ed255c481","https://git.kernel.org/stable/c/c348b0f8d035fc4bdc040796889beec7218bd1b8","https://git.kernel.org/stable/c/58bd38cbc961fd799842b7be8c5222310f04b908","https://git.kernel.org/stable/c/d05c2fdf8e10528bb6751bd95243e862d5402a9b","https://git.kernel.org/stable/c/0a0f7f84148445c9f02f226928803a870139d820","https://git.kernel.org/stable/c/88cd232146207ff1d41dededed5e77c0d4438113","https://git.kernel.org/stable/c/bdc28a8fb43cc476e33b11519235adb816ce00e8","https://git.kernel.org/stable/c/d8e1bc6029acac796293310aacef7b7336f35b6a","https://git.kernel.org/stable/c/0a375c822497ed6ad6b5da0792a12a6f1af10c0b"],"weaknesses":[],"ingestedAt":"2026-10-29T20:05:26.763Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2022/49xxx/CVE-2022-49372.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2022-49372","state":"PUBLISHED","datePublished":"2025-02-26T02:11:14.119Z","dateUpdated":"2026-05-11T18:58:24.878Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2025-02-26T02:08:31.555Z"},"containers":{"cna":{"title":"tcp: tcp_rtx_synack() can be called from process context","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\ntcp: tcp_rtx_synack() can be called from process context\n\nLaurent reported the enclosed report [1]\n\nThis bug triggers with following coditions:\n\n0) Kernel built with CONFIG_DEBUG_PREEMPT=y\n\n1) A new passive FastOpen TCP socket is created.\n   This FO socket waits for an ACK coming from client to be a complete\n   ESTABLISHED one.\n2) A socket operation on this socket goes through lock_sock()\n   release_sock() dance.\n3) While the socket is owned by the user in step 2),\n   a retransmit of the SYN is received and stored in socket backlog.\n4) At release_sock() time, the socket backlog is processed while\n   in process context.\n5) A SYNACK packet is cooked in response of the SYN retransmit.\n6) -> tcp_rtx_synack() is called in process context.\n\nBefore blamed commit, tcp_rtx_synack() was always called from BH handler,\nfrom a timer handler.\n\nFix this by using TCP_INC_STATS() & NET_INC_STATS()\nwhich do not assume caller is in non preemptible context.\n\n[1]\nBUG: using __this_cpu_add() in preemptible [00000000] code: epollpep/2180\ncaller is tcp_rtx_synack.part.0+0x36/0xc0\nCPU: 10 PID: 2180 Comm: epollpep Tainted: G           OE     5.16.0-0.bpo.4-amd64 #1  Debian 5.16.12-1~bpo11+1\nHardware name: Supermicro SYS-5039MC-H8TRF/X11SCD-F, BIOS 1.7 11/23/2021\nCall Trace:\n <TASK>\n dump_stack_lvl+0x48/0x5e\n check_preemption_disabled+0xde/0xe0\n tcp_rtx_synack.part.0+0x36/0xc0\n tcp_rtx_synack+0x8d/0xa0\n ? kmem_cache_alloc+0x2e0/0x3e0\n ? apparmor_file_alloc_security+0x3b/0x1f0\n inet_rtx_syn_ack+0x16/0x30\n tcp_check_req+0x367/0x610\n tcp_rcv_state_process+0x91/0xf60\n ? get_nohz_timer_target+0x18/0x1a0\n ? lock_timer_base+0x61/0x80\n ? preempt_count_add+0x68/0xa0\n tcp_v4_do_rcv+0xbd/0x270\n __release_sock+0x6d/0xb0\n release_sock+0x2b/0x90\n sock_setsockopt+0x138/0x1140\n ? __sys_getsockname+0x7e/0xc0\n ? aa_sk_perm+0x3e/0x1a0\n __sys_setsockopt+0x198/0x1e0\n __x64_sys_setsockopt+0x21/0x30\n do_syscall_64+0x38/0xc0\n entry_SYSCALL_64_after_hwframe+0x44/0xae"}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"168a8f58059a22feb9e9a2dcc1b8053dbbbc12ef","status":"affected","lessThan":"3db889f883e65bbd3b1401279bfc1e9ed255c481","versionType":"git"},{"version":"168a8f58059a22feb9e9a2dcc1b8053dbbbc12ef","status":"affected","lessThan":"c348b0f8d035fc4bdc040796889beec7218bd1b8","versionType":"git"},{"version":"168a8f58059a22feb9e9a2dcc1b8053dbbbc12ef","status":"affected","lessThan":"58bd38cbc961fd799842b7be8c5222310f04b908","versionType":"git"},{"version":"168a8f58059a22feb9e9a2dcc1b8053dbbbc12ef","status":"affected","lessThan":"d05c2fdf8e10528bb6751bd95243e862d5402a9b","versionType":"git"},{"version":"168a8f58059a22feb9e9a2dcc1b8053dbbbc12ef","status":"affected","lessThan":"0a0f7f84148445c9f02f226928803a870139d820","versionType":"git"},{"version":"168a8f58059a22feb9e9a2dcc1b8053dbbbc12ef","status":"affected","lessThan":"88cd232146207ff1d41dededed5e77c0d4438113","versionType":"git"},{"version":"168a8f58059a22feb9e9a2dcc1b8053dbbbc12ef","status":"affected","lessThan":"bdc28a8fb43cc476e33b11519235adb816ce00e8","versionType":"git"},{"version":"168a8f58059a22feb9e9a2dcc1b8053dbbbc12ef","status":"affected","lessThan":"d8e1bc6029acac796293310aacef7b7336f35b6a","versionType":"git"},{"version":"168a8f58059a22feb9e9a2dcc1b8053dbbbc12ef","status":"affected","lessThan":"0a375c822497ed6ad6b5da0792a12a6f1af10c0b","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["net/ipv4/tcp_output.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"3.7","status":"affected"},{"version":"0","status":"unaffected","lessThan":"3.7","versionType":"semver"},{"version":"4.9.318","status":"unaffected","lessThanOrEqual":"4.9.*","versionType":"semver"},{"version":"4.14.283","status":"unaffected","lessThanOrEqual":"4.14.*","versionType":"semver"},{"version":"4.19.247","status":"unaffected","lessThanOrEqual":"4.19.*","versionType":"semver"},{"version":"5.4.198","status":"unaffected","lessThanOrEqual":"5.4.*","versionType":"semver"},{"version":"5.10.122","status":"unaffected","lessThanOrEqual":"5.10.*","versionType":"semver"},{"version":"5.15.47","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"5.17.15","status":"unaffected","lessThanOrEqual":"5.17.*","versionType":"semver"},{"version":"5.18.4","status":"unaffected","lessThanOrEqual":"5.18.*","versionType":"semver"},{"version":"5.19","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["net/ipv4/tcp_output.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/3db889f883e65bbd3b1401279bfc1e9ed255c481"},{"url":"https://git.kernel.org/stable/c/c348b0f8d035fc4bdc040796889beec7218bd1b8"},{"url":"https://git.kernel.org/stable/c/58bd38cbc961fd799842b7be8c5222310f04b908"},{"url":"https://git.kernel.org/stable/c/d05c2fdf8e10528bb6751bd95243e862d5402a9b"},{"url":"https://git.kernel.org/stable/c/0a0f7f84148445c9f02f226928803a870139d820"},{"url":"https://git.kernel.org/stable/c/88cd232146207ff1d41dededed5e77c0d4438113"},{"url":"https://git.kernel.org/stable/c/bdc28a8fb43cc476e33b11519235adb816ce00e8"},{"url":"https://git.kernel.org/stable/c/d8e1bc6029acac796293310aacef7b7336f35b6a"},{"url":"https://git.kernel.org/stable/c/0a375c822497ed6ad6b5da0792a12a6f1af10c0b"}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-05-11T18:58:24.878Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"3.7","versionEndExcluding":"4.9.318"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"3.7","versionEndExcluding":"4.14.283"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"3.7","versionEndExcluding":"4.19.247"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"3.7","versionEndExcluding":"5.4.198"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"3.7","versionEndExcluding":"5.10.122"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"3.7","versionEndExcluding":"5.15.47"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"3.7","versionEndExcluding":"5.17.15"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"3.7","versionEndExcluding":"5.18.4"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"3.7","versionEndExcluding":"5.19"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}