[Bug 283799] tcpdump (14.2+) endian-swaps uid when parsing pflog data

From: <bugzilla-noreply_at_freebsd.org>
Date: Thu, 02 Jan 2025 17:13:10 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=283799

            Bug ID: 283799
           Summary: tcpdump (14.2+) endian-swaps uid when parsing pflog
                    data
           Product: Base System
           Version: 14.2-RELEASE
          Hardware: amd64
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: bin
          Assignee: bugs@FreeBSD.org
          Reporter: eborisch+FreeBSD@gmail.com

In this change:

https://cgit.freebsd.org/src/commit/contrib/tcpdump/print-pflog.c?h=releng/14.2&id=ec3da16d8bc19ad90f04cc227fc8f409813c44f4

Endian macros were added (apparently in error) here:

contrib/tcpdump/print-pflog.c line 122:
        if (GET_BE_U_4(hdr->uid) != UID_MAX)
                ND_PRINT(" [uid %u]", (unsigned)GET_BE_U_4(hdr->uid));

which causes the output uids to be treated to an incorrect byte-swap.

-- 
You are receiving this mail because:
You are the assignee for the bug.