Files
linux-stable-mirror/drivers
Willem de Bruijn e1edab87fa tun: read vnet_hdr_sz once
When IFF_VNET_HDR is enabled, a virtio_net header must precede data.
Data length is verified to be greater than or equal to expected header
length tun->vnet_hdr_sz before copying.

Read this value once and cache locally, as it can be updated between
the test and use (TOCTOU).

Signed-off-by: Willem de Bruijn <willemb@google.com>
Reported-by: Dmitry Vyukov <dvyukov@google.com>
CC: Eric Dumazet <edumazet@google.com>
Acked-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2017-02-06 22:41:27 -05:00
..
2016-12-25 10:47:44 +01:00
2017-01-25 15:35:11 +05:30
2017-01-26 00:24:23 +01:00
2016-12-25 10:47:44 +01:00
2016-12-25 17:21:22 +01:00
2017-02-06 22:41:27 -05:00
2017-01-26 17:49:14 +02:00
2016-12-25 10:47:44 +01:00
2016-12-25 17:21:22 +01:00