<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux.git/net/ipv4, branch v3.8-rc2</title>
<subtitle>Linux kernel source tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/'/>
<entry>
<title>ipv4/ip_gre: set transport header correctly to gre header</title>
<updated>2012-12-26T23:19:56+00:00</updated>
<author>
<name>Isaku Yamahata</name>
<email>yamahata@valinux.co.jp</email>
</author>
<published>2012-12-24T16:51:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=861aa6d56de8147249c8a04a4e87fb7c3600cca1'/>
<id>861aa6d56de8147249c8a04a4e87fb7c3600cca1</id>
<content type='text'>
ipgre_tunnel_xmit() incorrectly sets transport header to inner payload
instead of GRE header. It seems copy-and-pasted from ipip.c.
So set transport header to gre header.
(In ipip case the transport header is the inner ip header, so that's
correct.)

Found by inspection. In practice the incorrect transport header
doesn't matter because the skb usually is sent to another net_device
or socket, so the transport header isn't referenced.

Signed-off-by: Isaku Yamahata &lt;yamahata@valinux.co.jp&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>
ipgre_tunnel_xmit() incorrectly sets transport header to inner payload
instead of GRE header. It seems copy-and-pasted from ipip.c.
So set transport header to gre header.
(In ipip case the transport header is the inner ip header, so that's
correct.)

Found by inspection. In practice the incorrect transport header
doesn't matter because the skb usually is sent to another net_device
or socket, so the transport header isn't referenced.

Signed-off-by: Isaku Yamahata &lt;yamahata@valinux.co.jp&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tcp: should drop incoming frames without ACK flag set</title>
<updated>2012-12-26T23:08:55+00:00</updated>
<author>
<name>Eric Dumazet</name>
<email>edumazet@google.com</email>
</author>
<published>2012-12-26T12:44:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=c3ae62af8e755ea68380fb5ce682e60079a4c388'/>
<id>c3ae62af8e755ea68380fb5ce682e60079a4c388</id>
<content type='text'>
In commit 96e0bf4b5193d (tcp: Discard segments that ack data not yet
sent) John Dykstra enforced a check against ack sequences.

In commit 354e4aa391ed5 (tcp: RFC 5961 5.2 Blind Data Injection Attack
Mitigation) I added more safety tests.

But we missed fact that these tests are not performed if ACK bit is
not set.

RFC 793 3.9 mandates TCP should drop a frame without ACK flag set.

" fifth check the ACK field,
      if the ACK bit is off drop the segment and return"

Not doing so permits an attacker to only guess an acceptable sequence
number, evading stronger checks.

Many thanks to Zhiyun Qian for bringing this issue to our attention.

See :
http://web.eecs.umich.edu/~zhiyunq/pub/ccs12_TCP_sequence_number_inference.pdf

Reported-by: Zhiyun Qian &lt;zhiyunq@umich.edu&gt;
Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Cc: Nandita Dukkipati &lt;nanditad@google.com&gt;
Cc: Neal Cardwell &lt;ncardwell@google.com&gt;
Cc: John Dykstra &lt;john.dykstra1@gmail.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>
In commit 96e0bf4b5193d (tcp: Discard segments that ack data not yet
sent) John Dykstra enforced a check against ack sequences.

In commit 354e4aa391ed5 (tcp: RFC 5961 5.2 Blind Data Injection Attack
Mitigation) I added more safety tests.

But we missed fact that these tests are not performed if ACK bit is
not set.

RFC 793 3.9 mandates TCP should drop a frame without ACK flag set.

" fifth check the ACK field,
      if the ACK bit is off drop the segment and return"

Not doing so permits an attacker to only guess an acceptable sequence
number, evading stronger checks.

Many thanks to Zhiyun Qian for bringing this issue to our attention.

See :
http://web.eecs.umich.edu/~zhiyunq/pub/ccs12_TCP_sequence_number_inference.pdf

Reported-by: Zhiyun Qian &lt;zhiyunq@umich.edu&gt;
Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Cc: Nandita Dukkipati &lt;nanditad@google.com&gt;
Cc: Neal Cardwell &lt;ncardwell@google.com&gt;
Cc: John Dykstra &lt;john.dykstra1@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>arp: fix a regression in arp_solicit()</title>
<updated>2012-12-25T02:42:58+00:00</updated>
<author>
<name>Cong Wang</name>
<email>xiyou.wangcong@gmail.com</email>
</author>
<published>2012-12-23T15:23:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=cf0be88057baceae033a82d669128b282308c742'/>
<id>cf0be88057baceae033a82d669128b282308c742</id>
<content type='text'>
Sedat reported the following commit caused a regression:

commit 9650388b5c56578fdccc79c57a8c82fb92b8e7f1
Author: Eric Dumazet &lt;edumazet@google.com&gt;
Date:   Fri Dec 21 07:32:10 2012 +0000

    ipv4: arp: fix a lockdep splat in arp_solicit

This is due to the 6th parameter of arp_send() needs to be NULL
for the broadcast case, the above commit changed it to an all-zero
array by mistake.

Reported-by: Sedat Dilek &lt;sedat.dilek@gmail.com&gt;
Tested-by: Sedat Dilek &lt;sedat.dilek@gmail.com&gt;
Cc: Sedat Dilek &lt;sedat.dilek@gmail.com&gt;
Cc: Eric Dumazet &lt;edumazet@google.com&gt;
Cc: David S. Miller &lt;davem@davemloft.net&gt;
Cc: Julian Anastasov &lt;ja@ssi.bg&gt;
Signed-off-by: Cong Wang &lt;xiyou.wangcong@gmail.com&gt;
Acked-by: Eric Dumazet &lt;edumazet@google.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>
Sedat reported the following commit caused a regression:

commit 9650388b5c56578fdccc79c57a8c82fb92b8e7f1
Author: Eric Dumazet &lt;edumazet@google.com&gt;
Date:   Fri Dec 21 07:32:10 2012 +0000

    ipv4: arp: fix a lockdep splat in arp_solicit

This is due to the 6th parameter of arp_send() needs to be NULL
for the broadcast case, the above commit changed it to an all-zero
array by mistake.

Reported-by: Sedat Dilek &lt;sedat.dilek@gmail.com&gt;
Tested-by: Sedat Dilek &lt;sedat.dilek@gmail.com&gt;
Cc: Sedat Dilek &lt;sedat.dilek@gmail.com&gt;
Cc: Eric Dumazet &lt;edumazet@google.com&gt;
Cc: David S. Miller &lt;davem@davemloft.net&gt;
Cc: Julian Anastasov &lt;ja@ssi.bg&gt;
Signed-off-by: Cong Wang &lt;xiyou.wangcong@gmail.com&gt;
Acked-by: Eric Dumazet &lt;edumazet@google.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ipv4: arp: fix a lockdep splat in arp_solicit()</title>
<updated>2012-12-21T21:14:07+00:00</updated>
<author>
<name>Eric Dumazet</name>
<email>edumazet@google.com</email>
</author>
<published>2012-12-21T07:32:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=9650388b5c56578fdccc79c57a8c82fb92b8e7f1'/>
<id>9650388b5c56578fdccc79c57a8c82fb92b8e7f1</id>
<content type='text'>
Yan Burman reported following lockdep warning :

=============================================
[ INFO: possible recursive locking detected ]
3.7.0+ #24 Not tainted
---------------------------------------------
swapper/1/0 is trying to acquire lock:
  (&amp;n-&gt;lock){++--..}, at: [&lt;ffffffff8139f56e&gt;] __neigh_event_send
+0x2e/0x2f0

but task is already holding lock:
  (&amp;n-&gt;lock){++--..}, at: [&lt;ffffffff813f63f4&gt;] arp_solicit+0x1d4/0x280

other info that might help us debug this:
  Possible unsafe locking scenario:

        CPU0
        ----
   lock(&amp;n-&gt;lock);
   lock(&amp;n-&gt;lock);

  *** DEADLOCK ***

  May be due to missing lock nesting notation

4 locks held by swapper/1/0:
  #0:  (((&amp;n-&gt;timer))){+.-...}, at: [&lt;ffffffff8104b350&gt;]
call_timer_fn+0x0/0x1c0
  #1:  (&amp;n-&gt;lock){++--..}, at: [&lt;ffffffff813f63f4&gt;] arp_solicit
+0x1d4/0x280
  #2:  (rcu_read_lock_bh){.+....}, at: [&lt;ffffffff81395400&gt;]
dev_queue_xmit+0x0/0x5d0
  #3:  (rcu_read_lock_bh){.+....}, at: [&lt;ffffffff813cb41e&gt;]
ip_finish_output+0x13e/0x640

stack backtrace:
Pid: 0, comm: swapper/1 Not tainted 3.7.0+ #24
Call Trace:
  &lt;IRQ&gt;  [&lt;ffffffff8108c7ac&gt;] validate_chain+0xdcc/0x11f0
  [&lt;ffffffff8108d570&gt;] ? __lock_acquire+0x440/0xc30
  [&lt;ffffffff81120565&gt;] ? kmem_cache_free+0xe5/0x1c0
  [&lt;ffffffff8108d570&gt;] __lock_acquire+0x440/0xc30
  [&lt;ffffffff813c3570&gt;] ? inet_getpeer+0x40/0x600
  [&lt;ffffffff8108d570&gt;] ? __lock_acquire+0x440/0xc30
  [&lt;ffffffff8139f56e&gt;] ? __neigh_event_send+0x2e/0x2f0
  [&lt;ffffffff8108ddf5&gt;] lock_acquire+0x95/0x140
  [&lt;ffffffff8139f56e&gt;] ? __neigh_event_send+0x2e/0x2f0
  [&lt;ffffffff8108d570&gt;] ? __lock_acquire+0x440/0xc30
  [&lt;ffffffff81448d4b&gt;] _raw_write_lock_bh+0x3b/0x50
  [&lt;ffffffff8139f56e&gt;] ? __neigh_event_send+0x2e/0x2f0
  [&lt;ffffffff8139f56e&gt;] __neigh_event_send+0x2e/0x2f0
  [&lt;ffffffff8139f99b&gt;] neigh_resolve_output+0x16b/0x270
  [&lt;ffffffff813cb62d&gt;] ip_finish_output+0x34d/0x640
  [&lt;ffffffff813cb41e&gt;] ? ip_finish_output+0x13e/0x640
  [&lt;ffffffffa046f146&gt;] ? vxlan_xmit+0x556/0xbec [vxlan]
  [&lt;ffffffff813cb9a0&gt;] ip_output+0x80/0xf0
  [&lt;ffffffff813ca368&gt;] ip_local_out+0x28/0x80
  [&lt;ffffffffa046f25a&gt;] vxlan_xmit+0x66a/0xbec [vxlan]
  [&lt;ffffffffa046f146&gt;] ? vxlan_xmit+0x556/0xbec [vxlan]
  [&lt;ffffffff81394a50&gt;] ? skb_gso_segment+0x2b0/0x2b0
  [&lt;ffffffff81449355&gt;] ? _raw_spin_unlock_irqrestore+0x65/0x80
  [&lt;ffffffff81394c57&gt;] ? dev_queue_xmit_nit+0x207/0x270
  [&lt;ffffffff813950c8&gt;] dev_hard_start_xmit+0x298/0x5d0
  [&lt;ffffffff813956f3&gt;] dev_queue_xmit+0x2f3/0x5d0
  [&lt;ffffffff81395400&gt;] ? dev_hard_start_xmit+0x5d0/0x5d0
  [&lt;ffffffff813f5788&gt;] arp_xmit+0x58/0x60
  [&lt;ffffffff813f59db&gt;] arp_send+0x3b/0x40
  [&lt;ffffffff813f6424&gt;] arp_solicit+0x204/0x280
  [&lt;ffffffff813a1a70&gt;] ? neigh_add+0x310/0x310
  [&lt;ffffffff8139f515&gt;] neigh_probe+0x45/0x70
  [&lt;ffffffff813a1c10&gt;] neigh_timer_handler+0x1a0/0x2a0
  [&lt;ffffffff8104b3cf&gt;] call_timer_fn+0x7f/0x1c0
  [&lt;ffffffff8104b350&gt;] ? detach_if_pending+0x120/0x120
  [&lt;ffffffff8104b748&gt;] run_timer_softirq+0x238/0x2b0
  [&lt;ffffffff813a1a70&gt;] ? neigh_add+0x310/0x310
  [&lt;ffffffff81043e51&gt;] __do_softirq+0x101/0x280
  [&lt;ffffffff814518cc&gt;] call_softirq+0x1c/0x30
  [&lt;ffffffff81003b65&gt;] do_softirq+0x85/0xc0
  [&lt;ffffffff81043a7e&gt;] irq_exit+0x9e/0xc0
  [&lt;ffffffff810264f8&gt;] smp_apic_timer_interrupt+0x68/0xa0
  [&lt;ffffffff8145122f&gt;] apic_timer_interrupt+0x6f/0x80
  &lt;EOI&gt;  [&lt;ffffffff8100a054&gt;] ? mwait_idle+0xa4/0x1c0
  [&lt;ffffffff8100a04b&gt;] ? mwait_idle+0x9b/0x1c0
  [&lt;ffffffff8100a6a9&gt;] cpu_idle+0x89/0xe0
  [&lt;ffffffff81441127&gt;] start_secondary+0x1b2/0x1b6

Bug is from arp_solicit(), releasing the neigh lock after arp_send()
In case of vxlan, we eventually need to write lock a neigh lock later.

Its a false positive, but we can get rid of it without lockdep
annotations.

We can instead use neigh_ha_snapshot() helper.

Reported-by: Yan Burman &lt;yanb@mellanox.com&gt;
Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Acked-by: Stephen Hemminger &lt;shemminger@vyatta.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>
Yan Burman reported following lockdep warning :

=============================================
[ INFO: possible recursive locking detected ]
3.7.0+ #24 Not tainted
---------------------------------------------
swapper/1/0 is trying to acquire lock:
  (&amp;n-&gt;lock){++--..}, at: [&lt;ffffffff8139f56e&gt;] __neigh_event_send
+0x2e/0x2f0

but task is already holding lock:
  (&amp;n-&gt;lock){++--..}, at: [&lt;ffffffff813f63f4&gt;] arp_solicit+0x1d4/0x280

other info that might help us debug this:
  Possible unsafe locking scenario:

        CPU0
        ----
   lock(&amp;n-&gt;lock);
   lock(&amp;n-&gt;lock);

  *** DEADLOCK ***

  May be due to missing lock nesting notation

4 locks held by swapper/1/0:
  #0:  (((&amp;n-&gt;timer))){+.-...}, at: [&lt;ffffffff8104b350&gt;]
call_timer_fn+0x0/0x1c0
  #1:  (&amp;n-&gt;lock){++--..}, at: [&lt;ffffffff813f63f4&gt;] arp_solicit
+0x1d4/0x280
  #2:  (rcu_read_lock_bh){.+....}, at: [&lt;ffffffff81395400&gt;]
dev_queue_xmit+0x0/0x5d0
  #3:  (rcu_read_lock_bh){.+....}, at: [&lt;ffffffff813cb41e&gt;]
ip_finish_output+0x13e/0x640

stack backtrace:
Pid: 0, comm: swapper/1 Not tainted 3.7.0+ #24
Call Trace:
  &lt;IRQ&gt;  [&lt;ffffffff8108c7ac&gt;] validate_chain+0xdcc/0x11f0
  [&lt;ffffffff8108d570&gt;] ? __lock_acquire+0x440/0xc30
  [&lt;ffffffff81120565&gt;] ? kmem_cache_free+0xe5/0x1c0
  [&lt;ffffffff8108d570&gt;] __lock_acquire+0x440/0xc30
  [&lt;ffffffff813c3570&gt;] ? inet_getpeer+0x40/0x600
  [&lt;ffffffff8108d570&gt;] ? __lock_acquire+0x440/0xc30
  [&lt;ffffffff8139f56e&gt;] ? __neigh_event_send+0x2e/0x2f0
  [&lt;ffffffff8108ddf5&gt;] lock_acquire+0x95/0x140
  [&lt;ffffffff8139f56e&gt;] ? __neigh_event_send+0x2e/0x2f0
  [&lt;ffffffff8108d570&gt;] ? __lock_acquire+0x440/0xc30
  [&lt;ffffffff81448d4b&gt;] _raw_write_lock_bh+0x3b/0x50
  [&lt;ffffffff8139f56e&gt;] ? __neigh_event_send+0x2e/0x2f0
  [&lt;ffffffff8139f56e&gt;] __neigh_event_send+0x2e/0x2f0
  [&lt;ffffffff8139f99b&gt;] neigh_resolve_output+0x16b/0x270
  [&lt;ffffffff813cb62d&gt;] ip_finish_output+0x34d/0x640
  [&lt;ffffffff813cb41e&gt;] ? ip_finish_output+0x13e/0x640
  [&lt;ffffffffa046f146&gt;] ? vxlan_xmit+0x556/0xbec [vxlan]
  [&lt;ffffffff813cb9a0&gt;] ip_output+0x80/0xf0
  [&lt;ffffffff813ca368&gt;] ip_local_out+0x28/0x80
  [&lt;ffffffffa046f25a&gt;] vxlan_xmit+0x66a/0xbec [vxlan]
  [&lt;ffffffffa046f146&gt;] ? vxlan_xmit+0x556/0xbec [vxlan]
  [&lt;ffffffff81394a50&gt;] ? skb_gso_segment+0x2b0/0x2b0
  [&lt;ffffffff81449355&gt;] ? _raw_spin_unlock_irqrestore+0x65/0x80
  [&lt;ffffffff81394c57&gt;] ? dev_queue_xmit_nit+0x207/0x270
  [&lt;ffffffff813950c8&gt;] dev_hard_start_xmit+0x298/0x5d0
  [&lt;ffffffff813956f3&gt;] dev_queue_xmit+0x2f3/0x5d0
  [&lt;ffffffff81395400&gt;] ? dev_hard_start_xmit+0x5d0/0x5d0
  [&lt;ffffffff813f5788&gt;] arp_xmit+0x58/0x60
  [&lt;ffffffff813f59db&gt;] arp_send+0x3b/0x40
  [&lt;ffffffff813f6424&gt;] arp_solicit+0x204/0x280
  [&lt;ffffffff813a1a70&gt;] ? neigh_add+0x310/0x310
  [&lt;ffffffff8139f515&gt;] neigh_probe+0x45/0x70
  [&lt;ffffffff813a1c10&gt;] neigh_timer_handler+0x1a0/0x2a0
  [&lt;ffffffff8104b3cf&gt;] call_timer_fn+0x7f/0x1c0
  [&lt;ffffffff8104b350&gt;] ? detach_if_pending+0x120/0x120
  [&lt;ffffffff8104b748&gt;] run_timer_softirq+0x238/0x2b0
  [&lt;ffffffff813a1a70&gt;] ? neigh_add+0x310/0x310
  [&lt;ffffffff81043e51&gt;] __do_softirq+0x101/0x280
  [&lt;ffffffff814518cc&gt;] call_softirq+0x1c/0x30
  [&lt;ffffffff81003b65&gt;] do_softirq+0x85/0xc0
  [&lt;ffffffff81043a7e&gt;] irq_exit+0x9e/0xc0
  [&lt;ffffffff810264f8&gt;] smp_apic_timer_interrupt+0x68/0xa0
  [&lt;ffffffff8145122f&gt;] apic_timer_interrupt+0x6f/0x80
  &lt;EOI&gt;  [&lt;ffffffff8100a054&gt;] ? mwait_idle+0xa4/0x1c0
  [&lt;ffffffff8100a04b&gt;] ? mwait_idle+0x9b/0x1c0
  [&lt;ffffffff8100a6a9&gt;] cpu_idle+0x89/0xe0
  [&lt;ffffffff81441127&gt;] start_secondary+0x1b2/0x1b6

Bug is from arp_solicit(), releasing the neigh lock after arp_send()
In case of vxlan, we eventually need to write lock a neigh lock later.

Its a false positive, but we can get rid of it without lockdep
annotations.

We can instead use neigh_ha_snapshot() helper.

Reported-by: Yan Burman &lt;yanb@mellanox.com&gt;
Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Acked-by: Stephen Hemminger &lt;shemminger@vyatta.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ip_gre: fix possible use after free</title>
<updated>2012-12-21T21:14:01+00:00</updated>
<author>
<name>Eric Dumazet</name>
<email>edumazet@google.com</email>
</author>
<published>2012-12-20T16:00:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=f7e75ba1772bc712af0070655ffd8b09906993b5'/>
<id>f7e75ba1772bc712af0070655ffd8b09906993b5</id>
<content type='text'>
Once skb_realloc_headroom() is called, tiph might point to freed memory.

Cache tiph-&gt;ttl value before the reallocation, to avoid unexpected
behavior.

Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Cc: Isaku Yamahata &lt;yamahata@valinux.co.jp&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>
Once skb_realloc_headroom() is called, tiph might point to freed memory.

Cache tiph-&gt;ttl value before the reallocation, to avoid unexpected
behavior.

Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Cc: Isaku Yamahata &lt;yamahata@valinux.co.jp&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ip_gre: make ipgre_tunnel_xmit() not parse network header as IP unconditionally</title>
<updated>2012-12-21T21:14:00+00:00</updated>
<author>
<name>Isaku Yamahata</name>
<email>yamahata@valinux.co.jp</email>
</author>
<published>2012-12-20T15:12:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=412ed94744d16806fbec3bd250fd94e71cde5a1f'/>
<id>412ed94744d16806fbec3bd250fd94e71cde5a1f</id>
<content type='text'>
ipgre_tunnel_xmit() parses network header as IP unconditionally.
But transmitting packets are not always IP packet. For example such packet
can be sent by packet socket with sockaddr_ll.sll_protocol set.
So make the function check if skb-&gt;protocol is IP.

Signed-off-by: Isaku Yamahata &lt;yamahata@valinux.co.jp&gt;
Acked-by: Eric Dumazet &lt;edumazet@google.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>
ipgre_tunnel_xmit() parses network header as IP unconditionally.
But transmitting packets are not always IP packet. For example such packet
can be sent by packet socket with sockaddr_ll.sll_protocol set.
So make the function check if skb-&gt;protocol is IP.

Signed-off-by: Isaku Yamahata &lt;yamahata@valinux.co.jp&gt;
Acked-by: Eric Dumazet &lt;edumazet@google.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>inet: Fix kmemleak in tcp_v4/6_syn_recv_sock and dccp_v4/6_request_recv_sock</title>
<updated>2012-12-14T18:14:07+00:00</updated>
<author>
<name>Christoph Paasch</name>
<email>christoph.paasch@uclouvain.be</email>
</author>
<published>2012-12-14T04:07:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=e337e24d6624e74a558aa69071e112a65f7b5758'/>
<id>e337e24d6624e74a558aa69071e112a65f7b5758</id>
<content type='text'>
If in either of the above functions inet_csk_route_child_sock() or
__inet_inherit_port() fails, the newsk will not be freed:

unreferenced object 0xffff88022e8a92c0 (size 1592):
  comm "softirq", pid 0, jiffies 4294946244 (age 726.160s)
  hex dump (first 32 bytes):
    0a 01 01 01 0a 01 01 02 00 00 00 00 a7 cc 16 00  ................
    02 00 03 01 00 00 00 00 00 00 00 00 00 00 00 00  ................
  backtrace:
    [&lt;ffffffff8153d190&gt;] kmemleak_alloc+0x21/0x3e
    [&lt;ffffffff810ab3e7&gt;] kmem_cache_alloc+0xb5/0xc5
    [&lt;ffffffff8149b65b&gt;] sk_prot_alloc.isra.53+0x2b/0xcd
    [&lt;ffffffff8149b784&gt;] sk_clone_lock+0x16/0x21e
    [&lt;ffffffff814d711a&gt;] inet_csk_clone_lock+0x10/0x7b
    [&lt;ffffffff814ebbc3&gt;] tcp_create_openreq_child+0x21/0x481
    [&lt;ffffffff814e8fa5&gt;] tcp_v4_syn_recv_sock+0x3a/0x23b
    [&lt;ffffffff814ec5ba&gt;] tcp_check_req+0x29f/0x416
    [&lt;ffffffff814e8e10&gt;] tcp_v4_do_rcv+0x161/0x2bc
    [&lt;ffffffff814eb917&gt;] tcp_v4_rcv+0x6c9/0x701
    [&lt;ffffffff814cea9f&gt;] ip_local_deliver_finish+0x70/0xc4
    [&lt;ffffffff814cec20&gt;] ip_local_deliver+0x4e/0x7f
    [&lt;ffffffff814ce9f8&gt;] ip_rcv_finish+0x1fc/0x233
    [&lt;ffffffff814cee68&gt;] ip_rcv+0x217/0x267
    [&lt;ffffffff814a7bbe&gt;] __netif_receive_skb+0x49e/0x553
    [&lt;ffffffff814a7cc3&gt;] netif_receive_skb+0x50/0x82

This happens, because sk_clone_lock initializes sk_refcnt to 2, and thus
a single sock_put() is not enough to free the memory. Additionally, things
like xfrm, memcg, cookie_values,... may have been initialized.
We have to free them properly.

This is fixed by forcing a call to tcp_done(), ending up in
inet_csk_destroy_sock, doing the final sock_put(). tcp_done() is necessary,
because it ends up doing all the cleanup on xfrm, memcg, cookie_values,
xfrm,...

Before calling tcp_done, we have to set the socket to SOCK_DEAD, to
force it entering inet_csk_destroy_sock. To avoid the warning in
inet_csk_destroy_sock, inet_num has to be set to 0.
As inet_csk_destroy_sock does a dec on orphan_count, we first have to
increase it.

Calling tcp_done() allows us to remove the calls to
tcp_clear_xmit_timer() and tcp_cleanup_congestion_control().

A similar approach is taken for dccp by calling dccp_done().

This is in the kernel since 093d282321 (tproxy: fix hash locking issue
when using port redirection in __inet_inherit_port()), thus since
version &gt;= 2.6.37.

Signed-off-by: Christoph Paasch &lt;christoph.paasch@uclouvain.be&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>
If in either of the above functions inet_csk_route_child_sock() or
__inet_inherit_port() fails, the newsk will not be freed:

unreferenced object 0xffff88022e8a92c0 (size 1592):
  comm "softirq", pid 0, jiffies 4294946244 (age 726.160s)
  hex dump (first 32 bytes):
    0a 01 01 01 0a 01 01 02 00 00 00 00 a7 cc 16 00  ................
    02 00 03 01 00 00 00 00 00 00 00 00 00 00 00 00  ................
  backtrace:
    [&lt;ffffffff8153d190&gt;] kmemleak_alloc+0x21/0x3e
    [&lt;ffffffff810ab3e7&gt;] kmem_cache_alloc+0xb5/0xc5
    [&lt;ffffffff8149b65b&gt;] sk_prot_alloc.isra.53+0x2b/0xcd
    [&lt;ffffffff8149b784&gt;] sk_clone_lock+0x16/0x21e
    [&lt;ffffffff814d711a&gt;] inet_csk_clone_lock+0x10/0x7b
    [&lt;ffffffff814ebbc3&gt;] tcp_create_openreq_child+0x21/0x481
    [&lt;ffffffff814e8fa5&gt;] tcp_v4_syn_recv_sock+0x3a/0x23b
    [&lt;ffffffff814ec5ba&gt;] tcp_check_req+0x29f/0x416
    [&lt;ffffffff814e8e10&gt;] tcp_v4_do_rcv+0x161/0x2bc
    [&lt;ffffffff814eb917&gt;] tcp_v4_rcv+0x6c9/0x701
    [&lt;ffffffff814cea9f&gt;] ip_local_deliver_finish+0x70/0xc4
    [&lt;ffffffff814cec20&gt;] ip_local_deliver+0x4e/0x7f
    [&lt;ffffffff814ce9f8&gt;] ip_rcv_finish+0x1fc/0x233
    [&lt;ffffffff814cee68&gt;] ip_rcv+0x217/0x267
    [&lt;ffffffff814a7bbe&gt;] __netif_receive_skb+0x49e/0x553
    [&lt;ffffffff814a7cc3&gt;] netif_receive_skb+0x50/0x82

This happens, because sk_clone_lock initializes sk_refcnt to 2, and thus
a single sock_put() is not enough to free the memory. Additionally, things
like xfrm, memcg, cookie_values,... may have been initialized.
We have to free them properly.

This is fixed by forcing a call to tcp_done(), ending up in
inet_csk_destroy_sock, doing the final sock_put(). tcp_done() is necessary,
because it ends up doing all the cleanup on xfrm, memcg, cookie_values,
xfrm,...

Before calling tcp_done, we have to set the socket to SOCK_DEAD, to
force it entering inet_csk_destroy_sock. To avoid the warning in
inet_csk_destroy_sock, inet_num has to be set to 0.
As inet_csk_destroy_sock does a dec on orphan_count, we first have to
increase it.

Calling tcp_done() allows us to remove the calls to
tcp_clear_xmit_timer() and tcp_cleanup_congestion_control().

A similar approach is taken for dccp by calling dccp_done().

This is in the kernel since 093d282321 (tproxy: fix hash locking issue
when using port redirection in __inet_inherit_port()), thus since
version &gt;= 2.6.37.

Signed-off-by: Christoph Paasch &lt;christoph.paasch@uclouvain.be&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial</title>
<updated>2012-12-13T20:00:02+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2012-12-13T20:00:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=a2013a13e68354e0c8f3696b69701803e13fb737'/>
<id>a2013a13e68354e0c8f3696b69701803e13fb737</id>
<content type='text'>
Pull trivial branch from Jiri Kosina:
 "Usual stuff -- comment/printk typo fixes, documentation updates, dead
  code elimination."

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (39 commits)
  HOWTO: fix double words typo
  x86 mtrr: fix comment typo in mtrr_bp_init
  propagate name change to comments in kernel source
  doc: Update the name of profiling based on sysfs
  treewide: Fix typos in various drivers
  treewide: Fix typos in various Kconfig
  wireless: mwifiex: Fix typo in wireless/mwifiex driver
  messages: i2o: Fix typo in messages/i2o
  scripts/kernel-doc: check that non-void fcts describe their return value
  Kernel-doc: Convention: Use a "Return" section to describe return values
  radeon: Fix typo and copy/paste error in comments
  doc: Remove unnecessary declarations from Documentation/accounting/getdelays.c
  various: Fix spelling of "asynchronous" in comments.
  Fix misspellings of "whether" in comments.
  eisa: Fix spelling of "asynchronous".
  various: Fix spelling of "registered" in comments.
  doc: fix quite a few typos within Documentation
  target: iscsi: fix comment typos in target/iscsi drivers
  treewide: fix typo of "suport" in various comments and Kconfig
  treewide: fix typo of "suppport" in various comments
  ...
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Pull trivial branch from Jiri Kosina:
 "Usual stuff -- comment/printk typo fixes, documentation updates, dead
  code elimination."

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (39 commits)
  HOWTO: fix double words typo
  x86 mtrr: fix comment typo in mtrr_bp_init
  propagate name change to comments in kernel source
  doc: Update the name of profiling based on sysfs
  treewide: Fix typos in various drivers
  treewide: Fix typos in various Kconfig
  wireless: mwifiex: Fix typo in wireless/mwifiex driver
  messages: i2o: Fix typo in messages/i2o
  scripts/kernel-doc: check that non-void fcts describe their return value
  Kernel-doc: Convention: Use a "Return" section to describe return values
  radeon: Fix typo and copy/paste error in comments
  doc: Remove unnecessary declarations from Documentation/accounting/getdelays.c
  various: Fix spelling of "asynchronous" in comments.
  Fix misspellings of "whether" in comments.
  eisa: Fix spelling of "asynchronous".
  various: Fix spelling of "registered" in comments.
  doc: fix quite a few typos within Documentation
  target: iscsi: fix comment typos in target/iscsi drivers
  treewide: fix typo of "suport" in various comments and Kconfig
  treewide: fix typo of "suppport" in various comments
  ...
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next</title>
<updated>2012-12-13T02:07:07+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2012-12-13T02:07:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=6be35c700f742e911ecedd07fcc43d4439922334'/>
<id>6be35c700f742e911ecedd07fcc43d4439922334</id>
<content type='text'>
Pull networking changes from David Miller:

1) Allow to dump, monitor, and change the bridge multicast database
   using netlink.  From Cong Wang.

2) RFC 5961 TCP blind data injection attack mitigation, from Eric
   Dumazet.

3) Networking user namespace support from Eric W. Biederman.

4) tuntap/virtio-net multiqueue support by Jason Wang.

5) Support for checksum offload of encapsulated packets (basically,
   tunneled traffic can still be checksummed by HW).  From Joseph
   Gasparakis.

6) Allow BPF filter access to VLAN tags, from Eric Dumazet and
   Daniel Borkmann.

7) Bridge port parameters over netlink and BPDU blocking support
   from Stephen Hemminger.

8) Improve data access patterns during inet socket demux by rearranging
   socket layout, from Eric Dumazet.

9) TIPC protocol updates and cleanups from Ying Xue, Paul Gortmaker, and
   Jon Maloy.

10) Update TCP socket hash sizing to be more in line with current day
    realities.  The existing heurstics were choosen a decade ago.
    From Eric Dumazet.

11) Fix races, queue bloat, and excessive wakeups in ATM and
    associated drivers, from Krzysztof Mazur and David Woodhouse.

12) Support DOVE (Distributed Overlay Virtual Ethernet) extensions
    in VXLAN driver, from David Stevens.

13) Add "oops_only" mode to netconsole, from Amerigo Wang.

14) Support set and query of VEB/VEPA bridge mode via PF_BRIDGE, also
    allow DCB netlink to work on namespaces other than the initial
    namespace.  From John Fastabend.

15) Support PTP in the Tigon3 driver, from Matt Carlson.

16) tun/vhost zero copy fixes and improvements, plus turn it on
    by default, from Michael S. Tsirkin.

17) Support per-association statistics in SCTP, from Michele
    Baldessari.

And many, many, driver updates, cleanups, and improvements.  Too
numerous to mention individually.

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (1722 commits)
  net/mlx4_en: Add support for destination MAC in steering rules
  net/mlx4_en: Use generic etherdevice.h functions.
  net: ethtool: Add destination MAC address to flow steering API
  bridge: add support of adding and deleting mdb entries
  bridge: notify mdb changes via netlink
  ndisc: Unexport ndisc_{build,send}_skb().
  uapi: add missing netconf.h to export list
  pkt_sched: avoid requeues if possible
  solos-pci: fix double-free of TX skb in DMA mode
  bnx2: Fix accidental reversions.
  bna: Driver Version Updated to 3.1.2.1
  bna: Firmware update
  bna: Add RX State
  bna: Rx Page Based Allocation
  bna: TX Intr Coalescing Fix
  bna: Tx and Rx Optimizations
  bna: Code Cleanup and Enhancements
  ath9k: check pdata variable before dereferencing it
  ath5k: RX timestamp is reported at end of frame
  ath9k_htc: RX timestamp is reported at end of frame
  ...
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Pull networking changes from David Miller:

1) Allow to dump, monitor, and change the bridge multicast database
   using netlink.  From Cong Wang.

2) RFC 5961 TCP blind data injection attack mitigation, from Eric
   Dumazet.

3) Networking user namespace support from Eric W. Biederman.

4) tuntap/virtio-net multiqueue support by Jason Wang.

5) Support for checksum offload of encapsulated packets (basically,
   tunneled traffic can still be checksummed by HW).  From Joseph
   Gasparakis.

6) Allow BPF filter access to VLAN tags, from Eric Dumazet and
   Daniel Borkmann.

7) Bridge port parameters over netlink and BPDU blocking support
   from Stephen Hemminger.

8) Improve data access patterns during inet socket demux by rearranging
   socket layout, from Eric Dumazet.

9) TIPC protocol updates and cleanups from Ying Xue, Paul Gortmaker, and
   Jon Maloy.

10) Update TCP socket hash sizing to be more in line with current day
    realities.  The existing heurstics were choosen a decade ago.
    From Eric Dumazet.

11) Fix races, queue bloat, and excessive wakeups in ATM and
    associated drivers, from Krzysztof Mazur and David Woodhouse.

12) Support DOVE (Distributed Overlay Virtual Ethernet) extensions
    in VXLAN driver, from David Stevens.

13) Add "oops_only" mode to netconsole, from Amerigo Wang.

14) Support set and query of VEB/VEPA bridge mode via PF_BRIDGE, also
    allow DCB netlink to work on namespaces other than the initial
    namespace.  From John Fastabend.

15) Support PTP in the Tigon3 driver, from Matt Carlson.

16) tun/vhost zero copy fixes and improvements, plus turn it on
    by default, from Michael S. Tsirkin.

17) Support per-association statistics in SCTP, from Michele
    Baldessari.

And many, many, driver updates, cleanups, and improvements.  Too
numerous to mention individually.

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (1722 commits)
  net/mlx4_en: Add support for destination MAC in steering rules
  net/mlx4_en: Use generic etherdevice.h functions.
  net: ethtool: Add destination MAC address to flow steering API
  bridge: add support of adding and deleting mdb entries
  bridge: notify mdb changes via netlink
  ndisc: Unexport ndisc_{build,send}_skb().
  uapi: add missing netconf.h to export list
  pkt_sched: avoid requeues if possible
  solos-pci: fix double-free of TX skb in DMA mode
  bnx2: Fix accidental reversions.
  bna: Driver Version Updated to 3.1.2.1
  bna: Firmware update
  bna: Add RX State
  bna: Rx Page Based Allocation
  bna: TX Intr Coalescing Fix
  bna: Tx and Rx Optimizations
  bna: Code Cleanup and Enhancements
  ath9k: check pdata variable before dereferencing it
  ath5k: RX timestamp is reported at end of frame
  ath9k_htc: RX timestamp is reported at end of frame
  ...
</pre>
</div>
</content>
</entry>
<entry>
<title>net: remove obsolete simple_strto&lt;foo&gt;</title>
<updated>2012-12-10T19:09:00+00:00</updated>
<author>
<name>Abhijit Pawar</name>
<email>abhi.c.pawar@gmail.com</email>
</author>
<published>2012-12-09T23:12:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=4b5511ebc7e1cf94e4f13be19c2cf3e90edc3395'/>
<id>4b5511ebc7e1cf94e4f13be19c2cf3e90edc3395</id>
<content type='text'>
This patch replace the obsolete simple_strto&lt;foo&gt; with kstrto&lt;foo&gt;

Signed-off-by: Abhijit Pawar &lt;abhi.c.pawar@gmail.com&gt;
Acked-by: Neil Horman &lt;nhorman@tuxdriver.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>
This patch replace the obsolete simple_strto&lt;foo&gt; with kstrto&lt;foo&gt;

Signed-off-by: Abhijit Pawar &lt;abhi.c.pawar@gmail.com&gt;
Acked-by: Neil Horman &lt;nhorman@tuxdriver.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
</feed>
