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 61FDC17C77 for ; Thu, 27 Feb 2025 20:01:16 +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=1740686476; cv=none; b=Szy9gFI6mwS2UR1s00XQWxiw7SHpiFIaMub5oUyTLjagwA1Rd5NQwEmcX+kUZdxrPCsmjD6tcfWQPHjKj2+a3VRj/nFpOdZel/VgISKUiGxVQxQl2ravwxjSBrFerD5pSPopZyYIECPBEeco6ZZKVDTkTs4E0uRa6RbpmbFpQOc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740686476; c=relaxed/simple; bh=fPzdy8DaDqXNJ3pPyZCsh0vs7d5bEu/xtuxptKYKX9U=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=J+d8TUJTuNsolxjwACu4pzX+g3Dc9Xjvyh0WN2sMQkr8D1HKuUH9wtq3q3+GtYhyk4cglYsjgr38Eog466FrXeI0lFLoZh8BVQiAslQPw7FNp3bv+G9gsRBTfQOD53uvvlgd12WQJDmntKwOoecdYJ4bOlBu5lj+a87pPBE69bc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=uOZlJ/xK; 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="uOZlJ/xK" Received: by smtp.kernel.org (Postfix) with ESMTPSA id D32CAC4CEE4; Thu, 27 Feb 2025 20:01:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1740686475; bh=fPzdy8DaDqXNJ3pPyZCsh0vs7d5bEu/xtuxptKYKX9U=; h=From:To:Cc:Subject:Date:Reply-to:From; b=uOZlJ/xKf0nRNTr4b+hBu7pDIXbV2wJ+ZX/8VP6pu/qbmD6o8fvW87iSpN5PhmmGW wCUGnLAdYnp3EZ3YYZBAXLXCxW26fD/EPMVv8gp+fH1MabAnvExW2ETzSVfdD7FiR7 LoAyxHeivCFsEb1JydmO9d4EgGJ9kxZ48H0GIQcA= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-21808: net: xdp: Disallow attaching device-bound programs in generic mode Date: Thu, 27 Feb 2025 12:00:02 -0800 Message-ID: <2025022753-CVE-2025-21808-b8bf@gregkh> X-Mailer: git-send-email 2.48.1 Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Reply-to: , X-Developer-Signature: v=1; a=openpgp-sha256; l=2695; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=fPzdy8DaDqXNJ3pPyZCsh0vs7d5bEu/xtuxptKYKX9U=; b=owGbwMvMwCRo6H6F97bub03G02pJDOkHjlgaLhTLs1deu0hdqvZ06yR+t8N9OwXYujcusdK9+ e2SM7NgRywLgyATg6yYIsuXbTxH91ccUvQytD0NM4eVCWQIAxenAEwk7RfDgrNeqbLve/sCI8OD dErNWGssJ3luZpjv8FtOZpnJ6kp5Habw6+frlbqF234AAA== X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit 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-rc1 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