kernel-fxtec-pro1x/net/dccp
Andrey Konovalov 5edabca9d4 dccp: fix freeing skb too early for IPV6_RECVPKTINFO
In the current DCCP implementation an skb for a DCCP_PKT_REQUEST packet
is forcibly freed via __kfree_skb in dccp_rcv_state_process if
dccp_v6_conn_request successfully returns.

However, if IPV6_RECVPKTINFO is set on a socket, the address of the skb
is saved to ireq->pktopts and the ref count for skb is incremented in
dccp_v6_conn_request, so skb is still in use. Nevertheless, it gets freed
in dccp_rcv_state_process.

Fix by calling consume_skb instead of doing goto discard and therefore
calling __kfree_skb.

Similar fixes for TCP:

fb7e2399ec [TCP]: skb is unexpectedly freed.
0aea76d35c tcp: SYN packets are now
simply consumed

Signed-off-by: Andrey Konovalov <andreyknvl@google.com>
Acked-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2017-02-17 13:36:25 -05:00
..
ccids
ackvec.c dccp: drop null test before destroy functions 2015-09-15 16:49:43 -07:00
ackvec.h
ccid.c dccp: drop null test before destroy functions 2015-09-15 16:49:43 -07:00
ccid.h
dccp.h net: snmp: kill STATS_BH macros 2016-04-27 22:48:25 -04:00
diag.c
feat.c
feat.h
input.c dccp: fix freeing skb too early for IPV6_RECVPKTINFO 2017-02-17 13:36:25 -05:00
ipv4.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2016-12-03 12:29:53 -05:00
ipv6.c tcp: don't annotate mark on control socket from tcp_v6_send_response() 2017-01-27 10:33:56 -05:00
ipv6.h
Kconfig
Makefile
minisocks.c dccp: rename DCCP_INC_STATS_BH() 2016-04-27 22:48:22 -04:00
options.c dccp: do not assume DCCP code is non preemptible 2016-05-02 17:02:25 -04:00
output.c net: Generalise wq_has_sleeper helper 2015-11-30 14:47:33 -05:00
probe.c Use 64-bit timekeeping 2015-11-01 17:01:16 -05:00
proto.c dccp: do not send reset to already closed sockets 2016-11-03 16:16:51 -04:00
qpolicy.c
sysctl.c
timer.c net: rename NET_{ADD|INC}_STATS_BH() 2016-04-27 22:48:24 -04:00