Page MenuHomeFreeBSD

audit: Fix logging of IPv6 addresses
Needs ReviewPublic

Authored by gallatin on Apr 18 2023, 12:22 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sep 11 2025, 1:46 PM
Unknown Object (File)
Jul 11 2025, 11:49 PM
Unknown Object (File)
Jul 7 2025, 9:32 AM
Unknown Object (File)
Jul 7 2025, 1:40 AM
Unknown Object (File)
Jul 4 2025, 8:21 AM
Unknown Object (File)
Jul 4 2025, 12:07 AM
Unknown Object (File)
Jun 20 2025, 7:20 AM
Unknown Object (File)
Jun 18 2025, 3:06 AM
Subscribers

Details

Summary

Our audit logging was not logging the IP/port information for IPv6 accept() syscalls. It turns out there were 2 problems

  1. kaudit_to_bsm: Log IPv6 as well as IPv4 and unix addrs
  2. au_to_sock_inet128: Treat ports the same way as au_to_sock_inet32(). Just pushing a uint16 causes byte ordering problems on little endian systems.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped