<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/net/netfilter/ipvs, branch v3.4.64</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/net/netfilter/ipvs?h=v3.4.64</id>
<link rel='self' href='https://git.amat.us/linux/atom/net/netfilter/ipvs?h=v3.4.64'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2013-05-11T20:48:08Z</updated>
<entry>
<title>ipvs: ip_vs_sip_fill_param() BUG: bad check of return value</title>
<updated>2013-05-11T20:48:08Z</updated>
<author>
<name>Hans Schillstrom</name>
<email>hans@schillstrom.com</email>
</author>
<published>2013-04-27T18:06:14Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=4cd9d968a1e09ea2dc765bca9184b8a7aaafb435'/>
<id>urn:sha1:4cd9d968a1e09ea2dc765bca9184b8a7aaafb435</id>
<content type='text'>
commit f7a1dd6e3ad59f0cfd51da29dfdbfd54122c5916 upstream.

The reason for this patch is crash in kmemdup
caused by returning from get_callid with uniialized
matchoff and matchlen.

Removing Zero check of matchlen since it's done by ct_sip_get_header()

BUG: unable to handle kernel paging request at ffff880457b5763f
IP: [&lt;ffffffff810df7fc&gt;] kmemdup+0x2e/0x35
PGD 27f6067 PUD 0
Oops: 0000 [#1] PREEMPT SMP
Modules linked in: xt_state xt_helper nf_conntrack_ipv6 nf_defrag_ipv6 ip6table_mangle xt_connmark xt_conntrack ip6_tables nf_conntrack_ftp ip_vs_ftp nf_nat xt_tcpudp iptable_mangle xt_mark ip_tables x_tables ip_vs_rr ip_vs_lblcr ip_vs_pe_sip ip_vs nf_conntrack_sip nf_conntrack bonding igb i2c_algo_bit i2c_core
CPU 5
Pid: 0, comm: swapper/5 Not tainted 3.9.0-rc5+ #5                  /S1200KP
RIP: 0010:[&lt;ffffffff810df7fc&gt;]  [&lt;ffffffff810df7fc&gt;] kmemdup+0x2e/0x35
RSP: 0018:ffff8803fea03648  EFLAGS: 00010282
RAX: ffff8803d61063e0 RBX: 0000000000000003 RCX: 0000000000000003
RDX: 0000000000000003 RSI: ffff880457b5763f RDI: ffff8803d61063e0
RBP: ffff8803fea03658 R08: 0000000000000008 R09: 0000000000000011
R10: 0000000000000011 R11: 00ffffffff81a8a3 R12: ffff880457b5763f
R13: ffff8803d67f786a R14: ffff8803fea03730 R15: ffffffffa0098e90
FS:  0000000000000000(0000) GS:ffff8803fea00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: ffff880457b5763f CR3: 0000000001a0c000 CR4: 00000000001407e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
Process swapper/5 (pid: 0, threadinfo ffff8803ee18c000, task ffff8803ee18a480)
Stack:
 ffff8803d822a080 000000000000001c ffff8803fea036c8 ffffffffa000937a
 ffffffff81f0d8a0 000000038135fdd5 ffff880300000014 ffff880300110000
 ffffffff150118ac ffff8803d7e8a000 ffff88031e0118ac 0000000000000000
Call Trace:
 &lt;IRQ&gt;

 [&lt;ffffffffa000937a&gt;] ip_vs_sip_fill_param+0x13a/0x187 [ip_vs_pe_sip]
 [&lt;ffffffffa007b209&gt;] ip_vs_sched_persist+0x2c6/0x9c3 [ip_vs]
 [&lt;ffffffff8107dc53&gt;] ? __lock_acquire+0x677/0x1697
 [&lt;ffffffff8100972e&gt;] ? native_sched_clock+0x3c/0x7d
 [&lt;ffffffff8100972e&gt;] ? native_sched_clock+0x3c/0x7d
 [&lt;ffffffff810649bc&gt;] ? sched_clock_cpu+0x43/0xcf
 [&lt;ffffffffa007bb1e&gt;] ip_vs_schedule+0x181/0x4ba [ip_vs]
...

Signed-off-by: Hans Schillstrom &lt;hans@schillstrom.com&gt;
Acked-by: Julian Anastasov &lt;ja@ssi.bg&gt;
Signed-off-by: Simon Horman &lt;horms@verge.net.au&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Cc: Pablo Neira Ayuso &lt;pablo@netfilter.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>ipvs: fix oops in ip_vs_dst_event on rmmod</title>
<updated>2012-10-21T16:27:59Z</updated>
<author>
<name>Julian Anastasov</name>
<email>ja@ssi.bg</email>
</author>
<published>2012-07-07T17:30:11Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=486aaeb0b972820ed704bdf416270ec4b0950da3'/>
<id>urn:sha1:486aaeb0b972820ed704bdf416270ec4b0950da3</id>
<content type='text'>
commit 283283c4da91adc44b03519f434ee1e7e91d6fdb upstream.

	After commit 39f618b4fd95ae243d940ec64c961009c74e3333 (3.4)
"ipvs: reset ipvs pointer in netns" we can oops in
ip_vs_dst_event on rmmod ip_vs because ip_vs_control_cleanup
is called after the ipvs_core_ops subsys is unregistered and
net-&gt;ipvs is NULL. Fix it by exiting early from ip_vs_dst_event
if ipvs is NULL. It is safe because all services and dests
for the net are already freed.

Signed-off-by: Julian Anastasov &lt;ja@ssi.bg&gt;
Signed-off-by: Simon Horman &lt;horms@verge.net.au&gt;
Signed-off-by: Pablo Neira Ayuso &lt;pablo@netfilter.org&gt;
Acked-by: David Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>ipvs: fix info leak in getsockopt(IP_VS_SO_GET_TIMEOUT)</title>
<updated>2012-10-02T17:29:37Z</updated>
<author>
<name>Mathias Krause</name>
<email>minipli@googlemail.com</email>
</author>
<published>2012-08-15T11:31:56Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=62b4d90b525c6c11e467a2eadb12fcf64a6f0829'/>
<id>urn:sha1:62b4d90b525c6c11e467a2eadb12fcf64a6f0829</id>
<content type='text'>
[ Upstream commit 2d8a041b7bfe1097af21441cb77d6af95f4f4680 ]

If at least one of CONFIG_IP_VS_PROTO_TCP or CONFIG_IP_VS_PROTO_UDP is
not set, __ip_vs_get_timeouts() does not fully initialize the structure
that gets copied to userland and that for leaks up to 12 bytes of kernel
stack. Add an explicit memset(0) before passing the structure to
__ip_vs_get_timeouts() to avoid the info leak.

Signed-off-by: Mathias Krause &lt;minipli@googlemail.com&gt;
Cc: Wensong Zhang &lt;wensong@linux-vs.org&gt;
Cc: Simon Horman &lt;horms@verge.net.au&gt;
Cc: Julian Anastasov &lt;ja@ssi.bg&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>ipvs: kernel oops - do_ip_vs_get_ctl</title>
<updated>2012-04-30T08:40:35Z</updated>
<author>
<name>Hans Schillstrom</name>
<email>hans.schillstrom@ericsson.com</email>
</author>
<published>2012-04-26T05:47:44Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=8537de8a7ab6681cc72fb0411ab1ba7fdba62dd0'/>
<id>urn:sha1:8537de8a7ab6681cc72fb0411ab1ba7fdba62dd0</id>
<content type='text'>
Change order of init so netns init is ready
when register ioctl and netlink.

Ver2
	Whitespace fixes and __init added.

Reported-by: "Ryan O'Hara" &lt;rohara@redhat.com&gt;
Signed-off-by: Hans Schillstrom &lt;hans.schillstrom@ericsson.com&gt;
Acked-by: Julian Anastasov &lt;ja@ssi.bg&gt;
Signed-off-by: Jesper Dangaard Brouer &lt;brouer@redhat.com&gt;
Signed-off-by: Simon Horman &lt;horms@verge.net.au&gt;
</content>
</entry>
<entry>
<title>ipvs: take care of return value from protocol init_netns</title>
<updated>2012-04-30T08:40:35Z</updated>
<author>
<name>Hans Schillstrom</name>
<email>hans.schillstrom@ericsson.com</email>
</author>
<published>2012-04-26T07:45:35Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=582b8e3eadaec77788c1aa188081a8d5059c42a6'/>
<id>urn:sha1:582b8e3eadaec77788c1aa188081a8d5059c42a6</id>
<content type='text'>
ip_vs_create_timeout_table() can return NULL
All functions protocol init_netns is affected of this patch.

Signed-off-by: Hans Schillstrom &lt;hans.schillstrom@ericsson.com&gt;
Acked-by: Julian Anastasov &lt;ja@ssi.bg&gt;
Signed-off-by: Simon Horman &lt;horms@verge.net.au&gt;
</content>
</entry>
<entry>
<title>ipvs: null check of net-&gt;ipvs in lblc(r) shedulers</title>
<updated>2012-04-30T08:40:14Z</updated>
<author>
<name>Hans Schillstrom</name>
<email>hans.schillstrom@ericsson.com</email>
</author>
<published>2012-04-26T07:45:34Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=4b984cd50bc1b6d492175cd77bfabb78e76ffa67'/>
<id>urn:sha1:4b984cd50bc1b6d492175cd77bfabb78e76ffa67</id>
<content type='text'>
Avoid crash when registering shedulers after
the IPVS core initialization for netns fails. Do this by
checking for present core (net-&gt;ipvs).

Signed-off-by: Hans Schillstrom &lt;hans.schillstrom@ericsson.com&gt;
Acked-by: Julian Anastasov &lt;ja@ssi.bg&gt;
Signed-off-by: Simon Horman &lt;horms@verge.net.au&gt;
</content>
</entry>
<entry>
<title>ipvs: reset ipvs pointer in netns</title>
<updated>2012-04-26T06:26:35Z</updated>
<author>
<name>Julian Anastasov</name>
<email>ja@ssi.bg</email>
</author>
<published>2012-04-24T21:29:58Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=39f618b4fd95ae243d940ec64c961009c74e3333'/>
<id>urn:sha1:39f618b4fd95ae243d940ec64c961009c74e3333</id>
<content type='text'>
	Make sure net-&gt;ipvs is reset on netns cleanup or failed
initialization. It is needed for IPVS applications to know that
IPVS core is not loaded in netns.

Signed-off-by: Julian Anastasov &lt;ja@ssi.bg&gt;
Acked-by: Hans Schillstrom &lt;hans.schillstrom@ericsson.com&gt;
Signed-off-by: Simon Horman &lt;horms@verge.net.au&gt;
</content>
</entry>
<entry>
<title>ipvs: add check in ftp for initialized core</title>
<updated>2012-04-26T06:26:35Z</updated>
<author>
<name>Julian Anastasov</name>
<email>ja@ssi.bg</email>
</author>
<published>2012-04-24T21:29:59Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=8d08d71ce59438a6ef06be5db07966e0c144b74e'/>
<id>urn:sha1:8d08d71ce59438a6ef06be5db07966e0c144b74e</id>
<content type='text'>
	Avoid crash when registering ip_vs_ftp after
the IPVS core initialization for netns fails. Do this by
checking for present core (net-&gt;ipvs).

Signed-off-by: Julian Anastasov &lt;ja@ssi.bg&gt;
Acked-by: Hans Schillstrom &lt;hans.schillstrom@ericsson.com&gt;
Signed-off-by: Simon Horman &lt;horms@verge.net.au&gt;
</content>
</entry>
<entry>
<title>ipvs: fix crash in ip_vs_control_net_cleanup on unload</title>
<updated>2012-04-25T09:16:30Z</updated>
<author>
<name>Julian Anastasov</name>
<email>ja@ssi.bg</email>
</author>
<published>2012-04-13T15:08:43Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=8f9b9a2fad47af27e14b037395e03cd8278d96d7'/>
<id>urn:sha1:8f9b9a2fad47af27e14b037395e03cd8278d96d7</id>
<content type='text'>
	commit 14e405461e664b777e2a5636e10b2ebf36a686ec (2.6.39)
("Add __ip_vs_control_{init,cleanup}_sysctl()")
introduced regression due to wrong __net_init for
__ip_vs_control_cleanup_sysctl. This leads to crash when
the ip_vs module is unloaded.

	Fix it by changing __net_init to __net_exit for
the function that is already renamed to ip_vs_control_net_cleanup_sysctl.

Signed-off-by: Julian Anastasov &lt;ja@ssi.bg&gt;
Signed-off-by: Hans Schillstrom &lt;hans@schillstrom.com&gt;
Signed-off-by: Simon Horman &lt;horms@verge.net.au&gt;
Signed-off-by: Pablo Neira Ayuso &lt;pablo@netfilter.org&gt;
</content>
</entry>
<entry>
<title>ipvs: Verify that IP_VS protocol has been registered</title>
<updated>2012-04-25T09:16:12Z</updated>
<author>
<name>Sasha Levin</name>
<email>levinsasha928@gmail.com</email>
</author>
<published>2012-04-14T16:37:46Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=7118c07a844d367560ee91adb2071bde2fabcdbf'/>
<id>urn:sha1:7118c07a844d367560ee91adb2071bde2fabcdbf</id>
<content type='text'>
The registration of a protocol might fail, there were no checks
and all registrations were assumed to be correct. This lead to
NULL ptr dereferences when apps tried registering.

For example:

[ 1293.226051] BUG: unable to handle kernel NULL pointer dereference at 0000000000000018
[ 1293.227038] IP: [&lt;ffffffff822aacb0&gt;] tcp_register_app+0x60/0xb0
[ 1293.227038] PGD 391de067 PUD 6c20b067 PMD 0
[ 1293.227038] Oops: 0000 [#1] PREEMPT SMP
[ 1293.227038] CPU 1
[ 1293.227038] Pid: 19609, comm: trinity Tainted: G        W    3.4.0-rc1-next-20120405-sasha-dirty #57
[ 1293.227038] RIP: 0010:[&lt;ffffffff822aacb0&gt;]  [&lt;ffffffff822aacb0&gt;] tcp_register_app+0x60/0xb0
[ 1293.227038] RSP: 0018:ffff880038c1dd18  EFLAGS: 00010286
[ 1293.227038] RAX: ffffffffffffffc0 RBX: 0000000000001500 RCX: 0000000000010000
[ 1293.227038] RDX: 0000000000000000 RSI: ffff88003a2d5888 RDI: 0000000000000282
[ 1293.227038] RBP: ffff880038c1dd48 R08: 0000000000000000 R09: 0000000000000000
[ 1293.227038] R10: 0000000000000000 R11: 0000000000000000 R12: ffff88003a2d5668
[ 1293.227038] R13: ffff88003a2d5988 R14: ffff8800696a8ff8 R15: 0000000000000000
[ 1293.227038] FS:  00007f01930d9700(0000) GS:ffff88007ce00000(0000) knlGS:0000000000000000
[ 1293.227038] CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
[ 1293.227038] CR2: 0000000000000018 CR3: 0000000065dfc000 CR4: 00000000000406e0
[ 1293.227038] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[ 1293.227038] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
[ 1293.227038] Process trinity (pid: 19609, threadinfo ffff880038c1c000, task ffff88002dc73000)
[ 1293.227038] Stack:
[ 1293.227038]  ffff880038c1dd48 00000000fffffff4 ffff8800696aada0 ffff8800694f5580
[ 1293.227038]  ffffffff8369f1e0 0000000000001500 ffff880038c1dd98 ffffffff822a716b
[ 1293.227038]  0000000000000000 ffff8800696a8ff8 0000000000000015 ffff8800694f5580
[ 1293.227038] Call Trace:
[ 1293.227038]  [&lt;ffffffff822a716b&gt;] ip_vs_app_inc_new+0xdb/0x180
[ 1293.227038]  [&lt;ffffffff822a7258&gt;] register_ip_vs_app_inc+0x48/0x70
[ 1293.227038]  [&lt;ffffffff822b2fea&gt;] __ip_vs_ftp_init+0xba/0x140
[ 1293.227038]  [&lt;ffffffff821c9060&gt;] ops_init+0x80/0x90
[ 1293.227038]  [&lt;ffffffff821c90cb&gt;] setup_net+0x5b/0xe0
[ 1293.227038]  [&lt;ffffffff821c9416&gt;] copy_net_ns+0x76/0x100
[ 1293.227038]  [&lt;ffffffff810dc92b&gt;] create_new_namespaces+0xfb/0x190
[ 1293.227038]  [&lt;ffffffff810dca21&gt;] unshare_nsproxy_namespaces+0x61/0x80
[ 1293.227038]  [&lt;ffffffff810afd1f&gt;] sys_unshare+0xff/0x290
[ 1293.227038]  [&lt;ffffffff8187622e&gt;] ? trace_hardirqs_on_thunk+0x3a/0x3f
[ 1293.227038]  [&lt;ffffffff82665539&gt;] system_call_fastpath+0x16/0x1b
[ 1293.227038] Code: 89 c7 e8 34 91 3b 00 89 de 66 c1 ee 04 31 de 83 e6 0f 48 83 c6 22 48 c1 e6 04 4a 8b 14 26 49 8d 34 34 48 8d 42 c0 48 39 d6 74 13 &lt;66&gt; 39 58 58 74 22 48 8b 48 40 48 8d 41 c0 48 39 ce 75 ed 49 8d
[ 1293.227038] RIP  [&lt;ffffffff822aacb0&gt;] tcp_register_app+0x60/0xb0
[ 1293.227038]  RSP &lt;ffff880038c1dd18&gt;
[ 1293.227038] CR2: 0000000000000018
[ 1293.379284] ---[ end trace 364ab40c7011a009 ]---
[ 1293.381182] Kernel panic - not syncing: Fatal exception in interrupt

Signed-off-by: Sasha Levin &lt;levinsasha928@gmail.com&gt;
Acked-by: Julian Anastasov &lt;ja@ssi.bg&gt;
Signed-off-by: Simon Horman &lt;horms@verge.net.au&gt;
Signed-off-by: Pablo Neira Ayuso &lt;pablo@netfilter.org&gt;
</content>
</entry>
</feed>
