summaryrefslogtreecommitdiff
path: root/drivers/isdn
diff options
context:
space:
mode:
authorWillem de Bruijn <willemb@google.com>2018-12-31 01:24:36 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-01-09 19:38:31 +0300
commitcde81154f86e36df0fad21c23976cc8b80c01600 (patch)
tree93ed3a27611ef4d7a6705425748153db05c81041 /drivers/isdn
parent0d2b652b0732bcf1536394e9d1fb37223cf541a1 (diff)
downloadlinux-cde81154f86e36df0fad21c23976cc8b80c01600.tar.xz
ip: validate header length on virtual device xmit
[ Upstream commit cb9f1b783850b14cbd7f87d061d784a666dfba1f ] KMSAN detected read beyond end of buffer in vti and sit devices when passing truncated packets with PF_PACKET. The issue affects additional ip tunnel devices. Extend commit 76c0ddd8c3a6 ("ip6_tunnel: be careful when accessing the inner header") and commit ccfec9e5cb2d ("ip_tunnel: be careful when accessing the inner header"). Move the check to a separate helper and call at the start of each ndo_start_xmit function in net/ipv4 and net/ipv6. Minor changes: - convert dev_kfree_skb to kfree_skb on error path, as dev_kfree_skb calls consume_skb which is not for error paths. - use pskb_network_may_pull even though that is pedantic here, as the same as pskb_may_pull for devices without llheaders. - do not cache ipv6 hdrs if used only once (unsafe across pskb_may_pull, was more relevant to earlier patch) Reported-by: syzbot <syzkaller@googlegroups.com> Signed-off-by: Willem de Bruijn <willemb@google.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/isdn')
0 files changed, 0 insertions, 0 deletions