projects
/
GitHub
/
exynos8895
/
android_kernel_samsung_universal8895.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4bab0ea
)
af_key: mark policy as dead before destroying
author
Alexey Dobriyan
<adobriyan@gmail.com>
Fri, 7 Nov 2008 07:08:37 +0000
(23:08 -0800)
committer
David S. Miller
<davem@davemloft.net>
Fri, 7 Nov 2008 07:08:37 +0000
(23:08 -0800)
xfrm_policy_destroy() will oops if not dead policy is passed to it.
On error path in pfkey_compile_policy() exactly this happens.
Oopsable for CAP_NET_ADMIN owners.
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/key/af_key.c
patch
|
blob
|
blame
|
history
diff --git
a/net/key/af_key.c
b/net/key/af_key.c
index 3440a4637f01b772988bf11252888650c5346483..5b22e011653b3d54620090028762435559f2a696 100644
(file)
--- a/
net/key/af_key.c
+++ b/
net/key/af_key.c
@@
-3188,6
+3188,7
@@
static struct xfrm_policy *pfkey_compile_policy(struct sock *sk, int opt,
return xp;
out:
+ xp->walk.dead = 1;
xfrm_policy_destroy(xp);
return NULL;
}