From: David Miller <davem@davemloft.net>
To: eparis@parisplace.org
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
jamesm@namei.org, vyekkirala@trustedcs.com,
cxzhang@watson.ibm.com, sds@tycho.nsa.gov
Subject: Re: [PATCH] xfrm_policy delete security check misplaced
Date: Wed, 07 Mar 2007 15:38:13 -0800 (PST) [thread overview]
Message-ID: <20070307.153813.116350402.davem@davemloft.net> (raw)
In-Reply-To: <1172860190.31047.11.camel@localhost.localdomain>
From: Eric Paris <eparis@parisplace.org>
Date: Fri, 02 Mar 2007 13:29:50 -0500
> The security hooks to check permissions to remove an xfrm_policy were
> actually done after the policy was removed. Since the unlinking and
> deletion are done in xfrm_policy_by* functions this moves the hooks
> inside those 2 functions. There we have all the information needed to
> do the security check and it can be done before the deletion. Since
> auditing requires the result of that security check err has to be passed
> back and forth from the xfrm_policy_by* functions.
>
> This patch also fixes a bug where a deletion that failed the security
> check could cause improper accounting on the xfrm_policy
> (xfrm_get_policy didn't have a put on the exit path for the hold taken
> by xfrm_policy_by*)
>
> It also fixes the return code when no policy is found in
> xfrm_add_pol_expire. In old code (at least back in the 2.6.18 days) err
> wasn't used before the return when no policy is found and so the
> initialization would cause err to be ENOENT. But since err has since
> been used above when we don't get a policy back from the xfrm_policy_by*
> function we would always return 0 instead of the intended ENOENT. Also
> fixed some white space damage in the same area.
>
> Signed-off-by: Eric Paris <eparis@redhat.com>
Applied.
next prev parent reply other threads:[~2007-03-07 23:38 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-02 18:29 Eric Paris
2007-03-05 15:33 ` Venkat Yekkirala
2007-03-05 15:58 ` Venkat Yekkirala
2007-03-05 16:39 ` James Morris
2007-03-05 16:51 ` Eric Paris
2007-03-05 17:10 ` Venkat Yekkirala
2007-03-06 0:37 ` James Morris
2007-03-07 23:38 ` David Miller [this message]
2007-03-05 15:36 Venkat Yekkirala
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=20070307.153813.116350402.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=cxzhang@watson.ibm.com \
--cc=eparis@parisplace.org \
--cc=jamesm@namei.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=sds@tycho.nsa.gov \
--cc=vyekkirala@trustedcs.com \
/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
all inboxes | Powered by JetHome®