CVE-2021-47304

Updated:

Description:

In the Linux kernel, the following vulnerability has been resolved: tcp: fix tcp_init_transfer() to not reset icsk_ca_initialized This commit fixes a bug (found by syzkaller) that could cause spurious double-initializations for congestion control modules, which could cause memory leaks or other problems for congestion control modules (like CDG) that allocate memory in their init functions. The buggy scenario constructed by syzkaller was something like: (1) create a TCP socket (2) initiate a TFO connect via sendto() (3) while socket is in TCP_SYN_SENT, call setsockopt(TCP_CONGESTION), which calls: tcp_set_congestion_control() -> tcp_reinit_congestion_control() -> tcp_init_congestion_control() (4) receive ACK, connection is established, call tcp_init_transfer(), set icsk_ca_initialized=0 (without first calling cc->release()), call tcp_init_congestion_control() again. Note that in this sequence tcp_init_congestion_control() is called twice without a cc->release() call in between. Thus, for CC modules that allocate memory in their init() function, e.g, CDG, a memory leak may occur. The syzkaller tool managed to find a reproducer that triggered such a leak in CDG. The bug was introduced when that commit 8919a9b31eb4 ("tcp: Only init congestion control if not initialized already") introduced icsk_ca_initialized and set icsk_ca_initialized to 0 in tcp_init_transfer(), missing the possibility for a sequence like the one above, where a process could call setsockopt(TCP_CONGESTION) in state TCP_SYN_SENT (i.e. after the connect() or TFO open sendmsg()), which would call tcp_init_congestion_control(). It did not intend to reset any initialization that the user had already explicitly made; it just missed the possibility of that particular sequence (which syzkaller managed to find).

CVSS3: 5.5


Vendor State

OS Vendor version Errata
RHEL 8 4.18.0-553.16.1.el8_10 RHSA-2024:5101
Oracle Linux 8 4.18.0-553.16.1.el8_10 ELSA-2024-5101
AlmaLinux 8 4.18.0-553.16.1.el8_10 ALSA-2024:5101
Rocky Linux 8 4.18.0-553.16.1.el8_10 RLSA-2024:5101

KernelCare State

OS Original kernel version State
RHEL 8
4.18.0-348.el8 show all hide all
4.18.0-348.2.1.el8_5 4.18.0-348.7.1.el8_5 4.18.0-348.12.2.el8_5 4.18.0-348.20.1.el8_5 4.18.0-372.9.1.el8 4.18.0-348.23.1.el8_5 4.18.0-372.13.1.el8_6 4.18.0-372.16.1.el8_6 4.18.0-372.19.1.el8_6 4.18.0-372.26.1.el8_6 4.18.0-372.32.1.el8_6 4.18.0-425.3.1.el8 4.18.0-425.10.1.el8_7 4.18.0-425.13.1.el8_7 4.18.0-425.19.2.el8_7 4.18.0-477.10.1.el8_8 4.18.0-477.13.1.el8_8 4.18.0-477.15.1.el8_8 4.18.0-477.21.1.el8_8 4.18.0-477.27.1.el8_8 4.18.0-513.5.1.el8_9 4.18.0-513.9.1.el8_9 4.18.0-513.11.1.el8_9 4.18.0-513.18.1.el8_9 4.18.0-513.24.1.el8_9 4.18.0-553.el8_10 4.18.0-553.5.1.el8_10 4.18.0-553.8.1.el8_10
Released
Oracle Linux 8
4.18.0-348.el8 show all hide all
4.18.0-348.2.1.el8_5 4.18.0-348.7.1.el8_5 4.18.0-348.12.2.el8_5 4.18.0-348.20.1.el8_5 4.18.0-348.23.1.el8_5 4.18.0-372.9.1.el8 4.18.0-372.13.1.0.1.el8_6 4.18.0-372.16.1.0.1.el8_6 4.18.0-372.19.1.0.1.el8_6 4.18.0-372.26.1.0.1.el8_6 4.18.0-372.32.1.0.1.el8_6 4.18.0-425.3.1.el8 4.18.0-425.10.1.el8_7 4.18.0-425.13.1.el8_7 4.18.0-425.19.2.el8_7 4.18.0-477.10.1.el8_8 4.18.0-477.13.1.el8_8 4.18.0-477.15.1.el8_8 4.18.0-477.21.1.el8_8 4.18.0-477.27.0.1.el8_8 4.18.0-477.27.1.el8_8 4.18.0-513.5.1.el8_9 4.18.0-513.9.1.el8_9 4.18.0-513.11.0.1.el8_9 4.18.0-513.18.0.1.el8_9 4.18.0-513.18.0.2.el8_9 4.18.0-513.18.1.el8_9 4.18.0-513.18.1.0.1.el8_9 4.18.0-513.24.1.el8_9 4.18.0-553.el8_10 4.18.0-553.5.1.el8_10 4.18.0-553.8.1.el8_10
Released
CloudLinux OS 8
4.18.0-348.lve.el8 show all hide all
4.18.0-348.7.1.lve.el8 4.18.0-348.12.2.lve.el8 4.18.0-348.20.1.lve.1.el8 4.18.0-348.20.1.lve.el8 4.18.0-348.23.1.lve.el8 4.18.0-372.9.1.1.lve.el8 4.18.0-372.16.1.lve.el8 4.18.0-372.9.1.lve.el8 4.18.0-372.19.1.lve.el8 4.18.0-372.13.1.lve.el8 4.18.0-372.26.1.lve.1.el8 4.18.0-372.32.1.lve.el8 4.18.0-425.3.1.lve.1.el8 4.18.0-425.3.1.lve.el8 4.18.0-425.3.1.lve.2.el8 4.18.0-425.3.1.lve.3.el8 4.18.0-425.10.1.lve.el8 4.18.0-425.13.1.lve.el8 4.18.0-425.19.2.lve.el8 4.18.0-477.10.1.lve.el8 4.18.0-477.13.1.lve.el8 4.18.0-477.15.1.lve.2.el8 4.18.0-477.13.1.lve.1.el8 4.18.0-477.21.1.lve.el8 4.18.0-477.21.1.lve.1.el8 4.18.0-477.27.1.lve.el8 4.18.0-477.27.2.lve.el8 4.18.0-513.5.1.lve.el8 4.18.0-513.9.1.lve.el8 4.18.0-513.11.1.lve.el8 4.18.0-513.18.1.lve.el8 4.18.0-513.18.1.lve.2.el8 4.18.0-513.18.1.lve.1.el8 4.18.0-513.24.1.lve.el8 4.18.0-513.24.1.lve.1.el8 4.18.0-553.lve.el8 4.18.0-513.24.1.lve.2.el8 4.18.0-553.5.1.lve.el8 4.18.0-544.lve.el8 4.18.0-553.5.1.lve.1.el8 4.18.0-553.8.1.lve.el8
Released
CloudLinux OS 7h
4.18.0-348.7.1.lve.el7h show all hide all
4.18.0-348.12.2.lve.el7h 4.18.0-348.lve.el7h 4.18.0-348.12.2.lve.1.el7h 4.18.0-348.12.2.lve.2.el7h 4.18.0-348.20.1.lve.el7h 4.18.0-348.20.1.lve.1.el7h 4.18.0-348.23.1.lve.el7h 4.18.0-372.9.1.lve.el7h 4.18.0-372.13.1.lve.el7h 4.18.0-372.16.1.lve.el7h 4.18.0-372.19.1.lve.el7h 4.18.0-372.26.1.lve.1.el7h 4.18.0-372.32.1.lve.el7h 4.18.0-425.3.1.lve.el7h 4.18.0-425.3.1.lve.1.el7h 4.18.0-425.3.1.lve.2.el7h 4.18.0-425.3.1.lve.3.el7h 4.18.0-425.10.1.lve.el7h 4.18.0-425.13.1.lve.el7h 4.18.0-425.19.2.lve.el7h 4.18.0-477.10.1.lve.1.el7h 4.18.0-477.13.1.lve.el7h 4.18.0-477.15.1.lve.1.el7h 4.18.0-477.21.1.lve.el7h 4.18.0-477.13.1.lve.1.el7h 4.18.0-477.27.1.lve.el7h 4.18.0-477.15.1.lve.2.el7h 4.18.0-477.21.1.lve.1.el7h 4.18.0-513.5.1.lve.el7h 4.18.0-477.27.2.lve.el7h 4.18.0-513.9.1.lve.el7h 4.18.0-513.11.1.lve.el7h 4.18.0-513.18.1.lve.el7h 4.18.0-513.11.1.lve.1.el7h 4.18.0-513.18.1.lve.2.el7h 4.18.0-513.18.1.lve.1.el7h 4.18.0-513.24.1.lve.el7h 4.18.0-553.lve.el7h 4.18.0-513.24.1.lve.1.el7h 4.18.0-513.24.1.lve.2.el7h 4.18.0-553.5.1.lve.el7h 4.18.0-553.8.1.lve.el7h 4.18.0-553.5.1.lve.1.el7h
Released
AlmaLinux 8
4.18.0-348.el8 show all hide all
4.18.0-348.2.1.el8_5 4.18.0-348.7.1.el8_5 4.18.0-348.12.2.el8_5 4.18.0-348.20.1.el8_5 4.18.0-348.20.1.el8.fscrypt 4.18.0-348.23.1.el8_5 4.18.0-372.9.1.el8 4.18.0-372.13.1.el8_6 4.18.0-372.19.1.el8_6 4.18.0-372.16.1.el8_6 4.18.0-372.26.1.el8_6 4.18.0-372.32.1.el8_6 4.18.0-425.3.1.el8 4.18.0-425.10.1.el8_7 4.18.0-425.13.1.el8_7 4.18.0-425.19.2.el8_7 4.18.0-477.10.1.el8_8 4.18.0-477.13.1.el8_8 4.18.0-477.15.1.el8_8 4.18.0-477.21.1.el8_8 4.18.0-477.27.1.el8_8 4.18.0-513.5.1.el8_9 4.18.0-513.9.1.el8_9 4.18.0-477.27.2.el8_8 4.18.0-513.11.1.el8_9 4.18.0-513.18.1.el8_9 4.18.0-513.24.1.el8_9 4.18.0-513.18.2.el8_9 4.18.0-553.el8_10 4.18.0-553.5.1.el8_10 4.18.0-553.8.1.el8_10
Released
Rocky Linux 8
4.18.0-348.2.1.el8_5 show all hide all
4.18.0-348.12.2.el8_5 4.18.0-348.20.1.el8_5 4.18.0-348.7.1.el8_5 4.18.0-348.23.1.el8_5 4.18.0-372.9.1.el8 4.18.0-372.13.1.el8_6 4.18.0-372.19.1.el8_6 4.18.0-372.16.1.el8_6 4.18.0-372.16.1.el8_6.0.1 4.18.0-372.26.1.el8_6 4.18.0-372.32.1.el8_6 4.18.0-425.3.1.el8 4.18.0-425.10.1.el8_7 4.18.0-425.13.1.el8_7 4.18.0-425.19.2.el8_7 4.18.0-477.10.1.el8_8 4.18.0-477.13.1.el8_8 4.18.0-477.15.1.el8_8 4.18.0-477.27.1.el8_8 4.18.0-477.21.1.el8_8 4.18.0-513.5.1.el8_9 4.18.0-513.9.1.el8_9 4.18.0-513.11.1.el8_9 4.18.0-513.18.1.el8_9 4.18.0-513.11.1.el8_9.0.1 4.18.0-513.24.1.el8_9 4.18.0-553.el8_10 4.18.0-553.5.1.el8_10 4.18.0-553.8.1.el8_10
Released