IPVS
Subsystems (5)
Simon Horman
maintainerHi Patrick,
please consider pullinggit://git.kernel.org/pub/scm/linux/kernel/git/horms/lvs-test-2.6.git for-patrick to get the following fix from Hans.
I have based this patch on net-2.6/master as nf-2.6/master seems a little out of date (i.e. pre 2.6.39-rc1). Please let me know if you would prefer me to use a different base. Alternatively, feel free to apply the single patch by hand.
Hans Schillstrom (1):
IPVS Bug, Null ptr in ip_vs_ctl.c ip_vs_genl_dump_daemons().
include/net/ip_vs.h | 2 +- net/netfilter/ipvs/ip_vs_ctl.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
Simon Horman
maintainerPATCH 1/1 IPVS Bug, Null ptr in ip_vs_ctl.c ip_vs_genl_dump_daemons().
From: Hans Schillstrom <[email protected]>
ipvsadm -ln --daemon will trigger a Null pointer exception because ip_vs_genl_dump_daemons() uses skb_net() instead of skb_sknet().
To prevent others from NULL ptr a check is made in ip_vs.h skb_net().
--- include/net/ip_vs.h | 2 +- net/netfilter/ipvs/ip_vs_ctl.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
include/net/ip_vs.h +1 -1
@@ -52,7 +52,7 @@ static inline struct net *skb_net(const struct sk_buff *skb)*/ if (likely (skb->dev && skb->dev->nd_net))return dev_net (skb->dev); -if (skb_dst (skb)->dev) +if (skb_dst (skb) &&skb_dst (skb)->dev)return dev_net (skb_dst (skb)->dev);WARN (skb->sk,"Maybe skb_sknet should be used in %s() at line:%d\n" , __func__, __LINE__);
net/netfilter/ipvs/ip_vs_ctl.c +1 -1
@@ -3120,7 +3120,7 @@ nla_put_failure:static int ip_vs_genl_dump_daemons (struct sk_buff *skb,struct netlink_callback *cb) { -struct net *net =skb_net (skb); +struct net *net =skb_sknet (skb);struct netns_ipvs *ipvs =net_ipvs (net);mutex_lock (&__ip_vs_mutex);
Signature · 1 line
1.7.4.1
Patrick McHardy
AppliedRe: [PATCH] IPVS Bug, Null ptr in ip_vs_ctl.c ip_vs_genl_dump_daemons().
Quoted 7 lines · Simon Horman
From: Hans Schillstrom <[email protected]>
ipvsadm -ln --daemon will trigger a Null pointer exception because
ip_vs_genl_dump_daemons()usesskb_net()instead ofskb_sknet().To prevent others from NULL ptr a check is made in
ip_vs.hskb_net().
Applied, thanks.
Quoted 10 lines · Simon Horman
Hi Patrick,
please consider pulling
git://git.kernel.org/pub/scm/linux/kernel/git/horms/lvs-test-2.6.gitfor-patrick to get the following fix from Hans.I have based this patch on net-2.6/master as nf-2.6/master seems a little out of date (i.e. pre 2.6.39-rc1). Please let me know if you would prefer me to use a different base. Alternatively, feel free to apply the single patch by hand.
I'll apply this by hand to avoid possible unnecessary merge commits. I've also updated nf-2.6.git to net-2.6.git.
Simon Horman
maintainerQuoted 7 lines · Patrick McHardy
Quoted 6 lines · Simon Horman
Hi Patrick,
please consider pulling
git://git.kernel.org/pub/scm/linux/kernel/git/horms/lvs-test-2.6.gitfor-patrick to get the following fix from Hans.
Quoted 7 lines
Quoted 4 lines
I have based this patch on net-2.6/master as nf-2.6/master seems a little out of date (i.e. pre 2.6.39-rc1). Please let me know if you would prefer me to use a different base. Alternatively, feel free to apply the single patch by hand.
I'll apply this by hand to avoid possible unnecessary merge commits. I've also updated nf-2.6.git to net-2.6.git.
Thanks Patrick.