Bug #7688
DHCP client leaks hostname "amnesia"
100%
Description
1. Boot Tails 1.1.
2. Install Wireshark.
3. Monitor the network until a periodic
DHCP refresh is done.
4. Click on the “DHCP Request” packet
going out to the local router/gateway/dhcp-server.
In the data in the packet one can see:
Bootstrap Protocol
Message type: Boot Request (1)
[…]
Option: (12) Host Name
Length: 7
Host Name: amnesia
[…]
In earlier Tails versions the hostname was not leaked, so this is a regression.
Related issues
Related to Tails - Feature #5655: Share username and hostname amongst all anonymity distributions | Confirmed | 2016-03-17 | |
Related to Tails - |
Resolved | 2014-08-01 |
History
#1 Updated by intrigeri 2014-07-30 09:03:52
- Target version set to Tails_1.1.1
- Type of work changed from Code to Research
Tentatively flagged for 1.1.1, so that we have this security regression on our radar. And there’s no lead for a fix yet, so marking as needing research.
#2 Updated by BitingBird 2014-07-30 22:30:34
- related to Feature #5655: Share username and hostname amongst all anonymity distributions added
#3 Updated by intrigeri 2014-07-31 18:05:43
(All that follows is valid on Wheezy. Not checked anything newer yet.)
NetworkManager runs dhclient with the -cf /var/run/nm-dhclient-eth0.conf
option. That file contains send host-name "amnesia"; # added by NetworkManager
, and is created by the nm_dhcp_dhclient_create_config
function in src/dhcp-manager/nm-dhcp-dhclient-utils.c
. Each connection has a dhcp-send-hostname
setting (docs/api/html/ref-settings.html) that defaults to TRUE.
On the short term, simply commenting out the line that adds the line we don’t want should be enough.
As suggested on https://mail.gnome.org/archives/networkmanager-list/2014-January/msg00011.html, if using the “keyfile” plugin only (that is, after disabling the “ifupdown” one), adding this to /etc/NetworkManager/NetworkManager.conf
seems to resolve the problem:
[ipv4]
dhcp-send-hostname=false
But:
- I’m not sure what would be the consequences of disabling the “ifupdown” plugin. My understanding of https://wiki.gnome.org/Projects/NetworkManager/SystemSettings leads me to think it’s a complete no-op in our case, but this should be tested more thoroughly.
- One also has to patch the system-wide
dhclient.conf
, since it containssend host-name = gethostname();
, and its content is merged into the NM-generated dhclient config file. - I’ve not sniffed the network to confirm that doing all of the above is enough.
#4 Updated by intrigeri 2014-07-31 18:44:56
- Status changed from Confirmed to In Progress
- % Done changed from 0 to 10
#5 Updated by intrigeri 2014-07-31 20:49:18
- Feature Branch set to bugfix/7688-no-dhcp-send-hostname
- Type of work changed from Research to Code
Implemented the solution described above. The generated dhclient.conf looks good. Left to do:
sniff the network to confirm that the hostname is not sent over DHCP(Feature #7712);verify that it works for a manually added (e.g. Wi-Fi) network connection too(Feature #7712);verify that the resulting ISO generally works fine: passes the automated test suite;verify that this solution also works on Jessie: works fine on current sid, verified with Wireshark;write design documentation.
#6 Updated by intrigeri 2014-08-01 10:35:41
- related to
Feature #7712: Automatically test hostname leaks added
#7 Updated by intrigeri 2014-08-03 12:54:47
- Assignee set to intrigeri
#8 Updated by intrigeri 2014-08-04 15:58:41
- Assignee deleted (
intrigeri) - % Done changed from 10 to 50
- QA Check set to Ready for QA
#9 Updated by intrigeri 2014-08-10 13:48:47
- related to
Bug #7769: Resets hostname to the one provided by the DHCP server added
#10 Updated by intrigeri 2014-08-10 13:49:31
- Assignee set to intrigeri
- QA Check deleted (
Ready for QA)
This branch might be causing Bug #7769. Hold on.
#11 Updated by intrigeri 2014-08-10 17:13:15
- related to deleted (
)Bug #7769: Resets hostname to the one provided by the DHCP server
#12 Updated by intrigeri 2014-08-10 17:14:15
- Assignee deleted (
intrigeri) - QA Check set to Ready for QA
The Bug #7769 regression was fixed on that branch. Ready for QA again!
#13 Updated by alant 2014-08-14 10:34:38
- Assignee set to alant
#14 Updated by alant 2014-08-14 10:48:32
- Status changed from In Progress to Fix committed
- Assignee deleted (
alant) - QA Check changed from Ready for QA to Pass
Merged, thanks!
#15 Updated by anonym 2014-09-02 05:15:59
- Status changed from Fix committed to Resolved