]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 5 Jul 2017 12:35:14 +0000 (14:35 +0200)
commit3c0454ccee160d82c18783b5918cc8dcf79dca01
tree45ccc8fdde8bc6a663c77a9397ed068de39a765b
parentf790a77754db7b14c3e1235a852a83a2f1ad4041
xfrm: Oops on error in pfkey_msg2xfrm_state()

commit 1e3d0c2c70cd3edb5deed186c5f5c75f2b84a633 upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/key/af_key.c