<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/include/net, branch v2.6.27.40</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/include/net?h=v2.6.27.40</id>
<link rel='self' href='https://git.amat.us/linux/atom/include/net?h=v2.6.27.40'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2009-11-10T00:52:30Z</updated>
<entry>
<title>irda: Add irda_skb_cb qdisc related padding</title>
<updated>2009-11-10T00:52:30Z</updated>
<author>
<name>Samuel Ortiz</name>
<email>samuel@sortiz.org</email>
</author>
<published>2008-12-17T23:44:58Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=d4f9442f8805df2d235b446e3e7fe53f2f3d232e'/>
<id>urn:sha1: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>
</entry>
<entry>
<title>x25: Fix sleep from timer on socket destroy.</title>
<updated>2009-07-30T23:06:13Z</updated>
<author>
<name>David S. Miller</name>
<email>davem@davemloft.net</email>
</author>
<published>2009-06-16T12:40:30Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=3154ee5364cf95cc3948589d870f6f6c957ba0a3'/>
<id>urn:sha1: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>
</entry>
<entry>
<title>net: Kill skb_truesize_check(), it only catches false-positives.</title>
<updated>2009-03-17T00:52:42Z</updated>
<author>
<name>David S. Miller</name>
<email>davem@davemloft.net</email>
</author>
<published>2009-02-26T07:09:34Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=21ef40e66f6186898ea4240b83a0f1c7424953d0'/>
<id>urn:sha1: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>
</entry>
<entry>
<title>sctp: Fix crc32c calculations on big-endian arhes.</title>
<updated>2009-02-17T17:46:19Z</updated>
<author>
<name>Vlad Yasevich</name>
<email>vladislav.yasevich@hp.com</email>
</author>
<published>2009-01-22T22:52:23Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=d8e466e2cc8e9e4e033c9994f2d598276d60d409'/>
<id>urn:sha1: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>
</entry>
<entry>
<title>net: Fix soft lockups/OOM issues w/ unix garbage collector (CVE-2008-5300)</title>
<updated>2008-12-05T18:55:25Z</updated>
<author>
<name>dann frazier</name>
<email>dannf@hp.com</email>
</author>
<published>2008-11-26T23:32:27Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=d7fc504d906a210ae3e24741e45504c1df87035f'/>
<id>urn:sha1: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>
</entry>
<entry>
<title>net: unix: fix inflight counting bug in garbage collector</title>
<updated>2008-11-13T17:55:58Z</updated>
<author>
<name>Miklos Szeredi</name>
<email>mszeredi@suse.cz</email>
</author>
<published>2008-11-09T19:50:02Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=dc56d50c44eb80aca5ce60e881c6444f39c82461'/>
<id>urn:sha1: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>
</entry>
<entry>
<title>net: Fix recursive descent in __scm_destroy().</title>
<updated>2008-11-07T17:55:19Z</updated>
<author>
<name>David Miller</name>
<email>davem@davemloft.net</email>
</author>
<published>2008-11-06T08:37:40Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=1dbbd0bf5d15397a4e4a1ae3e3e82e0fe4f83c3a'/>
<id>urn:sha1: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>
</entry>
<entry>
<title>sctp: Fix kernel panic while process protocol violation parameter</title>
<updated>2008-09-30T12:32:24Z</updated>
<author>
<name>Wei Yongjun</name>
<email>yjwei@cn.fujitsu.com</email>
</author>
<published>2008-09-30T12:32:24Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=ba0166708ef4da7eeb61dd92bbba4d5a749d6561'/>
<id>urn:sha1: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>
</entry>
<entry>
<title>9p: implement proper trans module refcounting and unregistration</title>
<updated>2008-09-24T21:22:23Z</updated>
<author>
<name>Tejun Heo</name>
<email>tj@kernel.org</email>
</author>
<published>2008-09-24T21:22:23Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=72029fe85d8d060b3f966f2dbc36b3c75b5a6532'/>
<id>urn:sha1:72029fe85d8d060b3f966f2dbc36b3c75b5a6532</id>
<content type='text'>
9p trans modules aren't refcounted nor were they unregistered
properly.  Fix it.

* Add 9p_trans_module-&gt;owner and reference the module on each trans
  instance creation and put it on destruction.

* Protect v9fs_trans_list with a spinlock.  This isn't strictly
  necessary as the list is manipulated only during module loading /
  unloading but it's a good idea to make the API safe.

* Unregister trans modules when the corresponding module is being
  unloaded.

* While at it, kill unnecessary EXPORT_SYMBOL on p9_trans_fd_init().

Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
Signed-off-by: Eric Van Hensbergen &lt;ericvh@gmail.com&gt;

</content>
</entry>
<entry>
<title>netlink: fix overrun in attribute iteration</title>
<updated>2008-09-12T02:05:29Z</updated>
<author>
<name>Vegard Nossum</name>
<email>vegard.nossum@gmail.com</email>
</author>
<published>2008-09-12T02:05:29Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=1045b03e07d85f3545118510a587035536030c1c'/>
<id>urn:sha1:1045b03e07d85f3545118510a587035536030c1c</id>
<content type='text'>
kmemcheck reported this:

  kmemcheck: Caught 16-bit read from uninitialized memory (f6c1ba30)
  0500110001508abf050010000500000002017300140000006f72672e66726565
   i i i i i i i i i i i i i u u u u u u u u u u u u u u u u u u u
                                   ^

  Pid: 3462, comm: wpa_supplicant Not tainted (2.6.27-rc3-00054-g6397ab9-dirty #13)
  EIP: 0060:[&lt;c05de64a&gt;] EFLAGS: 00010296 CPU: 0
  EIP is at nla_parse+0x5a/0xf0
  EAX: 00000008 EBX: fffffffd ECX: c06f16c0 EDX: 00000005
  ESI: 00000010 EDI: f6c1ba30 EBP: f6367c6c ESP: c0a11e88
   DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068
  CR0: 8005003b CR2: f781cc84 CR3: 3632f000 CR4: 000006d0
  DR0: c0ead9bc DR1: 00000000 DR2: 00000000 DR3: 00000000
  DR6: ffff4ff0 DR7: 00000400
   [&lt;c05d4b23&gt;] rtnl_setlink+0x63/0x130
   [&lt;c05d5f75&gt;] rtnetlink_rcv_msg+0x165/0x200
   [&lt;c05ddf66&gt;] netlink_rcv_skb+0x76/0xa0
   [&lt;c05d5dfe&gt;] rtnetlink_rcv+0x1e/0x30
   [&lt;c05dda21&gt;] netlink_unicast+0x281/0x290
   [&lt;c05ddbe9&gt;] netlink_sendmsg+0x1b9/0x2b0
   [&lt;c05beef2&gt;] sock_sendmsg+0xd2/0x100
   [&lt;c05bf945&gt;] sys_sendto+0xa5/0xd0
   [&lt;c05bf9a6&gt;] sys_send+0x36/0x40
   [&lt;c05c03d6&gt;] sys_socketcall+0x1e6/0x2c0
   [&lt;c020353b&gt;] sysenter_do_call+0x12/0x3f
   [&lt;ffffffff&gt;] 0xffffffff

This is the line in nla_ok():

  /**
   * nla_ok - check if the netlink attribute fits into the remaining bytes
   * @nla: netlink attribute
   * @remaining: number of bytes remaining in attribute stream
   */
  static inline int nla_ok(const struct nlattr *nla, int remaining)
  {
          return remaining &gt;= sizeof(*nla) &amp;&amp;
                 nla-&gt;nla_len &gt;= sizeof(*nla) &amp;&amp;
                 nla-&gt;nla_len &lt;= remaining;
  }

It turns out that remaining can become negative due to alignment in
nla_next(). But GCC promotes "remaining" to unsigned in the test
against sizeof(*nla) above. Therefore the test succeeds, and the
nla_for_each_attr() may access memory outside the received buffer.

A short example illustrating this point is here:

  #include &lt;stdio.h&gt;

  main(void)
  {
          printf("%d\n", -1 &gt;= sizeof(int));
  }

...which prints "1".

This patch adds a cast in front of the sizeof so that GCC will make
a signed comparison and fix the illegal memory dereference. With the
patch applied, there is no kmemcheck report.

Signed-off-by: Vegard Nossum &lt;vegard.nossum@gmail.com&gt;
Acked-by: Thomas Graf &lt;tgraf@suug.ch&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
