public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH net 0/2] tap/tun: harden by dropping short frame
@ 2024-07-24 17:04 Dongli Zhang
  2024-07-24 17:04 ` [PATCH net 1/2] tap: add missing verification for " Dongli Zhang
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Dongli Zhang @ 2024-07-24 17:04 UTC (permalink / raw)
  To: netdev
  Cc: willemdebruijn.kernel, jasowang, davem, edumazet, kuba, pabeni,
	ast, daniel, hawk, john.fastabend, linux-kernel, bpf, si-wei.liu

This is to harden all of tap/tun to avoid any short frame smaller than the
Ethernet header (ETH_HLEN).

While the xen-netback already rejects short frame smaller than ETH_HLEN ...

 914 static void xenvif_tx_build_gops(struct xenvif_queue *queue,
 915                                      int budget,
 916                                      unsigned *copy_ops,
 917                                      unsigned *map_ops)
 918 {
... ...
1007                 if (unlikely(txreq.size < ETH_HLEN)) {
1008                         netdev_dbg(queue->vif->dev,
1009                                    "Bad packet size: %d\n", txreq.size);
1010                         xenvif_tx_err(queue, &txreq, extra_count, idx);
1011                         break;
1012                 }

... the short frame may not be dropped by vhost-net/tap/tun.

This fixes CVE-2024-41090 and CVE-2024-41091.

Thank you very much!

Dongli Zhang



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-07-25 15:19 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-24 17:04 [PATCH net 0/2] tap/tun: harden by dropping short frame Dongli Zhang
2024-07-24 17:04 ` [PATCH net 1/2] tap: add missing verification for " Dongli Zhang
2024-07-24 17:04 ` [PATCH net 2/2] tun: " Dongli Zhang
2024-07-25 15:19 ` [PATCH net 0/2] tap/tun: harden by dropping " patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox