All of lore.kernel.org
 help / color / mirror / Atom feed
* CVE-2026-139317: bpf: Don't saturate owner_refcnt on the last unpin
@ 2026-11-30 13:35 Greg Kroah-Hartman
  0 siblings, 0 replies; only message in thread
From: Greg Kroah-Hartman @ 2026-11-30 13:35 UTC (permalink / raw)
  To: linux-cve-announce; +Cc: Greg Kroah-Hartman

From: Greg Kroah-Hartman <gregkh@kernel.org>

Description
===========

In the Linux kernel, the following vulnerability has been resolved:

bpf: Don't saturate owner_refcnt on the last unpin

bpf_local_storage_map_free() pins the owner with refcount_inc_not_zero()
while it uncharges an element.  The pin counts when
bpf_local_storage_destroy() could not get local_storage->lock: destroy()
then goes on, drops the owner's reference and spins until the count is
zero.  So the pin is the last reference whenever it is needed, and
refcount_dec() takes that for a bug: it warns "decrement hit 0; leaking
memory" and saturates the count.  Unless destroy() happens to read the
count between the two stores it spins for ever, under rcu_read_lock().

Drop the pin with refcount_dec_and_test().

The Linux kernel CVE team has assigned CVE-2026-139317 to this issue.


Affected and fixed versions
===========================

	Issue introduced in 7.0 with commit 5d800f87d0a5ea1b156c47a4b9fd128479335153 and fixed in 7.3.6 with commit f2c55a9b936da22525988d9040f528d6feb78359
	Issue introduced in 7.0 with commit 5d800f87d0a5ea1b156c47a4b9fd128479335153 and fixed in 7.4-rc1 with commit 30a140c9d479974021f5c3eecb64415c96419c3f

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-139317
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:
	include/linux/bpf_local_storage.h
	kernel/bpf/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/f2c55a9b936da22525988d9040f528d6feb78359
	https://git.kernel.org/stable/c/30a140c9d479974021f5c3eecb64415c96419c3f

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-11-30 14:06 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-30 13:35 CVE-2026-139317: bpf: Don't saturate owner_refcnt on the last unpin Greg Kroah-Hartman

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.