Subject: Re: [PATCH] xfrm: fix crash in XFRM_MSG_GETSA netlink handler

From: Nicolas Dichtel <[email-masked]>
Date: Tue, 5 Jul 2016 12:14:12 +0200

Le 05/07/2016 10:18, Vegard Nossum a écrit :
> If we hit any of the error conditions inside xfrm_dump_sa(), then
> xfrm_state_walk_init() never gets called. However, we still call
> xfrm_state_walk_done() from xfrm_dump_sa_done(), which will crash
> because the state walk was never initialized properly.
> 
> We can fix this by setting cb->args[0] only after we've processed the
> first element and checking this before calling xfrm_state_walk_done().
> 
> Fixes: d3623099d3 ("ipsec: add support of limited SA dump")
> Cc: Nicolas Dichtel <[email-masked]>
> Cc: Steffen Klassert <[email-masked]>
> Signed-off-by: Vegard Nossum <[email-masked]>
Acked-by: Nicolas Dichtel <[email-masked]>

Thank you for the fix!