[PATCH net-next] tun: use sk_fullsock() before reading sk->sk_tsflags

2015-10-09 Thread Eric Dumazet
From: Eric Dumazet timewait or request sockets are small and do not contain sk->sk_tsflags Without this fix, we might read garbage, and crash later in __skb_complete_tx_timestamp() -> sock_queue_err_skb() (These pseudo sockets do not have an error queue either) Fixes: ca6fb0651883 ("tcp: att

Re: [PATCH net-next] tun: use sk_fullsock() before reading sk->sk_tsflags

2015-10-12 Thread David Miller
From: Eric Dumazet Date: Fri, 09 Oct 2015 15:42:21 -0700 > From: Eric Dumazet > > timewait or request sockets are small and do not contain sk->sk_tsflags > > Without this fix, we might read garbage, and crash later in > > __skb_complete_tx_timestamp() > -> sock_queue_err_skb() > > (These ps

Re: [PATCH net-next] tun: use sk_fullsock() before reading sk->sk_tsflags

2015-10-10 Thread Michael S. Tsirkin
On Fri, Oct 09, 2015 at 03:42:21PM -0700, Eric Dumazet wrote: > From: Eric Dumazet > > timewait or request sockets are small and do not contain sk->sk_tsflags > > Without this fix, we might read garbage, and crash later in > > __skb_complete_tx_timestamp() > -> sock_queue_err_skb() > > (These