From nobody Sun Jan 30 08:51:20 2022 X-Original-To: bugs@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 EDB901979EA5 for ; Sun, 30 Jan 2022 08:51:20 +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 4JmlKh3zDKz3KTD for ; Sun, 30 Jan 2022 08:51:20 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) 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 6A3E625DA7 for ; Sun, 30 Jan 2022 08:51:20 +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 20U8pKuu099451 for ; Sun, 30 Jan 2022 08:51:20 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 20U8pKDU099450 for bugs@FreeBSD.org; Sun, 30 Jan 2022 08:51:20 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: bugs@FreeBSD.org Subject: [Bug 261566] Padding of DLT_PFLOG packets should be done differently Date: Sun, 30 Jan 2022 08:51:20 +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: CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: gharris@sonic.net X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@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: Bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-bugs@freebsd.org MIME-Version: 1.0 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1643532680; 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=WqzlFyIYp8chDLCmyUNLpI51W8dQBMj7HDOnzZ2ezQk=; b=k8SfFcHHkUl1Wr0F0tsBdm/TXvDs7YCIlfjA9PfQlvuGc+ae11+1F4G50k3MLo6+F3iakD gxIhd847UEJ/EymQ8yRbEvCVWcCo232sz/g7XhH3RSzUj+ohrNBY19V0gtrAPYakG7xx3u pBGnhGdFnOkpWqa6EMWjIQmBMbfhL61v7X8/6Okm+fsTCR7aWjn40JHA9j81MkuxHURzOA ZoBBWCE87+fxHS3zrp+EmABaTmR/Wp7oJURpvhwujIjV5bYFmdJ87fZBmdqeyekzyp8YJi 13dO4EZtrXeR8wBj4lEx6NqaQ8Fv7uSozgVBA21JitJnNpBSbb6lC9hhPrnnbg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1643532680; a=rsa-sha256; cv=none; b=wckz3XdlV7O9Cq5M9NrsQufCgfBTYgktT1fKR5HIUXfOO+nvk+SqI5KIjLpYszhGh2xsyf EMyI+ECAEckAZRl3yPZdLesk14Hp5Q7ANbx61ONPFShGM9/+5h6FX2syt0ViAjrjBiu2Mr kz2ZU/XJD/SkWcM7CFBesrd3SORiJYKrGO2NXE97knCedHQpxAghZQrpgrANT0GWQevZER HkBUCEEqM3VEw/EQFYMmGXhK2LYkteEaQG5fex4e8m6YxPdkvfA25PkwDzODdt3sbCBCPM nkmv8MJPadm1zpjkMLUmqOcjFK0S1y4cWUyKaKGfA9cw8EAQ3eZ5ibNlb/laYQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D261566 --- Comment #1 from Guy Harris --- Note also that, if you try to read a DLT_PFLOG capture with the OpenBSD str= uct pfloghdr, and round the length up to a multiple of 8, you will *NOT* correc= tly read it. Here's version 1.29 of sys/net/if_pflog.h: =20=20=20 https://cvsweb.openbsd.org/src/sys/net/if_pflog.h?rev=3D1.29&content-type= =3Dtext/x-cvsweb-markup struct pf_addr is 16 bytes (containing a union big enough to hold either an IPv4 or an IPv6 address, as per version 1.505 of sys/net/pfvar.h: =20=20=20 https://cvsweb.openbsd.org/src/sys/net/pfvar.h?rev=3D1.505&content-type=3Dt= ext/x-cvsweb-markup ), IFNAMSIZ is 16, sa_family_t is 1 byte, and uid_t and pid_t are both 4 by= tes, for a total of 1+1+1+1+16+16+4+4+4+4+4+4+1+1+1+1+16+16+2+2 =3D 100 bytes, w= hich is *not* a multiple of 8, although it *is* a multiple of 4. The new-style header was introduced in version 1.8: =20=20=20 https://cvsweb.openbsd.org/src/sys/net/if_pflog.h?rev=3D1.8&content-type=3D= text/x-cvsweb-markup =20=20=20 https://cvsweb.openbsd.org/cgi-bin/cvsweb/src/sys/net/if_pflog.h.diff?r1=3D= 1.7&r2=3D1.8&f=3Dh and they got rid of the "PFLOG_REAL_HDRLEN doesn't include the padding to a 4-byte boundary" stuff in version 1.16: =20=20=20 https://cvsweb.openbsd.org/src/sys/net/if_pflog.h?rev=3D1.16&content-type= =3Dtext/x-cvsweb-markup =20=20=20 https://cvsweb.openbsd.org/cgi-bin/cvsweb/src/sys/net/if_pflog.h.diff?r1=3D= 1.15&r2=3D1.16&f=3Dh --=20 You are receiving this mail because: You are the assignee for the bug.=