artulab
projects
/
openbsd
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0a48850
)
fix a potential use-after-free in pf_state_rm_src_node
author
henning
<henning@openbsd.org>
Mon, 11 May 2015 12:22:14 +0000
(12:22 +0000)
committer
henning
<henning@openbsd.org>
Mon, 11 May 2015 12:22:14 +0000
(12:22 +0000)
found by jsg; ok jsg mikeb
sys/net/pf.c
patch
|
blob
|
history
diff --git
a/sys/net/pf.c
b/sys/net/pf.c
index
402c01c
..
5bd5864
100644
(file)
--- a/
sys/net/pf.c
+++ b/
sys/net/pf.c
@@
-1,4
+1,4
@@
-/* $OpenBSD: pf.c,v 1.91
2 2015/04/17 11:04:01 mikeb
Exp $ */
+/* $OpenBSD: pf.c,v 1.91
3 2015/05/11 12:22:14 henning
Exp $ */
/*
* Copyright (c) 2001 Daniel Hartmeier
@@
-611,9
+611,11
@@
pf_state_rm_src_node(struct pf_state *s, struct pf_src_node *sn)
else
SLIST_REMOVE_HEAD(&s->src_nodes, next);
pool_put(&pf_sn_item_pl, sni);
+ sni = NULL;
sn->states--;
}
- snip = sni;
+ if (sni != NULL)
+ snip = sni;
}
}