Skip to content
High 7.5

ZephyrのTCP処理に解放後使用の脆弱性、遠隔から攻撃されるおそれ

CVE-2026-95823 First seen on SecPulse

Summary

Zephyrには、TCPヘッダーの処理(tcp_pkt_linearize)で解放後のメモリを使ってしまう脆弱性があります。認証を受けていない細工したTCPセグメントを送られると、メモリの解放が二重に起きたり、データを保持したバッファーが解放されずに残ったりするおそれがあります。影響するのは2.3.0以降4.3.2未満と4.4.0以降4.5.0未満で、修正版は4.3.2と4.5.0です。該当するバージョンを使っている場合は、修正版への更新を計画してください。

AI summary

Produced by SecPulse using an external AI model; it may contain mistakes. Check the original description and references below before acting on it.

Zephyrには、TCPヘッダーの処理(tcp_pkt_linearize)で解放後のメモリを使ってしまう脆弱性があります。認証を受けていない細工したTCPセグメントを送られると、メモリの解放が二重に起きたり、データを保持したバッファーが解放されずに残ったりするおそれがあります。影響するのは2.3.0以降4.3.2未満と4.4.0以降4.5.0未満で、修正版は4.3.2と4.5.0です。該当するバージョンを使っている場合は、修正版への更新を計画してください。

Affected packages

PackageAffected → Fixed
zephyrprojectzephyr
≥ 2.3.0, < 4.3.2→ 4.3.2
≥ 4.4.0, < 4.5.0→ 4.5.0
Original description The description as published by the source.

tcp_pkt_linearize() in subsys/net/ip/tcp.c is used by th_get() whenever a received TCP header is not contiguous in a single net_buf. While pulling the header bytes out of the following fragments, the loop called net_buf_unref() on an emptied fragment without first detaching its frags pointer. net_buf_unref() walks the whole fragment list, so the payload buffers still linked behind that fragment were freed as well, and the stale pointer was then reinstalled into the packet as buf->frags, producing a use-after-free and a later double free during packet teardown. The same loop also advanced to second->frags unconditionally: when the fragment still held payload after the header remainder was pulled, it was spliced out of the packet without ever being unreferenced, permanently leaking that buffer and silently dropping the data it carried.

The defect is reached from tcp_recv() via th_get() on every received TCP segment, before connection lookup or any header validation, so a single unauthenticated segment that matches a listening socket is sufficient. An attacker only needs the TCP header to straddle a net_buf boundary, which they can arrange from off-link: IPv6 extension headers are accepted on receive and their length is added to the header offset by th_get(), so a Destination Options header of a suitable length places the TCP header across the boundary of the fixed-size receive buffers (CONFIG_NET_BUF_DATA_SIZE). Packet chains assembled from several sources - IPv4/IPv6 reassemb…

Source: CVE.org (CVE Program・cvelistV5) NVD GitHub Advisory

References

We use cookies for analytics and ad measurement. This setting applies to all Game co., Ltd. sites. Details