linux-stable/include
Eric Dumazet a9de6f42e9 net/flow_dissector: switch to siphash
commit 55667441c8 upstream.

UDP IPv6 packets auto flowlabels are using a 32bit secret
(static u32 hashrnd in net/core/flow_dissector.c) and
apply jhash() over fields known by the receivers.

Attackers can easily infer the 32bit secret and use this information
to identify a device and/or user, since this 32bit secret is only
set at boot time.

Really, using jhash() to generate cookies sent on the wire
is a serious security concern.

Trying to change the rol32(hash, 16) in ip6_make_flowlabel() would be
a dead end. Trying to periodically change the secret (like in sch_sfq.c)
could change paths taken in the network for long lived flows.

Let's switch to siphash, as we did in commit df453700e8
("inet: switch IP ID generator to siphash")

Using a cryptographically strong pseudo random function will solve this
privacy issue and more generally remove other weak points in the stack.

Packet schedulers using skb_get_hash_perturb() benefit from this change.

Fixes: b56774163f ("ipv6: Enable auto flow labels by default")
Fixes: 42240901f7 ("ipv6: Implement different admin modes for automatic flow labels")
Fixes: 67800f9b1f ("ipv6: Call skb_get_hash_flowi6 to get skb->hash in ip6_make_flowlabel")
Fixes: cb1ce2ef38 ("ipv6: Implement automatic flow label generation on transmit")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reported-by: Jonathan Berger <jonathann1@walla.com>
Reported-by: Amit Klein <aksecurity@gmail.com>
Reported-by: Benny Pinkas <benny@pinkas.net>
Cc: Tom Herbert <tom@herbertland.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-11-10 11:25:37 +01:00
..
acpi ACPICA: Reference Counts: increase max to 0x4000 for large servers 2019-03-19 13:13:21 +01:00
asm-generic asm-generic: fix -Wtype-limits compiler warnings 2019-08-25 10:50:18 +02:00
clocksource
crypto
drm drm/crc: Only report a single overflow when a CRC fd is opened 2019-07-31 07:28:56 +02:00
dt-bindings
keys keys: Fix dependency loop between construction record and auth key 2019-03-23 14:35:14 +01:00
kvm KVM: arm/arm64: Sync ICH_VMCR_EL2 back when about to block 2019-08-25 10:50:18 +02:00
linux net/flow_dissector: switch to siphash 2019-11-10 11:25:37 +01:00
math-emu
media media: cec: make cec_get_edid_spa_location() an inline function 2019-05-16 19:42:26 +02:00
memory
misc
net net/flow_dissector: switch to siphash 2019-11-10 11:25:37 +01:00
pcmcia
ras
rdma IB/core: Add an unbound WQ type to the new CQ API 2019-10-05 12:47:32 +02:00
scsi scsi: core: save/restore command resid for error handling 2019-10-29 09:17:31 +01:00
soc
sound ASoC: Define a set of DAPM pre/post-up events 2019-10-11 18:18:30 +02:00
target
trace sched, trace: Fix prev_state output in sched_switch tracepoint 2019-02-20 10:20:55 +01:00
uapi netfilter: xt_nfacct: Fix alignment mismatch in xt_nfacct_match_info 2019-09-21 07:15:32 +02:00
video udlfb: set optimal write delay 2018-09-09 19:56:01 +02:00
xen xen/events: fix binding user event channels to cpus 2019-07-31 07:28:39 +02:00