From: Steffen Klassert <steffen.klassert@secunet.com>
To: Mathias Krause <minipli@googlemail.com>
Cc: "David S. Miller" <davem@davemloft.net>,
Herbert Xu <herbert@gondor.apana.org.au>,
<netdev@vger.kernel.org>, Thomas Graf <tgraf@suug.ch>
Subject: Re: [PATCH] xfrm_user: propagate sec ctx allocation errors
Date: Fri, 9 Sep 2016 10:34:56 +0200 [thread overview]
Message-ID: <20160909083456.GZ31137@gauss.secunet.com> (raw)
In-Reply-To: <1473350997-32733-1-git-send-email-minipli@googlemail.com>
On Thu, Sep 08, 2016 at 06:09:57PM +0200, Mathias Krause wrote:
> 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 fd21150a0fe1 ("[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: fd21150a0fe1 ("[XFRM] netlink: Inline attach_encap_tmpl()...")
> Signed-off-by: Mathias Krause <minipli@googlemail.com>
Applied to the ipsec tree, thanks Mathias!
prev parent reply other threads:[~2016-09-09 8:35 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-08 16:09 [PATCH] xfrm_user: propagate sec ctx allocation errors Mathias Krause
2016-09-09 8:34 ` Steffen Klassert [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160909083456.GZ31137@gauss.secunet.com \
--to=steffen.klassert@secunet.com \
--cc=davem@davemloft.net \
--cc=herbert@gondor.apana.org.au \
--cc=minipli@googlemail.com \
--cc=netdev@vger.kernel.org \
--cc=tgraf@suug.ch \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).