<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-stable.git/net, branch v4.7.2</title>
<subtitle>Linux kernel stable tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/'/>
<entry>
<title>netlabel: add address family checks to netlbl_{sock,req}_delattr()</title>
<updated>2016-08-20T16:10:58+00:00</updated>
<author>
<name>Paul Moore</name>
<email>paul@paul-moore.com</email>
</author>
<published>2016-06-06T19:17:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=6520eadab50ec5def9a41c3ae11598ff16485f93'/>
<id>6520eadab50ec5def9a41c3ae11598ff16485f93</id>
<content type='text'>
commit 0e0e36774081534783aa8eeb9f6fbddf98d3c061 upstream.

It seems risky to always rely on the caller to ensure the socket's
address family is correct before passing it to the NetLabel kAPI,
especially since we see at least one LSM which didn't. Add address
family checks to the *_delattr() functions to help prevent future
problems.

Reported-by: Maninder Singh &lt;maninder1.s@samsung.com&gt;
Signed-off-by: Paul Moore &lt;paul@paul-moore.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

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

It seems risky to always rely on the caller to ensure the socket's
address family is correct before passing it to the NetLabel kAPI,
especially since we see at least one LSM which didn't. Add address
family checks to the *_delattr() functions to help prevent future
problems.

Reported-by: Maninder Singh &lt;maninder1.s@samsung.com&gt;
Signed-off-by: Paul Moore &lt;paul@paul-moore.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>Bluetooth: Fix l2cap_sock_setsockopt() with optname BT_RCVMTU</title>
<updated>2016-08-20T16:10:54+00:00</updated>
<author>
<name>Amadeusz Sławiński</name>
<email>amadeusz.slawinski@tieto.com</email>
</author>
<published>2016-07-14T08:50:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=34fc69f9aa9893b98b129d6a7ac12a667a430bd4'/>
<id>34fc69f9aa9893b98b129d6a7ac12a667a430bd4</id>
<content type='text'>
commit 23bc6ab0a0912146fd674a0becc758c3162baabc upstream.

When we retrieve imtu value from userspace we should use 16 bit pointer
cast instead of 32 as it's defined that way in headers. Fixes setsockopt
calls on big-endian platforms.

Signed-off-by: Amadeusz Sławiński &lt;amadeusz.slawinski@tieto.com&gt;
Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

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

When we retrieve imtu value from userspace we should use 16 bit pointer
cast instead of 32 as it's defined that way in headers. Fixes setsockopt
calls on big-endian platforms.

Signed-off-by: Amadeusz Sławiński &lt;amadeusz.slawinski@tieto.com&gt;
Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>tcp: consider recv buf for the initial window scale</title>
<updated>2016-08-16T07:34:58+00:00</updated>
<author>
<name>Soheil Hassas Yeganeh</name>
<email>soheil@google.com</email>
</author>
<published>2016-07-29T13:34:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=89c2f98f31c17a81ed736b101e10b2472777e307'/>
<id>89c2f98f31c17a81ed736b101e10b2472777e307</id>
<content type='text'>
[ Upstream commit f626300a3e776ccc9671b0dd94698fb3aa315966 ]

tcp_select_initial_window() intends to advertise a window
scaling for the maximum possible window size. To do so,
it considers the maximum of net.ipv4.tcp_rmem[2] and
net.core.rmem_max as the only possible upper-bounds.
However, users with CAP_NET_ADMIN can use SO_RCVBUFFORCE
to set the socket's receive buffer size to values
larger than net.ipv4.tcp_rmem[2] and net.core.rmem_max.
Thus, SO_RCVBUFFORCE is effectively ignored by
tcp_select_initial_window().

To fix this, consider the maximum of net.ipv4.tcp_rmem[2],
net.core.rmem_max and socket's initial buffer space.

Fixes: b0573dea1fb3 ("[NET]: Introduce SO_{SND,RCV}BUFFORCE socket options")
Signed-off-by: Soheil Hassas Yeganeh &lt;soheil@google.com&gt;
Suggested-by: Neal Cardwell &lt;ncardwell@google.com&gt;
Acked-by: Neal Cardwell &lt;ncardwell@google.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[ Upstream commit f626300a3e776ccc9671b0dd94698fb3aa315966 ]

tcp_select_initial_window() intends to advertise a window
scaling for the maximum possible window size. To do so,
it considers the maximum of net.ipv4.tcp_rmem[2] and
net.core.rmem_max as the only possible upper-bounds.
However, users with CAP_NET_ADMIN can use SO_RCVBUFFORCE
to set the socket's receive buffer size to values
larger than net.ipv4.tcp_rmem[2] and net.core.rmem_max.
Thus, SO_RCVBUFFORCE is effectively ignored by
tcp_select_initial_window().

To fix this, consider the maximum of net.ipv4.tcp_rmem[2],
net.core.rmem_max and socket's initial buffer space.

Fixes: b0573dea1fb3 ("[NET]: Introduce SO_{SND,RCV}BUFFORCE socket options")
Signed-off-by: Soheil Hassas Yeganeh &lt;soheil@google.com&gt;
Suggested-by: Neal Cardwell &lt;ncardwell@google.com&gt;
Acked-by: Neal Cardwell &lt;ncardwell@google.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net/sctp: terminate rhashtable walk correctly</title>
<updated>2016-08-16T07:34:58+00:00</updated>
<author>
<name>Vegard Nossum</name>
<email>vegard.nossum@oracle.com</email>
</author>
<published>2016-07-23T07:42:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=77719251041381423bf6fb4ae9d529e2a42adb55'/>
<id>77719251041381423bf6fb4ae9d529e2a42adb55</id>
<content type='text'>
[ Upstream commit 5fc382d87517707ad77ea4c9c12e2a3fde2c838a ]

I was seeing a lot of these:

    BUG: sleeping function called from invalid context at mm/slab.h:388
    in_atomic(): 0, irqs_disabled(): 0, pid: 14971, name: trinity-c2
    Preemption disabled at:[&lt;ffffffff819bcd46&gt;] rhashtable_walk_start+0x46/0x150

     [&lt;ffffffff81149abb&gt;] preempt_count_add+0x1fb/0x280
     [&lt;ffffffff83295722&gt;] _raw_spin_lock+0x12/0x40
     [&lt;ffffffff811aac87&gt;] console_unlock+0x2f7/0x930
     [&lt;ffffffff811ab5bb&gt;] vprintk_emit+0x2fb/0x520
     [&lt;ffffffff811aba6a&gt;] vprintk_default+0x1a/0x20
     [&lt;ffffffff812c171a&gt;] printk+0x94/0xb0
     [&lt;ffffffff811d6ed0&gt;] print_stack_trace+0xe0/0x170
     [&lt;ffffffff8115835e&gt;] ___might_sleep+0x3be/0x460
     [&lt;ffffffff81158490&gt;] __might_sleep+0x90/0x1a0
     [&lt;ffffffff8139b823&gt;] kmem_cache_alloc+0x153/0x1e0
     [&lt;ffffffff819bca1e&gt;] rhashtable_walk_init+0xfe/0x2d0
     [&lt;ffffffff82ec64de&gt;] sctp_transport_walk_start+0x1e/0x60
     [&lt;ffffffff82edd8ad&gt;] sctp_transport_seq_start+0x4d/0x150
     [&lt;ffffffff8143a82b&gt;] seq_read+0x27b/0x1180
     [&lt;ffffffff814f97fc&gt;] proc_reg_read+0xbc/0x180
     [&lt;ffffffff813d471b&gt;] __vfs_read+0xdb/0x610
     [&lt;ffffffff813d4d3a&gt;] vfs_read+0xea/0x2d0
     [&lt;ffffffff813d615b&gt;] SyS_pread64+0x11b/0x150
     [&lt;ffffffff8100334c&gt;] do_syscall_64+0x19c/0x410
     [&lt;ffffffff832960a5&gt;] return_from_SYSCALL_64+0x0/0x6a
     [&lt;ffffffffffffffff&gt;] 0xffffffffffffffff

Apparently we always need to call rhashtable_walk_stop(), even when
rhashtable_walk_start() fails:

 * rhashtable_walk_start - Start a hash table walk
 * @iter:       Hash table iterator
 *
 * Start a hash table walk.  Note that we take the RCU lock in all
 * cases including when we return an error.  So you must always call
 * rhashtable_walk_stop to clean up.

otherwise we never call rcu_read_unlock() and we get the splat above.

Fixes: 53fa1036 ("sctp: fix some rhashtable functions using in sctp proc/diag")
See-also: 53fa1036 ("sctp: fix some rhashtable functions using in sctp proc/diag")
See-also: f2dba9c6 ("rhashtable: Introduce rhashtable_walk_*")
Cc: Xin Long &lt;lucien.xin@gmail.com&gt;
Cc: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
Cc: stable@vger.kernel.org
Signed-off-by: Vegard Nossum &lt;vegard.nossum@oracle.com&gt;
Acked-by: Marcelo Ricardo Leitner &lt;marcelo.leitner@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[ Upstream commit 5fc382d87517707ad77ea4c9c12e2a3fde2c838a ]

I was seeing a lot of these:

    BUG: sleeping function called from invalid context at mm/slab.h:388
    in_atomic(): 0, irqs_disabled(): 0, pid: 14971, name: trinity-c2
    Preemption disabled at:[&lt;ffffffff819bcd46&gt;] rhashtable_walk_start+0x46/0x150

     [&lt;ffffffff81149abb&gt;] preempt_count_add+0x1fb/0x280
     [&lt;ffffffff83295722&gt;] _raw_spin_lock+0x12/0x40
     [&lt;ffffffff811aac87&gt;] console_unlock+0x2f7/0x930
     [&lt;ffffffff811ab5bb&gt;] vprintk_emit+0x2fb/0x520
     [&lt;ffffffff811aba6a&gt;] vprintk_default+0x1a/0x20
     [&lt;ffffffff812c171a&gt;] printk+0x94/0xb0
     [&lt;ffffffff811d6ed0&gt;] print_stack_trace+0xe0/0x170
     [&lt;ffffffff8115835e&gt;] ___might_sleep+0x3be/0x460
     [&lt;ffffffff81158490&gt;] __might_sleep+0x90/0x1a0
     [&lt;ffffffff8139b823&gt;] kmem_cache_alloc+0x153/0x1e0
     [&lt;ffffffff819bca1e&gt;] rhashtable_walk_init+0xfe/0x2d0
     [&lt;ffffffff82ec64de&gt;] sctp_transport_walk_start+0x1e/0x60
     [&lt;ffffffff82edd8ad&gt;] sctp_transport_seq_start+0x4d/0x150
     [&lt;ffffffff8143a82b&gt;] seq_read+0x27b/0x1180
     [&lt;ffffffff814f97fc&gt;] proc_reg_read+0xbc/0x180
     [&lt;ffffffff813d471b&gt;] __vfs_read+0xdb/0x610
     [&lt;ffffffff813d4d3a&gt;] vfs_read+0xea/0x2d0
     [&lt;ffffffff813d615b&gt;] SyS_pread64+0x11b/0x150
     [&lt;ffffffff8100334c&gt;] do_syscall_64+0x19c/0x410
     [&lt;ffffffff832960a5&gt;] return_from_SYSCALL_64+0x0/0x6a
     [&lt;ffffffffffffffff&gt;] 0xffffffffffffffff

Apparently we always need to call rhashtable_walk_stop(), even when
rhashtable_walk_start() fails:

 * rhashtable_walk_start - Start a hash table walk
 * @iter:       Hash table iterator
 *
 * Start a hash table walk.  Note that we take the RCU lock in all
 * cases including when we return an error.  So you must always call
 * rhashtable_walk_stop to clean up.

otherwise we never call rcu_read_unlock() and we get the splat above.

Fixes: 53fa1036 ("sctp: fix some rhashtable functions using in sctp proc/diag")
See-also: 53fa1036 ("sctp: fix some rhashtable functions using in sctp proc/diag")
See-also: f2dba9c6 ("rhashtable: Introduce rhashtable_walk_*")
Cc: Xin Long &lt;lucien.xin@gmail.com&gt;
Cc: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
Cc: stable@vger.kernel.org
Signed-off-by: Vegard Nossum &lt;vegard.nossum@oracle.com&gt;
Acked-by: Marcelo Ricardo Leitner &lt;marcelo.leitner@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net/irda: fix NULL pointer dereference on memory allocation failure</title>
<updated>2016-08-16T07:34:58+00:00</updated>
<author>
<name>Vegard Nossum</name>
<email>vegard.nossum@oracle.com</email>
</author>
<published>2016-07-23T05:43:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=e8f7ce7bc0ba489d18955796fb5b31291a345b65'/>
<id>e8f7ce7bc0ba489d18955796fb5b31291a345b65</id>
<content type='text'>
[ Upstream commit d3e6952cfb7ba5f4bfa29d4803ba91f96ce1204d ]

I ran into this:

    kasan: CONFIG_KASAN_INLINE enabled
    kasan: GPF could be caused by NULL-ptr deref or user memory access
    general protection fault: 0000 [#1] PREEMPT SMP KASAN
    CPU: 2 PID: 2012 Comm: trinity-c3 Not tainted 4.7.0-rc7+ #19
    Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Ubuntu-1.8.2-1ubuntu1 04/01/2014
    task: ffff8800b745f2c0 ti: ffff880111740000 task.ti: ffff880111740000
    RIP: 0010:[&lt;ffffffff82bbf066&gt;]  [&lt;ffffffff82bbf066&gt;] irttp_connect_request+0x36/0x710
    RSP: 0018:ffff880111747bb8  EFLAGS: 00010286
    RAX: dffffc0000000000 RBX: 0000000000000000 RCX: 0000000069dd8358
    RDX: 0000000000000009 RSI: 0000000000000027 RDI: 0000000000000048
    RBP: ffff880111747c00 R08: 0000000000000000 R09: 0000000000000000
    R10: 0000000069dd8358 R11: 1ffffffff0759723 R12: 0000000000000000
    R13: ffff88011a7e4780 R14: 0000000000000027 R15: 0000000000000000
    FS:  00007fc738404700(0000) GS:ffff88011af00000(0000) knlGS:0000000000000000
    CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
    CR2: 00007fc737fdfb10 CR3: 0000000118087000 CR4: 00000000000006e0
    Stack:
     0000000000000200 ffff880111747bd8 ffffffff810ee611 ffff880119f1f220
     ffff880119f1f4f8 ffff880119f1f4f0 ffff88011a7e4780 ffff880119f1f232
     ffff880119f1f220 ffff880111747d58 ffffffff82bca542 0000000000000000
    Call Trace:
     [&lt;ffffffff82bca542&gt;] irda_connect+0x562/0x1190
     [&lt;ffffffff825ae582&gt;] SYSC_connect+0x202/0x2a0
     [&lt;ffffffff825b4489&gt;] SyS_connect+0x9/0x10
     [&lt;ffffffff8100334c&gt;] do_syscall_64+0x19c/0x410
     [&lt;ffffffff83295ca5&gt;] entry_SYSCALL64_slow_path+0x25/0x25
    Code: 41 89 ca 48 89 e5 41 57 41 56 41 55 41 54 41 89 d7 53 48 89 fb 48 83 c7 48 48 89 fa 41 89 f6 48 c1 ea 03 48 83 ec 20 4c 8b 65 10 &lt;0f&gt; b6 04 02 84 c0 74 08 84 c0 0f 8e 4c 04 00 00 80 7b 48 00 74
    RIP  [&lt;ffffffff82bbf066&gt;] irttp_connect_request+0x36/0x710
     RSP &lt;ffff880111747bb8&gt;
    ---[ end trace 4cda2588bc055b30 ]---

The problem is that irda_open_tsap() can fail and leave self-&gt;tsap = NULL,
and then irttp_connect_request() almost immediately dereferences it.

Cc: stable@vger.kernel.org
Signed-off-by: Vegard Nossum &lt;vegard.nossum@oracle.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[ Upstream commit d3e6952cfb7ba5f4bfa29d4803ba91f96ce1204d ]

I ran into this:

    kasan: CONFIG_KASAN_INLINE enabled
    kasan: GPF could be caused by NULL-ptr deref or user memory access
    general protection fault: 0000 [#1] PREEMPT SMP KASAN
    CPU: 2 PID: 2012 Comm: trinity-c3 Not tainted 4.7.0-rc7+ #19
    Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Ubuntu-1.8.2-1ubuntu1 04/01/2014
    task: ffff8800b745f2c0 ti: ffff880111740000 task.ti: ffff880111740000
    RIP: 0010:[&lt;ffffffff82bbf066&gt;]  [&lt;ffffffff82bbf066&gt;] irttp_connect_request+0x36/0x710
    RSP: 0018:ffff880111747bb8  EFLAGS: 00010286
    RAX: dffffc0000000000 RBX: 0000000000000000 RCX: 0000000069dd8358
    RDX: 0000000000000009 RSI: 0000000000000027 RDI: 0000000000000048
    RBP: ffff880111747c00 R08: 0000000000000000 R09: 0000000000000000
    R10: 0000000069dd8358 R11: 1ffffffff0759723 R12: 0000000000000000
    R13: ffff88011a7e4780 R14: 0000000000000027 R15: 0000000000000000
    FS:  00007fc738404700(0000) GS:ffff88011af00000(0000) knlGS:0000000000000000
    CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
    CR2: 00007fc737fdfb10 CR3: 0000000118087000 CR4: 00000000000006e0
    Stack:
     0000000000000200 ffff880111747bd8 ffffffff810ee611 ffff880119f1f220
     ffff880119f1f4f8 ffff880119f1f4f0 ffff88011a7e4780 ffff880119f1f232
     ffff880119f1f220 ffff880111747d58 ffffffff82bca542 0000000000000000
    Call Trace:
     [&lt;ffffffff82bca542&gt;] irda_connect+0x562/0x1190
     [&lt;ffffffff825ae582&gt;] SYSC_connect+0x202/0x2a0
     [&lt;ffffffff825b4489&gt;] SyS_connect+0x9/0x10
     [&lt;ffffffff8100334c&gt;] do_syscall_64+0x19c/0x410
     [&lt;ffffffff83295ca5&gt;] entry_SYSCALL64_slow_path+0x25/0x25
    Code: 41 89 ca 48 89 e5 41 57 41 56 41 55 41 54 41 89 d7 53 48 89 fb 48 83 c7 48 48 89 fa 41 89 f6 48 c1 ea 03 48 83 ec 20 4c 8b 65 10 &lt;0f&gt; b6 04 02 84 c0 74 08 84 c0 0f 8e 4c 04 00 00 80 7b 48 00 74
    RIP  [&lt;ffffffff82bbf066&gt;] irttp_connect_request+0x36/0x710
     RSP &lt;ffff880111747bb8&gt;
    ---[ end trace 4cda2588bc055b30 ]---

The problem is that irda_open_tsap() can fail and leave self-&gt;tsap = NULL,
and then irttp_connect_request() almost immediately dereferences it.

Cc: stable@vger.kernel.org
Signed-off-by: Vegard Nossum &lt;vegard.nossum@oracle.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>sctp: fix BH handling on socket backlog</title>
<updated>2016-08-16T07:34:58+00:00</updated>
<author>
<name>Marcelo Ricardo Leitner</name>
<email>marcelo.leitner@gmail.com</email>
</author>
<published>2016-07-23T03:32:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=2f9abe462b23e1f78cc55de4d92de58a63c9b710'/>
<id>2f9abe462b23e1f78cc55de4d92de58a63c9b710</id>
<content type='text'>
[ Upstream commit eefc1b1d105ee4d2ce907833ce675f1e9599b5e3 ]

Now that the backlog processing is called with BH enabled, we have to
disable BH before taking the socket lock via bh_lock_sock() otherwise
it may dead lock:

sctp_backlog_rcv()
                bh_lock_sock(sk);

                if (sock_owned_by_user(sk)) {
                        if (sk_add_backlog(sk, skb, sk-&gt;sk_rcvbuf))
                                sctp_chunk_free(chunk);
                        else
                                backloged = 1;
                } else
                        sctp_inq_push(inqueue, chunk);

                bh_unlock_sock(sk);

while sctp_inq_push() was disabling/enabling BH, but enabling BH
triggers pending softirq, which then may try to re-lock the socket in
sctp_rcv().

[  219.187215]  &lt;IRQ&gt;
[  219.187217]  [&lt;ffffffff817ca3e0&gt;] _raw_spin_lock+0x20/0x30
[  219.187223]  [&lt;ffffffffa041888c&gt;] sctp_rcv+0x48c/0xba0 [sctp]
[  219.187225]  [&lt;ffffffff816e7db2&gt;] ? nf_iterate+0x62/0x80
[  219.187226]  [&lt;ffffffff816f1b14&gt;] ip_local_deliver_finish+0x94/0x1e0
[  219.187228]  [&lt;ffffffff816f1e1f&gt;] ip_local_deliver+0x6f/0xf0
[  219.187229]  [&lt;ffffffff816f1a80&gt;] ? ip_rcv_finish+0x3b0/0x3b0
[  219.187230]  [&lt;ffffffff816f17a8&gt;] ip_rcv_finish+0xd8/0x3b0
[  219.187232]  [&lt;ffffffff816f2122&gt;] ip_rcv+0x282/0x3a0
[  219.187233]  [&lt;ffffffff810d8bb6&gt;] ? update_curr+0x66/0x180
[  219.187235]  [&lt;ffffffff816abac4&gt;] __netif_receive_skb_core+0x524/0xa90
[  219.187236]  [&lt;ffffffff810d8e00&gt;] ? update_cfs_shares+0x30/0xf0
[  219.187237]  [&lt;ffffffff810d557c&gt;] ? __enqueue_entity+0x6c/0x70
[  219.187239]  [&lt;ffffffff810dc454&gt;] ? enqueue_entity+0x204/0xdf0
[  219.187240]  [&lt;ffffffff816ac048&gt;] __netif_receive_skb+0x18/0x60
[  219.187242]  [&lt;ffffffff816ad1ce&gt;] process_backlog+0x9e/0x140
[  219.187243]  [&lt;ffffffff816ac8ec&gt;] net_rx_action+0x22c/0x370
[  219.187245]  [&lt;ffffffff817cd352&gt;] __do_softirq+0x112/0x2e7
[  219.187247]  [&lt;ffffffff817cc3bc&gt;] do_softirq_own_stack+0x1c/0x30
[  219.187247]  &lt;EOI&gt;
[  219.187248]  [&lt;ffffffff810aa1c8&gt;] do_softirq.part.14+0x38/0x40
[  219.187249]  [&lt;ffffffff810aa24d&gt;] __local_bh_enable_ip+0x7d/0x80
[  219.187254]  [&lt;ffffffffa0408428&gt;] sctp_inq_push+0x68/0x80 [sctp]
[  219.187258]  [&lt;ffffffffa04190f1&gt;] sctp_backlog_rcv+0x151/0x1c0 [sctp]
[  219.187260]  [&lt;ffffffff81692b07&gt;] __release_sock+0x87/0xf0
[  219.187261]  [&lt;ffffffff81692ba0&gt;] release_sock+0x30/0xa0
[  219.187265]  [&lt;ffffffffa040e46d&gt;] sctp_accept+0x17d/0x210 [sctp]
[  219.187266]  [&lt;ffffffff810e7510&gt;] ? prepare_to_wait_event+0xf0/0xf0
[  219.187268]  [&lt;ffffffff8172d52c&gt;] inet_accept+0x3c/0x130
[  219.187269]  [&lt;ffffffff8168d7a3&gt;] SYSC_accept4+0x103/0x210
[  219.187271]  [&lt;ffffffff817ca2ba&gt;] ? _raw_spin_unlock_bh+0x1a/0x20
[  219.187272]  [&lt;ffffffff81692bfc&gt;] ? release_sock+0x8c/0xa0
[  219.187276]  [&lt;ffffffffa0413e22&gt;] ? sctp_inet_listen+0x62/0x1b0 [sctp]
[  219.187277]  [&lt;ffffffff8168f2d0&gt;] SyS_accept+0x10/0x20

Fixes: 860fbbc343bf ("sctp: prepare for socket backlog behavior change")
Cc: Eric Dumazet &lt;eric.dumazet@gmail.com&gt;
Signed-off-by: Marcelo Ricardo Leitner &lt;marcelo.leitner@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[ Upstream commit eefc1b1d105ee4d2ce907833ce675f1e9599b5e3 ]

Now that the backlog processing is called with BH enabled, we have to
disable BH before taking the socket lock via bh_lock_sock() otherwise
it may dead lock:

sctp_backlog_rcv()
                bh_lock_sock(sk);

                if (sock_owned_by_user(sk)) {
                        if (sk_add_backlog(sk, skb, sk-&gt;sk_rcvbuf))
                                sctp_chunk_free(chunk);
                        else
                                backloged = 1;
                } else
                        sctp_inq_push(inqueue, chunk);

                bh_unlock_sock(sk);

while sctp_inq_push() was disabling/enabling BH, but enabling BH
triggers pending softirq, which then may try to re-lock the socket in
sctp_rcv().

[  219.187215]  &lt;IRQ&gt;
[  219.187217]  [&lt;ffffffff817ca3e0&gt;] _raw_spin_lock+0x20/0x30
[  219.187223]  [&lt;ffffffffa041888c&gt;] sctp_rcv+0x48c/0xba0 [sctp]
[  219.187225]  [&lt;ffffffff816e7db2&gt;] ? nf_iterate+0x62/0x80
[  219.187226]  [&lt;ffffffff816f1b14&gt;] ip_local_deliver_finish+0x94/0x1e0
[  219.187228]  [&lt;ffffffff816f1e1f&gt;] ip_local_deliver+0x6f/0xf0
[  219.187229]  [&lt;ffffffff816f1a80&gt;] ? ip_rcv_finish+0x3b0/0x3b0
[  219.187230]  [&lt;ffffffff816f17a8&gt;] ip_rcv_finish+0xd8/0x3b0
[  219.187232]  [&lt;ffffffff816f2122&gt;] ip_rcv+0x282/0x3a0
[  219.187233]  [&lt;ffffffff810d8bb6&gt;] ? update_curr+0x66/0x180
[  219.187235]  [&lt;ffffffff816abac4&gt;] __netif_receive_skb_core+0x524/0xa90
[  219.187236]  [&lt;ffffffff810d8e00&gt;] ? update_cfs_shares+0x30/0xf0
[  219.187237]  [&lt;ffffffff810d557c&gt;] ? __enqueue_entity+0x6c/0x70
[  219.187239]  [&lt;ffffffff810dc454&gt;] ? enqueue_entity+0x204/0xdf0
[  219.187240]  [&lt;ffffffff816ac048&gt;] __netif_receive_skb+0x18/0x60
[  219.187242]  [&lt;ffffffff816ad1ce&gt;] process_backlog+0x9e/0x140
[  219.187243]  [&lt;ffffffff816ac8ec&gt;] net_rx_action+0x22c/0x370
[  219.187245]  [&lt;ffffffff817cd352&gt;] __do_softirq+0x112/0x2e7
[  219.187247]  [&lt;ffffffff817cc3bc&gt;] do_softirq_own_stack+0x1c/0x30
[  219.187247]  &lt;EOI&gt;
[  219.187248]  [&lt;ffffffff810aa1c8&gt;] do_softirq.part.14+0x38/0x40
[  219.187249]  [&lt;ffffffff810aa24d&gt;] __local_bh_enable_ip+0x7d/0x80
[  219.187254]  [&lt;ffffffffa0408428&gt;] sctp_inq_push+0x68/0x80 [sctp]
[  219.187258]  [&lt;ffffffffa04190f1&gt;] sctp_backlog_rcv+0x151/0x1c0 [sctp]
[  219.187260]  [&lt;ffffffff81692b07&gt;] __release_sock+0x87/0xf0
[  219.187261]  [&lt;ffffffff81692ba0&gt;] release_sock+0x30/0xa0
[  219.187265]  [&lt;ffffffffa040e46d&gt;] sctp_accept+0x17d/0x210 [sctp]
[  219.187266]  [&lt;ffffffff810e7510&gt;] ? prepare_to_wait_event+0xf0/0xf0
[  219.187268]  [&lt;ffffffff8172d52c&gt;] inet_accept+0x3c/0x130
[  219.187269]  [&lt;ffffffff8168d7a3&gt;] SYSC_accept4+0x103/0x210
[  219.187271]  [&lt;ffffffff817ca2ba&gt;] ? _raw_spin_unlock_bh+0x1a/0x20
[  219.187272]  [&lt;ffffffff81692bfc&gt;] ? release_sock+0x8c/0xa0
[  219.187276]  [&lt;ffffffffa0413e22&gt;] ? sctp_inet_listen+0x62/0x1b0 [sctp]
[  219.187277]  [&lt;ffffffff8168f2d0&gt;] SyS_accept+0x10/0x20

Fixes: 860fbbc343bf ("sctp: prepare for socket backlog behavior change")
Cc: Eric Dumazet &lt;eric.dumazet@gmail.com&gt;
Signed-off-by: Marcelo Ricardo Leitner &lt;marcelo.leitner@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: ipv6: Always leave anycast and multicast groups on link down</title>
<updated>2016-08-16T07:34:58+00:00</updated>
<author>
<name>Mike Manning</name>
<email>mmanning@brocade.com</email>
</author>
<published>2016-07-22T17:32:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=201e07fe162762ac07cf074aa8b0cfdfe665eda9'/>
<id>201e07fe162762ac07cf074aa8b0cfdfe665eda9</id>
<content type='text'>
[ Upstream commit ea06f7176413e2538d13bb85b65387d0917943d9 ]

Default kernel behavior is to delete IPv6 addresses on link
down, which entails deletion of the multicast and the
subnet-router anycast addresses. These deletions do not
happen with sysctl setting to keep global IPv6 addresses on
link down, so every link down/up causes an increment of the
anycast and multicast refcounts. These bogus refcounts may
stop these addrs from being removed on subsequent calls to
delete them. The solution is to leave the groups for the
multicast and subnet anycast on link down for the callflow
when global IPv6 addresses are kept.

Fixes: f1705ec197e7 ("net: ipv6: Make address flushing on ifdown optional")
Signed-off-by: Mike Manning &lt;mmanning@brocade.com&gt;
Acked-by: David Ahern &lt;dsa@cumulusnetworks.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[ Upstream commit ea06f7176413e2538d13bb85b65387d0917943d9 ]

Default kernel behavior is to delete IPv6 addresses on link
down, which entails deletion of the multicast and the
subnet-router anycast addresses. These deletions do not
happen with sysctl setting to keep global IPv6 addresses on
link down, so every link down/up causes an increment of the
anycast and multicast refcounts. These bogus refcounts may
stop these addrs from being removed on subsequent calls to
delete them. The solution is to leave the groups for the
multicast and subnet anycast on link down for the callflow
when global IPv6 addresses are kept.

Fixes: f1705ec197e7 ("net: ipv6: Make address flushing on ifdown optional")
Signed-off-by: Mike Manning &lt;mmanning@brocade.com&gt;
Acked-by: David Ahern &lt;dsa@cumulusnetworks.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>bridge: Fix incorrect re-injection of LLDP packets</title>
<updated>2016-08-16T07:34:57+00:00</updated>
<author>
<name>Ido Schimmel</name>
<email>idosch@mellanox.com</email>
</author>
<published>2016-07-22T11:56:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=5986b7b7284dbb5a3ea117c36608b19504b862a5'/>
<id>5986b7b7284dbb5a3ea117c36608b19504b862a5</id>
<content type='text'>
[ Upstream commit baedbe55884c003819f5c8c063ec3d2569414296 ]

Commit 8626c56c8279 ("bridge: fix potential use-after-free when hook
returns QUEUE or STOLEN verdict") caused LLDP packets arriving through a
bridge port to be re-injected to the Rx path with skb-&gt;dev set to the
bridge device, but this breaks the lldpad daemon.

The lldpad daemon opens a packet socket with protocol set to ETH_P_LLDP
for any valid device on the system, which doesn't not include soft
devices such as bridge and VLAN.

Since packet sockets (ptype_base) are processed in the Rx path after the
Rx handler, LLDP packets with skb-&gt;dev set to the bridge device never
reach the lldpad daemon.

Fix this by making the bridge's Rx handler re-inject LLDP packets with
RX_HANDLER_PASS, which effectively restores the behaviour prior to the
mentioned commit.

This means netfilter will never receive LLDP packets coming through a
bridge port, as I don't see a way in which we can have okfn() consume
the packet without breaking existing behaviour. I've already carried out
a similar fix for STP packets in commit 56fae404fb2c ("bridge: Fix
incorrect re-injection of STP packets").

Fixes: 8626c56c8279 ("bridge: fix potential use-after-free when hook returns QUEUE or STOLEN verdict")
Signed-off-by: Ido Schimmel &lt;idosch@mellanox.com&gt;
Reviewed-by: Jiri Pirko &lt;jiri@mellanox.com&gt;
Cc: Florian Westphal &lt;fw@strlen.de&gt;
Cc: John Fastabend &lt;john.fastabend@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[ Upstream commit baedbe55884c003819f5c8c063ec3d2569414296 ]

Commit 8626c56c8279 ("bridge: fix potential use-after-free when hook
returns QUEUE or STOLEN verdict") caused LLDP packets arriving through a
bridge port to be re-injected to the Rx path with skb-&gt;dev set to the
bridge device, but this breaks the lldpad daemon.

The lldpad daemon opens a packet socket with protocol set to ETH_P_LLDP
for any valid device on the system, which doesn't not include soft
devices such as bridge and VLAN.

Since packet sockets (ptype_base) are processed in the Rx path after the
Rx handler, LLDP packets with skb-&gt;dev set to the bridge device never
reach the lldpad daemon.

Fix this by making the bridge's Rx handler re-inject LLDP packets with
RX_HANDLER_PASS, which effectively restores the behaviour prior to the
mentioned commit.

This means netfilter will never receive LLDP packets coming through a
bridge port, as I don't see a way in which we can have okfn() consume
the packet without breaking existing behaviour. I've already carried out
a similar fix for STP packets in commit 56fae404fb2c ("bridge: Fix
incorrect re-injection of STP packets").

Fixes: 8626c56c8279 ("bridge: fix potential use-after-free when hook returns QUEUE or STOLEN verdict")
Signed-off-by: Ido Schimmel &lt;idosch@mellanox.com&gt;
Reviewed-by: Jiri Pirko &lt;jiri@mellanox.com&gt;
Cc: Florian Westphal &lt;fw@strlen.de&gt;
Cc: John Fastabend &lt;john.fastabend@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>udp: use sk_filter_trim_cap for udp{,6}_queue_rcv_skb</title>
<updated>2016-08-16T07:34:57+00:00</updated>
<author>
<name>Daniel Borkmann</name>
<email>daniel@iogearbox.net</email>
</author>
<published>2016-07-25T16:06:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=ec3bdcb8073254fe4ef98aa55ff61c788e1ebaa3'/>
<id>ec3bdcb8073254fe4ef98aa55ff61c788e1ebaa3</id>
<content type='text'>
[ Upstream commit ba66bbe5480a012108958a71cff88b23dce84956 ]

After a612769774a3 ("udp: prevent bugcheck if filter truncates packet
too much"), there followed various other fixes for similar cases such
as f4979fcea7fd ("rose: limit sk_filter trim to payload").

Latter introduced a new helper sk_filter_trim_cap(), where we can pass
the trim limit directly to the socket filter handling. Make use of it
here as well with sizeof(struct udphdr) as lower cap limit and drop the
extra skb-&gt;len test in UDP's input path.

Signed-off-by: Daniel Borkmann &lt;daniel@iogearbox.net&gt;
Cc: Willem de Bruijn &lt;willemb@google.com&gt;
Acked-by: Willem de Bruijn &lt;willemb@google.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[ Upstream commit ba66bbe5480a012108958a71cff88b23dce84956 ]

After a612769774a3 ("udp: prevent bugcheck if filter truncates packet
too much"), there followed various other fixes for similar cases such
as f4979fcea7fd ("rose: limit sk_filter trim to payload").

Latter introduced a new helper sk_filter_trim_cap(), where we can pass
the trim limit directly to the socket filter handling. Make use of it
here as well with sizeof(struct udphdr) as lower cap limit and drop the
extra skb-&gt;len test in UDP's input path.

Signed-off-by: Daniel Borkmann &lt;daniel@iogearbox.net&gt;
Cc: Willem de Bruijn &lt;willemb@google.com&gt;
Acked-by: Willem de Bruijn &lt;willemb@google.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge tag 'ceph-for-4.7-rc8' of git://github.com/ceph/ceph-client</title>
<updated>2016-07-24T01:00:31+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2016-07-24T01:00:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=68093c43f352e4ad36cf1324bbdbd7c723a24dbc'/>
<id>68093c43f352e4ad36cf1324bbdbd7c723a24dbc</id>
<content type='text'>
Pull ceph fix from Ilya Dryomov:
 "A fix for a long-standing bug in the incremental osdmap handling code
  that caused misdirected requests, tagged for stable"

  The tag is signed with a brand new key - Sage is on vacation and I
  didn't anticipate this"

* tag 'ceph-for-4.7-rc8' of git://github.com/ceph/ceph-client:
  libceph: apply new_state before new_up_client on incrementals
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Pull ceph fix from Ilya Dryomov:
 "A fix for a long-standing bug in the incremental osdmap handling code
  that caused misdirected requests, tagged for stable"

  The tag is signed with a brand new key - Sage is on vacation and I
  didn't anticipate this"

* tag 'ceph-for-4.7-rc8' of git://github.com/ceph/ceph-client:
  libceph: apply new_state before new_up_client on incrementals
</pre>
</div>
</content>
</entry>
</feed>
