diff options
author | Willem de Bruijn <willemb@google.com> | 2017-02-03 18:20:48 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-02-18 15:11:42 +0100 |
commit | 26989c9d9904e3626443336bcefab0b6e7077d99 (patch) | |
tree | abe0693a4f8c0a3c74bce7eda6b772601fe5a3cd /drivers/thunderbolt/ctl.h | |
parent | 0f895f51a831d73ce24158534784aba5b2a72a9e (diff) | |
download | linux-rpi3-26989c9d9904e3626443336bcefab0b6e7077d99.tar.gz linux-rpi3-26989c9d9904e3626443336bcefab0b6e7077d99.tar.bz2 linux-rpi3-26989c9d9904e3626443336bcefab0b6e7077d99.zip |
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 'drivers/thunderbolt/ctl.h')
0 files changed, 0 insertions, 0 deletions