diff options
| author | Eric Dumazet <edumazet@google.com> | 2015-10-09 11:29:32 -0700 |
|---|---|---|
| committer | Luis Henriques <luis.henriques@canonical.com> | 2015-12-13 17:49:32 +0000 |
| commit | d1011c5cc57bc209f81d274bfb0972f86c564df8 (patch) | |
| tree | 773207bd932e8457eb7ce7370e5674284556ad12 /drivers | |
| parent | 9c84eab0508da4286b83f8d7afec5183457f20c7 (diff) | |
packet: fix match_fanout_group()
commit 161642e24fee40fba2c5bc2ceacc00d118a22d65 upstream.
Recent TCP listener patches exposed a prior af_packet bug :
match_fanout_group() blindly assumes it is always safe
to cast sk to a packet socket to compare fanout with af_packet_priv
But SYNACK packets can be sent while attached to request_sock, which
are smaller than a "struct sock".
We can read non existent memory and crash.
Fixes: c0de08d04215 ("af_packet: don't emit packet on orig fanout group")
Fixes: ca6fb0651883 ("tcp: attach SYNACK messages to request sockets instead of listener")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Willem de Bruijn <willemb@google.com>
Cc: Eric Leblond <eric@regit.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
Diffstat (limited to 'drivers')
0 files changed, 0 insertions, 0 deletions
