summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorWillem de Bruijn <willemb@google.com>2017-02-03 18:20:48 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-02-18 16:39:27 +0100
commit625bd9e43b3b6a5d796c6a5bac660dc405a60fa2 (patch)
tree6ecb8b8717326a83d670ccfd71f94aab42de451d /net
parent82e9f6b90a0e7fbc017bdce23845c7580db6f657 (diff)
tun: read vnet_hdr_sz once
[ Upstream commit e1edab87faf6ca30cd137e0795bc73aa9a9a22ec ] 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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net')
0 files changed, 0 insertions, 0 deletions