Direct naar de inhoud
Kritieke cyberalerts voor jouw sector & systemen — direct in je inbox. Aanmelden →
cybernieuws.nl Cybersecurity en informatiebeveiling nieuws alerts live · 1 min 139 bronnen 3 kritiek 1 vandaag
CVE's Videos Dagbriefing

← Terug naar CVE-database

CVE-2026-64177

MEDIUM · 5.5 CVSS Gepubliceerd:

Beschrijving NL

In de Linux kernel is de volgende kwetsbaarheid verholpen:

phonet/pep: BH uitschakelen rond doorgestuurde sk_receive_skb()

Het netwerkontvangstpad wordt meestal uitgevoerd vanuit softirq-context, maar
protocollen die de socketvergrendeling gebruiken, kunnen pakketten bevatten die zijn opgeslagen in de
backlog en later verwerkt vanuit procescontext. In dat geval
laat release_Sock() -> __release_Sock() de slok vallen met spin_unlock_bh()
en roept dan sk->sk_backlog_rcv() aan met de onderste helften ingeschakeld. Typische sk_backlog_rcv-handlers verwerken de socket waarvan de backlog
wordt afgevoerd, dus de BH-status bij binnenkomst is niet relevant voor de slocks
ze raken aan. pep_do_rcv() is anders: wanneer de inkomende skb zich richt op een
bestaande PEP-buis, stuurt de skb door naar een ander *kind* stopcontact
via sk_receive_skb(). Die helper neemt de kinderslok mee
bh_lock_sock_nested(), wat gewoon spin_lock_nested() is en ervan uitgaat dat BH
is al uitgeschakeld. Dezelfde kind-slok eindigt dus verworven met
BH aan (procespad) en met BH uit (softirq pad):

procescontext softirq context
--------------- ---------------
release_sock(luisteraar) __netif_receive_skb()
__release_Sock() FONET_rcv()
spin_unlock_bh() __sk_receive_skb(luisteraar)
[BH nu INGESCHAKELD] [BH al uitgeschakeld]
sk_backlog_rcv: sk_backlog_rcv:
pep_do_rcv() pep_do_rcv()
sk_receive_skb(kind) sk_receive_skb(kind)
bh_lock_sock_nested(kind) bh_lock_sock_nested(kind)
=> SOFTIRQ-ON-W => IN-SOFTIRQ-W

Lockdep markeert dit als inconsistente vergrendelingsstatus en het kan een echte
self-deadlock als een softirq op dezelfde CPU probeert te ontvangen op dezelfde
kindercontactdoos terwijl de slock in het BH-pad wordt gehouden:

WAARSCHUWING: inconsistente vergrendelingstoestand
inconsistent {SOFTIRQ-ON-W} -> {IN-SOFTIRQ-W} gebruik. (slock-AF_PHONET/1){+.?.}-{3:3}, te: __sk_receive_skb+0x1cf/0x900
__sk_receive_skb net/core/sock.c:563
sk_receive_skb include/net/sock.h:2022 [inline]
pep_do_rcv net/phonet/pep.c:675
sk_backlog_rcv include/net/sock.h:1190
__release_sock net/core/sock.c:3216
release_sock net/core/sock.c:3815
pep_sock_accept net/phonet/pep.c:879

Verpak de forwa rded sk_receive_skb() in local_bh_disable() /
local_bh_enable(), zodat de kinderslok altijd wordt verworven met BH uit. local_bh_disable() nestelt veilig op het softirq-pad. Ontdekt via in-house syzkaller fuzzing; dezelfde oorzaak ook
op het linux-6.1.y syzbot-dashboard als extid 44f0626dd6284f02663c. Gereproduceerd onder KASAN + LOCKDEP + Proof_LOCKING, reproducer:
https://pastebin.com/A3t8xzCR

Origineel (Engels) tonen

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

phonet/pep: disable BH around forwarded sk_receive_skb()

The networking receive path is usually run from softirq context, but
protocols that take the socket lock may have packets stored in the
backlog and processed later from process context. In that case
release_sock() -> __release_sock() drops the slock with spin_unlock_bh()
and then calls sk->sk_backlog_rcv() with bottom halves enabled.

Typical sk_backlog_rcv handlers process the socket whose backlog is
being drained, so the BH state at entry is irrelevant for the slocks
they touch. pep_do_rcv() is different: when the inbound skb targets an
existing PEP pipe, it forwards the skb to a different *child* socket
via sk_receive_skb(). That helper takes the child slock with
bh_lock_sock_nested(), which is just spin_lock_nested() and assumes BH
is already off. The same child slock therefore ends up acquired with
BH on (process path) and with BH off (softirq path):

process context softirq context
--------------- ---------------
release_sock(listener) __netif_receive_skb()
__release_sock() phonet_rcv()
spin_unlock_bh() __sk_receive_skb(listener)
[BH now ENABLED] [BH already disabled]
sk_backlog_rcv: sk_backlog_rcv:
pep_do_rcv() pep_do_rcv()
sk_receive_skb(child) sk_receive_skb(child)
bh_lock_sock_nested(child) bh_lock_sock_nested(child)
=> SOFTIRQ-ON-W => IN-SOFTIRQ-W

Lockdep flags this as inconsistent lock state, and it can become a real
self-deadlock if a softirq on the same CPU tries to receive to the same
child socket while its slock is held in the BH-enabled path:

WARNING: inconsistent lock state
inconsistent {SOFTIRQ-ON-W} -> {IN-SOFTIRQ-W} usage.
(slock-AF_PHONET/1){+.?.}-{3:3}, at: __sk_receive_skb+0x1cf/0x900
__sk_receive_skb net/core/sock.c:563
sk_receive_skb include/net/sock.h:2022 [inline]
pep_do_rcv net/phonet/pep.c:675
sk_backlog_rcv include/net/sock.h:1190
__release_sock net/core/sock.c:3216
release_sock net/core/sock.c:3815
pep_sock_accept net/phonet/pep.c:879

Wrap the forwarded sk_receive_skb() in local_bh_disable() /
local_bh_enable() so the child slock is always acquired with BH off.
local_bh_disable() nests safely on the softirq path.

Discovered via in-house syzkaller fuzzing; the same root cause also
on the linux-6.1.y syzbot dashboard as extid 44f0626dd6284f02663c.
Reproduced under KASAN + LOCKDEP + PROVE_LOCKING, reproducer:
https://pastebin.com/A3t8xzCR

Vendors

Linux

Affected products

Linux Kernel

References