Use-after-free and net_buf leak in Zephyr TCP header linearization (tcp_pkt_linearize)
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 …