| From bippy-5f407fcff5a0 Mon Sep 17 00:00:00 2001 |
| From: Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
| To: <linux-cve-announce@vger.kernel.org> |
| Reply-to: <cve@kernel.org>, <linux-kernel@vger.kernel.org> |
| Subject: CVE-2025-21808: net: xdp: Disallow attaching device-bound programs in generic mode |
| |
| Description |
| =========== |
| |
| In the Linux kernel, the following vulnerability has been resolved: |
| |
| net: xdp: Disallow attaching device-bound programs in generic mode |
| |
| Device-bound programs are used to support RX metadata kfuncs. These |
| kfuncs are driver-specific and rely on the driver context to read the |
| metadata. This means they can't work in generic XDP mode. However, there |
| is no check to disallow such programs from being attached in generic |
| mode, in which case the metadata kfuncs will be called in an invalid |
| context, leading to crashes. |
| |
| Fix this by adding a check to disallow attaching device-bound programs |
| in generic mode. |
| |
| The Linux kernel CVE team has assigned CVE-2025-21808 to this issue. |
| |
| |
| Affected and fixed versions |
| =========================== |
| |
| Issue introduced in 6.3 with commit 2b3486bc2d237ec345b3942b7be5deabf8c8fed1 and fixed in 6.6.76 with commit b1bc4a35a04cbeb85b6ef5911ec015baa424989f |
| Issue introduced in 6.3 with commit 2b3486bc2d237ec345b3942b7be5deabf8c8fed1 and fixed in 6.12.13 with commit 557707906dd3e34b8a8c265f664d19f95799937e |
| Issue introduced in 6.3 with commit 2b3486bc2d237ec345b3942b7be5deabf8c8fed1 and fixed in 6.13.2 with commit 5a9eae683d6c36e8a7aa31e5eb8b369e41aa66e1 |
| Issue introduced in 6.3 with commit 2b3486bc2d237ec345b3942b7be5deabf8c8fed1 and fixed in 6.14 with commit 3595599fa8360bb3c7afa7ee50c810b4a64106ea |
| |
| 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-2025-21808 |
| 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/core/dev.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/b1bc4a35a04cbeb85b6ef5911ec015baa424989f |
| https://git.kernel.org/stable/c/557707906dd3e34b8a8c265f664d19f95799937e |
| https://git.kernel.org/stable/c/5a9eae683d6c36e8a7aa31e5eb8b369e41aa66e1 |
| https://git.kernel.org/stable/c/3595599fa8360bb3c7afa7ee50c810b4a64106ea |