diff options
author | gordon <gordon@FreeBSD.org> | 2019-05-14 23:10:21 +0000 |
---|---|---|
committer | gordon <gordon@FreeBSD.org> | 2019-05-14 23:10:21 +0000 |
commit | f4d79a1222c4f4c9ae1941f72ee3ba12ec7cc812 (patch) | |
tree | 3f501d19ed555507ca7027d09130e890c06a379d | |
parent | d196ca685378f9d29b6f523ca725f9ae8c660139 (diff) | |
download | FreeBSD-src-f4d79a1222c4f4c9ae1941f72ee3ba12ec7cc812.zip FreeBSD-src-f4d79a1222c4f4c9ae1941f72ee3ba12ec7cc812.tar.gz |
Fix IPv6 fragment reassembly panic in pf
Approved by: so
Security: FreeBSD-SA-19:05.pf
Security: CVE-2019-5597
-rw-r--r-- | sys/netpfil/pf/pf_norm.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/netpfil/pf/pf_norm.c b/sys/netpfil/pf/pf_norm.c index f54e038..612dff6 100644 --- a/sys/netpfil/pf/pf_norm.c +++ b/sys/netpfil/pf/pf_norm.c @@ -652,11 +652,11 @@ pf_reassemble6(struct mbuf **m0, struct ip6_hdr *ip6, struct ip6_frag *fraghdr, } /* We have all the data. */ + frent = TAILQ_FIRST(&frag->fr_queue); + KASSERT(frent != NULL, ("frent != NULL")); extoff = frent->fe_extoff; maxlen = frag->fr_maxlen; frag_id = frag->fr_id; - frent = TAILQ_FIRST(&frag->fr_queue); - KASSERT(frent != NULL, ("frent != NULL")); total = TAILQ_LAST(&frag->fr_queue, pf_fragq)->fe_off + TAILQ_LAST(&frag->fr_queue, pf_fragq)->fe_len; hdrlen = frent->fe_hdrlen - sizeof(struct ip6_frag); |