CVE-2026-64459
KritikTeknik Veri (Otomatik)
- CVSS Skoru
- 9.8
- EPSS
- 0.6%
- CWE
- —
- KEV Durumu
- Hayır
Yayım tarihi: 25 Temmuz 2026
Linux çekirdeğinde aşağıdaki güvenlik açığı çözülmüştür: tcp: tcp_ao_destroy_sock'ta RCU bağışıklık süresini geri yükle 51e547e8c89c taahhüdü ("tcp: RCU olmadan TCP-AO/TCP-MD5 bilgi/anahtarlarını serbest bırak") tcp_ao_destroy_sock()'ten call_rcu() geri çağırmasını kaldırdı ve "bilgi/anahtarların yok edilmesi, soket yok edicisi kadar geciktirilir" ve bu nedenle "artık kimse bunu keşfedemez" diye iddia etti. Bu argüman, tcp_connect()'teki çağrı sitesinde (net/ipv4/tcp_output.c:4327-4332) geçerli değildir. Bu noktada soket TCP_SYN_SENT'dir, zaten tcp_v4_connect()'teki inet_hash_connect() tarafından inet ehash'ye eklenmiştir ve bu nedenle çok keşfedilebilir: başka bir CPU'da tcp_v4_rcv() çalıştıran herhangi bir softirq, soketi ehash'ten çıkarabilir, tcp_inbound_hash()'e girebilir ve bh_lock_sock_nested() alındıktan önce örtük RCU aracılığıyla tp->ao_info'yu yükleyebilir. Okuyucu yolu daha sonra __tcp_ao_do_lookup()'e (net/ipv4/tcp_ao.c:208) girer bu, rcu_dereference_check() aracılığıyla tp->ao_info'yu yeniden yükler; yeniden yükleme, hala serbest bırakılmak üzere olan işaretçiyi gözlemleyebilir, çünkü tcp_ao_destroy_sock()'teki rcu_assign_pointer(tp->ao_info, NULL) ve tcp_ao_info_free() arasında synchronize_rcu() yoktur. Ele geçirilen işaretçi daha sonra 223. satırda gezilir: hlist_for_each_entry_rcu(key, &ao->head, node, ...) Yazarın senkron kfree()'si, 218. satır yeniden alması ve 223. satır hlist iterasyonu arasında tamamlanmak için serbesttir. Slab yeniden kullanılır (veya henüz yeniden kullanılmamışsa LIST_POISON1 ile damgalanır) ve iterasyon, softirq bağlamında saldırgan tarafından kontrol edilen veya zehirlenmiş belleği gezinir. Üretici (hiçbir hata shim'i yok, stok x86_64 v7.1-rc2 SMP+KASAN, QEMU+KVM): CLONE_NEWUSER|CLONE_NEWNET içinde bir uid=1000 işlemi, TCP_MD5SIG + TCP_AO_ADD_KEY'i bir TCP soketi üzerinde kurar, sahte TCP-AO segmentlerini son 4-lüye doğru ham soketler aracılığıyla püskürtür, ardından connect() çağırır. tcp_connect()'teki md5-wins uzlaşması, tcp_ao_destroy_sock()'ü ateşler; döngü geri bildirimi NAPI yolundaki softirq arka plan okuyucu hatalı ao->head.first gezintisinde çöker: Oops: genel koruma hatası, muhtemelen kanonik olmayan adres 0xfbd59c000000002f KASAN: belki de wild
Orijinal açıklama (İngilizce)
In the Linux kernel, the following vulnerability has been resolved: tcp: restore RCU grace period in tcp_ao_destroy_sock Commit 51e547e8c89c ("tcp: Free TCP-AO/TCP-MD5 info/keys without RCU") removed the call_rcu() callback from tcp_ao_destroy_sock(), arguing that "the destruction of info/keys is delayed until the socket destructor" and therefore "no one can discover it anymore". That argument does not hold for the call site in tcp_connect() (net/ipv4/tcp_output.c:4327-4332). At that point the socket is in TCP_SYN_SENT, has already been inserted into the inet ehash by inet_hash_connect() in tcp_v4_connect(), and is therefore very much discoverable: any softirq running tcp_v4_rcv() on another CPU can take the socket out of the ehash, walk into tcp_inbound_hash(), and load tp->ao_info via implicit RCU before bh_lock_sock_nested() is taken on the destroying CPU. The reader path then enters __tcp_ao_do_lookup() (net/ipv4/tcp_ao.c:208) which re-loads tp->ao_info via rcu_dereference_check(); the re-load can still observe the (about-to-be-freed) pointer because there is no synchronize_rcu() between rcu_assign_pointer(tp->ao_info, NULL) and tcp_ao_info_free() in tcp_ao_destroy_sock(). The captured pointer is then walked at line 223: hlist_for_each_entry_rcu(key, &ao->head, node, ...) The writer's synchronous kfree() is free to complete between the line 218 re-fetch and the line 223 hlist iteration. The slab is reused (or simply LIST_POISON1-stamped if not yet reused) and the iteration walks attacker-controlled or poison memory in softirq context. Reproducer (no debug shim, stock x86_64 v7.1-rc2 SMP+KASAN, QEMU+KVM): an unprivileged uid=1000 process inside CLONE_NEWUSER|CLONE_NEWNET installs TCP_MD5SIG + TCP_AO_ADD_KEY on a TCP socket, sprays forged TCP-AO segments toward its eventual 4-tuple via raw sockets, then calls connect(). The md5-wins reconciliation in tcp_connect() fires tcp_ao_destroy_sock(); the softirq backlog reader on the loopback NAPI path crashes on the freed ao->head.first walk: Oops: general protection fault, probably for non-canonical address 0xfbd59c000000002f KASAN: maybe wild-memory-access in range [0xdead000000000178-0xdead00000000017f] CPU: 0 UID: 1000 PID: 100 Comm: repro_userns RIP: 0010:__tcp_ao_do_lookup+0x107/0x1c0 Call Trace: <IRQ> __tcp_ao_do_lookup+0x107/0x1c0 tcp_ao_inbound_lookup.constprop.0+0x12a/0x200 tcp_inbound_ao_hash+0x5ea/0x1520 tcp_inbound_hash+0x7ce/0x1240 tcp_v4_rcv+0x1e7a/0x3e10 ... Restore the RCU grace period: re-add struct rcu_head to tcp_ao_info and replace the synchronous tcp_ao_info_free() with a call_rcu() callback. Readers that captured tp->ao_info before rcu_assign_pointer NULLed it now see the object remain valid until rcu_read_unlock(). With the patch applied the reproducer runs cleanly for 2000 iterations on the same kernel build.
Referanslar
Bu CVE için henüz editoryal inceleme yapılmadı. Sadece otomatik teknik veri gösteriliyor.