Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 5DF68331222 for ; Wed, 24 Jun 2026 16:39:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782319168; cv=none; b=JLeY+8zqTJdy4VOckY+v4YiyfFy/FVeUu0/w+9C1WHG1/WDJn0fwK8PrJyFj7hCZ34c87PM/h47FsBkiP5gbjiuFtK7+udtRNJg8xaBeAE+mENp7QxUZZDC4WRMuaTWbfTBRLZ7h7NCvpN1JfsemB1snJqvQ14HGftF1wIIZhgQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782319168; c=relaxed/simple; bh=YIm/zGA087Eu9rSTWCHXY+gNYGF2xGYAOoV4QBrZYpc=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=Pd608prNw7Knf9T0Q/beUCKNBAZmiShq7smOkPu4xUgJb8QSgqxieXOSa5iPMhjN5jMvt6SSlAlVXHYb+1VxzqCpKss+wWs4vttTo+LbSjagwo9yw6qL99xlN31rSVk8L/n5fqndGdGkKkV6PuUawav4DnLXhwjClVEouZkfbv0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=0UbxBu5C; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="0UbxBu5C" Received: by smtp.kernel.org (Postfix) with ESMTPSA id A34611F000E9; Wed, 24 Jun 2026 16:39:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1782319167; bh=V0Wy12rpp0FmUjFPL7e+z1vzVepMxC+4vcXa/tFzKSM=; h=From:To:Cc:Subject:Date:Reply-To; b=0UbxBu5C2Zhwz1E+oxfLy75xkpR0sdNYTcYL9uASyBr25QVPse8o3fAIqvUxHnbQ4 sHpaLfxmB8s/hT341GjCfPrP5a8axH/8HyZr4M6zdu0Hbnrxu/B2t9tjuIhssy5OVP hgsE3PXpr+05hTau1v1u+Lu7cFBchBl8zQCtsCAc= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-53089: bpf: Fix use-after-free in offloaded map/prog info fill Date: Wed, 24 Jun 2026 17:31:53 +0100 Message-ID: <2026062409-CVE-2026-53089-fdd8@gregkh> X-Mailer: git-send-email 2.54.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=2627; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=lTmL/iQsmY16BD1CKOsTWESabSSpZNm6J69PkKpCFuw=; b=owGbwMvMwCRo6H6F97bub03G02pJDFk2bIJbz0z7OZvHrPnMIY9gezaOuSHfhVc8Ll+ebjrDP SM58gJLRywLgyATg6yYIsuXbTxH91ccUvQytD0NM4eVCWQIAxenAEwk14xhftzZI6csjrFOd77L 9H1lC0/RO8uKKob5hUv33hT/k3VKXSTQvZn1717TbeLWAA== 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: Fix use-after-free in offloaded map/prog info fill When querying info for an offloaded BPF map or program, bpf_map_offload_info_fill_ns() and bpf_prog_offload_info_fill_ns() obtain the network namespace with get_net(dev_net(offmap->netdev)). However, the associated netdev's netns may be racing with teardown during netns destruction. If the netns refcount has already reached 0, get_net() performs a refcount_t increment on 0, triggering: refcount_t: addition on 0; use-after-free. Although rtnl_lock and bpf_devs_lock ensure the netdev pointer remains valid, they cannot prevent the netns refcount from reaching zero. Fix this by using maybe_get_net() instead of get_net(). maybe_get_net() uses refcount_inc_not_zero() and returns NULL if the refcount is already zero, which causes ns_get_path_cb() to fail and the caller to return -ENOENT -- the correct behavior when the netns is being destroyed. The Linux kernel CVE team has assigned CVE-2026-53089 to this issue. Affected and fixed versions =========================== Issue introduced in 4.16 with commit 675fc275a3a2d905535207237402c6d8dcb5fa4b and fixed in 7.0.10 with commit a51e7fbe94a87e236631a83973d4f558310b2cd2 Issue introduced in 4.16 with commit 675fc275a3a2d905535207237402c6d8dcb5fa4b and fixed in 7.1 with commit a0c584fc18056709c8e047a82a6045d6c209f4ce 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-53089 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: kernel/bpf/offload.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/a51e7fbe94a87e236631a83973d4f558310b2cd2 https://git.kernel.org/stable/c/a0c584fc18056709c8e047a82a6045d6c209f4ce