ip6_tunnel: fix potential NULL pointer dereference
Subsystems (3)
PATCH 1/1 ip6_tunnel: fix potential NULL pointer dereference
The function ip6_tnl_validate assumes that the rtnl attribute IFLA_IPTUN_PROTO always be filled . If this attribute is not filled by the userspace application kernel get crashed with NULL pointer dereference. This patch fixes the potential kernel crash when IFLA_IPTUN_PROTO is missing .
--- net/ipv6/ip6_tunnel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/ipv6/ip6_tunnel.c +1 -1
@@ -1557,7 +1557,7 @@ static int ip6_tnl_validate(struct nlattr *tb[], struct nlattr *data[]) {u8 proto; -if (!data) +if (!data || !data[IFLA_IPTUN_PROTO ])return 0 ; proto =nla_get_u8 (data[IFLA_IPTUN_PROTO ]);
Signature · 1 line
1.8.3.1
David Miller
maintainerFrom: Susant Sahani <[email protected]>
Date: Sat, 10 May 2014 00:11:32 +0530
Quoted 9 lines
The function
ip6_tnl_validateassumes that the rtnl attributeIFLA_IPTUN_PROTOalways be filled . If this attribute is not filled by the userspace application kernel get crashed with NULL pointer dereference. This patch fixes the potential kernel crash whenIFLA_IPTUN_PROTOis missing .Signed-off-by Susant Sahani <[email protected]>Acked-by Thomas Graf <[email protected]>
You really need to fix the date on your computer, it was not Saturday May 10th when you submitted this patch.
A message that is not in the archive (sent off-list or not yet received): [email protected]
David Miller
maintainerFrom: Susant Sahani <[email protected]>
Date: Fri, 09 May 2014 22:47:28 +0530
Quoted 11 lines · David Miller
Quoted 10 lines
From: Susant Sahani <[email protected]>
Date: Sat, 10 May 2014 00:11:32 +0530Quoted 7 lines
The function
ip6_tnl_validateassumes that the rtnl attributeIFLA_IPTUN_PROTOalways be filled . If this attribute is not filled by the userspace application kernel get crashed with NULL pointer dereference. This patch fixes the potential kernel crash whenIFLA_IPTUN_PROTOis missing .
Quoted 5 lines
Quoted 4 lines
Quoted 2 lines
Signed-off-by Susant Sahani <[email protected]>Acked-by Thomas Graf <[email protected]>You really need to fix the date on your computer, it was not Saturday May 10th when you submitted this patch.
Do you want me to resend it again ?
It's not necessary this time, but just realize that this makes my work harder because your patch looked like the most recent one submitted in patchwork because the date was always newer than anything else being submitted meanwhile.
David Miller
maintainerFrom: Susant Sahani <[email protected]>
Date: Sat, 10 May 2014 00:11:32 +0530
Quoted 9 lines
The function
ip6_tnl_validateassumes that the rtnl attributeIFLA_IPTUN_PROTOalways be filled . If this attribute is not filled by the userspace application kernel get crashed with NULL pointer dereference. This patch fixes the potential kernel crash whenIFLA_IPTUN_PROTOis missing .Signed-off-by Susant Sahani <[email protected]>Acked-by Thomas Graf <[email protected]>
Applied and queued up for -stable, thanks.