Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 CCDA1391E77 for ; Sun, 19 Jul 2026 12:04:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784462678; cv=none; b=C/SFjfBTHBlzRSjUH8xX8Oz+nLbHxw7WFDh//gwNP43OHw02GMxRuvrijEqL0LFL+jR9ZoOoCzU+D8ROP2yNX/gRfwKzsEAptO9mZnX/MQ4fFwqB2EtnPzeCh1/JoyfniTJSdTfb/zJksCkOHqw9Wyj0VkZDYo7ZQeiJ7hOvPSA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784462678; c=relaxed/simple; bh=81lmN7recgUwA3sbohMX3A5VNqY7Nnc4UQGOgI+b29c=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=h6ZFscdAJBi8OdOttFMfVBbcigpIBH6y084ng1GdxzjfyByFISfdjFaFQ4aUsdZcdqTXi1//hb8efncqFdUkQfFi51oJoR9oZtZn/mzTOanDJULGIiRTSgc97cORI+D40ahxK/5RPbb8zOM/C8oawIceOmBRCCMwKdqSrRDNvTc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=G9jbByVP; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="G9jbByVP" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3D9441F000E9; Sun, 19 Jul 2026 12:04:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1784462676; bh=b7BXK3ikoVn5bDioiMeLj7fIpExJmaob4sy8HhButrc=; h=From:To:Cc:Subject:Date:Reply-To; b=G9jbByVPuyLDuXzaDvvcVk2cEqFTqasSqBRnTY59+NIIB3+HGNtEmj9rmilg+UV3D JAxnVFuZDsc9cL+MF2sS0eCRWZ3ZekonGUiEZhq1aanKe61l7SPZw5aFJVfXNEYXYo m0fUWvPtawgeTtqg36mREDHEbhPHl5UuD3y8VHjU= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-63836: batman-adv: tp_meter: avoid divide-by-zero for dec_cwnd Date: Sun, 19 Jul 2026 14:02:53 +0200 Message-ID: <2026071909-CVE-2026-63836-24b8@gregkh> X-Mailer: git-send-email 2.55.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=4190; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=1FOzTc6w58C1J4KcCxBtSU8kzA+9+AD4DTpxb4g3ts8=; b=owGbwMvMwCRo6H6F97bub03G02pJDFkxew6ebmnz0J30ZP6NZJE9C1807BS1/N53IevdstbOD p/3/NPlOmJZGASZGGTFFFm+bOM5ur/ikKKXoe1pmDmsTCBDGLg4BWAiK78yLDj6qe6o+b/szrSK Eskude+HDXq8zQzzk2+F9rZebvaeHn1RqvmDid+qE/bLAQ== 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: batman-adv: tp_meter: avoid divide-by-zero for dec_cwnd The cwnd is always MSS <= cwnd <= 0x20000000. But the calculation in batadv_tp_update_cwnd() assumes unsigned 32 bit arithmetics. ((mss * 8) ** 2) / (cwnd * 8) In case cwnd is actually 0x20000000, it will be shifted by 3 bit to the left end up at 0x100000000 or U32_MAX + 1. It will therefore wrap around and be 0 - resulting in: ((mss * 8) ** 2) / 0 This is of course invalid and cannot be calculated. The calculation should must be simplified to avoid this overflow: (mss ** 2) * 8 / cwnd It will keep the precision enhancement from the scaling (by 8) but avoid the overflow in the divisor. In theory, there could still be an overflow in the dividend. It is at the moment fixed to BATADV_TP_PLEN in batadv_tp_recv_ack() - so it is not an imminent problem. But allowing it to use the whole u32 bit range, would mean that it can still use up to 67 bits. To keep this calculation safe for 32 bit arithmetic, mss must never use more than floor((32 - 3) / 2) bits - or in other words: must never be larger than 16383. The Linux kernel CVE team has assigned CVE-2026-63836 to this issue. Affected and fixed versions =========================== Issue introduced in 4.8 with commit 33a3bb4a3345bb511f9c69c913da95d4693e2a4e and fixed in 5.10.260 with commit 35264c4d46067d6312871488c810cef387f8c1f6 Issue introduced in 4.8 with commit 33a3bb4a3345bb511f9c69c913da95d4693e2a4e and fixed in 5.15.211 with commit 1381b021bf886b793fa5ffb895a8efae7ba0318f Issue introduced in 4.8 with commit 33a3bb4a3345bb511f9c69c913da95d4693e2a4e and fixed in 6.1.177 with commit d08b69da40a101df1e28bfe1e8fa7a09ffa41107 Issue introduced in 4.8 with commit 33a3bb4a3345bb511f9c69c913da95d4693e2a4e and fixed in 6.6.144 with commit cd74176cf1685f35a2e5f212d15748bbfecb53b6 Issue introduced in 4.8 with commit 33a3bb4a3345bb511f9c69c913da95d4693e2a4e and fixed in 6.12.95 with commit ac229c86e49fdb96d91f51bc2fa37a9c4f58c44f Issue introduced in 4.8 with commit 33a3bb4a3345bb511f9c69c913da95d4693e2a4e and fixed in 6.18.38 with commit 7d2a44bc6bbe39aed03c68864aa0e54e04a50278 Issue introduced in 4.8 with commit 33a3bb4a3345bb511f9c69c913da95d4693e2a4e and fixed in 7.1.3 with commit 585616dab0aa9c45bc11b2c8082ca78533bc00e9 Issue introduced in 4.8 with commit 33a3bb4a3345bb511f9c69c913da95d4693e2a4e and fixed in 7.2-rc1 with commit 33ccd52f3cc9ed46ce395199f89aa3234dc83314 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-2026-63836 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/batman-adv/tp_meter.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/35264c4d46067d6312871488c810cef387f8c1f6 https://git.kernel.org/stable/c/1381b021bf886b793fa5ffb895a8efae7ba0318f https://git.kernel.org/stable/c/d08b69da40a101df1e28bfe1e8fa7a09ffa41107 https://git.kernel.org/stable/c/cd74176cf1685f35a2e5f212d15748bbfecb53b6 https://git.kernel.org/stable/c/ac229c86e49fdb96d91f51bc2fa37a9c4f58c44f https://git.kernel.org/stable/c/7d2a44bc6bbe39aed03c68864aa0e54e04a50278 https://git.kernel.org/stable/c/585616dab0aa9c45bc11b2c8082ca78533bc00e9 https://git.kernel.org/stable/c/33ccd52f3cc9ed46ce395199f89aa3234dc83314