mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
ipv6: seg6_genl_set_tunsrc() must check kmemdup() return value
seg6_genl_get_tunsrc() and set_tun_src() do not handle tun_src being
possibly NULL, so we must check kmemdup() return value and abort if
it is NULL
Fixes: 915d7e5e59 ("ipv6: sr: add code base for control plane support of SR-IPv6")
Signed-off-by: Eric Dumazet <[email protected]>
Cc: David Lebrun <[email protected]>
Acked-by: David Lebrun <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
2c561b2b72
commit
e363116b90
1 changed files with 2 additions and 0 deletions
|
|
@ -176,6 +176,8 @@ static int seg6_genl_set_tunsrc(struct sk_buff *skb, struct genl_info *info)
|
|||
|
||||
val = nla_data(info->attrs[SEG6_ATTR_DST]);
|
||||
t_new = kmemdup(val, sizeof(*val), GFP_KERNEL);
|
||||
if (!t_new)
|
||||
return -ENOMEM;
|
||||
|
||||
mutex_lock(&sdata->lock);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue