]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit
net: create skb_gso_validate_mac_len()
authorDaniel Axtens <dja@axtens.net>
Mon, 12 Feb 2018 04:43:00 +0000 (05:43 +0100)
committerStefan Bader <stefan.bader@canonical.com>
Wed, 14 Mar 2018 10:42:08 +0000 (11:42 +0100)
commit030674f6682feb88dd134858a05ff30d6ebbe71a
treeadd41007fa49908b2ff9b28432879d25328dbbe0
parent122121cc977d225a9516762b97766d6524ca292e
net: create skb_gso_validate_mac_len()

BugLink: https://bugs.launchpad.net/bugs/1715519
CVE-2018-1000026

If you take a GSO skb, and split it into packets, will the MAC
length (L2 + L3 + L4 headers + payload) of those packets be small
enough to fit within a given length?

Move skb_gso_mac_seglen() to skbuff.h with other related functions
like skb_gso_network_seglen() so we can use it, and then create
skb_gso_validate_mac_len to do the full calculation.

Signed-off-by: Daniel Axtens <dja@axtens.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit 2b16f048729bf35e6c28a40cbfad07239f9dcd90)
Signed-off-by: Daniel Axtens <daniel.axtens@canonical.com>
Acked-by: Seth Forshee <seth.forshee@canonical.com>
Acked-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
include/linux/skbuff.h
net/core/skbuff.c
net/sched/sch_tbf.c