]> git.baikalelectronics.ru Git - kernel.git/commit
xfrm: Fix potential null pointer dereference in xdst_queue_output
authorSteffen Klassert <steffen.klassert@secunet.com>
Wed, 28 Aug 2013 06:47:14 +0000 (08:47 +0200)
committerSteffen Klassert <steffen.klassert@secunet.com>
Wed, 28 Aug 2013 06:47:14 +0000 (08:47 +0200)
commit74b75806ad98a9e5653e1148233dc0a44f4901c2
tree162abbe125b769187a43c8d7ed133765d2134c7a
parent35a98f74d6719b21e37763dbb54aa0fc85fed2a9
xfrm: Fix potential null pointer dereference in xdst_queue_output

The net_device might be not set on the skb when we try refcounting.
This leads to a null pointer dereference in xdst_queue_output().
It turned out that the refcount to the net_device is not needed
after all. The dst_entry has a refcount to the net_device before
we queue the skb, so it can't go away. Therefore we can remove the
refcount on queueing to fix the null pointer dereference.

Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
net/xfrm/xfrm_policy.c