This is a note to let you know that I've just added the patch titled erspan: Check IFLA_GRE_ERSPAN_VER is set. to the 4.19-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: erspan-check-ifla_gre_erspan_ver-is-set.patch and it can be found in the queue-4.19 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From 51fa960d3b5163b1af22efdebcabfccc5d615ad6 Mon Sep 17 00:00:00 2001 From: William Tu <u9012063@xxxxxxxxx> Date: Tue, 12 May 2020 10:36:23 -0700 Subject: erspan: Check IFLA_GRE_ERSPAN_VER is set. From: William Tu <u9012063@xxxxxxxxx> commit 51fa960d3b5163b1af22efdebcabfccc5d615ad6 upstream. Add a check to make sure the IFLA_GRE_ERSPAN_VER is provided by users. Fixes: f989d546a2d5 ("erspan: Add type I version 0 support.") Cc: Eric Dumazet <eric.dumazet@xxxxxxxxx> Signed-off-by: William Tu <u9012063@xxxxxxxxx> Reviewed-by: Eric Dumazet <edumazet@xxxxxxxxxx> Signed-off-by: David S. Miller <davem@xxxxxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- net/ipv4/ip_gre.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- a/net/ipv4/ip_gre.c +++ b/net/ipv4/ip_gre.c @@ -1182,7 +1182,8 @@ static int erspan_validate(struct nlattr if (ret) return ret; - if (nla_get_u8(data[IFLA_GRE_ERSPAN_VER]) == 0) + if (data[IFLA_GRE_ERSPAN_VER] && + nla_get_u8(data[IFLA_GRE_ERSPAN_VER]) == 0) return 0; /* ERSPAN type II/III should only have GRE sequence and key flag */ Patches currently in stable-queue which might be from u9012063@xxxxxxxxx are queue-4.19/erspan-add-type-i-version-0-support.patch queue-4.19/ip_gre-do-not-report-erspan-version-on-gre-interface.patch queue-4.19/erspan-check-ifla_gre_erspan_ver-is-set.patch