<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/include/net, branch v2.6.27.48</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>sctp: Fix skb_over_panic resulting from multiple invalid parameter errors (CVE-2010-1173) (v4)</title>
<updated>2010-07-05T18:08:46+00:00</updated>
<author>
<name>Neil Horman</name>
<email>nhorman@tuxdriver.com</email>
</author>
<published>2010-04-28T10:30:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=b1b7bf1eede2a2d954dc0e4e7db6bb94e7650f60'/>
<id>b1b7bf1eede2a2d954dc0e4e7db6bb94e7650f60</id>
<content type='text'>
commit 5fa782c2f5ef6c2e4f04d3e228412c9b4a4c8809 upstream.

Ok, version 4

Change Notes:
1) Minor cleanups, from Vlads notes

Summary:

Hey-
	Recently, it was reported to me that the kernel could oops in the
following way:

&lt;5&gt; kernel BUG at net/core/skbuff.c:91!
&lt;5&gt; invalid operand: 0000 [#1]
&lt;5&gt; Modules linked in: sctp netconsole nls_utf8 autofs4 sunrpc iptable_filter
ip_tables cpufreq_powersave parport_pc lp parport vmblock(U) vsock(U) vmci(U)
vmxnet(U) vmmemctl(U) vmhgfs(U) acpiphp dm_mirror dm_mod button battery ac md5
ipv6 uhci_hcd ehci_hcd snd_ens1371 snd_rawmidi snd_seq_device snd_pcm_oss
snd_mixer_oss snd_pcm snd_timer snd_page_alloc snd_ac97_codec snd soundcore
pcnet32 mii floppy ext3 jbd ata_piix libata mptscsih mptsas mptspi mptscsi
mptbase sd_mod scsi_mod
&lt;5&gt; CPU:    0
&lt;5&gt; EIP:    0060:[&lt;c02bff27&gt;]    Not tainted VLI
&lt;5&gt; EFLAGS: 00010216   (2.6.9-89.0.25.EL)
&lt;5&gt; EIP is at skb_over_panic+0x1f/0x2d
&lt;5&gt; eax: 0000002c   ebx: c033f461   ecx: c0357d96   edx: c040fd44
&lt;5&gt; esi: c033f461   edi: df653280   ebp: 00000000   esp: c040fd40
&lt;5&gt; ds: 007b   es: 007b   ss: 0068
&lt;5&gt; Process swapper (pid: 0, threadinfo=c040f000 task=c0370be0)
&lt;5&gt; Stack: c0357d96 e0c29478 00000084 00000004 c033f461 df653280 d7883180
e0c2947d
&lt;5&gt;        00000000 00000080 df653490 00000004 de4f1ac0 de4f1ac0 00000004
df653490
&lt;5&gt;        00000001 e0c2877a 08000800 de4f1ac0 df653490 00000000 e0c29d2e
00000004
&lt;5&gt; Call Trace:
&lt;5&gt;  [&lt;e0c29478&gt;] sctp_addto_chunk+0xb0/0x128 [sctp]
&lt;5&gt;  [&lt;e0c2947d&gt;] sctp_addto_chunk+0xb5/0x128 [sctp]
&lt;5&gt;  [&lt;e0c2877a&gt;] sctp_init_cause+0x3f/0x47 [sctp]
&lt;5&gt;  [&lt;e0c29d2e&gt;] sctp_process_unk_param+0xac/0xb8 [sctp]
&lt;5&gt;  [&lt;e0c29e90&gt;] sctp_verify_init+0xcc/0x134 [sctp]
&lt;5&gt;  [&lt;e0c20322&gt;] sctp_sf_do_5_1B_init+0x83/0x28e [sctp]
&lt;5&gt;  [&lt;e0c25333&gt;] sctp_do_sm+0x41/0x77 [sctp]
&lt;5&gt;  [&lt;c01555a4&gt;] cache_grow+0x140/0x233
&lt;5&gt;  [&lt;e0c26ba1&gt;] sctp_endpoint_bh_rcv+0xc5/0x108 [sctp]
&lt;5&gt;  [&lt;e0c2b863&gt;] sctp_inq_push+0xe/0x10 [sctp]
&lt;5&gt;  [&lt;e0c34600&gt;] sctp_rcv+0x454/0x509 [sctp]
&lt;5&gt;  [&lt;e084e017&gt;] ipt_hook+0x17/0x1c [iptable_filter]
&lt;5&gt;  [&lt;c02d005e&gt;] nf_iterate+0x40/0x81
&lt;5&gt;  [&lt;c02e0bb9&gt;] ip_local_deliver_finish+0x0/0x151
&lt;5&gt;  [&lt;c02e0c7f&gt;] ip_local_deliver_finish+0xc6/0x151
&lt;5&gt;  [&lt;c02d0362&gt;] nf_hook_slow+0x83/0xb5
&lt;5&gt;  [&lt;c02e0bb2&gt;] ip_local_deliver+0x1a2/0x1a9
&lt;5&gt;  [&lt;c02e0bb9&gt;] ip_local_deliver_finish+0x0/0x151
&lt;5&gt;  [&lt;c02e103e&gt;] ip_rcv+0x334/0x3b4
&lt;5&gt;  [&lt;c02c66fd&gt;] netif_receive_skb+0x320/0x35b
&lt;5&gt;  [&lt;e0a0928b&gt;] init_stall_timer+0x67/0x6a [uhci_hcd]
&lt;5&gt;  [&lt;c02c67a4&gt;] process_backlog+0x6c/0xd9
&lt;5&gt;  [&lt;c02c690f&gt;] net_rx_action+0xfe/0x1f8
&lt;5&gt;  [&lt;c012a7b1&gt;] __do_softirq+0x35/0x79
&lt;5&gt;  [&lt;c0107efb&gt;] handle_IRQ_event+0x0/0x4f
&lt;5&gt;  [&lt;c01094de&gt;] do_softirq+0x46/0x4d

Its an skb_over_panic BUG halt that results from processing an init chunk in
which too many of its variable length parameters are in some way malformed.

The problem is in sctp_process_unk_param:
if (NULL == *errp)
	*errp = sctp_make_op_error_space(asoc, chunk,
					 ntohs(chunk-&gt;chunk_hdr-&gt;length));

	if (*errp) {
		sctp_init_cause(*errp, SCTP_ERROR_UNKNOWN_PARAM,
				 WORD_ROUND(ntohs(param.p-&gt;length)));
		sctp_addto_chunk(*errp,
			WORD_ROUND(ntohs(param.p-&gt;length)),
				  param.v);

When we allocate an error chunk, we assume that the worst case scenario requires
that we have chunk_hdr-&gt;length data allocated, which would be correct nominally,
given that we call sctp_addto_chunk for the violating parameter.  Unfortunately,
we also, in sctp_init_cause insert a sctp_errhdr_t structure into the error
chunk, so the worst case situation in which all parameters are in violation
requires chunk_hdr-&gt;length+(sizeof(sctp_errhdr_t)*param_count) bytes of data.

The result of this error is that a deliberately malformed packet sent to a
listening host can cause a remote DOS, described in CVE-2010-1173:
http://cve.mitre.org/cgi-bin/cvename.cgi?name=2010-1173

I've tested the below fix and confirmed that it fixes the issue.  We move to a
strategy whereby we allocate a fixed size error chunk and ignore errors we don't
have space to report.  Tested by me successfully

Signed-off-by: Neil Horman &lt;nhorman@tuxdriver.com&gt;
Acked-by: Vlad Yasevich &lt;vladislav.yasevich@hp.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 5fa782c2f5ef6c2e4f04d3e228412c9b4a4c8809 upstream.

Ok, version 4

Change Notes:
1) Minor cleanups, from Vlads notes

Summary:

Hey-
	Recently, it was reported to me that the kernel could oops in the
following way:

&lt;5&gt; kernel BUG at net/core/skbuff.c:91!
&lt;5&gt; invalid operand: 0000 [#1]
&lt;5&gt; Modules linked in: sctp netconsole nls_utf8 autofs4 sunrpc iptable_filter
ip_tables cpufreq_powersave parport_pc lp parport vmblock(U) vsock(U) vmci(U)
vmxnet(U) vmmemctl(U) vmhgfs(U) acpiphp dm_mirror dm_mod button battery ac md5
ipv6 uhci_hcd ehci_hcd snd_ens1371 snd_rawmidi snd_seq_device snd_pcm_oss
snd_mixer_oss snd_pcm snd_timer snd_page_alloc snd_ac97_codec snd soundcore
pcnet32 mii floppy ext3 jbd ata_piix libata mptscsih mptsas mptspi mptscsi
mptbase sd_mod scsi_mod
&lt;5&gt; CPU:    0
&lt;5&gt; EIP:    0060:[&lt;c02bff27&gt;]    Not tainted VLI
&lt;5&gt; EFLAGS: 00010216   (2.6.9-89.0.25.EL)
&lt;5&gt; EIP is at skb_over_panic+0x1f/0x2d
&lt;5&gt; eax: 0000002c   ebx: c033f461   ecx: c0357d96   edx: c040fd44
&lt;5&gt; esi: c033f461   edi: df653280   ebp: 00000000   esp: c040fd40
&lt;5&gt; ds: 007b   es: 007b   ss: 0068
&lt;5&gt; Process swapper (pid: 0, threadinfo=c040f000 task=c0370be0)
&lt;5&gt; Stack: c0357d96 e0c29478 00000084 00000004 c033f461 df653280 d7883180
e0c2947d
&lt;5&gt;        00000000 00000080 df653490 00000004 de4f1ac0 de4f1ac0 00000004
df653490
&lt;5&gt;        00000001 e0c2877a 08000800 de4f1ac0 df653490 00000000 e0c29d2e
00000004
&lt;5&gt; Call Trace:
&lt;5&gt;  [&lt;e0c29478&gt;] sctp_addto_chunk+0xb0/0x128 [sctp]
&lt;5&gt;  [&lt;e0c2947d&gt;] sctp_addto_chunk+0xb5/0x128 [sctp]
&lt;5&gt;  [&lt;e0c2877a&gt;] sctp_init_cause+0x3f/0x47 [sctp]
&lt;5&gt;  [&lt;e0c29d2e&gt;] sctp_process_unk_param+0xac/0xb8 [sctp]
&lt;5&gt;  [&lt;e0c29e90&gt;] sctp_verify_init+0xcc/0x134 [sctp]
&lt;5&gt;  [&lt;e0c20322&gt;] sctp_sf_do_5_1B_init+0x83/0x28e [sctp]
&lt;5&gt;  [&lt;e0c25333&gt;] sctp_do_sm+0x41/0x77 [sctp]
&lt;5&gt;  [&lt;c01555a4&gt;] cache_grow+0x140/0x233
&lt;5&gt;  [&lt;e0c26ba1&gt;] sctp_endpoint_bh_rcv+0xc5/0x108 [sctp]
&lt;5&gt;  [&lt;e0c2b863&gt;] sctp_inq_push+0xe/0x10 [sctp]
&lt;5&gt;  [&lt;e0c34600&gt;] sctp_rcv+0x454/0x509 [sctp]
&lt;5&gt;  [&lt;e084e017&gt;] ipt_hook+0x17/0x1c [iptable_filter]
&lt;5&gt;  [&lt;c02d005e&gt;] nf_iterate+0x40/0x81
&lt;5&gt;  [&lt;c02e0bb9&gt;] ip_local_deliver_finish+0x0/0x151
&lt;5&gt;  [&lt;c02e0c7f&gt;] ip_local_deliver_finish+0xc6/0x151
&lt;5&gt;  [&lt;c02d0362&gt;] nf_hook_slow+0x83/0xb5
&lt;5&gt;  [&lt;c02e0bb2&gt;] ip_local_deliver+0x1a2/0x1a9
&lt;5&gt;  [&lt;c02e0bb9&gt;] ip_local_deliver_finish+0x0/0x151
&lt;5&gt;  [&lt;c02e103e&gt;] ip_rcv+0x334/0x3b4
&lt;5&gt;  [&lt;c02c66fd&gt;] netif_receive_skb+0x320/0x35b
&lt;5&gt;  [&lt;e0a0928b&gt;] init_stall_timer+0x67/0x6a [uhci_hcd]
&lt;5&gt;  [&lt;c02c67a4&gt;] process_backlog+0x6c/0xd9
&lt;5&gt;  [&lt;c02c690f&gt;] net_rx_action+0xfe/0x1f8
&lt;5&gt;  [&lt;c012a7b1&gt;] __do_softirq+0x35/0x79
&lt;5&gt;  [&lt;c0107efb&gt;] handle_IRQ_event+0x0/0x4f
&lt;5&gt;  [&lt;c01094de&gt;] do_softirq+0x46/0x4d

Its an skb_over_panic BUG halt that results from processing an init chunk in
which too many of its variable length parameters are in some way malformed.

The problem is in sctp_process_unk_param:
if (NULL == *errp)
	*errp = sctp_make_op_error_space(asoc, chunk,
					 ntohs(chunk-&gt;chunk_hdr-&gt;length));

	if (*errp) {
		sctp_init_cause(*errp, SCTP_ERROR_UNKNOWN_PARAM,
				 WORD_ROUND(ntohs(param.p-&gt;length)));
		sctp_addto_chunk(*errp,
			WORD_ROUND(ntohs(param.p-&gt;length)),
				  param.v);

When we allocate an error chunk, we assume that the worst case scenario requires
that we have chunk_hdr-&gt;length data allocated, which would be correct nominally,
given that we call sctp_addto_chunk for the violating parameter.  Unfortunately,
we also, in sctp_init_cause insert a sctp_errhdr_t structure into the error
chunk, so the worst case situation in which all parameters are in violation
requires chunk_hdr-&gt;length+(sizeof(sctp_errhdr_t)*param_count) bytes of data.

The result of this error is that a deliberately malformed packet sent to a
listening host can cause a remote DOS, described in CVE-2010-1173:
http://cve.mitre.org/cgi-bin/cvename.cgi?name=2010-1173

I've tested the below fix and confirmed that it fixes the issue.  We move to a
strategy whereby we allocate a fixed size error chunk and ignore errors we don't
have space to report.  Tested by me successfully

Signed-off-by: Neil Horman &lt;nhorman@tuxdriver.com&gt;
Acked-by: Vlad Yasevich &lt;vladislav.yasevich@hp.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>ipv6: reassembly: use seperate reassembly queues for conntrack and local delivery</title>
<updated>2010-01-06T23:17:14+00:00</updated>
<author>
<name>Patrick McHardy</name>
<email>kaber@trash.net</email>
</author>
<published>2009-12-15T15:59:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=4e9e4fcb0d12ae07cd6e9a9430927eb1dbfb0166'/>
<id>4e9e4fcb0d12ae07cd6e9a9430927eb1dbfb0166</id>
<content type='text'>
commit 0b5ccb2ee250136dd7385b1c7da28417d0d4d32d upstream.

Currently the same reassembly queue might be used for packets reassembled
by conntrack in different positions in the stack (PREROUTING/LOCAL_OUT),
as well as local delivery. This can cause "packet jumps" when the fragment
completing a reassembled packet is queued from a different position in the
stack than the previous ones.

Add a "user" identifier to the reassembly queue key to seperate the queues
of each caller, similar to what we do for IPv4.

Signed-off-by: Patrick McHardy &lt;kaber@trash.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 0b5ccb2ee250136dd7385b1c7da28417d0d4d32d upstream.

Currently the same reassembly queue might be used for packets reassembled
by conntrack in different positions in the stack (PREROUTING/LOCAL_OUT),
as well as local delivery. This can cause "packet jumps" when the fragment
completing a reassembled packet is queued from a different position in the
stack than the previous ones.

Add a "user" identifier to the reassembly queue key to seperate the queues
of each caller, similar to what we do for IPv4.

Signed-off-by: Patrick McHardy &lt;kaber@trash.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>irda: Add irda_skb_cb qdisc related padding</title>
<updated>2009-11-10T00:52:30+00:00</updated>
<author>
<name>Samuel Ortiz</name>
<email>samuel@sortiz.org</email>
</author>
<published>2008-12-17T23:44:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=d4f9442f8805df2d235b446e3e7fe53f2f3d232e'/>
<id>d4f9442f8805df2d235b446e3e7fe53f2f3d232e</id>
<content type='text'>
commit 69c30e1e7492192f882a3fc11888b320fde5206a upstream.

We need to pad irda_skb_cb in order to keep it safe accross dev_queue_xmit()
calls. This is some ugly and temporary hack triggered by recent qisc code
changes.
Even though it fixes bugzilla.kernel.org bug #11795, it will be replaced by a
proper fix before 2.6.29 is released.

Signed-off-by: Samuel Ortiz &lt;samuel@sortiz.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Cc: Chuck Ebbert &lt;cebbert@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 69c30e1e7492192f882a3fc11888b320fde5206a upstream.

We need to pad irda_skb_cb in order to keep it safe accross dev_queue_xmit()
calls. This is some ugly and temporary hack triggered by recent qisc code
changes.
Even though it fixes bugzilla.kernel.org bug #11795, it will be replaced by a
proper fix before 2.6.29 is released.

Signed-off-by: Samuel Ortiz &lt;samuel@sortiz.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Cc: Chuck Ebbert &lt;cebbert@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>x25: Fix sleep from timer on socket destroy.</title>
<updated>2009-07-30T23:06:13+00:00</updated>
<author>
<name>David S. Miller</name>
<email>davem@davemloft.net</email>
</author>
<published>2009-06-16T12:40:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=3154ee5364cf95cc3948589d870f6f6c957ba0a3'/>
<id>3154ee5364cf95cc3948589d870f6f6c957ba0a3</id>
<content type='text'>
[ Upstream commit 14ebaf81e13ce66bff275380b246796fd16cbfa1 ]

If socket destuction gets delayed to a timer, we try to
lock_sock() from that timer which won't work.

Use bh_lock_sock() in that case.

Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Tested-by: Ingo Molnar &lt;mingo@elte.hu&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[ Upstream commit 14ebaf81e13ce66bff275380b246796fd16cbfa1 ]

If socket destuction gets delayed to a timer, we try to
lock_sock() from that timer which won't work.

Use bh_lock_sock() in that case.

Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Tested-by: Ingo Molnar &lt;mingo@elte.hu&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: Kill skb_truesize_check(), it only catches false-positives.</title>
<updated>2009-03-17T00:52:42+00:00</updated>
<author>
<name>David S. Miller</name>
<email>davem@davemloft.net</email>
</author>
<published>2009-02-26T07:09:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=21ef40e66f6186898ea4240b83a0f1c7424953d0'/>
<id>21ef40e66f6186898ea4240b83a0f1c7424953d0</id>
<content type='text'>
[ Upstream commit 92a0acce186cde8ead56c6915d9479773673ea1a ]

A long time ago we had bugs, primarily in TCP, where we would modify
skb-&gt;truesize (for TSO queue collapsing) in ways which would corrupt
the socket memory accounting.

skb_truesize_check() was added in order to try and catch this error
more systematically.

However this debugging check has morphed into a Frankenstein of sorts
and these days it does nothing other than catch false-positives.

Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[ Upstream commit 92a0acce186cde8ead56c6915d9479773673ea1a ]

A long time ago we had bugs, primarily in TCP, where we would modify
skb-&gt;truesize (for TSO queue collapsing) in ways which would corrupt
the socket memory accounting.

skb_truesize_check() was added in order to try and catch this error
more systematically.

However this debugging check has morphed into a Frankenstein of sorts
and these days it does nothing other than catch false-positives.

Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>sctp: Fix crc32c calculations on big-endian arhes.</title>
<updated>2009-02-17T17:46:19+00:00</updated>
<author>
<name>Vlad Yasevich</name>
<email>vladislav.yasevich@hp.com</email>
</author>
<published>2009-01-22T22:52:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=d8e466e2cc8e9e4e033c9994f2d598276d60d409'/>
<id>d8e466e2cc8e9e4e033c9994f2d598276d60d409</id>
<content type='text'>
[ Upstream commit 9c5ff5f75d0d0a1c7928ecfae3f38418b51a88e3 ]

crc32c algorithm provides a byteswaped result.  On little-endian
arches, the result ends up in big-endian/network byte order.
On big-endinan arches, the result ends up in little-endian
order and needs to be byte swapped again.  Thus calling cpu_to_le32
gives the right output.

Tested-by: Jukka Taimisto &lt;jukka.taimisto@mail.suomi.net&gt;
Signed-off-by: Vlad Yasevich &lt;vladislav.yasevich@hp.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[ Upstream commit 9c5ff5f75d0d0a1c7928ecfae3f38418b51a88e3 ]

crc32c algorithm provides a byteswaped result.  On little-endian
arches, the result ends up in big-endian/network byte order.
On big-endinan arches, the result ends up in little-endian
order and needs to be byte swapped again.  Thus calling cpu_to_le32
gives the right output.

Tested-by: Jukka Taimisto &lt;jukka.taimisto@mail.suomi.net&gt;
Signed-off-by: Vlad Yasevich &lt;vladislav.yasevich@hp.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>net: Fix soft lockups/OOM issues w/ unix garbage collector (CVE-2008-5300)</title>
<updated>2008-12-05T18:55:25+00:00</updated>
<author>
<name>dann frazier</name>
<email>dannf@hp.com</email>
</author>
<published>2008-11-26T23:32:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=d7fc504d906a210ae3e24741e45504c1df87035f'/>
<id>d7fc504d906a210ae3e24741e45504c1df87035f</id>
<content type='text'>
commit 5f23b734963ec7eaa3ebcd9050da0c9b7d143dd3 upstream.

This is an implementation of David Miller's suggested fix in:
  https://bugzilla.redhat.com/show_bug.cgi?id=470201

It has been updated to use wait_event() instead of
wait_event_interruptible().

Paraphrasing the description from the above report, it makes sendmsg()
block while UNIX garbage collection is in progress. This avoids a
situation where child processes continue to queue new FDs over a
AF_UNIX socket to a parent which is in the exit path and running
garbage collection on these FDs. This contention can result in soft
lockups and oom-killing of unrelated processes.

Signed-off-by: dann frazier &lt;dannf@hp.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 5f23b734963ec7eaa3ebcd9050da0c9b7d143dd3 upstream.

This is an implementation of David Miller's suggested fix in:
  https://bugzilla.redhat.com/show_bug.cgi?id=470201

It has been updated to use wait_event() instead of
wait_event_interruptible().

Paraphrasing the description from the above report, it makes sendmsg()
block while UNIX garbage collection is in progress. This avoids a
situation where child processes continue to queue new FDs over a
AF_UNIX socket to a parent which is in the exit path and running
garbage collection on these FDs. This contention can result in soft
lockups and oom-killing of unrelated processes.

Signed-off-by: dann frazier &lt;dannf@hp.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>net: unix: fix inflight counting bug in garbage collector</title>
<updated>2008-11-13T17:55:58+00:00</updated>
<author>
<name>Miklos Szeredi</name>
<email>mszeredi@suse.cz</email>
</author>
<published>2008-11-09T19:50:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=dc56d50c44eb80aca5ce60e881c6444f39c82461'/>
<id>dc56d50c44eb80aca5ce60e881c6444f39c82461</id>
<content type='text'>
commit 6209344f5a3795d34b7f2c0061f49802283b6bdd upstream

Previously I assumed that the receive queues of candidates don't
change during the GC.  This is only half true, nothing can be received
from the queues (see comment in unix_gc()), but buffers could be added
through the other half of the socket pair, which may still have file
descriptors referring to it.

This can result in inc_inflight_move_tail() erronously increasing the
"inflight" counter for a unix socket for which dec_inflight() wasn't
previously called.  This in turn can trigger the "BUG_ON(total_refs &lt;
inflight_refs)" in a later garbage collection run.

Fix this by only manipulating the "inflight" counter for sockets which
are candidates themselves.  Duplicating the file references in
unix_attach_fds() is also needed to prevent a socket becoming a
candidate for GC while the skb that contains it is not yet queued.

Reported-by: Andrea Bittau &lt;a.bittau@cs.ucl.ac.uk&gt;
Signed-off-by: Miklos Szeredi &lt;mszeredi@suse.cz&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 6209344f5a3795d34b7f2c0061f49802283b6bdd upstream

Previously I assumed that the receive queues of candidates don't
change during the GC.  This is only half true, nothing can be received
from the queues (see comment in unix_gc()), but buffers could be added
through the other half of the socket pair, which may still have file
descriptors referring to it.

This can result in inc_inflight_move_tail() erronously increasing the
"inflight" counter for a unix socket for which dec_inflight() wasn't
previously called.  This in turn can trigger the "BUG_ON(total_refs &lt;
inflight_refs)" in a later garbage collection run.

Fix this by only manipulating the "inflight" counter for sockets which
are candidates themselves.  Duplicating the file references in
unix_attach_fds() is also needed to prevent a socket becoming a
candidate for GC while the skb that contains it is not yet queued.

Reported-by: Andrea Bittau &lt;a.bittau@cs.ucl.ac.uk&gt;
Signed-off-by: Miklos Szeredi &lt;mszeredi@suse.cz&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>net: Fix recursive descent in __scm_destroy().</title>
<updated>2008-11-07T17:55:19+00:00</updated>
<author>
<name>David Miller</name>
<email>davem@davemloft.net</email>
</author>
<published>2008-11-06T08:37:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=1dbbd0bf5d15397a4e4a1ae3e3e82e0fe4f83c3a'/>
<id>1dbbd0bf5d15397a4e4a1ae3e3e82e0fe4f83c3a</id>
<content type='text'>
commit f8d570a4745835f2238a33b537218a1bb03fc671 and
3b53fbf4314594fa04544b02b2fc6e607912da18 upstream (because once wasn't
good enough...)

__scm_destroy() walks the list of file descriptors in the scm_fp_list
pointed to by the scm_cookie argument.

Those, in turn, can close sockets and invoke __scm_destroy() again.

There is nothing which limits how deeply this can occur.

The idea for how to fix this is from Linus.  Basically, we do all of
the fput()s at the top level by collecting all of the scm_fp_list
objects hit by an fput().  Inside of the initial __scm_destroy() we
keep running the list until it is empty.

Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit f8d570a4745835f2238a33b537218a1bb03fc671 and
3b53fbf4314594fa04544b02b2fc6e607912da18 upstream (because once wasn't
good enough...)

__scm_destroy() walks the list of file descriptors in the scm_fp_list
pointed to by the scm_cookie argument.

Those, in turn, can close sockets and invoke __scm_destroy() again.

There is nothing which limits how deeply this can occur.

The idea for how to fix this is from Linus.  Basically, we do all of
the fput()s at the top level by collecting all of the scm_fp_list
objects hit by an fput().  Inside of the initial __scm_destroy() we
keep running the list until it is empty.

Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>sctp: Fix kernel panic while process protocol violation parameter</title>
<updated>2008-09-30T12:32:24+00:00</updated>
<author>
<name>Wei Yongjun</name>
<email>yjwei@cn.fujitsu.com</email>
</author>
<published>2008-09-30T12:32:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=ba0166708ef4da7eeb61dd92bbba4d5a749d6561'/>
<id>ba0166708ef4da7eeb61dd92bbba4d5a749d6561</id>
<content type='text'>
Since call to function sctp_sf_abort_violation() need paramter 'arg' with
'struct sctp_chunk' type, it will read the chunk type and chunk length from
the chunk_hdr member of chunk. But call to sctp_sf_violation_paramlen()
always with 'struct sctp_paramhdr' type's parameter, it will be passed to
sctp_sf_abort_violation(). This may cause kernel panic.

   sctp_sf_violation_paramlen()
     |-- sctp_sf_abort_violation()
        |-- sctp_make_abort_violation()

This patch fixed this problem. This patch also fix two place which called
sctp_sf_violation_paramlen() with wrong paramter type.

Signed-off-by: Wei Yongjun &lt;yjwei@cn.fujitsu.com&gt;
Signed-off-by: Vlad Yasevich &lt;vladislav.yasevich@hp.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Since call to function sctp_sf_abort_violation() need paramter 'arg' with
'struct sctp_chunk' type, it will read the chunk type and chunk length from
the chunk_hdr member of chunk. But call to sctp_sf_violation_paramlen()
always with 'struct sctp_paramhdr' type's parameter, it will be passed to
sctp_sf_abort_violation(). This may cause kernel panic.

   sctp_sf_violation_paramlen()
     |-- sctp_sf_abort_violation()
        |-- sctp_make_abort_violation()

This patch fixed this problem. This patch also fix two place which called
sctp_sf_violation_paramlen() with wrong paramter type.

Signed-off-by: Wei Yongjun &lt;yjwei@cn.fujitsu.com&gt;
Signed-off-by: Vlad Yasevich &lt;vladislav.yasevich@hp.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
</feed>
