<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/include, branch v2.6.27.54</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>compat: Make compat_alloc_user_space() incorporate the access_ok()</title>
<updated>2010-09-20T20:03:21+00:00</updated>
<author>
<name>H. Peter Anvin</name>
<email>hpa@linux.intel.com</email>
</author>
<published>2010-09-07T23:16:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=1d3fb6bbb5c235568f80fd708e5ec6149b5d141c'/>
<id>1d3fb6bbb5c235568f80fd708e5ec6149b5d141c</id>
<content type='text'>
commit c41d68a513c71e35a14f66d71782d27a79a81ea6 upstream.

compat_alloc_user_space() expects the caller to independently call
access_ok() to verify the returned area.  A missing call could
introduce problems on some architectures.

This patch incorporates the access_ok() check into
compat_alloc_user_space() and also adds a sanity check on the length.
The existing compat_alloc_user_space() implementations are renamed
arch_compat_alloc_user_space() and are used as part of the
implementation of the new global function.

This patch assumes NULL will cause __get_user()/__put_user() to either
fail or access userspace on all architectures.  This should be
followed by checking the return value of compat_access_user_space()
for NULL in the callers, at which time the access_ok() in the callers
can also be removed.

Reported-by: Ben Hawkes &lt;hawkes@sota.gen.nz&gt;
Signed-off-by: H. Peter Anvin &lt;hpa@linux.intel.com&gt;
Acked-by: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
Acked-by: Chris Metcalf &lt;cmetcalf@tilera.com&gt;
Acked-by: David S. Miller &lt;davem@davemloft.net&gt;
Acked-by: Ingo Molnar &lt;mingo@elte.hu&gt;
Acked-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Acked-by: Tony Luck &lt;tony.luck@intel.com&gt;
Cc: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Cc: Arnd Bergmann &lt;arnd@arndb.de&gt;
Cc: Fenghua Yu &lt;fenghua.yu@intel.com&gt;
Cc: H. Peter Anvin &lt;hpa@zytor.com&gt;
Cc: Heiko Carstens &lt;heiko.carstens@de.ibm.com&gt;
Cc: Helge Deller &lt;deller@gmx.de&gt;
Cc: James Bottomley &lt;jejb@parisc-linux.org&gt;
Cc: Kyle McMartin &lt;kyle@mcmartin.ca&gt;
Cc: Martin Schwidefsky &lt;schwidefsky@de.ibm.com&gt;
Cc: Paul Mackerras &lt;paulus@samba.org&gt;
Cc: Ralf Baechle &lt;ralf@linux-mips.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 c41d68a513c71e35a14f66d71782d27a79a81ea6 upstream.

compat_alloc_user_space() expects the caller to independently call
access_ok() to verify the returned area.  A missing call could
introduce problems on some architectures.

This patch incorporates the access_ok() check into
compat_alloc_user_space() and also adds a sanity check on the length.
The existing compat_alloc_user_space() implementations are renamed
arch_compat_alloc_user_space() and are used as part of the
implementation of the new global function.

This patch assumes NULL will cause __get_user()/__put_user() to either
fail or access userspace on all architectures.  This should be
followed by checking the return value of compat_access_user_space()
for NULL in the callers, at which time the access_ok() in the callers
can also be removed.

Reported-by: Ben Hawkes &lt;hawkes@sota.gen.nz&gt;
Signed-off-by: H. Peter Anvin &lt;hpa@linux.intel.com&gt;
Acked-by: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
Acked-by: Chris Metcalf &lt;cmetcalf@tilera.com&gt;
Acked-by: David S. Miller &lt;davem@davemloft.net&gt;
Acked-by: Ingo Molnar &lt;mingo@elte.hu&gt;
Acked-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Acked-by: Tony Luck &lt;tony.luck@intel.com&gt;
Cc: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Cc: Arnd Bergmann &lt;arnd@arndb.de&gt;
Cc: Fenghua Yu &lt;fenghua.yu@intel.com&gt;
Cc: H. Peter Anvin &lt;hpa@zytor.com&gt;
Cc: Heiko Carstens &lt;heiko.carstens@de.ibm.com&gt;
Cc: Helge Deller &lt;deller@gmx.de&gt;
Cc: James Bottomley &lt;jejb@parisc-linux.org&gt;
Cc: Kyle McMartin &lt;kyle@mcmartin.ca&gt;
Cc: Martin Schwidefsky &lt;schwidefsky@de.ibm.com&gt;
Cc: Paul Mackerras &lt;paulus@samba.org&gt;
Cc: Ralf Baechle &lt;ralf@linux-mips.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>math-emu: correct test for downshifting fraction in _FP_FROM_INT()</title>
<updated>2010-08-02T17:18:50+00:00</updated>
<author>
<name>Mikael Pettersson</name>
<email>mikpe@it.uu.se</email>
</author>
<published>2010-07-21T01:45:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=387247ff4b68aea133a0ca440e78fb19ae3ecf16'/>
<id>387247ff4b68aea133a0ca440e78fb19ae3ecf16</id>
<content type='text'>
commit f8324e20f8289dffc646d64366332e05eaacab25 upstream.

The kernel's math-emu code contains a macro _FP_FROM_INT() which is
used to convert an integer to a raw normalized floating-point value.
It does this basically in three steps:

1. Compute the exponent from the number of leading zero bits.
2. Downshift large fractions to put the MSB in the right position
   for normalized fractions.
3. Upshift small fractions to put the MSB in the right position.

There is an boundary error in step 2, causing a fraction with its
MSB exactly one bit above the normalized MSB position to not be
downshifted.  This results in a non-normalized raw float, which when
packed becomes a massively inaccurate representation for that input.

The impact of this depends on a number of arch-specific factors,
but it is known to have broken emulation of FXTOD instructions
on UltraSPARC III, which was originally reported as GCC bug 44631
&lt;http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44631&gt;.

Any arch which uses math-emu to emulate conversions from integers to
same-size floats may be affected.

The fix is simple: the exponent comparison used to determine if the
fraction should be downshifted must be "&lt;=" not "&lt;".

I'm sending a kernel module to test this as a reply to this message.
There are also SPARC user-space test cases in the GCC bug entry.

Signed-off-by: Mikael Pettersson &lt;mikpe@it.uu.se&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 f8324e20f8289dffc646d64366332e05eaacab25 upstream.

The kernel's math-emu code contains a macro _FP_FROM_INT() which is
used to convert an integer to a raw normalized floating-point value.
It does this basically in three steps:

1. Compute the exponent from the number of leading zero bits.
2. Downshift large fractions to put the MSB in the right position
   for normalized fractions.
3. Upshift small fractions to put the MSB in the right position.

There is an boundary error in step 2, causing a fraction with its
MSB exactly one bit above the normalized MSB position to not be
downshifted.  This results in a non-normalized raw float, which when
packed becomes a massively inaccurate representation for that input.

The impact of this depends on a number of arch-specific factors,
but it is known to have broken emulation of FXTOD instructions
on UltraSPARC III, which was originally reported as GCC bug 44631
&lt;http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44631&gt;.

Any arch which uses math-emu to emulate conversions from integers to
same-size floats may be affected.

The fix is simple: the exponent comparison used to determine if the
fraction should be downshifted must be "&lt;=" not "&lt;".

I'm sending a kernel module to test this as a reply to this message.
There are also SPARC user-space test cases in the GCC bug entry.

Signed-off-by: Mikael Pettersson &lt;mikpe@it.uu.se&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>vfs: add NOFOLLOW flag to umount(2)</title>
<updated>2010-07-05T18:08:46+00:00</updated>
<author>
<name>Miklos Szeredi</name>
<email>mszeredi@suse.cz</email>
</author>
<published>2010-02-10T11:15:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=23b5e014564bb71eb05871af019912957263f158'/>
<id>23b5e014564bb71eb05871af019912957263f158</id>
<content type='text'>
commit db1f05bb85d7966b9176e293f3ceead1cb8b5d79 upstream.

Add a new UMOUNT_NOFOLLOW flag to umount(2).  This is needed to prevent
symlink attacks in unprivileged unmounts (fuse, samba, ncpfs).

Additionally, return -EINVAL if an unknown flag is used (and specify
an explicitly unused flag: UMOUNT_UNUSED).  This makes it possible for
the caller to determine if a flag is supported or not.

CC: Eugene Teo &lt;eugene@redhat.com&gt;
CC: Michael Kerrisk &lt;mtk.manpages@gmail.com&gt;
Signed-off-by: Miklos Szeredi &lt;mszeredi@suse.cz&gt;
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&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 db1f05bb85d7966b9176e293f3ceead1cb8b5d79 upstream.

Add a new UMOUNT_NOFOLLOW flag to umount(2).  This is needed to prevent
symlink attacks in unprivileged unmounts (fuse, samba, ncpfs).

Additionally, return -EINVAL if an unknown flag is used (and specify
an explicitly unused flag: UMOUNT_UNUSED).  This makes it possible for
the caller to determine if a flag is supported or not.

CC: Eugene Teo &lt;eugene@redhat.com&gt;
CC: Michael Kerrisk &lt;mtk.manpages@gmail.com&gt;
Signed-off-by: Miklos Szeredi &lt;mszeredi@suse.cz&gt;
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</pre>
</div>
</content>
</entry>
<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>nfsd: fix vm overcommit crash fix #2</title>
<updated>2010-05-26T21:27:09+00:00</updated>
<author>
<name>Junjiro R. Okajima</name>
<email>hooanon05@yahoo.co.jp</email>
</author>
<published>2008-12-02T18:31:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=c0ac27236d86f07e1b24126bd7ee0eeb9008eaaf'/>
<id>c0ac27236d86f07e1b24126bd7ee0eeb9008eaaf</id>
<content type='text'>
commit 1b79cd04fab80be61dcd2732e2423aafde9a4c1c upstream.

The previous patch from Alan Cox ("nfsd: fix vm overcommit crash",
commit 731572d39fcd3498702eda4600db4c43d51e0b26) fixed the problem where
knfsd crashes on exported shmemfs objects and strict overcommit is set.

But the patch forgot supporting the case when CONFIG_SECURITY is
disabled.

This patch copies a part of his fix which is mainly for detecting a bug
earlier.

Acked-by: James Morris &lt;jmorris@namei.org&gt;
Signed-off-by: Alan Cox &lt;alan@redhat.com&gt;
Signed-off-by: Junjiro R. Okajima &lt;hooanon05@yahoo.co.jp&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&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 1b79cd04fab80be61dcd2732e2423aafde9a4c1c upstream.

The previous patch from Alan Cox ("nfsd: fix vm overcommit crash",
commit 731572d39fcd3498702eda4600db4c43d51e0b26) fixed the problem where
knfsd crashes on exported shmemfs objects and strict overcommit is set.

But the patch forgot supporting the case when CONFIG_SECURITY is
disabled.

This patch copies a part of his fix which is mainly for detecting a bug
earlier.

Acked-by: James Morris &lt;jmorris@namei.org&gt;
Signed-off-by: Alan Cox &lt;alan@redhat.com&gt;
Signed-off-by: Junjiro R. Okajima &lt;hooanon05@yahoo.co.jp&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&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>nfsd: fix vm overcommit crash</title>
<updated>2010-05-26T21:27:09+00:00</updated>
<author>
<name>Alan Cox</name>
<email>alan@redhat.com</email>
</author>
<published>2008-10-29T21:01:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=3f955fe683ffdda7fd68e0b61779001cb9b50011'/>
<id>3f955fe683ffdda7fd68e0b61779001cb9b50011</id>
<content type='text'>
commit 731572d39fcd3498702eda4600db4c43d51e0b26 upstream.

Junjiro R.  Okajima reported a problem where knfsd crashes if you are
using it to export shmemfs objects and run strict overcommit.  In this
situation the current-&gt;mm based modifier to the overcommit goes through a
NULL pointer.

We could simply check for NULL and skip the modifier but we've caught
other real bugs in the past from mm being NULL here - cases where we did
need a valid mm set up (eg the exec bug about a year ago).

To preserve the checks and get the logic we want shuffle the checking
around and add a new helper to the vm_ security wrappers

Also fix a current-&gt;mm reference in nommu that should use the passed mm

[akpm@linux-foundation.org: coding-style fixes]
[akpm@linux-foundation.org: fix build]
Reported-by: Junjiro R. Okajima &lt;hooanon05@yahoo.co.jp&gt;
Acked-by: James Morris &lt;jmorris@namei.org&gt;
Signed-off-by: Alan Cox &lt;alan@redhat.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&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 731572d39fcd3498702eda4600db4c43d51e0b26 upstream.

Junjiro R.  Okajima reported a problem where knfsd crashes if you are
using it to export shmemfs objects and run strict overcommit.  In this
situation the current-&gt;mm based modifier to the overcommit goes through a
NULL pointer.

We could simply check for NULL and skip the modifier but we've caught
other real bugs in the past from mm being NULL here - cases where we did
need a valid mm set up (eg the exec bug about a year ago).

To preserve the checks and get the logic we want shuffle the checking
around and add a new helper to the vm_ security wrappers

Also fix a current-&gt;mm reference in nommu that should use the passed mm

[akpm@linux-foundation.org: coding-style fixes]
[akpm@linux-foundation.org: fix build]
Reported-by: Junjiro R. Okajima &lt;hooanon05@yahoo.co.jp&gt;
Acked-by: James Morris &lt;jmorris@namei.org&gt;
Signed-off-by: Alan Cox &lt;alan@redhat.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&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>vfs: Remove the range_cont writeback mode.</title>
<updated>2010-05-26T21:27:06+00:00</updated>
<author>
<name>Aneesh Kumar K.V</name>
<email>aneesh.kumar@linux.vnet.ibm.com</email>
</author>
<published>2010-03-16T00:26:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=c18cb57f81d42eb408fa7f0fb15b9f4f3f9998fb'/>
<id>c18cb57f81d42eb408fa7f0fb15b9f4f3f9998fb</id>
<content type='text'>
commit 74baaaaec8b4f22e1ae279f5ecca4ff705b28912 upstream.

Ext4 was the only user of range_cont writeback mode and ext4 switched
to a different method. So remove the range_cont mode which is not used
in the kernel.

Signed-off-by: Aneesh Kumar K.V &lt;aneesh.kumar@linux.vnet.ibm.com&gt;
Signed-off-by: "Theodore Ts'o" &lt;tytso@mit.edu&gt;
CC: linux-fsdevel@vger.kernel.org
Signed-off-by: Jayson R. King &lt;dev@jaysonking.com&gt;
Signed-off-by: Theodore Ts'o &lt;tytso@mit.edu&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 74baaaaec8b4f22e1ae279f5ecca4ff705b28912 upstream.

Ext4 was the only user of range_cont writeback mode and ext4 switched
to a different method. So remove the range_cont mode which is not used
in the kernel.

Signed-off-by: Aneesh Kumar K.V &lt;aneesh.kumar@linux.vnet.ibm.com&gt;
Signed-off-by: "Theodore Ts'o" &lt;tytso@mit.edu&gt;
CC: linux-fsdevel@vger.kernel.org
Signed-off-by: Jayson R. King &lt;dev@jaysonking.com&gt;
Signed-off-by: Theodore Ts'o &lt;tytso@mit.edu&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>percpu counter: clean up percpu_counter_sum_and_set()</title>
<updated>2010-05-26T21:27:05+00:00</updated>
<author>
<name>Mingming Cao</name>
<email>cmm@us.ibm.com</email>
</author>
<published>2010-03-16T00:25:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=ac6016e3a8c7967cf8e3fe9102a9b87d7092b4bf'/>
<id>ac6016e3a8c7967cf8e3fe9102a9b87d7092b4bf</id>
<content type='text'>
commit 1f7c14c62ce63805f9574664a6c6de3633d4a354 upstream.

percpu_counter_sum_and_set() and percpu_counter_sum() is the same except
the former updates the global counter after accounting.  Since we are
taking the fbc-&gt;lock to calculate the precise value of the counter in
percpu_counter_sum() anyway, it should simply set fbc-&gt;count too, as the
percpu_counter_sum_and_set() does.

This patch merges these two interfaces into one.

Signed-off-by: Mingming Cao &lt;cmm@us.ibm.com&gt;
Acked-by: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Cc: &lt;linux-ext4@vger.kernel.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: "Theodore Ts'o" &lt;tytso@mit.edu&gt;
Signed-off-by: Jayson R. King &lt;dev@jaysonking.com&gt;
Signed-off-by: Theodore Ts'o &lt;tytso@mit.edu&gt;

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

percpu_counter_sum_and_set() and percpu_counter_sum() is the same except
the former updates the global counter after accounting.  Since we are
taking the fbc-&gt;lock to calculate the precise value of the counter in
percpu_counter_sum() anyway, it should simply set fbc-&gt;count too, as the
percpu_counter_sum_and_set() does.

This patch merges these two interfaces into one.

Signed-off-by: Mingming Cao &lt;cmm@us.ibm.com&gt;
Acked-by: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Cc: &lt;linux-ext4@vger.kernel.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: "Theodore Ts'o" &lt;tytso@mit.edu&gt;
Signed-off-by: Jayson R. King &lt;dev@jaysonking.com&gt;
Signed-off-by: Theodore Ts'o &lt;tytso@mit.edu&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>KVM: VMX: Check cpl before emulating debug register access</title>
<updated>2010-04-01T22:52:24+00:00</updated>
<author>
<name>Avi Kivity</name>
<email>avi@redhat.com</email>
</author>
<published>2009-09-01T09:03:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=0a32cd3d6adbe5cbfdfb411e1b1fccceec75e36a'/>
<id>0a32cd3d6adbe5cbfdfb411e1b1fccceec75e36a</id>
<content type='text'>
commit 0a79b009525b160081d75cef5dbf45817956acf2 upstream.

Debug registers may only be accessed from cpl 0.  Unfortunately, vmx will
code to emulate the instruction even though it was issued from guest
userspace, possibly leading to an unexpected trap later.

Signed-off-by: Avi Kivity &lt;avi@redhat.com&gt;
Signed-off-by: Marcelo Tosatti &lt;mtosatti@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 0a79b009525b160081d75cef5dbf45817956acf2 upstream.

Debug registers may only be accessed from cpl 0.  Unfortunately, vmx will
code to emulate the instruction even though it was issued from guest
userspace, possibly leading to an unexpected trap later.

Signed-off-by: Avi Kivity &lt;avi@redhat.com&gt;
Signed-off-by: Marcelo Tosatti &lt;mtosatti@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;


</pre>
</div>
</content>
</entry>
<entry>
<title>KVM: x86 emulator: limit instructions to 15 bytes</title>
<updated>2010-04-01T22:52:23+00:00</updated>
<author>
<name>Avi Kivity</name>
<email>avi@redhat.com</email>
</author>
<published>2009-11-24T11:20:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=8b91c56fd291670294e197bc2d25ba3844cc53fa'/>
<id>8b91c56fd291670294e197bc2d25ba3844cc53fa</id>
<content type='text'>
commit eb3c79e64a70fb8f7473e30fa07e89c1ecc2c9bb upstream

[ &lt;cebbert@redhat.com&gt;: backport to 2.6.27 ]

While we are never normally passed an instruction that exceeds 15 bytes,
smp games can cause us to attempt to interpret one, which will cause
large latencies in non-preempt hosts.

Signed-off-by: Avi Kivity &lt;avi@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 eb3c79e64a70fb8f7473e30fa07e89c1ecc2c9bb upstream

[ &lt;cebbert@redhat.com&gt;: backport to 2.6.27 ]

While we are never normally passed an instruction that exceeds 15 bytes,
smp games can cause us to attempt to interpret one, which will cause
large latencies in non-preempt hosts.

Signed-off-by: Avi Kivity &lt;avi@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</pre>
</div>
</content>
</entry>
</feed>
