CVE-2021-47304: tcp: fix tcp_init_transfer() to not reset icsk_ca_initialized

Published May 21, 2024
·
Updated

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

tcp: fix tcpinittransfer() to not reset icskcainitialized

The Linux kernel CVE team has assigned CVE-2021-47304 to this issue.

Upstream advisory: https://lore.kernel.org/linux-cve-announce/2024052126-CVE-2021-47304-fc16@gregkh/T

Other sources

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

tcp: fix tcpinittransfer() to not reset icskcainitialized

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 TCPSYNSENT, call setsockopt(TCPCONGESTION), which calls: tcpsetcongestioncontrol() -> tcpreinitcongestioncontrol() -> tcpinitcongestioncontrol() (4) receive ACK, connection is established, call tcpinittransfer(), set icskcainitialized=0 (without first calling cc->release()), call tcpinitcongestioncontrol() again.

Note that in this sequence tcpinitcongestioncontrol() 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 icskcainitialized and set icskcainitialized to 0 in tcpinittransfer(), missing the possibility for a sequence like the one above, where a process could call setsockopt(TCPCONGESTION) in state TCPSYNSENT (i.e. after the connect() or TFO open sendmsg()), which would call tcpinitcongestioncontrol(). 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).

MITRE

Linux Kernel is vulnerable to a denial of service, caused by a memory leak flaw in the tcpinittransfer() function due to not reset icskcainitialized. By sending a specially crafted request, a local authenticated attacker could exploit this vulnerability to cause a denial of service condition.

IBM

Affected Software

10 affected componentsFixes available
redhat/kernel<5.10.53
5.10.53
redhat/kernel<5.13.5
5.13.5
redhat/kernel<5.14
5.14
IBM Security Verify Governance<=ISVG 10.0.2
IBM Security Verify Governance, Identity Manager Software Stack<=ISVG 10.0.2
IBM Security Verify Governance, Identity Manager Virtual Appliance<=ISVG 10.0.2
IBM Security Verify Governance Identity Manager Container<=ISVG 10.0.2
Linux Linux kernel>=5.10<5.10.53
Linux Linux kernel>=5.11<5.13.5
Linux Linux kernel=5.14-rc1

Event History

May 21, 2024
CVE Published
via MITRE·02:35 PM
Data Sourced
via MITRE·02:35 PM
Description
May 22, 2024
Data Sourced
via Red Hat·12:38 PM
DescriptionSeverityAffected Software

Parent advisories

This vulnerability appears in the following advisories.

Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2021-47304?

CVE-2021-47304 has a severity rating that necessitates attention due to potential impacts on the Linux kernel's TCP functions.

2

How do I fix CVE-2021-47304?

To fix CVE-2021-47304, update the Linux kernel to version 5.10.53, 5.13.5, or 5.14 as applicable.

3

Which software is affected by CVE-2021-47304?

CVE-2021-47304 affects various versions of the Linux kernel and IBM Security Verify Governance products.

4

What are the risks of not addressing CVE-2021-47304?

Failing to address CVE-2021-47304 may lead to network instability and potential security vulnerabilities within the Linux kernel.

5

Is CVE-2021-47304 publicly disclosed?

Yes, CVE-2021-47304 has been publicly disclosed by the Linux kernel CVE team.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203