Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 825BB2EA75E for ; Tue, 30 Dec 2025 12:20:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767097258; cv=none; b=qzvGkMHznWcU3iCKgWF8HBfWk7+spEJrM8KJsDDL7jYMZSLhCxAjivr+WObIHdw4p6ptpikgFYvnVg7XcxB05huC53k7VZFtVVFPe72p2Z+TYOqRVGJIko+9YX/5IAj8o+mPSKncf2HfwwIPqxYIFgwnzzAxRybrDZsx9UqKoTw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767097258; c=relaxed/simple; bh=i4lRAlu8I7HBBUBJsbK29khedjqUyuuVvWWTdWNfP18=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=bu47j/rVYRe5nIkVr8uJXwOPgfLHSyZj0B33C1J7G2stVPrTAL0sx4RldEj0mKznEOBHWqRDmPOnitcqY6QWgEUZpFnjcTFf5PKkLkxXElrwB0lCbf9dRalGTUMfLRQJ4wZZz5s3q8iXvjbc+poSyi6KKBRXAolj6lh2kdI1rDI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=kuRS6qIS; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="kuRS6qIS" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0C447C4CEFB; Tue, 30 Dec 2025 12:20:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1767097258; bh=i4lRAlu8I7HBBUBJsbK29khedjqUyuuVvWWTdWNfP18=; h=From:To:Cc:Subject:Date:Reply-To:From; b=kuRS6qISsYMrrvJAYsju3qsoD7U/W68qhtlRJw9ikJOCWeOlN4CJDJACjRhdzTlpI GAVOdHaASD6e+hZXVeVLIZ1/2rJc/y39UABKkMjr+DB/Lse6jjZPFau7YUdcmcjKHB BIJ0eIHmz8CyqY/gAQVo6Iz3hfSnSuVYiN57x/SI= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2022-50865: tcp: fix a signed-integer-overflow bug in tcp_add_backlog() Date: Tue, 30 Dec 2025 13:20:01 +0100 Message-ID: <2025123049-CVE-2022-50865-281e@gregkh> X-Mailer: git-send-email 2.52.0 Reply-To: , Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=2790; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=GzGm33EDXsj9z9+U3V+vmykk2d9nVfw3tByfO1p0D3E=; b=owGbwMvMwCRo6H6F97bub03G02pJDJnBh1O/zWE9tsQifXHLJq76IulTLVaRp44Xzzu40kbcJ SYrq9O4I5aFQZCJQVZMkeXLNp6j+ysOKXoZ2p6GmcPKBDKEgYtTACZixsswh8Ngtp6U5LWSc9x7 k5wd1c8+vtCswTC/8Oc0deU9O0Q2lq28cdHsP/+r5Z/3AQA= X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit From: Greg Kroah-Hartman Description =========== In the Linux kernel, the following vulnerability has been resolved: tcp: fix a signed-integer-overflow bug in tcp_add_backlog() The type of sk_rcvbuf and sk_sndbuf in struct sock is int, and in tcp_add_backlog(), the variable limit is caculated by adding sk_rcvbuf, sk_sndbuf and 64 * 1024, it may exceed the max value of int and overflow. This patch reduces the limit budget by halving the sndbuf to solve this issue since ACK packets are much smaller than the payload. The Linux kernel CVE team has assigned CVE-2022-50865 to this issue. Affected and fixed versions =========================== Issue introduced in 4.9 with commit c9c3321257e1b95be9b375f811fb250162af8d39 and fixed in 5.4.278 with commit 9d04b4d0feee12bce6bfe37f30d8e953d3c30368 Issue introduced in 4.9 with commit c9c3321257e1b95be9b375f811fb250162af8d39 and fixed in 5.10.153 with commit 4f23cb2be530785db284a685d1b1c30224d8a538 Issue introduced in 4.9 with commit c9c3321257e1b95be9b375f811fb250162af8d39 and fixed in 5.15.77 with commit a85d39f14aa8a71e29cfb5eb5de02878a8779898 Issue introduced in 4.9 with commit c9c3321257e1b95be9b375f811fb250162af8d39 and fixed in 6.0.7 with commit 28addf029417d53b1df062b4c87feb7bc033cb5f Issue introduced in 4.9 with commit c9c3321257e1b95be9b375f811fb250162af8d39 and fixed in 6.1 with commit ec791d8149ff60c40ad2074af3b92a39c916a03f 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-50865 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: net/ipv4/tcp_ipv4.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/9d04b4d0feee12bce6bfe37f30d8e953d3c30368 https://git.kernel.org/stable/c/4f23cb2be530785db284a685d1b1c30224d8a538 https://git.kernel.org/stable/c/a85d39f14aa8a71e29cfb5eb5de02878a8779898 https://git.kernel.org/stable/c/28addf029417d53b1df062b4c87feb7bc033cb5f https://git.kernel.org/stable/c/ec791d8149ff60c40ad2074af3b92a39c916a03f