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 <[email protected]>
Signed-off-by: Ben Pfaff <[email protected]>
Reviewed-by: Greg Rose <[email protected]>
  • Loading branch information
wyjwang authored and blp committed Sep 12, 2018
1 parent 34c2c34 commit 1657366
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions datapath/linux/compat/lisp.c
Original file line number Diff line number Diff line change
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 1657366

Please sign in to comment.