From nobody Thu Jan 02 22:10:29 2025 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 4YPLVs67kvz5k2fG for ; Thu, 02 Jan 2025 22:10:29 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4YPLVs42t5z45Sq for ; Thu, 2 Jan 2025 22:10:29 +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=1735855829; 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=oUzeaqfjjkG4trjpgG238fYf8YoQhlY/glbAPMihlEQ=; b=c5f5e5XwFtzVvE94KzCYfD9GvTXbdtidQd3ni8lufH8W/Vfr5hNpIhvhLWV851p+4sKS2P HsuCSohnijXVWDqMxexC4KqlG+CjsNQ3h+QknA8WA2NSTc0oYc0fN3ao795D8oGfY+k2Bj QFo+yKciXh5SbAA68yeo4xHVtwJ7JPl7WZjpwIk6e368jMS1AsaRZu7jA5Pb0dxU8EZPd4 Uvd+imY/1vVP6gc6xJynEsmA0JcR7piBBf17E1SSCZg2aYL0zdCndJTaAqBU8krTfKj/95 zvnJHv57c6n1+fRsCmjPbAyfTZg+J0LVnYiESqdYBaudo9QuABKon5eCJrKSNA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1735855829; a=rsa-sha256; cv=none; b=HMVsUD7vMRl4ZaM9fe3CXES/Dg6SgFF1TBhe9v+zuO2JOl5qRqvov2uuSwEyba+URgayA6 7GyNXbLrVhgN0TVVc1N0VGC7HycS2cx9/ocY4t6XSXJkMEvYMfHX9dVo1MEtmPs4uPbYwG d9shoZmhIbJs334MYOGrRHZiKPFcjFUywjWXz5rgZJ1VvlG08UnpTUwAAuz+CgratK+Sk8 J1wGj4hSpCcmX0Ks1/OQ16cgbZ3zUycJG1PEf7iSiyagNhgu3imA7pn6WELJeaXVSW0Hde Axby6w1AVmnr+Osce2RaPcclq1qrJbSPxgLqQrNJ1UGEOQaeLjl3hJx+EZ5d7Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none 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 4YPLVs3BqSztw1 for ; Thu, 02 Jan 2025 22:10:29 +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 502MAT0I060981 for ; Thu, 2 Jan 2025 22:10:29 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 502MATg6060978 for bugs@FreeBSD.org; Thu, 2 Jan 2025 22:10:29 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 283799] tcpdump (14.2+) endian-swaps uid when parsing pflog data Date: Thu, 02 Jan 2025 22:10:29 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bin X-Bugzilla-Version: 14.2-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: jrm@freebsd.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc 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 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D283799 Joseph Mingrone changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kp@freebsd.org --- Comment #2 from Joseph Mingrone --- [CC: kp@FreeSBD.org who has a better understanding of pf.] Hello, and thank you for reporting. hdr->uid is now defined as nd_uint32_t in contrib/tcpdump/pflog.h [0], so I /thought/ we needed GET_BE_U_4. The equivalent upstream code (which has unfortunately diverged from ours) also uses GET_BE_U_4 when printing the uid [1]. I'm not a pf user, so I'm not clear on the expected output before and after this change. This is what I see now: % id -u 1001 % sudo service pf start Enabling pf. % sudo service pflog start Starting pflog. % cat /etc/pf.conf if=3D"em0" block out log on $if inet proto icmp all % ping google.com # (in another vt) % sudo tcpdump -n -e -ttt -i pflog0 tcpdump: verbose output suppressed, use -v[v]... for full protocol decode listening on pflog0, link-type PFLOG (OpenBSD pflog file), snapshot length 262144 bytes 00:00:00.000000 rule 0/0(match) [uid 0]: block out on em0: 192.168.2.2 > 142.250.80.46: ICMP echo request, id 40305, seq 0, length 64 Could you share a recipe to demonstrate the problem? -- [0] https://github.com/freebsd/freebsd-src/blob/main/contrib/tcpdump/pflog.h#L1= 18-L151 [1] https://github.com/the-tcpdump-group/tcpdump/blob/master/print-pflog.c#L424= -L432 --=20 You are receiving this mail because: You are the assignee for the bug.=