mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-14 10:09:48 +00:00
ipfilter: Fix ip_nat memory leak and use-after-free
Unfortunately the wrong elemet is freed, also resulting in use-after-free. PR: 255859 Submitted by: lylgood@foxmail.com Reported by: lylgood@foxmail.com MFC after: 3 days
This commit is contained in:
parent
d72cd27518
commit
323a4e2c4e
@ -6245,7 +6245,7 @@ ipf_nat_rule_deref(softc, inp)
|
|||||||
|
|
||||||
if (n->in_tqehead[0] != NULL) {
|
if (n->in_tqehead[0] != NULL) {
|
||||||
if (ipf_deletetimeoutqueue(n->in_tqehead[0]) == 0) {
|
if (ipf_deletetimeoutqueue(n->in_tqehead[0]) == 0) {
|
||||||
ipf_freetimeoutqueue(softc, n->in_tqehead[1]);
|
ipf_freetimeoutqueue(softc, n->in_tqehead[0]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user