From: Paul Moore <pmoore@redhat.com>
To: eparis@redhat.com
Cc: selinux@tycho.nsa.gov
Subject: Re: [PATCH v3] selinux: fix problems in netnode when BUG() is compiled out
Date: Fri, 24 May 2013 14:25:32 -0400 [thread overview]
Message-ID: <1527561.BHgFlbIGtA@sifl> (raw)
In-Reply-To: <1854129.fLaNtYFx1j@sifl>
On Monday, April 29, 2013 11:09:47 AM Paul Moore wrote:
> On Thursday, April 04, 2013 10:46:00 AM Paul Moore wrote:
> > When the BUG() macro is disabled at compile time it can cause some
> > problems in the SELinux netnode code: invalid return codes and
> > uninitialized variables. This patch fixes this by making sure we take
> > some corrective action after the BUG() macro.
> >
> > Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
> > Signed-off-by: Paul Moore <pmoore@redhat.com>
> >
> > ---
> >
> > In the process of cleaning up a local git tree I realized I had this
> > patch still sitting in my tree that for some reason hadn't been
> > merged upstream. Originally sent back on December 5, 2012.
> > ---
> >
> > security/selinux/netnode.c | 2 ++
> > 1 file changed, 2 insertions(+)
> >
> > diff --git a/security/selinux/netnode.c b/security/selinux/netnode.c
> > index c5454c0..03a72c3 100644
> > --- a/security/selinux/netnode.c
> > +++ b/security/selinux/netnode.c
> > @@ -166,6 +166,7 @@ static void sel_netnode_insert(struct sel_netnode
> > *node) break;
> >
> > default:
> > BUG();
> >
> > + return;
> >
> > }
> >
> > /* we need to impose a limit on the growth of the hash table so check
> >
> > @@ -225,6 +226,7 @@ static int sel_netnode_sid_slow(void *addr, u16
> > family,
> > u32 *sid) break;
> >
> > default:
> > BUG();
> >
> > + ret = -EINVAL;
> >
> > }
> > if (ret != 0)
> >
> > goto out;
>
> It would be nice to get this into 3.10.
*COUGH*
Hello? 3.10? Hello?
*COUGH*
--
paul moore
security and virtualization @ redhat
--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.
prev parent reply other threads:[~2013-05-24 18:25 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-04 14:46 [PATCH v3] selinux: fix problems in netnode when BUG() is compiled out Paul Moore
2013-04-29 15:09 ` Paul Moore
2013-05-24 18:25 ` Paul Moore [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=1527561.BHgFlbIGtA@sifl \
--to=pmoore@redhat.com \
--cc=eparis@redhat.com \
--cc=selinux@tycho.nsa.gov \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.