Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 2f30ea50 authored by Mathias Krause's avatar Mathias Krause Committed by Steffen Klassert
Browse files

xfrm_user: propagate sec ctx allocation errors



When we fail to attach the security context in xfrm_state_construct()
we'll return 0 as error value which, in turn, will wrongly claim success
to userland when, in fact, we won't be adding / updating the XFRM state.

This is a regression introduced by commit fd21150a ("[XFRM] netlink:
Inline attach_encap_tmpl(), attach_sec_ctx(), and attach_one_addr()").

Fix it by propagating the error returned by security_xfrm_state_alloc()
in this case.

Fixes: fd21150a ("[XFRM] netlink: Inline attach_encap_tmpl()...")
Signed-off-by: default avatarMathias Krause <minipli@googlemail.com>
Cc: Thomas Graf <tgraf@suug.ch>
Signed-off-by: default avatarSteffen Klassert <steffen.klassert@secunet.com>
parent 2c2c8e33
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment