Commit 42e42562 authored by Sabrina Dubroca's avatar Sabrina Dubroca Committed by Steffen Klassert
Browse files

xfrm: flush all states in xfrm_state_fini



While reverting commit f75a2804 ("xfrm: destroy xfrm_state
synchronously on net exit path"), I incorrectly changed
xfrm_state_flush's "proto" argument back to IPSEC_PROTO_ANY. This
reverts some of the changes in commit dbb2483b ("xfrm: clean up
xfrm protocol checks"), and leads to some states not being removed
when we exit the netns.

Pass 0 instead of IPSEC_PROTO_ANY from both xfrm_state_fini
xfrm6_tunnel_net_exit, so that xfrm_state_flush deletes all states.

Fixes: 2a198bbe ("Revert "xfrm: destroy xfrm_state synchronously on net exit path"")
Reported-by: default avatar <syzbot+6641a61fe0e2e89ae8c5@syzkaller.appspotmail.com>
Closes: https://syzkaller.appspot.com/bug?extid=6641a61fe0e2e89ae8c5


Tested-by: default avatar <syzbot+6641a61fe0e2e89ae8c5@syzkaller.appspotmail.com>
Signed-off-by: default avatarSabrina Dubroca <sd@queasysnail.net>
Reviewed-by: default avatarSimon Horman <horms@kernel.org>
Signed-off-by: default avatarSteffen Klassert <steffen.klassert@secunet.com>
parent d942fe13
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment