]> git.baikalelectronics.ru Git - kernel.git/commit
xfrm: Fix NULL pointer dereference on sub policy usage
authorSteffen Klassert <steffen.klassert@secunet.com>
Wed, 19 Feb 2014 12:33:23 +0000 (13:33 +0100)
committerSteffen Klassert <steffen.klassert@secunet.com>
Thu, 20 Feb 2014 13:29:58 +0000 (14:29 +0100)
commit782c6506afd2c4d708106957346a8f77acb9b439
tree29fd34fd5df068375acbd51de352e0955de633b6
parentd9ca8f4c05eb24140ff3b8706384d68a3b6366d6
xfrm: Fix NULL pointer dereference on sub policy usage

xfrm_state_sort() takes the unsorted states from the src array
and stores them into the dst array. We try to get the namespace
from the dst array which is empty at this time, so take the
namespace from the src array instead.

Fixes: 6e88ae692c216 ("xfrm: Namespacify xfrm state/policy locks")
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
net/xfrm/xfrm_state.c