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.
Published: 2026-07-19
Score: n/a
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

In the batman‑adv networking driver for the Linux kernel, the formula used to update the congestion window contains an arithmetic operation that can overflow when the congestion window reaches its maximum bound of 0x20000000. The calculation casts the product of the maximum segment size and eight to 32‑bit unsigned arithmetic, causing the intermediate value to wrap to zero and producing a division by zero. This invalid operation triggers a kernel panic, resulting in denial of service for all processes that depend on the kernel’s networking stack. The flaw is a classic example of a divide‑by‑zero error (CWE‑369).

Affected Systems

Any Linux kernel that includes the batman‑adv module is susceptible until the bug is fixed. This covers most distributions that ship with batman‑adv enabled in the stock kernel as well as custom kernels that compile the module. Systems that have the module disabled or removed are not affected.

Risk and Exploitability

The EPSS score is below 1 % and the vulnerability is not listed in the CISA KEV catalog, indicating a low current exploitation probability. Based on the description, it is inferred that an attacker who can send crafted TP packets through a host that has batman‑adv enabled could pressure the congestion window to its upper bound, triggering the overflow. Successful exploitation would crash the kernel, forcing a reboot and causing a denial of service. The attack requires network access to the affected host and sufficient traffic to manipulate the congestion window, so while not trivial, the exploit path is plausible in a compromised or poorly isolated network environment.

Generated by OpenCVE AI on August 1, 2026 at 08:00 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Update the Linux kernel to a revision that includes the batadv_tp_update_cwnd() fix.
  • If the batman‑adv module is not required, unload or blacklist it to prevent the flaw from being active.
  • For environments where a kernel upgrade is not yet available, apply the vendor‑provided patch to the batadv_tp_update_cwnd() function and rebuild the module.

Generated by OpenCVE AI on August 1, 2026 at 08:00 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Debian DLA Debian DLA DLA-4700-1 linux-6.1 security update
Debian DLA Debian DLA DLA-4717-1 linux security update
History

Tue, 21 Jul 2026 00:15:00 +0000


Sun, 19 Jul 2026 12:15:00 +0000

Type Values Removed Values Added
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.
Title batman-adv: tp_meter: avoid divide-by-zero for dec_cwnd
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References

Subscriptions

Linux Linux Kernel
cve-icon MITRE

Status: PUBLISHED

Assigner: Linux

Published:

Updated: 2026-07-19T12:02:27.166Z

Reserved: 2026-07-19T07:54:57.015Z

Link: CVE-2026-63836

cve-icon Vulnrichment

No data.

cve-icon NVD

No data.

cve-icon Redhat

Severity :

Publid Date: 2026-07-19T00:00:00Z

Links: CVE-2026-63836 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-08-01T08:00:14Z

Weaknesses