From nobody Fri Jan 27 11:10:55 2023 X-Original-To: net@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 4P3FHg2fDRz3bN6N for ; Fri, 27 Jan 2023 11:10:55 +0000 (UTC) (envelope-from bugzilla-noreply@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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4P3FHg1ds3z490l for ; Fri, 27 Jan 2023 11:10:55 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674817855; 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: in-reply-to:in-reply-to:references:references; bh=V3knhi+EABrIkJ/rvhZb7jmsypt1/C+BDfayQvSG8eo=; b=FYvaZX/+m4VSYXvvABGy7ib69in9nnN5xtlzkAGTmhOanGaquaMfvBEJU1DunEE9d+R+IW bPiKnO8k+Gdp92vk1adhsR7Gone8aqB5ytP719CWcVSTC84pPBX1NiguHKGXInWlNKRANx XxnM+pJQ+FwPqOqLVbCObWxOLOyDL4LWpVMc3wbVVCKzm1I9smbq3e1WUGMR2FZGXJ31fL d6u7hS5hT8+x1FpNlJA3rPmx40MRODVD6TR1nQArohxDVMluxGJHoT90D3+CHIeS9pBpEr Fw4G1UNNMJ3ukJQqiWyDZS67ZKBU669ewTFTStb2sJ8FDRbMeNBvbHy8oESjow== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1674817855; a=rsa-sha256; cv=none; b=aaYgnrtSLSZOOWGG7Z9rTGB2S1V/FgAaEy3mCIkql3ebFTwb5k7dm5Ycy/CJIaTEm7emOH b4OPeNg4JzOjfrOszd7X+nNptnF2smQOe3/4gB4BEewLlMCzLeoeDRN4JoTkTdxN7tPeYQ OrQ+qHz8xhMfkvYcY5BPgxV7LGlxU8alccuIG2RpiW6EhMyBKjw1CRbBOQDnCIgQ7/xM0U 9pv4TGzJ7Ope65A4RQUBoQj52Rzo96+OTtFaUI6bw1piAxL1mBOyWgtbFV1II3OuvacXYD VR+qXzdYTE7+RrIQAWNWKMy+iucoDVKgerT1ed71SDfM7ZvXli0nUlCN1mjOBA== Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (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 did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4P3FHg0jKRz16Bv for ; Fri, 27 Jan 2023 11:10:55 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 30RBAtww078207 for ; Fri, 27 Jan 2023 11:10:55 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 30RBAtl4078206 for net@FreeBSD.org; Fri, 27 Jan 2023 11:10:55 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: net@FreeBSD.org Subject: [Bug 268246] crash and panic using pfsync on 13.1-RELEASE Date: Fri, 27 Jan 2023 11:10:55 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 13.1-RELEASE X-Bugzilla-Keywords: crash, needs-qa X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: kp@freebsd.org X-Bugzilla-Status: Open X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: net@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Networking and TCP/IP with FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-net List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-net@freebsd.org MIME-Version: 1.0 X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D268246 --- Comment #34 from Kristof Provost --- (In reply to jjasen from comment #33) Can you try this patch?=20 diff --git a/sys/netpfil/pf/if_pfsync.c b/sys/netpfil/pf/if_pfsync.c index 61308a35a7e1..54824227da57 100644 --- a/sys/netpfil/pf/if_pfsync.c +++ b/sys/netpfil/pf/if_pfsync.c @@ -1734,6 +1738,7 @@ pfsync_defer(struct pf_kstate *st, struct mbuf *m) struct pfsync_softc *sc =3D V_pfsyncif; struct pfsync_deferral *pd; struct pfsync_bucket *b; + struct ip *ip; if (m->m_flags & (M_BCAST|M_MCAST)) return (0); @@ -1751,6 +1756,13 @@ pfsync_defer(struct pf_kstate *st, struct mbuf *m) return (0); } + ip =3D mtod(m, struct ip *); + if (ip->ip_v =3D=3D 4) { + int len =3D ntohs(ip->ip_len); + if (m_length(m, NULL) !=3D len) + printf("%s() defer len %d / %d\n", __func__, m_length(m, NULL), len); + } + PFSYNC_BUCKET_LOCK(b); PFSYNC_UNLOCK(sc); That won't fix anything, but if we're looking at an incorrect IP packet that should trigger a log at least. I can reproduce your backtrace by setting an incorrect ip_len here. --=20 You are receiving this mail because: You are the assignee for the bug.=