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 8D1F73A452D for ; Wed, 25 Mar 2026 10:28:26 +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=1774434506; cv=none; b=SXly66QfE/JznCCz8GHhtHMkWCwwakPdaecSA8zhopFigwyECbJtZ4k4ZjuxLIfHKpmnz6Y6SsiqKXZcNDvKJA2RO02Oa8m3UXT4AJaZcCGzDBH7SFvbkcc+iQ8lL+u4sH+t550+wuHs1bPRugDyjILmycOhFiM9WYKifewAPrM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774434506; c=relaxed/simple; bh=uKVDNEiCmJFVE72DCexbVVRdPJevPEe/PJcU0KSpEpY=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=ffguEe0KNP/HEiYBI7oGBgj0jdCpoJ4VhnA0jQUKSJ8823WpwYu/H93ySyCVZR/V+oWNTmpqk+MdBm8df0JdfhJeW2MKfP3CgHCsMA6wVm/oN0JZ9r+hW0XEeLGzPewpaD8RpjtlD0rZXWup5uZcJi/DJi6s4ZmvHovveQfJ1OE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=BfS1LJvP; 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="BfS1LJvP" Received: by smtp.kernel.org (Postfix) with ESMTPSA id BEEC2C4CEF7; Wed, 25 Mar 2026 10:28:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1774434506; bh=uKVDNEiCmJFVE72DCexbVVRdPJevPEe/PJcU0KSpEpY=; h=From:To:Cc:Subject:Date:Reply-To:From; b=BfS1LJvP0gkjTdyM0sgRt0no0DUQEAUu2VKeFk4uVG8kDnPgpZftKe9tQZbwpiipc 9lXPMD6J9J6Lrm6gc7AWzvaZOJ27mSroKQSX+/49/6k5k1P4NK/piRXJk7go/tsfgp Fd5wNkU/209IoDJxA75WdJGY6IeB8RVTwvne3Wbc= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-23310: bpf/bonding: reject vlan+srcmac xmit_hash_policy change when XDP is loaded Date: Wed, 25 Mar 2026 11:26:54 +0100 Message-ID: <2026032528-CVE-2026-23310-9b67@gregkh> X-Mailer: git-send-email 2.53.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=4287; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=VdQYTWmrAFSRdzS++bgPnl0bjrwM4sBXBn4IPeCbLbw=; b=owGbwMvMwCRo6H6F97bub03G02pJDJmHd4S46z89PvlyWOXMOuPvTMGXf0gHLvNlf5n/MGDP1 4UtS/kXd8SyMAgyMciKKbJ82cZzdH/FIUUvQ9vTMHNYmUCGMHBxCsBE3pgwzDMKfPFglmTomWmr tXl3ixm49merLmGYH3t+z+vQo0Z3ty74OGVia/eKTwWCegA= 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: bpf/bonding: reject vlan+srcmac xmit_hash_policy change when XDP is loaded bond_option_mode_set() already rejects mode changes that would make a loaded XDP program incompatible via bond_xdp_check(). However, bond_option_xmit_hash_policy_set() has no such guard. For 802.3ad and balance-xor modes, bond_xdp_check() returns false when xmit_hash_policy is vlan+srcmac, because the 802.1q payload is usually absent due to hardware offload. This means a user can: 1. Attach a native XDP program to a bond in 802.3ad/balance-xor mode with a compatible xmit_hash_policy (e.g. layer2+3). 2. Change xmit_hash_policy to vlan+srcmac while XDP remains loaded. This leaves bond->xdp_prog set but bond_xdp_check() now returning false for the same device. When the bond is later destroyed, dev_xdp_uninstall() calls bond_xdp_set(dev, NULL, NULL) to remove the program, which hits the bond_xdp_check() guard and returns -EOPNOTSUPP, triggering: WARN_ON(dev_xdp_install(dev, mode, bpf_op, NULL, 0, NULL)) Fix this by rejecting xmit_hash_policy changes to vlan+srcmac when an XDP program is loaded on a bond in 802.3ad or balance-xor mode. commit 39a0876d595b ("net, bonding: Disallow vlan+srcmac with XDP") introduced bond_xdp_check() which returns false for 802.3ad/balance-xor modes when xmit_hash_policy is vlan+srcmac. The check was wired into bond_xdp_set() to reject XDP attachment with an incompatible policy, but the symmetric path -- preventing xmit_hash_policy from being changed to an incompatible value after XDP is already loaded -- was left unguarded in bond_option_xmit_hash_policy_set(). Note: commit 094ee6017ea0 ("bonding: check xdp prog when set bond mode") later added a similar guard to bond_option_mode_set(), but bond_option_xmit_hash_policy_set() remained unprotected. The Linux kernel CVE team has assigned CVE-2026-23310 to this issue. Affected and fixed versions =========================== Issue introduced in 5.15 with commit 39a0876d595bd7c7512782dfcce0ee66f65bf221 and fixed in 6.6.130 with commit 5c262bd0e39320a6d6c8277cb8349ce21c01b8c1 Issue introduced in 5.15 with commit 39a0876d595bd7c7512782dfcce0ee66f65bf221 and fixed in 6.12.77 with commit d36ad7e126c6a0c5f699583309ccc37e3a3263ea Issue introduced in 5.15 with commit 39a0876d595bd7c7512782dfcce0ee66f65bf221 and fixed in 6.18.17 with commit 0ace8027e41f6f094ef6c1aca42d2ed6cd7af54e Issue introduced in 5.15 with commit 39a0876d595bd7c7512782dfcce0ee66f65bf221 and fixed in 6.19.7 with commit e85fa809e507b9d8eff4840888b8c727e4e8448c Issue introduced in 5.15 with commit 39a0876d595bd7c7512782dfcce0ee66f65bf221 and fixed in 7.0-rc3 with commit 479d589b40b836442bbdadc3fdb37f001bb67f26 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-23310 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: drivers/net/bonding/bond_main.c drivers/net/bonding/bond_options.c include/net/bonding.h 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/5c262bd0e39320a6d6c8277cb8349ce21c01b8c1 https://git.kernel.org/stable/c/d36ad7e126c6a0c5f699583309ccc37e3a3263ea https://git.kernel.org/stable/c/0ace8027e41f6f094ef6c1aca42d2ed6cd7af54e https://git.kernel.org/stable/c/e85fa809e507b9d8eff4840888b8c727e4e8448c https://git.kernel.org/stable/c/479d589b40b836442bbdadc3fdb37f001bb67f26