linux/include
Eric Dumazet 81ed463384 ipv6: add complete rcu protection around np->opt
[ Upstream commit 45f6fad84c ]

This patch addresses multiple problems :

UDP/RAW sendmsg() need to get a stable struct ipv6_txoptions
while socket is not locked : Other threads can change np->opt
concurrently. Dmitry posted a syzkaller
(http://github.com/google/syzkaller) program desmonstrating
use-after-free.

Starting with TCP/DCCP lockless listeners, tcp_v6_syn_recv_sock()
and dccp_v6_request_recv_sock() also need to use RCU protection
to dereference np->opt once (before calling ipv6_dup_options())

This patch adds full RCU protection to np->opt

Reported-by: Dmitry Vyukov <dvyukov@google.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Acked-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
History 2015-12-14 21:24:32 -08:00
..
acpi ACPICA: Tables: Enable default 64-bit FADT addresses favor 2015-08-03 09:29:14 -07:00
asm-generic sched/preempt: Fix cond_resched_lock() and cond_resched_softirq() 2015-10-27 09:51:58 +09:00
clocksource time: move the timecounter/cyclecounter code into its own file. 2014-12-30 18:29:25 -05:00
crypto Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2015-04-15 10:42:15 -07:00
drm drm/dp/mst: make mst i2c transfer code more robust. 2015-10-27 09:51:57 +09:00
dt-bindings Merge branch 'for-linus' of git://git.infradead.org/users/vkoul/slave-dma 2015-04-24 09:49:37 -07:00
keys KEYS: Restore partial ID matching functionality for asymmetric keys 2014-10-06 15:21:05 +01:00
kvm KVM/ARM changes for v4.1: 2015-04-07 18:09:20 +02:00
linux ipv6: add complete rcu protection around np->opt 2015-12-14 21:24:32 -08:00
math-emu math-emu: fix floating-point to integer overflow detection 2014-01-07 18:36:24 -06:00
media Merge branch 'patchwork' into v4l_for_linus 2015-04-21 06:12:35 -03:00
memory ddr: add LPDDR2 data from JESD209-2 2012-05-02 00:04:06 -07:00
misc cxl: Add new header for call backs and structs 2014-10-08 20:15:43 +11:00
net ipv6: add complete rcu protection around np->opt 2015-12-14 21:24:32 -08:00
pcmcia pcmcia/ds.h: introduce helper for pcmcia_driver module boilerplate 2013-03-15 12:26:03 -07:00
ras PCI/AER: Rename PCI_ERR_UNC_TRAIN to PCI_ERR_UNC_UND 2014-09-25 09:42:40 -06:00
rdma IB/core: Fix unaligned accesses 2015-05-05 13:21:27 -04:00
rxrpc RxRPC: Handle VERSION Rx protocol packets 2015-04-01 16:31:26 +01:00
scsi Revert "libata-eh: Set 'information' field for autosense" 2015-09-13 09:07:46 -07:00
soc iommu/tegra-smmu: Parameterize number of TLB lines 2015-09-29 19:26:14 +02:00
sound ASoC: wm8904: Correct number of EQ registers 2015-11-09 14:33:34 -08:00
target target/iscsi: Fix np_ip bracket issue by removing np_ip 2015-10-22 14:43:11 -07:00
trace net: sunrpc: fix tracepoint Warning: unknown op '->' 2015-09-29 19:26:10 +02:00
uapi PCI: Restore PCI_MSIX_FLAGS_BIRMASK definition 2015-08-16 20:52:22 -07:00
video fbdev changes for v4.1 2015-04-20 15:16:25 -07:00
xen x86/xen: Support kexec/kdump in HVM guests by doing a soft reset 2015-10-22 14:43:14 -07:00
Kbuild UAPI: remove empty Kbuild files 2013-04-30 17:04:09 -07:00