From: John Johansen <john.johansen@canonical.com>
To: linux-security-module@vger.kernel.org
Subject: Re: [PATCH] apparmor: Fix an error code in verify_table_headers()
Date: Sat, 24 Mar 2018 00:27:07 +0000 [thread overview]
Message-ID: <41f7677e-dd86-927e-0909-dfda2ef2cb7b@canonical.com> (raw)
In-Reply-To: <20180319091231.GA7409@mwanda>
On 03/19/2018 02:12 AM, Dan Carpenter wrote:
> We accidentally return a positive EPROTO instead of a negative -EPROTO.
> Since 71 is not an error pointer, that means it eventually results in an
> Oops in the caller.
>
> Fixes: d901d6a298dc ("apparmor: dfa split verification of table headers")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>
ouch, and pulled into apparmor-next
Acked-by: John Johansen <john.johansen@canonical.com>
> diff --git a/security/apparmor/match.c b/security/apparmor/match.c
> index dd4c995c5e25..280eba082c7b 100644
> --- a/security/apparmor/match.c
> +++ b/security/apparmor/match.c
> @@ -198,7 +198,7 @@ static int verify_table_headers(struct table_header **tables, int flags)
> static int verify_dfa(struct aa_dfa *dfa)
> {
> size_t i, state_count, trans_count;
> - int error = EPROTO;
> + int error = -EPROTO;
>
> state_count = dfa->tables[YYTD_ID_BASE]->td_lolen;
> trans_count = dfa->tables[YYTD_ID_NXT]->td_lolen;
>
prev parent reply other threads:[~2018-03-24 0:27 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-19 9:12 [PATCH] apparmor: Fix an error code in verify_table_headers() Dan Carpenter
2018-03-24 0:27 ` 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=41f7677e-dd86-927e-0909-dfda2ef2cb7b@canonical.com \
--to=john.johansen@canonical.com \
--cc=linux-security-module@vger.kernel.org \
/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