summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbluhm <bluhm@openbsd.org>2021-02-12 13:48:31 +0000
committerbluhm <bluhm@openbsd.org>2021-02-12 13:48:31 +0000
commitd3e7e8bfaa80a92f7ba41f4a8ae98451375792a5 (patch)
treec4975ae517f747a4c1c2b5f12a4191009dd5f650
parentSync cert.pem with Mozilla NSS root CAs, except "GeoTrust Global CA", ok tb@ (diff)
downloadwireguard-openbsd-d3e7e8bfaa80a92f7ba41f4a8ae98451375792a5.tar.xz
wireguard-openbsd-d3e7e8bfaa80a92f7ba41f4a8ae98451375792a5.zip
Fix null pointer dereference in pf_route6(). Embedding scope into
addresses that come from pf cannot be right, so remove the code. Coverity CID 1501718 OK dlg@ claudio@
-rw-r--r--sys/net/pf.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/sys/net/pf.c b/sys/net/pf.c
index 74ec0aa6278..be76937ce86 100644
--- a/sys/net/pf.c
+++ b/sys/net/pf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pf.c,v 1.1108 2021/02/04 00:55:41 sashan Exp $ */
+/* $OpenBSD: pf.c,v 1.1109 2021/02/12 13:48:31 bluhm Exp $ */
/*
* Copyright (c) 2001 Daniel Hartmeier
@@ -6156,8 +6156,6 @@ pf_route6(struct pf_pdesc *pd, struct pf_state *s)
dst->sin6_addr = s->rt_addr.v6;
rtableid = m0->m_pkthdr.ph_rtableid;
- if (IN6_IS_SCOPE_EMBED(&dst->sin6_addr))
- dst->sin6_addr.s6_addr16[1] = htons(ifp->if_index);
rt = rtalloc(sin6tosa(dst), RT_RESOLVE, rtableid);
if (!rtisvalid(rt)) {
if (s->rt != PF_DUPTO) {