From: Alex Gartrell <agartrell@fb.com>
To: <horms@verge.net.au>
Cc: <ja@ssi.bg>, <dan.carpenter@oracle.com>,
<lvs-devel@vger.kernel.org>, <netdev@vger.kernel.org>,
<kernel-team@fb.com>, Alex Gartrell <agartrell@fb.com>
Subject: [PATCH net-next] ipvs: Avoid null-pointer deref in debug code
Date: Mon, 6 Oct 2014 08:46:19 -0700 [thread overview]
Message-ID: <1412610379-6295-1-git-send-email-agartrell@fb.com> (raw)
In-Reply-To: <20141006073232.GA10073@verge.net.au>
Use daddr instead of reaching into dest.
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Alex Gartrell <agartrell@fb.com>
---
net/netfilter/ipvs/ip_vs_xmit.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/net/netfilter/ipvs/ip_vs_xmit.c b/net/netfilter/ipvs/ip_vs_xmit.c
index 91f17c1..437a366 100644
--- a/net/netfilter/ipvs/ip_vs_xmit.c
+++ b/net/netfilter/ipvs/ip_vs_xmit.c
@@ -316,7 +316,7 @@ __ip_vs_get_out_rt(int skb_af, struct sk_buff *skb, struct ip_vs_dest *dest,
if (unlikely(crosses_local_route_boundary(skb_af, skb, rt_mode,
local))) {
IP_VS_DBG_RL("We are crossing local and non-local addresses"
- " daddr=%pI4\n", &dest->addr.ip);
+ " daddr=%pI4\n", &daddr);
goto err_put;
}
@@ -458,7 +458,7 @@ __ip_vs_get_out_rt_v6(int skb_af, struct sk_buff *skb, struct ip_vs_dest *dest,
if (unlikely(crosses_local_route_boundary(skb_af, skb, rt_mode,
local))) {
IP_VS_DBG_RL("We are crossing local and non-local addresses"
- " daddr=%pI6\n", &dest->addr.in6);
+ " daddr=%pI6\n", daddr);
goto err_put;
}
--
Alex Gartrell <agartrell@fb.com>
next parent reply other threads:[~2014-10-06 15:46 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20141006073232.GA10073@verge.net.au>
2014-10-06 15:46 ` Alex Gartrell [this message]
2014-10-06 19:01 ` [PATCH net-next] ipvs: Avoid null-pointer deref in debug code Julian Anastasov
2014-10-17 6:27 ` Simon Horman
[not found] <20141001174526.GA16206@mwanda>
2014-10-06 0:54 ` Alex Gartrell
2014-10-06 6:49 ` Julian Anastasov
2014-10-06 15:56 ` Alex Gartrell
2014-10-06 19:13 ` Julian Anastasov
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=1412610379-6295-1-git-send-email-agartrell@fb.com \
--to=agartrell@fb.com \
--cc=dan.carpenter@oracle.com \
--cc=horms@verge.net.au \
--cc=ja@ssi.bg \
--cc=kernel-team@fb.com \
--cc=lvs-devel@vger.kernel.org \
--cc=netdev@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).