Skip to content

Redact MAC and IP addresses in omarchy-debug - #10334

Closed
surim0n wants to merge 1 commit into
omacom:quattrofrom
surim0n:fix/debug-redact
Closed

surim0n wants to merge 1 commit into
omacom:quattrofrom
surim0n:fix/debug-redact

Conversation

@surim0n

@surim0n surim0n commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes #10255.

The bug report template asks users to attach omarchy-debug output, but that output currently includes unredacted LAN MAC addresses and IPv4 addresses from UFW BLOCK dmesg lines.

Changes

  • Add redact_network() to bin/omarchy-debug to mask MAC addresses and IPv4 addresses.
  • Drop [UFW BLOCK] lines from dmesg (they are netfilter noise and are rarely relevant).
  • Apply the same redaction to the journalctl warnings/errors section.
  • Add a header note warning that hostname and package list may still identify the machine, so the reporter should review before sharing.

Test plan

  • bash -n bin/omarchy-debug passes
  • Full run with omarchy-debug --print on a Linux box (not available here)

The bug template asks users to attach omarchy-debug output, but that output currently includes unredacted LAN MAC addresses and IPv4 addresses from UFW BLOCK dmesg lines.

Add a redact_network filter that strips [UFW BLOCK] lines from dmesg and masks MAC and IPv4 addresses in both dmesg and journalctl. Also add a header note warning that the remaining hostname/package list may still identify the machine.

Fixes omacom#10255

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@CarloBrandolini

Copy link
Copy Markdown

Ran redact_network() from this branch against the journal section of a real
omarchy-debug --no-sudo dump (Omarchy 4.0.2-1, desktop, ufw at default
LOGLEVEL=low, quiet LAN). Two gaps, one of them a leak of the exact thing the
PR title promises to redact.

The router's MAC survives, 33 times, inside its IPv6 link-local address.
The journal path is journalctl -b -p 4..1 | redact_network, with no
grep -v '\[UFW BLOCK\]' and no IPv6 rule, so every IPv6 ufw line comes through
with SRC= intact. That address is EUI-64: the MAC with the U/L bit flipped and
ff:fe inserted in the middle. Synthetic example of the mechanism:

MAC   aa:bb:cc:dd:ee:ff
SRC=  fe80:0000:0000:0000:a8bb:ccff:fedd:eeff

Anyone can reverse that by hand. On this machine it resolves to the router's
vendor via OUI lookup, and a router MAC is one small offset away from its BSSID,
which wardriving databases geolocate. So the MAC rule is being bypassed by the
address it sits inside.

Measured, journal section only (239 lines in):

after this branch
[UFW BLOCK] lines remaining 194
MAC-shaped strings remaining 0
fe80: link-local addresses remaining 33
<mac> / <ip> substitutions in those ufw lines all

The ufw drop is applied to dmesg only. ufw logs at kernel warning level, so
the journal carries the same packet log. On this box 194 of 239 journal lines are
[UFW BLOCK], all IGMP membership queries from the router every two minutes.
The --no-sudo path skips dmesg entirely, so on that path none of the ufw lines
are dropped at all.

Both are handled in #10257, which drops ufw lines on both paths and has an
8-group and a compressed IPv6 rule. Whichever branch lands, the IPv6 rule is
load-bearing for the MAC, not an extra.

Filed by Claude Fable 5.1 via Claude Code.

@surim0n

surim0n commented Sep 6, 2026

Copy link
Copy Markdown
Contributor Author

Closing this in favor of #10257, which drops [UFW BLOCK] on both paths and already handles compressed IPv6 / EUI-64 MAC leakage.

@surim0n surim0n closed this Sep 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

omarchy-debug output includes unredacted LAN IPs and MAC addresses, and the bug template asks users to attach it

2 participants