]> git.baikalelectronics.ru Git - kernel.git/commit
sock: fix possible NULL sk dereference in __skb_tstamp_tx
authorWillem de Bruijn <willemb@google.com>
Wed, 11 Mar 2015 19:43:55 +0000 (15:43 -0400)
committerDavid S. Miller <davem@davemloft.net>
Thu, 12 Mar 2015 04:09:55 +0000 (00:09 -0400)
commit083791983bdbb926d6388d0f7ad62ce03b4b126c
tree2b0f3746ed1049a0781d381791df55a24bcd73b6
parent73a0b05622c3e7c059da40d151cdae0bbcc21ff1
sock: fix possible NULL sk dereference in __skb_tstamp_tx

Test that sk != NULL before reading sk->sk_tsflags.

Fixes: a464edaba687 ("net-timestamp: no-payload option")
Reported-by: One Thousand Gnomes <gnomes@lxorguk.ukuu.org.uk>
Signed-off-by: Willem de Bruijn <willemb@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/skbuff.c