Direct naar de inhoud
Kritieke cyberalerts voor jouw sector & systemen — direct in je inbox. Aanmelden →
CVE's Videos Dagbriefing

← Terug naar CVE-database

CVE-2026-52947

HIGH · 7.8 CVSS Gepubliceerd: CWE-416

Beschrijving NL

In de Linux kernel is de volgende kwetsbaarheid verholpen:

net: qrtr: fix refcount saturation and potential UAF in qrtr_port_remove

In qrtr_port_remove() wordt het aantal socketreferenties verlaagd via
__Sock_put() voordat de poort wordt verwijderd uit de qrtr_ports XArray en
voordat de gratieperiode van de RCU is verstreken. Dit doorbreekt het fundamentele RCU-updateparadigma. Het onthult een ras
venster waar een gelijktijdige RCU-lezer (zoals qrtr_reset_ports() of
qrtr_port_lookup()) kan een pointer naar de socket van de XArray verkrijgen,
en probeer sock_hold() aan te roepen op een socket waarvan de referentietelling
al naar nul gezakt. Deze exacte raceconditie werd geraakt tijdens het fuzzen van de syzkaller, wat leidde tot
de volgende waarschuwing voor refcount-saturatie en een mogelijke Use-After-Free:

refcount_t: verzadigd; lekkend geheugen. WAARSCHUWING: CPU: 3 PID: 1273 bij lib/refcount.c:22 refcount_warn_saturate+0xae/0x1d0
Modules gekoppeld in: qrtr(+) bochs drm_shmem_helper ... Oproeptracering:

qrtr_reset_ports net/qrtr/af_qrtr.c:768 [inline] [qrtr]
__qrtr_bind.isra.0+0x48b/0x570 net/qrtr/af_qrtr.c:805 [qrtr]
qrtr_bind+0x17d/0x210 net/qrtr/af_qrtr.c:901 [qrtr]
kernel_bind+0xe4/0x120 net/socket.c:3592
qrtr_ns_init+0x1a6/0x380 net/qrtr/ns.c:715 [qrtr]
qrtr_proto_init+0x3b/0xff0 net/qrtr/af_qrtr.c:169 [qrtr]
do_one_initcall+0xf5/0x5e0 init/main.c:1283
... Los dit op door de verlaging van de referentietelling uit te stellen tot na de
xa_erase() en de synchronize_rcu() voltooid. (Opmerking: de v1 van deze patch heeft __Sock_put() ten onrechte vervangen door
sock_put(). Zoals Simon Horman opmerkte, de bellers van qrtr_port_remove()
nog steeds een verwijzing naar de socket, dus het vrijmaken van de socket geheugen hier
zou leiden tot een volgend UAF in de beller. De __Sock_put() is dus
bewaard, maar alleen geherpositioneerd om de RCU-race te sluiten.)

Origineel (Engels) tonen

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

net: qrtr: fix refcount saturation and potential UAF in qrtr_port_remove

In qrtr_port_remove(), the socket reference count is decremented via
__sock_put() before the port is removed from the qrtr_ports XArray and
before the RCU grace period elapses.

This breaks the fundamental RCU update paradigm. It exposes a race
window where a concurrent RCU reader (such as qrtr_reset_ports() or
qrtr_port_lookup()) can obtain a pointer to the socket from the XArray,
and attempt to call sock_hold() on a socket whose reference count has
already dropped to zero.

This exact race condition was hit during syzkaller fuzzing, leading to
the following refcount saturation warning and a potential Use-After-Free:

refcount_t: saturated; leaking memory.
WARNING: CPU: 3 PID: 1273 at lib/refcount.c:22 refcount_warn_saturate+0xae/0x1d0
Modules linked in: qrtr(+) bochs drm_shmem_helper ...
Call Trace:

qrtr_reset_ports net/qrtr/af_qrtr.c:768 [inline] [qrtr]
__qrtr_bind.isra.0+0x48b/0x570 net/qrtr/af_qrtr.c:805 [qrtr]
qrtr_bind+0x17d/0x210 net/qrtr/af_qrtr.c:901 [qrtr]
kernel_bind+0xe4/0x120 net/socket.c:3592
qrtr_ns_init+0x1a6/0x380 net/qrtr/ns.c:715 [qrtr]
qrtr_proto_init+0x3b/0xff0 net/qrtr/af_qrtr.c:169 [qrtr]
do_one_initcall+0xf5/0x5e0 init/main.c:1283
...

Fix this by deferring the reference count decrement until after the
xa_erase() and the synchronize_rcu() complete.

(Note: The v1 of this patch incorrectly replaced __sock_put() with
sock_put(). As Simon Horman pointed out, the callers of qrtr_port_remove()
still hold a reference to the socket, so freeing the socket memory here
would lead to a subsequent UAF in the caller. Thus, the __sock_put() is
kept, but only repositioned to close the RCU race.)

Vendors

Linux

Affected products

Linux Kernel

References