net: mvpp2: prevent buffer overflow in page_pool allocation
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 7d04b0b13b1175ce0c4bdc77f1278c1f120f874f · < f0e7d62c1eb984dd204095118973c59604144cd8| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
net: mvpp2: prevent buffer overflow in page_pool allocation
The per‑processor buffering scheme is supported only if the number of pools (nrxqs * 2) does not exceed MVPP2_BM_MAX_POOLS (8). This is already checked in mvpp2_probe() during the initial activation of percpu_pools.
However, mvpp2_change_mtu() may later call mvpp2_bm_switch_buffers(priv, true) without this check, which can lead to an out-of-bounds access in the priv->page_pool array in mvpp2_bm_init(). The array is sized to hold MVPP2_PORT_MAX_RXQ entries, and mvpp2_get_nrxqs() may return exactly that value. The per-CPU scheme then doubles it to nrxqs * 2, exceeding the array bounds.
Check that the hardware version is MVPP22 or newer and that the number of pools (nrxqs * 2) does not exceed MVPP2_BM_MAX_POOLS before switching to per-CPU mode.
Found by Linux Verification Center (linuxtesting.org) with SVACE.
From the CVE record · Linux
The Linux kernel’s mvpp2 driver can access the priv->page_pool array out of bounds when an MTU change switches to per-CPU buffering without checking the number of pools. The input does not specify whether an attacker can trigger this condition, or any network, authentication, or user-interaction requirements.
Engineers running Linux kernels with the mvpp2 driver should check whether their kernel includes the fix; affected versions are not specified.