CVE-2021-47304: tcp: fix tcp_init_transfer() to not reset icsk_ca_initialized
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).
Security readout for executives and security teams
Plain-English summary
This Linux kernel issue can cause TCP congestion-control code to initialize twice, potentially leaking memory in modules such as CDG. The source does not provide CVSS, real-world exploitation, or business impact evidence. Treat it as a kernel reliability risk until your Linux vendor confirms exposure and fixed builds.
Executive priority
Monitor and patch through normal kernel maintenance unless vendor guidance rates your environment higher. Escalate if affected kernels run shared hosting, sandbox, or untrusted workload platforms where reliability issues can become operational incidents.
Technical view
tcp_init_transfer() reset icsk_ca_initialized after user-triggered congestion-control initialization during TCP_SYN_SENT. A later transfer initialization could call tcp_init_congestion_control() again without cc->release(), causing leaks or other module-specific problems. Syzkaller found a CDG memory-leak reproducer.
Likely exposure
Exposure is limited to Linux systems running affected kernel versions or commits listed by the CVE source. Risk is most relevant where workloads can create TCP sockets, use TCP Fast Open/connect flows, and change TCP_CONGESTION during connection setup.
Exploitation context
The source says syzkaller found the bug and a memory leak reproducer. It does not cite active exploitation, KEV listing, public weaponization, or remote unauthenticated exploitation. KEV is false in the provided bundle.
Researcher notes
Evidence is strongest for a kernel logic bug and syzkaller-discovered memory leak in CDG. The source does not provide CVSS, CWE, exploit maturity, or complete downstream distribution status, so validation must rely on vendor kernel backport information.
Mitigation direction
Check Linux vendor advisories for fixed kernels containing the referenced stable commits.
Update affected Linux kernels through supported vendor or distribution channels.
Prioritize multi-tenant or untrusted-workload systems after vendor exposure confirmation.
Track kernel memory-leak or TCP congestion-control advisories for your distribution.
Validation and detection
Inventory Linux kernel versions across servers, containers hosts, and appliances.
Compare deployed versions against the affected versions in the CVE source.
Confirm whether vendor kernels include the referenced stable fixes.
Review kernel logs and monitoring for unusual memory growth on exposed systems.
Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.
Potential ATT&CK relevance
Conservative CVE-to-ATT&CK context
These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.
ATT&CK lookup starting points
Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.
cve · low confidence lookup
CVE-2021-47304 mapping review
Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.
These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.