diff options
author | Eric Dumazet <edumazet@google.com> | 2022-10-08 01:57:43 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-11-25 19:45:55 +0300 |
commit | e929ec98c0c3b10d9c07f3776df0c1a02d7a763e (patch) | |
tree | dd6786c7df5c1dd4b0e176ffcd37372b6bf3d830 /lib/ashldi3.c | |
parent | 95ebea5a15e465385bc2d8178d2f18b7cdba9b03 (diff) | |
download | linux-e929ec98c0c3b10d9c07f3776df0c1a02d7a763e.tar.xz |
macvlan: enforce a consistent minimal mtu
commit b64085b00044bdf3cd1c9825e9ef5b2e0feae91a upstream.
macvlan should enforce a minimal mtu of 68, even at link creation.
This patch avoids the current behavior (which could lead to crashes
in ipv6 stack if the link is brought up)
$ ip link add macvlan1 link eno1 mtu 8 type macvlan # This should fail !
$ ip link sh dev macvlan1
5: macvlan1@eno1: <BROADCAST,MULTICAST> mtu 8 qdisc noop
state DOWN mode DEFAULT group default qlen 1000
link/ether 02:47:6c:24:74:82 brd ff:ff:ff:ff:ff:ff
$ ip link set macvlan1 mtu 67
Error: mtu less than device minimum.
$ ip link set macvlan1 mtu 68
$ ip link set macvlan1 mtu 8
Error: mtu less than device minimum.
Fixes: 91572088e3fd ("net: use core MTU range checking in core net infra")
Reported-by: syzbot <syzkaller@googlegroups.com>
Signed-off-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 'lib/ashldi3.c')
0 files changed, 0 insertions, 0 deletions