xfrm: Oops on error in pfkey_msg2xfrm_state()
authorDan Carpenter <dan.carpenter@oracle.com>
Wed, 14 Jun 2017 10:34:05 +0000 (13:34 +0300)
committerSteffen Klassert <steffen.klassert@secunet.com>
Wed, 14 Jun 2017 10:40:49 +0000 (12:40 +0200)
commit1e3d0c2c70cd3edb5deed186c5f5c75f2b84a633
tree8bff776003643b91dca316de70cdb182990b34a5
parent138437f591dd9a42d53c6fed1a3c85e02678851c
xfrm: Oops on error in pfkey_msg2xfrm_state()

There are some missing error codes here so we accidentally return NULL
instead of an error pointer.  It results in a NULL pointer dereference.

Fixes: df71837d5024 ("[LSM-IPSec]: Security association restriction.")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
net/key/af_key.c