CVE-2022-49372

Severity CVSS v4.0:
Pending analysis
Type:
Unavailable / Other
Publication date:
26/02/2025
Last modified:
21/10/2025

Description

In the Linux kernel, the following vulnerability has been resolved:<br /> <br /> tcp: tcp_rtx_synack() can be called from process context<br /> <br /> Laurent reported the enclosed report [1]<br /> <br /> This bug triggers with following coditions:<br /> <br /> 0) Kernel built with CONFIG_DEBUG_PREEMPT=y<br /> <br /> 1) A new passive FastOpen TCP socket is created.<br /> This FO socket waits for an ACK coming from client to be a complete<br /> ESTABLISHED one.<br /> 2) A socket operation on this socket goes through lock_sock()<br /> release_sock() dance.<br /> 3) While the socket is owned by the user in step 2),<br /> a retransmit of the SYN is received and stored in socket backlog.<br /> 4) At release_sock() time, the socket backlog is processed while<br /> in process context.<br /> 5) A SYNACK packet is cooked in response of the SYN retransmit.<br /> 6) -&gt; tcp_rtx_synack() is called in process context.<br /> <br /> Before blamed commit, tcp_rtx_synack() was always called from BH handler,<br /> from a timer handler.<br /> <br /> Fix this by using TCP_INC_STATS() &amp; NET_INC_STATS()<br /> which do not assume caller is in non preemptible context.<br /> <br /> [1]<br /> BUG: using __this_cpu_add() in preemptible [00000000] code: epollpep/2180<br /> caller is tcp_rtx_synack.part.0+0x36/0xc0<br /> CPU: 10 PID: 2180 Comm: epollpep Tainted: G OE 5.16.0-0.bpo.4-amd64 #1 Debian 5.16.12-1~bpo11+1<br /> Hardware name: Supermicro SYS-5039MC-H8TRF/X11SCD-F, BIOS 1.7 11/23/2021<br /> Call Trace:<br /> <br /> dump_stack_lvl+0x48/0x5e<br /> check_preemption_disabled+0xde/0xe0<br /> tcp_rtx_synack.part.0+0x36/0xc0<br /> tcp_rtx_synack+0x8d/0xa0<br /> ? kmem_cache_alloc+0x2e0/0x3e0<br /> ? apparmor_file_alloc_security+0x3b/0x1f0<br /> inet_rtx_syn_ack+0x16/0x30<br /> tcp_check_req+0x367/0x610<br /> tcp_rcv_state_process+0x91/0xf60<br /> ? get_nohz_timer_target+0x18/0x1a0<br /> ? lock_timer_base+0x61/0x80<br /> ? preempt_count_add+0x68/0xa0<br /> tcp_v4_do_rcv+0xbd/0x270<br /> __release_sock+0x6d/0xb0<br /> release_sock+0x2b/0x90<br /> sock_setsockopt+0x138/0x1140<br /> ? __sys_getsockname+0x7e/0xc0<br /> ? aa_sk_perm+0x3e/0x1a0<br /> __sys_setsockopt+0x198/0x1e0<br /> __x64_sys_setsockopt+0x21/0x30<br /> do_syscall_64+0x38/0xc0<br /> entry_SYSCALL_64_after_hwframe+0x44/0xae

Vulnerable products and versions

CPE From Up to
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 3.7 (including) 4.9.318 (excluding)
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 4.10 (including) 4.14.283 (excluding)
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 4.15 (including) 4.19.247 (excluding)
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 4.20 (including) 5.4.198 (excluding)
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 5.5 (including) 5.10.122 (excluding)
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 5.11 (including) 5.15.47 (excluding)
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 5.16 (including) 5.17.15 (excluding)
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 5.18 (including) 5.18.4 (excluding)