Skip to content

Fix NETW-2706: Update DNSSEC detection logic for modern resolvectl - #1740

Open
miikun95 wants to merge 3 commits into
CISOfy:masterfrom
miikun95:master
Open

miikun95 wants to merge 3 commits into
CISOfy:masterfrom
miikun95:master

Conversation

@miikun95

@miikun95 miikun95 commented May 7, 2026 •

Copy link
Copy Markdown
Contributor

summary

this pr improves the dnssec detection logic in the `netw-2706` test to support newer versions of `systemd-resolved` (systemd 250 and later).

problem

the current implementation relies on `resolvectl --statistics`, which only provides statistical counters and does not reliably indicate whether dnssec is active for the current network interfaces. furthermore, the previous `awk` parsing logic fails on newer output formats like `dnssec=yes/supported`.

changes

  • changed `resolve_cmd_param` from `--statistics` to `status` to get the actual operational status.
  • updated the parsing logic using `grep` and `cut` to correctly extract the status even when the output includes additional info (e.g., `yes/supported`).
  • added `head -n 1` to ensure a consistent single-line result when multiple interfaces are active.

note for maintainers

i am a japanese user and am using a machine translator to write this. i apologize for any unnatural phrasing. i have verified this fix on my local environment, and it now correctly returns `yes`.

verified result

command:
 
resolvectl status | grep -o 'DNSSEC=[^ ]*' | cut -d'=' -f2 | cut -d'/' -f1 | head -n 1
Output:
 
yes

miikun95, miikun95@miikun95.net

@q1sh101

q1sh101 commented Aug 12, 2026

Copy link
Copy Markdown

I tested the statistics to status change on Lynis 3.1.6, Ubuntu 26.04,
and systemd 259. On this system it also fixes a second problem in NETW-2706.

As an unprivileged user, resolvectl statistics requests the polkit action
org.freedesktop.resolve1.dump-statistics. The local policy sets
allow_active to auth_admin_keep, so the command opens an authorization
dialog and waits. Closing the dialog leaves the test UNKNOWN.

Measured locally:

$ resolvectl statistics >/dev/null
# opens a polkit dialog and waits

$ resolvectl status >/dev/null
# exits 0 immediately, no polkit authorization event

status still carries the value this PR parses:

Protocols: -LLMNR -mDNS -DNSOverTLS DNSSEC=no/unsupported

So on this configuration the change fixes both the DNSSEC parsing and an
unexpected interaction. It may be worth mentioning the second effect in the
commit message.

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.

2 participants