Replies: 3 comments
-
Not a bug, so moving to discussions. |
Beta Was this translation helpful? Give feedback.
-
@a1346054 : I suggest that you check the service file used in Arch Linux. It provides tight sandboxing:
And if that's not enough for you, you can additionally confine dnscrypt-proxy with AppArmor. A profile is available here. In that case you should read the installation and usage instructions for that project. |
Beta Was this translation helpful? Give feedback.
-
I checked whether the Arch Linux systemd service file could be merged into dnscrypt-proxy, but discovered that dnscrypt-proxy does not contain an editable service file but instead uses kardianos/service to generate a service file during installation. Unfortunately, that vendor does not have any functionality to define any of these hardening options. This means that a different service file generator or solution would be needed to make a proper pull request to maintain a hardened systemd service file in dnscrypt-proxy repository. Does anyone have any ideas? |
Beta Was this translation helpful? Give feedback.
-
Output of the following commands:
./dnscrypt-proxy -version
2.1.4
./dnscrypt-proxy -check
[2023-07-08 10:54:22] [NOTICE] dnscrypt-proxy 2.1.4
[2023-07-08 10:54:23] [NOTICE] Source [relays] loaded
[2023-07-08 10:54:24] [NOTICE] Source [public-resolvers] loaded
[2023-07-08 10:54:24] [NOTICE] Configuration successfully checked
./dnscrypt-proxy -resolve example.com
Resolving [example.com] using 127.0.0.1 port 53
Resolver : 193.70.85.11 (radia.bortzmeyer.org.)
Canonical name: example.com.
IPv4 addresses: 93.184.216.34
IPv6 addresses: 2606:2800:220:1:248:1893:25c8:1946
Name servers : a.iana-servers.net., b.iana-servers.net.
DNSSEC signed : yes
Mail servers : 1 mail servers found
HTTPS alias : -
HTTPS info : -
Host info : -
TXT records : v=spf1 -all, wgyf8z8cgvm2qmxpnbnldrcltvk4xqfn
What is affected by this bug?
dnscrypt-proxy.service generated by
dnscrypt-proxy -service install
When does this occur?
When you run
systemd-analyze security dnscrypt-proxy.service
Where does it happen?
In
/etc/systemd/system/dnscrypt-proxy.service
How do we replicate the issue?
Use linux distribution debian 12 (bookworm), which runs systemd as init.
Download dnscrypt-proxy-linux_x86_64-2.1.4.tar.gz from github, unpack, install using
dnscrypt-proxy -service install
Execute:
Notice this output:
Expected behavior (i.e. solution)
Apply more systemd service sandboxing measures by improving the default configuration of the dnscrypt-proxy.service when it is installed using
dnscrypt-proxy -service install
Other Comments
I know that the author of dnscrypt-proxy does not use linux or systemd, so I'm asking anyone else for help in fixing/improving this.
I also know that dnscrypt-proxy is well-written and already has some security measures to protect against vulnerabilities.
Please also ignore the systemd output "Overall exposure level for dnscrypt-proxy.service: 9.6 UNSAFE 😨", it's not an accurate representation of dnscrypt-proxy security.
Beta Was this translation helpful? Give feedback.
All reactions