Skip to contentSkip to conversation

CVE-2022-49325: tcp: add accessors to read/set tp->snd_cwnd

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Feb 26, 2025

lore
Share & tools
lore
#0 lore raw

Description
===========

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

tcp: add accessors to read/set tp->snd_cwnd

We had various bugs over the years with code breaking the assumption that tp->snd_cwnd is greater than zero.

Lately, syzbot reported the WARN_ON_ONCE(!tp->prior_cwnd) added in commit 8b8a321ff72c ("tcp: fix zero cwnd in tcp_cwnd_reduction") can trigger, and without a repro we would have to spend considerable time finding the bug.

Instead of complaining too late, we want to catch where and when tp->snd_cwnd is set to an illegal value.

The Linux kernel CVE team has assigned CVE-2022-49325 to this issue.

Affected and fixed versions
===========================

	Fixed in 5.15.47 with commit 3308676ec525901bf1656014003c443a60730a04
	Fixed in 5.17.15 with commit 5aba0ad44fb4a7fb78c5076c313456de199a3c29
	Fixed in 5.18.4 with commit 41e191fe72282e193a7744e2fc1786b23156c9e4
	Fixed in 5.19 with commit 40570375356c874b1578e05c1dcc3ff7c1322dbe

Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community.

Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at

	https://cve.org/CVERecord/?id=CVE-2022-49325

will be updated if fixes are backported, please check that for the most up to date information about this issue.

Affected files
==============

The file(s) affected by this issue are:

	include/net/tcp.h
	include/trace/events/tcp.h
	net/core/filter.c
	net/ipv4/tcp.c
	net/ipv4/tcp_bbr.c
	net/ipv4/tcp_bic.c
	net/ipv4/tcp_cdg.c
	net/ipv4/tcp_cong.c
	net/ipv4/tcp_cubic.c
	net/ipv4/tcp_dctcp.c
	net/ipv4/tcp_highspeed.c
	net/ipv4/tcp_htcp.c
	net/ipv4/tcp_hybla.c
	net/ipv4/tcp_illinois.c
	net/ipv4/tcp_input.c
	net/ipv4/tcp_ipv4.c
	net/ipv4/tcp_lp.c
	net/ipv4/tcp_metrics.c
	net/ipv4/tcp_nv.c
	net/ipv4/tcp_output.c
	net/ipv4/tcp_rate.c
	net/ipv4/tcp_scalable.c
	net/ipv4/tcp_vegas.c
	net/ipv4/tcp_veno.c
	net/ipv4/tcp_westwood.c
	net/ipv4/tcp_yeah.c
	net/ipv6/tcp_ipv6.c

Mitigation
==========

The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits:

	https://git.kernel.org/stable/c/3308676ec525901bf1656014003c443a60730a04
	https://git.kernel.org/stable/c/5aba0ad44fb4a7fb78c5076c313456de199a3c29
	https://git.kernel.org/stable/c/41e191fe72282e193a7744e2fc1786b23156c9e4
	https://git.kernel.org/stable/c/40570375356c874b1578e05c1dcc3ff7c1322dbe