Skip to content

Commit

Permalink
datapath: lisp: Fix uninitialized field in tunnel_cfg.
Browse files Browse the repository at this point in the history
The tunnel_cfg had the gro_receive and gro_complete fields uninitialized
in function lisp_open(). This caused an uninitialized memory read.

Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
Reviewed-by: Greg Rose <gvrose8192@gmail.com>
  • Loading branch information
wyjwang authored and blp committed Sep 12, 2018
1 parent d5654d1 commit 97ec7af
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions datapath/linux/compat/lisp.c
Expand Up @@ -457,6 +457,7 @@ static int lisp_open(struct net_device *dev)

rcu_assign_pointer(lisp->sock, sock);
/* Mark socket as an encapsulation socket */
memset(&tunnel_cfg, 0, sizeof(tunnel_cfg));
tunnel_cfg.sk_user_data = dev;
tunnel_cfg.encap_type = 1;
tunnel_cfg.encap_rcv = lisp_rcv;
Expand Down

0 comments on commit 97ec7af

Please sign in to comment.