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 AEAB23EB808 for ; Wed, 27 May 2026 09:25:08 +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=1779873911; cv=none; b=cogXqdNZppxtXcDJaOKf71/8wnFyBOqEdMoWdQAXUDxw69HTKlwzPkzEGLym/8L75hsAIrzZ67pqwX4xEnGNbdJ9CybK2Wy7mB1scm4SjXpWHVs4pwSSF/bWiKbNS8wE+b3FRUfcbEH1+GuC5ovKAAlvchSpK7s8Urh3GU5jCx4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779873911; c=relaxed/simple; bh=J82qQNJHk7xiq5BeDuCzZCG9do9CQ20eskuQngeDZCU=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=MHlwKgMYaNtk4Sk9jWQOGrxWpAWWpsN4xLsfRVahFwVUhw5XDVMGBsTU6/Z+nrB9LWtHsGoKep3ZyjdN6c4qWnBNSUaVfm3OAU8EKUuriN6bpjWyr/g0mAHj7mFFbg0cP70h1MpepdnWO2dbfvnA1VWeZYADwnJNSifM0wKrdCI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=Jaxzbqux; 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="Jaxzbqux" Received: by smtp.kernel.org (Postfix) with ESMTPSA id D0B7C1F000E9; Wed, 27 May 2026 09:25:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1779873907; bh=dsRoLzjSGkDTY/qzfwTHTVK5qPYv5+4Zi920J5wTNQw=; h=From:To:Cc:Subject:Date:Reply-To; b=Jaxzbqux9aND9H7YxCZQNRIn73kD5SbGqfpvuAPXVIJxOMJ+8k4zCdfa0PlCOWzSL MunIv57FIV/vhFGPrrBxrQGodbNbWyh4w0YrSxuQUZV+qXOyRH4TINj5m6wjymganX /MxLdoqQmSk2yuauwlyOXMv2CRqkKY1Q6zeVpdF4= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-45838: bpf: fix end-of-list detection in cgroup_storage_get_next_key() Date: Wed, 27 May 2026 11:24:10 +0200 Message-ID: <2026052711-CVE-2026-45838-9c3b@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=2943; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=0i99kPpQ5j8yndSURSBsdXtb8QqT3lLwOk2bBPeoYBU=; b=owGbwMvMwCRo6H6F97bub03G02pJDFliO6zzw3bNnZi9JtqnpUeqYsU2h0eafT+ahdTnP30vY Pj6p/W5jlgWBkEmBlkxRZYv23iO7q84pOhlaHsaZg4rE8gQBi5OAZjIwssMC2bmRml8W/5sVvue dtemOY8OcYn9X86wYH3EIWN2wQMbvp2wCklJmb336QvmKgA= 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 end-of-list detection in cgroup_storage_get_next_key() list_next_entry() never returns NULL -- when the current element is the last entry it wraps to the list head via container_of(). The subsequent NULL check is therefore dead code and get_next_key() never returns -ENOENT for the last element, instead reading storage->key from a bogus pointer that aliases internal map fields and copying the result to userspace. Replace it with list_entry_is_head() so the function correctly returns -ENOENT when there are no more entries. The Linux kernel CVE team has assigned CVE-2026-45838 to this issue. Affected and fixed versions =========================== Issue introduced in 4.19 with commit de9cbbaadba5adf88a19e46df61f7054000838f6 and fixed in 6.6.141 with commit b4b5a20bed82130da2f2818f04d52378952fbd0b Issue introduced in 4.19 with commit de9cbbaadba5adf88a19e46df61f7054000838f6 and fixed in 6.12.91 with commit 85a2f30e40f7468db732f55659bc6318874f49af Issue introduced in 4.19 with commit de9cbbaadba5adf88a19e46df61f7054000838f6 and fixed in 6.18.33 with commit 32ce55d424395904986f5066f8755f6cb9993377 Issue introduced in 4.19 with commit de9cbbaadba5adf88a19e46df61f7054000838f6 and fixed in 7.0.10 with commit fc39753b7f92e09177777e9c648afe5aa3abb81f Issue introduced in 4.19 with commit de9cbbaadba5adf88a19e46df61f7054000838f6 and fixed in 7.1-rc1 with commit 5828b9e5b272ecff7cf5d345128d3de7324117f7 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-45838 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/local_storage.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/b4b5a20bed82130da2f2818f04d52378952fbd0b https://git.kernel.org/stable/c/85a2f30e40f7468db732f55659bc6318874f49af https://git.kernel.org/stable/c/32ce55d424395904986f5066f8755f6cb9993377 https://git.kernel.org/stable/c/fc39753b7f92e09177777e9c648afe5aa3abb81f https://git.kernel.org/stable/c/5828b9e5b272ecff7cf5d345128d3de7324117f7