1
0
Fork 0
alistair23-linux/net/key
Dan Carpenter e747f64336 xfrm: NULL dereference on allocation failure
The default error code in pfkey_msg2xfrm_state() is -ENOBUFS.  We
added a new call to security_xfrm_state_alloc() which sets "err" to zero
so there several places where we can return ERR_PTR(0) if kmalloc()
fails.  The caller is expecting error pointers so it leads to a NULL
dereference.

Fixes: df71837d50 ("[LSM-IPSec]: Security association restriction.")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
2017-06-14 12:40:49 +02:00
..
Makefile Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
af_key.c xfrm: NULL dereference on allocation failure 2017-06-14 12:40:49 +02:00