From: Dave Jones <davej@redhat.com>
To: Linux Kernel <linux-kernel@vger.kernel.org>
Cc: pmoore@redhat.com, jmorris@namei.org
Subject: selinux: fix uninitalised stack variable read in sel_netport_init
Date: Thu, 7 Aug 2014 12:38:18 -0400 [thread overview]
Message-ID: <20140807163818.GA27618@redhat.com> (raw)
After the removal of the avc_add_callback() in commit 615e51fdda6
("selinux: reduce the number of calls to synchronize_net() when flushing caches"),
ret is never set to anything, but we return uninitialized stack data on success.
Given the absense of other failure paths, just explicitly return 0.
Signed-off-by: Dave Jones <davej@redhat.com>
diff --git a/security/selinux/netport.c b/security/selinux/netport.c
index 73ac6784d091..3311cc393cb4 100644
--- a/security/selinux/netport.c
+++ b/security/selinux/netport.c
@@ -237,7 +237,6 @@ void sel_netport_flush(void)
static __init int sel_netport_init(void)
{
int iter;
- int ret;
if (!selinux_enabled)
return 0;
@@ -247,7 +246,7 @@ static __init int sel_netport_init(void)
sel_netport_hash[iter].size = 0;
}
- return ret;
+ return 0;
}
__initcall(sel_netport_init);
next reply other threads:[~2014-08-07 16:38 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-07 16:38 Dave Jones [this message]
2014-08-08 13:02 ` selinux: fix uninitalised stack variable read in sel_netport_init Paul Moore
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=20140807163818.GA27618@redhat.com \
--to=davej@redhat.com \
--cc=jmorris@namei.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pmoore@redhat.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 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.