From: pablo@netfilter.org
To: netfilter-devel@vger.kernel.org
Cc: davem@davemloft.net, netdev@vger.kernel.org
Subject: [PATCH 1/5] ipvs: freeing uninitialized pointer on error
Date: Sat, 9 Feb 2013 13:03:56 +0100 [thread overview]
Message-ID: <1360411440-6526-2-git-send-email-pablo@netfilter.org> (raw)
In-Reply-To: <1360411440-6526-1-git-send-email-pablo@netfilter.org>
From: Dan Carpenter <dan.carpenter@oracle.com>
If state != IP_VS_STATE_BACKUP then tinfo->buf is uninitialized. If
kthread_run() fails then it means we free random memory resulting in an
oops.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: Simon Horman <horms@verge.net.au>
---
net/netfilter/ipvs/ip_vs_sync.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/net/netfilter/ipvs/ip_vs_sync.c b/net/netfilter/ipvs/ip_vs_sync.c
index effa10c..44fd10c 100644
--- a/net/netfilter/ipvs/ip_vs_sync.c
+++ b/net/netfilter/ipvs/ip_vs_sync.c
@@ -1795,6 +1795,8 @@ int start_sync_thread(struct net *net, int state, char *mcast_ifn, __u8 syncid)
GFP_KERNEL);
if (!tinfo->buf)
goto outtinfo;
+ } else {
+ tinfo->buf = NULL;
}
tinfo->id = id;
--
1.7.10.4
next prev parent reply other threads:[~2013-02-09 12:03 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-09 12:03 [PATCH 0/5] Netfilter/IPVS fixes for 3.8-rc7 pablo
2013-02-09 12:03 ` pablo [this message]
2013-02-09 12:03 ` [PATCH 2/5] ipvs: sctp: fix checksumming on snat and dnat handlers pablo
2013-02-09 12:03 ` [PATCH 3/5] netfilter: ip6t_NPT: Fix adjustment calculation pablo
2013-02-09 12:03 ` [PATCH 4/5] netfilter: ip6t_NPT: Fix prefix mangling pablo
2013-02-09 12:04 ` [PATCH 5/5] netfilter: ip6t_NPT: Ensure to check lower part of prefixes are zero pablo
2013-02-11 1:44 ` [PATCH 0/5] Netfilter/IPVS fixes for 3.8-rc7 David Miller
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=1360411440-6526-2-git-send-email-pablo@netfilter.org \
--to=pablo@netfilter.org \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=netfilter-devel@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;
as well as URLs for NNTP newsgroup(s).