<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux.git/net, branch v4.9-rc8</title>
<subtitle>Linux kernel source tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/'/>
<entry>
<title>net: avoid signed overflows for SO_{SND|RCV}BUFFORCE</title>
<updated>2016-12-02T19:10:14+00:00</updated>
<author>
<name>Eric Dumazet</name>
<email>edumazet@google.com</email>
</author>
<published>2016-12-02T17:44:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=b98b0bc8c431e3ceb4b26b0dfc8db509518fb290'/>
<id>b98b0bc8c431e3ceb4b26b0dfc8db509518fb290</id>
<content type='text'>
CAP_NET_ADMIN users should not be allowed to set negative
sk_sndbuf or sk_rcvbuf values, as it can lead to various memory
corruptions, crashes, OOM...

Note that before commit 82981930125a ("net: cleanups in
sock_setsockopt()"), the bug was even more serious, since SO_SNDBUF
and SO_RCVBUF were vulnerable.

This needs to be backported to all known linux kernels.

Again, many thanks to syzkaller team for discovering this gem.

Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Reported-by: Andrey Konovalov &lt;andreyknvl@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>
CAP_NET_ADMIN users should not be allowed to set negative
sk_sndbuf or sk_rcvbuf values, as it can lead to various memory
corruptions, crashes, OOM...

Note that before commit 82981930125a ("net: cleanups in
sock_setsockopt()"), the bug was even more serious, since SO_SNDBUF
and SO_RCVBUF were vulnerable.

This needs to be backported to all known linux kernels.

Again, many thanks to syzkaller team for discovering this gem.

Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Reported-by: Andrey Konovalov &lt;andreyknvl@google.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tipc: check minimum bearer MTU</title>
<updated>2016-12-02T19:03:20+00:00</updated>
<author>
<name>Michal Kubeček</name>
<email>mkubecek@suse.cz</email>
</author>
<published>2016-12-02T08:33:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=3de81b758853f0b29c61e246679d20b513c4cfec'/>
<id>3de81b758853f0b29c61e246679d20b513c4cfec</id>
<content type='text'>
Qian Zhang (张谦) reported a potential socket buffer overflow in
tipc_msg_build() which is also known as CVE-2016-8632: due to
insufficient checks, a buffer overflow can occur if MTU is too short for
even tipc headers. As anyone can set device MTU in a user/net namespace,
this issue can be abused by a regular user.

As agreed in the discussion on Ben Hutchings' original patch, we should
check the MTU at the moment a bearer is attached rather than for each
processed packet. We also need to repeat the check when bearer MTU is
adjusted to new device MTU. UDP case also needs a check to avoid
overflow when calculating bearer MTU.

Fixes: b97bf3fd8f6a ("[TIPC] Initial merge")
Signed-off-by: Michal Kubecek &lt;mkubecek@suse.cz&gt;
Reported-by: Qian Zhang (张谦) &lt;zhangqian-c@360.cn&gt;
Acked-by: Ying Xue &lt;ying.xue@windriver.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>
Qian Zhang (张谦) reported a potential socket buffer overflow in
tipc_msg_build() which is also known as CVE-2016-8632: due to
insufficient checks, a buffer overflow can occur if MTU is too short for
even tipc headers. As anyone can set device MTU in a user/net namespace,
this issue can be abused by a regular user.

As agreed in the discussion on Ben Hutchings' original patch, we should
check the MTU at the moment a bearer is attached rather than for each
processed packet. We also need to repeat the check when bearer MTU is
adjusted to new device MTU. UDP case also needs a check to avoid
overflow when calculating bearer MTU.

Fixes: b97bf3fd8f6a ("[TIPC] Initial merge")
Signed-off-by: Michal Kubecek &lt;mkubecek@suse.cz&gt;
Reported-by: Qian Zhang (张谦) &lt;zhangqian-c@360.cn&gt;
Acked-by: Ying Xue &lt;ying.xue@windriver.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ip6_offload: check segs for NULL in ipv6_gso_segment.</title>
<updated>2016-12-02T18:34:58+00:00</updated>
<author>
<name>Artem Savkov</name>
<email>asavkov@redhat.com</email>
</author>
<published>2016-12-01T13:06:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=6b6ebb6b01c873d0cfe3449e8a1219ee6e5fc022'/>
<id>6b6ebb6b01c873d0cfe3449e8a1219ee6e5fc022</id>
<content type='text'>
segs needs to be checked for being NULL in ipv6_gso_segment() before calling
skb_shinfo(segs), otherwise kernel can run into a NULL-pointer dereference:

[   97.811262] BUG: unable to handle kernel NULL pointer dereference at 00000000000000cc
[   97.819112] IP: [&lt;ffffffff816e52f9&gt;] ipv6_gso_segment+0x119/0x2f0
[   97.825214] PGD 0 [   97.827047]
[   97.828540] Oops: 0000 [#1] SMP
[   97.831678] Modules linked in: vhost_net vhost macvtap macvlan nfsv3 rpcsec_gss_krb5
nfsv4 dns_resolver nfs fscache xt_CHECKSUM iptable_mangle ipt_MASQUERADE nf_nat_masquerade_ipv4
iptable_nat nf_nat_ipv4 nf_nat nf_conntrack_ipv4 nf_defrag_ipv4 xt_conntrack nf_conntrack
ipt_REJECT nf_reject_ipv4 tun ebtable_filter ebtables ip6table_filter ip6_tables iptable_filter
bridge stp llc snd_hda_codec_realtek snd_hda_codec_hdmi snd_hda_codec_generic snd_hda_intel
snd_hda_codec edac_mce_amd snd_hda_core edac_core snd_hwdep kvm_amd snd_seq kvm snd_seq_device
snd_pcm irqbypass snd_timer ppdev parport_serial snd parport_pc k10temp pcspkr soundcore parport
sp5100_tco shpchp sg wmi i2c_piix4 acpi_cpufreq nfsd auth_rpcgss nfs_acl lockd grace sunrpc
ip_tables xfs libcrc32c sr_mod cdrom sd_mod ata_generic pata_acpi amdkfd amd_iommu_v2 radeon
broadcom bcm_phy_lib i2c_algo_bit drm_kms_helper syscopyarea sysfillrect sysimgblt fb_sys_fops
ttm ahci serio_raw tg3 firewire_ohci libahci pata_atiixp drm ptp libata firewire_core pps_core
i2c_core crc_itu_t fjes dm_mirror dm_region_hash dm_log dm_mod
[   97.927721] CPU: 1 PID: 3504 Comm: vhost-3495 Not tainted 4.9.0-7.el7.test.x86_64 #1
[   97.935457] Hardware name: AMD Snook/Snook, BIOS ESK0726A 07/26/2010
[   97.941806] task: ffff880129a1c080 task.stack: ffffc90001bcc000
[   97.947720] RIP: 0010:[&lt;ffffffff816e52f9&gt;]  [&lt;ffffffff816e52f9&gt;] ipv6_gso_segment+0x119/0x2f0
[   97.956251] RSP: 0018:ffff88012fc43a10  EFLAGS: 00010207
[   97.961557] RAX: 0000000000000000 RBX: ffff8801292c8700 RCX: 0000000000000594
[   97.968687] RDX: 0000000000000593 RSI: ffff880129a846c0 RDI: 0000000000240000
[   97.975814] RBP: ffff88012fc43a68 R08: ffff880129a8404e R09: 0000000000000000
[   97.982942] R10: 0000000000000000 R11: ffff880129a84076 R12: 00000020002949b3
[   97.990070] R13: ffff88012a580000 R14: 0000000000000000 R15: ffff88012a580000
[   97.997198] FS:  0000000000000000(0000) GS:ffff88012fc40000(0000) knlGS:0000000000000000
[   98.005280] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[   98.011021] CR2: 00000000000000cc CR3: 0000000126c5d000 CR4: 00000000000006e0
[   98.018149] Stack:
[   98.020157]  00000000ffffffff ffff88012fc43ac8 ffffffffa017ad0a 000000000000000e
[   98.027584]  0000001300000000 0000000077d59998 ffff8801292c8700 00000020002949b3
[   98.035010]  ffff88012a580000 0000000000000000 ffff88012a580000 ffff88012fc43a98
[   98.042437] Call Trace:
[   98.044879]  &lt;IRQ&gt; [   98.046803]  [&lt;ffffffffa017ad0a&gt;] ? tg3_start_xmit+0x84a/0xd60 [tg3]
[   98.053156]  [&lt;ffffffff815eeee0&gt;] skb_mac_gso_segment+0xb0/0x130
[   98.059158]  [&lt;ffffffff815eefd3&gt;] __skb_gso_segment+0x73/0x110
[   98.064985]  [&lt;ffffffff815ef40d&gt;] validate_xmit_skb+0x12d/0x2b0
[   98.070899]  [&lt;ffffffff815ef5d2&gt;] validate_xmit_skb_list+0x42/0x70
[   98.077073]  [&lt;ffffffff81618560&gt;] sch_direct_xmit+0xd0/0x1b0
[   98.082726]  [&lt;ffffffff815efd86&gt;] __dev_queue_xmit+0x486/0x690
[   98.088554]  [&lt;ffffffff8135c135&gt;] ? cpumask_next_and+0x35/0x50
[   98.094380]  [&lt;ffffffff815effa0&gt;] dev_queue_xmit+0x10/0x20
[   98.099863]  [&lt;ffffffffa09ce057&gt;] br_dev_queue_push_xmit+0xa7/0x170 [bridge]
[   98.106907]  [&lt;ffffffffa09ce161&gt;] br_forward_finish+0x41/0xc0 [bridge]
[   98.113430]  [&lt;ffffffff81627cf2&gt;] ? nf_iterate+0x52/0x60
[   98.118735]  [&lt;ffffffff81627d6b&gt;] ? nf_hook_slow+0x6b/0xc0
[   98.124216]  [&lt;ffffffffa09ce32c&gt;] __br_forward+0x14c/0x1e0 [bridge]
[   98.130480]  [&lt;ffffffffa09ce120&gt;] ? br_dev_queue_push_xmit+0x170/0x170 [bridge]
[   98.137785]  [&lt;ffffffffa09ce4bd&gt;] br_forward+0x9d/0xb0 [bridge]
[   98.143701]  [&lt;ffffffffa09cfbb7&gt;] br_handle_frame_finish+0x267/0x560 [bridge]
[   98.150834]  [&lt;ffffffffa09d0064&gt;] br_handle_frame+0x174/0x2f0 [bridge]
[   98.157355]  [&lt;ffffffff8102fb89&gt;] ? sched_clock+0x9/0x10
[   98.162662]  [&lt;ffffffff810b63b2&gt;] ? sched_clock_cpu+0x72/0xa0
[   98.168403]  [&lt;ffffffff815eccf5&gt;] __netif_receive_skb_core+0x1e5/0xa20
[   98.174926]  [&lt;ffffffff813659f9&gt;] ? timerqueue_add+0x59/0xb0
[   98.180580]  [&lt;ffffffff815ed548&gt;] __netif_receive_skb+0x18/0x60
[   98.186494]  [&lt;ffffffff815ee625&gt;] process_backlog+0x95/0x140
[   98.192145]  [&lt;ffffffff815edccd&gt;] net_rx_action+0x16d/0x380
[   98.197713]  [&lt;ffffffff8170cff1&gt;] __do_softirq+0xd1/0x283
[   98.203106]  [&lt;ffffffff8170b2bc&gt;] do_softirq_own_stack+0x1c/0x30
[   98.209107]  &lt;EOI&gt; [   98.211029]  [&lt;ffffffff8108a5c0&gt;] do_softirq+0x50/0x60
[   98.216166]  [&lt;ffffffff815ec853&gt;] netif_rx_ni+0x33/0x80
[   98.221386]  [&lt;ffffffffa09eeff7&gt;] tun_get_user+0x487/0x7f0 [tun]
[   98.227388]  [&lt;ffffffffa09ef3ab&gt;] tun_sendmsg+0x4b/0x60 [tun]
[   98.233129]  [&lt;ffffffffa0b68932&gt;] handle_tx+0x282/0x540 [vhost_net]
[   98.239392]  [&lt;ffffffffa0b68c25&gt;] handle_tx_kick+0x15/0x20 [vhost_net]
[   98.245916]  [&lt;ffffffffa0abacfe&gt;] vhost_worker+0x9e/0xf0 [vhost]
[   98.251919]  [&lt;ffffffffa0abac60&gt;] ? vhost_umem_alloc+0x40/0x40 [vhost]
[   98.258440]  [&lt;ffffffff81003a47&gt;] ? do_syscall_64+0x67/0x180
[   98.264094]  [&lt;ffffffff810a44d9&gt;] kthread+0xd9/0xf0
[   98.268965]  [&lt;ffffffff810a4400&gt;] ? kthread_park+0x60/0x60
[   98.274444]  [&lt;ffffffff8170a4d5&gt;] ret_from_fork+0x25/0x30
[   98.279836] Code: 8b 93 d8 00 00 00 48 2b 93 d0 00 00 00 4c 89 e6 48 89 df 66 89 93 c2 00 00 00 ff 10 48 3d 00 f0 ff ff 49 89 c2 0f 87 52 01 00 00 &lt;41&gt; 8b 92 cc 00 00 00 48 8b 80 d0 00 00 00 44 0f b7 74 10 06 66
[   98.299425] RIP  [&lt;ffffffff816e52f9&gt;] ipv6_gso_segment+0x119/0x2f0
[   98.305612]  RSP &lt;ffff88012fc43a10&gt;
[   98.309094] CR2: 00000000000000cc
[   98.312406] ---[ end trace 726a2c7a2d2d78d0 ]---

Signed-off-by: Artem Savkov &lt;asavkov@redhat.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>
segs needs to be checked for being NULL in ipv6_gso_segment() before calling
skb_shinfo(segs), otherwise kernel can run into a NULL-pointer dereference:

[   97.811262] BUG: unable to handle kernel NULL pointer dereference at 00000000000000cc
[   97.819112] IP: [&lt;ffffffff816e52f9&gt;] ipv6_gso_segment+0x119/0x2f0
[   97.825214] PGD 0 [   97.827047]
[   97.828540] Oops: 0000 [#1] SMP
[   97.831678] Modules linked in: vhost_net vhost macvtap macvlan nfsv3 rpcsec_gss_krb5
nfsv4 dns_resolver nfs fscache xt_CHECKSUM iptable_mangle ipt_MASQUERADE nf_nat_masquerade_ipv4
iptable_nat nf_nat_ipv4 nf_nat nf_conntrack_ipv4 nf_defrag_ipv4 xt_conntrack nf_conntrack
ipt_REJECT nf_reject_ipv4 tun ebtable_filter ebtables ip6table_filter ip6_tables iptable_filter
bridge stp llc snd_hda_codec_realtek snd_hda_codec_hdmi snd_hda_codec_generic snd_hda_intel
snd_hda_codec edac_mce_amd snd_hda_core edac_core snd_hwdep kvm_amd snd_seq kvm snd_seq_device
snd_pcm irqbypass snd_timer ppdev parport_serial snd parport_pc k10temp pcspkr soundcore parport
sp5100_tco shpchp sg wmi i2c_piix4 acpi_cpufreq nfsd auth_rpcgss nfs_acl lockd grace sunrpc
ip_tables xfs libcrc32c sr_mod cdrom sd_mod ata_generic pata_acpi amdkfd amd_iommu_v2 radeon
broadcom bcm_phy_lib i2c_algo_bit drm_kms_helper syscopyarea sysfillrect sysimgblt fb_sys_fops
ttm ahci serio_raw tg3 firewire_ohci libahci pata_atiixp drm ptp libata firewire_core pps_core
i2c_core crc_itu_t fjes dm_mirror dm_region_hash dm_log dm_mod
[   97.927721] CPU: 1 PID: 3504 Comm: vhost-3495 Not tainted 4.9.0-7.el7.test.x86_64 #1
[   97.935457] Hardware name: AMD Snook/Snook, BIOS ESK0726A 07/26/2010
[   97.941806] task: ffff880129a1c080 task.stack: ffffc90001bcc000
[   97.947720] RIP: 0010:[&lt;ffffffff816e52f9&gt;]  [&lt;ffffffff816e52f9&gt;] ipv6_gso_segment+0x119/0x2f0
[   97.956251] RSP: 0018:ffff88012fc43a10  EFLAGS: 00010207
[   97.961557] RAX: 0000000000000000 RBX: ffff8801292c8700 RCX: 0000000000000594
[   97.968687] RDX: 0000000000000593 RSI: ffff880129a846c0 RDI: 0000000000240000
[   97.975814] RBP: ffff88012fc43a68 R08: ffff880129a8404e R09: 0000000000000000
[   97.982942] R10: 0000000000000000 R11: ffff880129a84076 R12: 00000020002949b3
[   97.990070] R13: ffff88012a580000 R14: 0000000000000000 R15: ffff88012a580000
[   97.997198] FS:  0000000000000000(0000) GS:ffff88012fc40000(0000) knlGS:0000000000000000
[   98.005280] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[   98.011021] CR2: 00000000000000cc CR3: 0000000126c5d000 CR4: 00000000000006e0
[   98.018149] Stack:
[   98.020157]  00000000ffffffff ffff88012fc43ac8 ffffffffa017ad0a 000000000000000e
[   98.027584]  0000001300000000 0000000077d59998 ffff8801292c8700 00000020002949b3
[   98.035010]  ffff88012a580000 0000000000000000 ffff88012a580000 ffff88012fc43a98
[   98.042437] Call Trace:
[   98.044879]  &lt;IRQ&gt; [   98.046803]  [&lt;ffffffffa017ad0a&gt;] ? tg3_start_xmit+0x84a/0xd60 [tg3]
[   98.053156]  [&lt;ffffffff815eeee0&gt;] skb_mac_gso_segment+0xb0/0x130
[   98.059158]  [&lt;ffffffff815eefd3&gt;] __skb_gso_segment+0x73/0x110
[   98.064985]  [&lt;ffffffff815ef40d&gt;] validate_xmit_skb+0x12d/0x2b0
[   98.070899]  [&lt;ffffffff815ef5d2&gt;] validate_xmit_skb_list+0x42/0x70
[   98.077073]  [&lt;ffffffff81618560&gt;] sch_direct_xmit+0xd0/0x1b0
[   98.082726]  [&lt;ffffffff815efd86&gt;] __dev_queue_xmit+0x486/0x690
[   98.088554]  [&lt;ffffffff8135c135&gt;] ? cpumask_next_and+0x35/0x50
[   98.094380]  [&lt;ffffffff815effa0&gt;] dev_queue_xmit+0x10/0x20
[   98.099863]  [&lt;ffffffffa09ce057&gt;] br_dev_queue_push_xmit+0xa7/0x170 [bridge]
[   98.106907]  [&lt;ffffffffa09ce161&gt;] br_forward_finish+0x41/0xc0 [bridge]
[   98.113430]  [&lt;ffffffff81627cf2&gt;] ? nf_iterate+0x52/0x60
[   98.118735]  [&lt;ffffffff81627d6b&gt;] ? nf_hook_slow+0x6b/0xc0
[   98.124216]  [&lt;ffffffffa09ce32c&gt;] __br_forward+0x14c/0x1e0 [bridge]
[   98.130480]  [&lt;ffffffffa09ce120&gt;] ? br_dev_queue_push_xmit+0x170/0x170 [bridge]
[   98.137785]  [&lt;ffffffffa09ce4bd&gt;] br_forward+0x9d/0xb0 [bridge]
[   98.143701]  [&lt;ffffffffa09cfbb7&gt;] br_handle_frame_finish+0x267/0x560 [bridge]
[   98.150834]  [&lt;ffffffffa09d0064&gt;] br_handle_frame+0x174/0x2f0 [bridge]
[   98.157355]  [&lt;ffffffff8102fb89&gt;] ? sched_clock+0x9/0x10
[   98.162662]  [&lt;ffffffff810b63b2&gt;] ? sched_clock_cpu+0x72/0xa0
[   98.168403]  [&lt;ffffffff815eccf5&gt;] __netif_receive_skb_core+0x1e5/0xa20
[   98.174926]  [&lt;ffffffff813659f9&gt;] ? timerqueue_add+0x59/0xb0
[   98.180580]  [&lt;ffffffff815ed548&gt;] __netif_receive_skb+0x18/0x60
[   98.186494]  [&lt;ffffffff815ee625&gt;] process_backlog+0x95/0x140
[   98.192145]  [&lt;ffffffff815edccd&gt;] net_rx_action+0x16d/0x380
[   98.197713]  [&lt;ffffffff8170cff1&gt;] __do_softirq+0xd1/0x283
[   98.203106]  [&lt;ffffffff8170b2bc&gt;] do_softirq_own_stack+0x1c/0x30
[   98.209107]  &lt;EOI&gt; [   98.211029]  [&lt;ffffffff8108a5c0&gt;] do_softirq+0x50/0x60
[   98.216166]  [&lt;ffffffff815ec853&gt;] netif_rx_ni+0x33/0x80
[   98.221386]  [&lt;ffffffffa09eeff7&gt;] tun_get_user+0x487/0x7f0 [tun]
[   98.227388]  [&lt;ffffffffa09ef3ab&gt;] tun_sendmsg+0x4b/0x60 [tun]
[   98.233129]  [&lt;ffffffffa0b68932&gt;] handle_tx+0x282/0x540 [vhost_net]
[   98.239392]  [&lt;ffffffffa0b68c25&gt;] handle_tx_kick+0x15/0x20 [vhost_net]
[   98.245916]  [&lt;ffffffffa0abacfe&gt;] vhost_worker+0x9e/0xf0 [vhost]
[   98.251919]  [&lt;ffffffffa0abac60&gt;] ? vhost_umem_alloc+0x40/0x40 [vhost]
[   98.258440]  [&lt;ffffffff81003a47&gt;] ? do_syscall_64+0x67/0x180
[   98.264094]  [&lt;ffffffff810a44d9&gt;] kthread+0xd9/0xf0
[   98.268965]  [&lt;ffffffff810a4400&gt;] ? kthread_park+0x60/0x60
[   98.274444]  [&lt;ffffffff8170a4d5&gt;] ret_from_fork+0x25/0x30
[   98.279836] Code: 8b 93 d8 00 00 00 48 2b 93 d0 00 00 00 4c 89 e6 48 89 df 66 89 93 c2 00 00 00 ff 10 48 3d 00 f0 ff ff 49 89 c2 0f 87 52 01 00 00 &lt;41&gt; 8b 92 cc 00 00 00 48 8b 80 d0 00 00 00 44 0f b7 74 10 06 66
[   98.299425] RIP  [&lt;ffffffff816e52f9&gt;] ipv6_gso_segment+0x119/0x2f0
[   98.305612]  RSP &lt;ffff88012fc43a10&gt;
[   98.309094] CR2: 00000000000000cc
[   98.312406] ---[ end trace 726a2c7a2d2d78d0 ]---

Signed-off-by: Artem Savkov &lt;asavkov@redhat.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>RDS: TCP: unregister_netdevice_notifier() in error path of rds_tcp_init_net</title>
<updated>2016-12-02T18:29:26+00:00</updated>
<author>
<name>Sowmini Varadhan</name>
<email>sowmini.varadhan@oracle.com</email>
</author>
<published>2016-12-01T12:44:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=721c7443dcb26bf8c0b4ad317a36c7dfa140f1e4'/>
<id>721c7443dcb26bf8c0b4ad317a36c7dfa140f1e4</id>
<content type='text'>
If some error is encountered in rds_tcp_init_net, make sure to
unregister_netdevice_notifier(), else we could trigger a panic
later on, when the modprobe from a netns fails.

Signed-off-by: Sowmini Varadhan &lt;sowmini.varadhan@oracle.com&gt;
Acked-by: Santosh Shilimkar &lt;santosh.shilimkar@oracle.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>
If some error is encountered in rds_tcp_init_net, make sure to
unregister_netdevice_notifier(), else we could trigger a panic
later on, when the modprobe from a netns fails.

Signed-off-by: Sowmini Varadhan &lt;sowmini.varadhan@oracle.com&gt;
Acked-by: Santosh Shilimkar &lt;santosh.shilimkar@oracle.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert: "ip6_tunnel: Update skb-&gt;protocol to ETH_P_IPV6 in ip6_tnl_xmit()"</title>
<updated>2016-12-02T17:34:22+00:00</updated>
<author>
<name>Eli Cooper</name>
<email>elicooper@gmx.com</email>
</author>
<published>2016-12-01T02:05:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=80d1106aeaf689ab5fdf33020c5fecd269b31c88'/>
<id>80d1106aeaf689ab5fdf33020c5fecd269b31c88</id>
<content type='text'>
This reverts commit ae148b085876fa771d9ef2c05f85d4b4bf09ce0d
("ip6_tunnel: Update skb-&gt;protocol to ETH_P_IPV6 in ip6_tnl_xmit()").

skb-&gt;protocol is now set in __ip_local_out() and __ip6_local_out() before
dst_output() is called. It is no longer necessary to do it for each tunnel.

Cc: stable@vger.kernel.org
Signed-off-by: Eli Cooper &lt;elicooper@gmx.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 reverts commit ae148b085876fa771d9ef2c05f85d4b4bf09ce0d
("ip6_tunnel: Update skb-&gt;protocol to ETH_P_IPV6 in ip6_tnl_xmit()").

skb-&gt;protocol is now set in __ip_local_out() and __ip6_local_out() before
dst_output() is called. It is no longer necessary to do it for each tunnel.

Cc: stable@vger.kernel.org
Signed-off-by: Eli Cooper &lt;elicooper@gmx.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ipv6: Set skb-&gt;protocol properly for local output</title>
<updated>2016-12-02T17:34:22+00:00</updated>
<author>
<name>Eli Cooper</name>
<email>elicooper@gmx.com</email>
</author>
<published>2016-12-01T02:05:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=b4e479a96fc398ccf83bb1cffb4ffef8631beaf1'/>
<id>b4e479a96fc398ccf83bb1cffb4ffef8631beaf1</id>
<content type='text'>
When xfrm is applied to TSO/GSO packets, it follows this path:

    xfrm_output() -&gt; xfrm_output_gso() -&gt; skb_gso_segment()

where skb_gso_segment() relies on skb-&gt;protocol to function properly.

This patch sets skb-&gt;protocol to ETH_P_IPV6 before dst_output() is called,
fixing a bug where GSO packets sent through an ipip6 tunnel are dropped
when xfrm is involved.

Cc: stable@vger.kernel.org
Signed-off-by: Eli Cooper &lt;elicooper@gmx.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>
When xfrm is applied to TSO/GSO packets, it follows this path:

    xfrm_output() -&gt; xfrm_output_gso() -&gt; skb_gso_segment()

where skb_gso_segment() relies on skb-&gt;protocol to function properly.

This patch sets skb-&gt;protocol to ETH_P_IPV6 before dst_output() is called,
fixing a bug where GSO packets sent through an ipip6 tunnel are dropped
when xfrm is involved.

Cc: stable@vger.kernel.org
Signed-off-by: Eli Cooper &lt;elicooper@gmx.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ipv4: Set skb-&gt;protocol properly for local output</title>
<updated>2016-12-02T17:34:22+00:00</updated>
<author>
<name>Eli Cooper</name>
<email>elicooper@gmx.com</email>
</author>
<published>2016-12-01T02:05:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=f4180439109aa720774baafdd798b3234ab1a0d2'/>
<id>f4180439109aa720774baafdd798b3234ab1a0d2</id>
<content type='text'>
When xfrm is applied to TSO/GSO packets, it follows this path:

    xfrm_output() -&gt; xfrm_output_gso() -&gt; skb_gso_segment()

where skb_gso_segment() relies on skb-&gt;protocol to function properly.

This patch sets skb-&gt;protocol to ETH_P_IP before dst_output() is called,
fixing a bug where GSO packets sent through a sit tunnel are dropped
when xfrm is involved.

Cc: stable@vger.kernel.org
Signed-off-by: Eli Cooper &lt;elicooper@gmx.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>
When xfrm is applied to TSO/GSO packets, it follows this path:

    xfrm_output() -&gt; xfrm_output_gso() -&gt; skb_gso_segment()

where skb_gso_segment() relies on skb-&gt;protocol to function properly.

This patch sets skb-&gt;protocol to ETH_P_IP before dst_output() is called,
fixing a bug where GSO packets sent through a sit tunnel are dropped
when xfrm is involved.

Cc: stable@vger.kernel.org
Signed-off-by: Eli Cooper &lt;elicooper@gmx.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>packet: fix race condition in packet_set_ring</title>
<updated>2016-12-02T17:16:49+00:00</updated>
<author>
<name>Philip Pettersson</name>
<email>philip.pettersson@gmail.com</email>
</author>
<published>2016-11-30T22:55:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=84ac7260236a49c79eede91617700174c2c19b0c'/>
<id>84ac7260236a49c79eede91617700174c2c19b0c</id>
<content type='text'>
When packet_set_ring creates a ring buffer it will initialize a
struct timer_list if the packet version is TPACKET_V3. This value
can then be raced by a different thread calling setsockopt to
set the version to TPACKET_V1 before packet_set_ring has finished.

This leads to a use-after-free on a function pointer in the
struct timer_list when the socket is closed as the previously
initialized timer will not be deleted.

The bug is fixed by taking lock_sock(sk) in packet_setsockopt when
changing the packet version while also taking the lock at the start
of packet_set_ring.

Fixes: f6fb8f100b80 ("af-packet: TPACKET_V3 flexible buffer implementation.")
Signed-off-by: Philip Pettersson &lt;philip.pettersson@gmail.com&gt;
Signed-off-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>
When packet_set_ring creates a ring buffer it will initialize a
struct timer_list if the packet version is TPACKET_V3. This value
can then be raced by a different thread calling setsockopt to
set the version to TPACKET_V1 before packet_set_ring has finished.

This leads to a use-after-free on a function pointer in the
struct timer_list when the socket is closed as the previously
initialized timer will not be deleted.

The bug is fixed by taking lock_sock(sk) in packet_setsockopt when
changing the packet version while also taking the lock at the start
of packet_set_ring.

Fixes: f6fb8f100b80 ("af-packet: TPACKET_V3 flexible buffer implementation.")
Signed-off-by: Philip Pettersson &lt;philip.pettersson@gmail.com&gt;
Signed-off-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>net/rtnetlink: fix attribute name in nlmsg_size() comments</title>
<updated>2016-12-02T15:34:59+00:00</updated>
<author>
<name>Tobias Klauser</name>
<email>tklauser@distanz.ch</email>
</author>
<published>2016-11-30T13:30:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=6919756caaeaa76dc56287252fb656e3c2d9b4e1'/>
<id>6919756caaeaa76dc56287252fb656e3c2d9b4e1</id>
<content type='text'>
Use the correct attribute constant names IFLA_GSO_MAX_{SEGS,SIZE}
instead of IFLA_MAX_GSO_{SEGS,SIZE} for the comments int nlmsg_size().

Cc: Eric Dumazet &lt;edumazet@google.com&gt;
Signed-off-by: Tobias Klauser &lt;tklauser@distanz.ch&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>
Use the correct attribute constant names IFLA_GSO_MAX_{SEGS,SIZE}
instead of IFLA_MAX_GSO_{SEGS,SIZE} for the comments int nlmsg_size().

Cc: Eric Dumazet &lt;edumazet@google.com&gt;
Signed-off-by: Tobias Klauser &lt;tklauser@distanz.ch&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/klassert/ipsec</title>
<updated>2016-12-01T16:35:49+00:00</updated>
<author>
<name>David S. Miller</name>
<email>davem@davemloft.net</email>
</author>
<published>2016-12-01T16:35:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=7bbf91ce27dd83cae1452995b15d358db92a8235'/>
<id>7bbf91ce27dd83cae1452995b15d358db92a8235</id>
<content type='text'>
Steffen Klassert says:

====================
pull request (net): ipsec 2016-12-01

1) Change the error value when someone tries to run 32bit
   userspace on a 64bit host from -ENOTSUPP to the userspace
   exported -EOPNOTSUPP. Fix from Yi Zhao.

2) On inbound, ESN sequence numbers are already in network
   byte order. So don't try to convert it again, this fixes
   integrity verification for ESN. Fixes from Tobias Brunner.

Please pull or let me know if there are problems.
====================

Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Steffen Klassert says:

====================
pull request (net): ipsec 2016-12-01

1) Change the error value when someone tries to run 32bit
   userspace on a 64bit host from -ENOTSUPP to the userspace
   exported -EOPNOTSUPP. Fix from Yi Zhao.

2) On inbound, ESN sequence numbers are already in network
   byte order. So don't try to convert it again, this fixes
   integrity verification for ESN. Fixes from Tobias Brunner.

Please pull or let me know if there are problems.
====================

Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
</feed>
