rapidio/rionet: do not free skb before reading its length
authorPan Bian <bianpan2016@163.com>
Wed, 28 Nov 2018 06:53:19 +0000 (14:53 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 5 Dec 2018 18:42:38 +0000 (19:42 +0100)
commit13a3d8908e54f99a98af3c41f733aab9e93a0c56
tree048d56dc9ce8c34291451fb692f728400b53e42c
parentd39ebd199a639df704f50db315e93aa45d9ca33c
rapidio/rionet: do not free skb before reading its length

[ Upstream commit cfc435198f53a6fa1f656d98466b24967ff457d0 ]

skb is freed via dev_kfree_skb_any, however, skb->len is read then. This
may result in a use-after-free bug.

Fixes: e6161d64263 ("rapidio/rionet: rework driver initialization and removal")
Signed-off-by: Pan Bian <bianpan2016@163.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/rionet.c