mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: John Johansen <john.johansen@canonical.com>
To: Christos Gkekas <chris.gekas@gmail.com>,
	James Morris <james.l.morris@oracle.com>,
	"Serge E. Hallyn" <serge@hallyn.com>,
	linux-security-module@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] apparmor: Fix logical error in verify_header()
Date: Mon, 31 Jul 2017 17:22:29 -0700	[thread overview]
Message-ID: <2ea41bda-6a90-4d11-bb85-e56073b64274@canonical.com> (raw)
In-Reply-To: <1499543421-5544-1-git-send-email-chris.gekas@gmail.com>

On 07/08/2017 12:50 PM, Christos Gkekas wrote:
> verify_header() is currently checking whether interface version is less
> than 5 *and* greater than 7, which always evaluates to false. Instead it
> should check whether it is less than 5 *or* greater than 7.
> 
> Signed-off-by: Christos Gkekas <chris.gekas@gmail.com>

sigh, yes. sorry for the delay this ended up in the wrong bucket.

I've pulled it in for the next pull

Acked-by: John Johansen <john.johansen@canonical.com>


> ---
>  security/apparmor/policy_unpack.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/security/apparmor/policy_unpack.c b/security/apparmor/policy_unpack.c
> index c600f4d..f273c61 100644
> --- a/security/apparmor/policy_unpack.c
> +++ b/security/apparmor/policy_unpack.c
> @@ -832,7 +832,7 @@ static int verify_header(struct aa_ext *e, int required, const char **ns)
>  	 * if not specified use previous version
>  	 * Mask off everything that is not kernel abi version
>  	 */
> -	if (VERSION_LT(e->version, v5) && VERSION_GT(e->version, v7)) {
> +	if (VERSION_LT(e->version, v5) || VERSION_GT(e->version, v7)) {
>  		audit_iface(NULL, NULL, NULL, "unsupported interface version",
>  			    e, error);
>  		return error;
> 

      reply	other threads:[~2017-08-01  0:22 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-08 19:50 Christos Gkekas
2017-08-01  0:22 ` John Johansen [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=2ea41bda-6a90-4d11-bb85-e56073b64274@canonical.com \
    --to=john.johansen@canonical.com \
    --cc=chris.gekas@gmail.com \
    --cc=james.l.morris@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=serge@hallyn.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®