]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/commit
MFC r314810:
authorkp <kp@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Thu, 9 Mar 2017 03:20:20 +0000 (03:20 +0000)
committerkp <kp@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Thu, 9 Mar 2017 03:20:20 +0000 (03:20 +0000)
commit42ad0ff42f63b92d21383e8922da630cf3e80220
treee850acf4b9f2dc63b5f863a9ff911df6c20f66fb
parent433e4c11267a47bd24cfd93b23e04b06c2ecd8ac
MFC r314810:

pf: Fix a crash in low-memory situations

If the call to pf_state_key_clone() in pf_get_translation() fails (i.e. there's
no more memory for it) it frees skp. This is wrong, because skp is a
pf_state_key **, so we need to free *skp, as is done later in the function.
Getting it wrong means we try to free a stack variable of the calling
pf_test_rule() function, and we panic.

git-svn-id: svn://svn.freebsd.org/base/stable/10@314940 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
sys/netpfil/pf/pf_lb.c