From nobody Tue Aug 11 08:42:42 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4hK4rL4nxfz6XBpd for ; Tue, 11 Aug 2026 08:42:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4hK4rL1nMcz436c for ; Tue, 11 Aug 2026 08:42:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1786437762; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=F6f5V5RHwR5gAi7P9Ptb9A60FEzuylVrcvEjNpGvvW0=; b=nIkdfofUvehKCEEhDbzZWvbOaXXYcAMjS9asZxL/rVXNRvQg9f84kbCtfYmlTpQZc10Kfp XqodUDWFIhJ+s07Pusi5/KREKrsI+RzlYPNcUeB81dE/yrg1lvqBD6FI5I5AeO7Iv0Dqck kFxQFQRgctXQsSbhwaiv9bjrqzCfXltLy/SJq+JBjP1L4RMgrdVLhH1O1kXwc3H04FL+kj xe4JrNfc19qUxEFTNH1bvTf4+ySqfT7arxU+i/tCxsTLL5WZK+CuD1SoRJDVQqEtwNUbFF PS0vUL75SscSKLh1vvP+smOx/UrGRMYHA49IkEpspvxYSgdiR4z0nQWvDDdViw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1786437762; a=rsa-sha256; cv=none; b=fNrHrRU8GqqoscppdP6OJkeJFbg9QPQxPXLSc6qwAeNEcwrZpffWBfCopBA9LglC19ioHe YN1LVltjGNPC3HY54WhCLYmAcq5ydafVLDhh3bCXWJK3LDbB19alXwAC48W8sYAbPphIvp wasq0GS5OlJfCVMbn1WjMo1XzUGaBimCvRo33m8Iu0ROmvLSfkMVxwuMfb0aVUaSBXgUfA DrHTWTU/eguSAzHy9lQe7LCY4OMvuMg5oJ+kZWcHaMobUM3wYWuCd20Li3k1z/vvBLVNtT oyNZptBlaDbOOzhORNxYcybDEbETrojV9B6ZFD3sxTPXjOAgUHZxzmxnoedVvA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1786437762; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=F6f5V5RHwR5gAi7P9Ptb9A60FEzuylVrcvEjNpGvvW0=; b=SHfbcQ+udI4mDrS/WIqFcwH/9baUdf2BTYHIJCsqW0z1AcPhiQOjmH9dytLtxgp1rVTvIC +l7AlkGs+EoiLxAOCEIaU3fwg2xBVjC4chYijq8OP1cU9xYk9ILEgDCF26yYnEgGSFSlc1 4bGoSuliMgSogpbaHQ8/j5jb8FBhn/CoEgd4rncrex0ObSfulOJ6U7ZaKTKIseq1FElHle YZ+0WHfxXQiysgVIY8kcIFw5KdkWRVzMIKla5wSljhRZC7OwpgP53a9bFR/cjRY6CFW/mL V9H50jRGTlsQWUdJg1E878UIzMbGiRVZMs7feDWKZ+Zc3xAFEs2kZGULTW2p4Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4hK4rL0VlBznrW for ; Tue, 11 Aug 2026 08:42:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 30f15 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 11 Aug 2026 08:42:42 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: 82255ae91399 - stable/14 - pf: check if a group has a kif before dereferencing it List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 82255ae9139995c0597246b90c90ba4cf955d3ed Auto-Submitted: auto-generated Date: Tue, 11 Aug 2026 08:42:42 +0000 Message-Id: <6a7ae082.30f15.7647210a@gitrepo.freebsd.org> The branch stable/14 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=82255ae9139995c0597246b90c90ba4cf955d3ed commit 82255ae9139995c0597246b90c90ba4cf955d3ed Author: Kristof Provost AuthorDate: 2025-09-02 08:46:26 +0000 Commit: Kristof Provost CommitDate: 2026-08-11 08:34:13 +0000 pf: check if a group has a kif before dereferencing it It's possible for interface groups to not have had a pfi_kkif assigned to them, so before we pass that pointer to pfi_kkif_update() we must check if it's actually set. We've seen panics such as this, where we get an address update for an interface that belongs to a group without associated pfi_kkif: Tracing pid 12 tid 100034 td 0xfffff80100d2a000 kdb_enter() at kdb_enter+0x33/frame 0xfffffe0067eed340 panic() at panic+0x43/frame 0xfffffe0067eed3a0 trap_pfault() at trap_pfault+0x3c9/frame 0xfffffe0067eed3f0 calltrap() at calltrap+0x8/frame 0xfffffe0067eed3f0 --- trap 0xc, rip = 0xffffffff8102ebd5, rsp = 0xfffffe0067eed4c0, rbp = 0xfffffe0067eed500 --- pfi_kkif_update() at pfi_kkif_update+0x15/frame 0xfffffe0067eed500 pfi_kkif_update() at pfi_kkif_update+0x1fc/frame 0xfffffe0067eed550 pfi_ifaddr_event() at pfi_ifaddr_event+0x82/frame 0xfffffe0067eed5a0 srcaddr_change_event() at srcaddr_change_event+0xa7/frame 0xfffffe0067eed610 in6_update_ifa() at in6_update_ifa+0xd52/frame 0xfffffe0067eed790 in6_ifadd() at in6_ifadd+0x29a/frame 0xfffffe0067eed8b0 nd6_ra_input() at nd6_ra_input+0xf65/frame 0xfffffe0067eeda90 icmp6_input() at icmp6_input+0x3c8/frame 0xfffffe0067eedc10 ip6_input() at ip6_input+0xa15/frame 0xfffffe0067eedcf0 sppp_input() at sppp_input+0x502/frame 0xfffffe0067eedd80 pppoe_data_input() at pppoe_data_input+0x1e7/frame 0xfffffe0067eeddf0 swi_net() at swi_net+0x128/frame 0xfffffe0067eede60 ithread_loop() at ithread_loop+0x239/frame 0xfffffe0067eedef0 fork_exit() at fork_exit+0x7b/frame 0xfffffe0067eedf30 fork_trampoline() at fork_trampoline+0xe/frame 0xfffffe0067eedf30 Note that pf doesn't assign pfi_kkif objects to groups created before pf has fully started (see V_pf_vnet_active check in pfi_attach_group_event()), which is one possible way for this to happen. Reported by: garga Sponsored by: Rubicon Communications, LLC ("Netgate") (cherry picked from commit dc0cf0648c8d28ab4914c798a4cff8256ae94ee5) --- sys/netpfil/pf/pf_if.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/netpfil/pf/pf_if.c b/sys/netpfil/pf/pf_if.c index 650a7e4db799..3c5bcc95f7cf 100644 --- a/sys/netpfil/pf/pf_if.c +++ b/sys/netpfil/pf/pf_if.c @@ -610,8 +610,10 @@ pfi_kkif_update(struct pfi_kkif *kif) /* again for all groups kif is member of */ if (kif->pfik_ifp != NULL) { CK_STAILQ_FOREACH(ifgl, &kif->pfik_ifp->if_groups, ifgl_next) - pfi_kkif_update((struct pfi_kkif *) - ifgl->ifgl_group->ifg_pf_kif); + if (ifgl->ifgl_group->ifg_pf_kif) { + pfi_kkif_update((struct pfi_kkif *) + ifgl->ifgl_group->ifg_pf_kif); + } } }