LWN.net Logo

Security

Picking a MAC address for a FreedomBox

By Jonathan Corbet
December 5, 2012
The FreedomBox project is working toward the creation of an inexpensive, in-home device that can be used for secure and private communications. The initial plan is to create a version of the Debian distribution that can be installed on a device like the DreamPlug; the resulting configuration should "just work" for nontechnical users in potentially hostile situations. The project has many challenges to overcome, one of which — the choice of MAC address for the network interface — shows how tricky this problem space can be.

An interface's MAC address is a unique number identifying the interface to any other devices it may communicate directly with. Ethernet-style MAC addresses are six-byte quantities; half of those bytes identify the manufacturer while the other half are meant to be a unique serial number. The MAC address for the Ethernet interface on the system where this article being typed is:

    18:03:73:be:76:4a

This MAC address identifies the relevant system as having been manufactured by Dell. If Dell has done its job properly (and there is no evidence to the contrary), no other Ethernet interface on the planet should have that same MAC address.

FreedomBox developer Nick Daly recently started pondering the question of how a FreedomBox should set its MAC address. The hardware will come with an address provided by the manufacturer, of course, but that address can be changed by the kernel and there may well be good reasons for doing so. Many of those were outlined in this lengthy message from John Gilmore, which is well worth reading in its entirety; it forms the basis of this summary.

One obvious problem is that a static MAC address is a unique number identifying a particular system. Most interfaces never operate with anything but the vendor-supplied address; if a hostile party learns that address, they can quickly identify the system it belongs to. So, while a FreedomBox device might move around, a suitably informed observer will always know which device it is. That allows the correlation of activities over time and the monitoring of specific devices.

Current technologies make things worse. Quoting John:

Apple iPhones record the MAC addresses that are nearby, report these to Apple, and Apple uses them to return a physical position fix. This is used to more rapidly cause the GPS algorithm to converge on a position, and also used when GPS isn't working. The phones often report their GPS position and any nearby MAC addresses back to Apple servers... It's easy for hackers to query that database of MAC addresses and locations, by pretending to be an iPhone seeking its location.

In other words, a hostile entity might not have to drive around a city in an attempt to detect a device with a specific MAC address; instead, it is just a matter of asking Apple, which has a widespread surveillance network in place and can simply say where that device is to be found. Similar information is maintained by other parties — Google, for example.

John also pointed out that it is often trivial to determine which IP address is assigned to a device; it is often just a matter of sending a DNS query to the MAC address of interest. That can enable the identification of the location from which specific network activity has been generated.

Finally, there is the matter of that manufacturer identification number found in every MAC address. If FreedomBox becomes a widely used and effective system, certain authorities might develop a strong interest in knowing where DreamPlug systems are to be found. The identifying information found in the MAC address makes that identification a relatively simple task. Turning on a DreamPlug could be a way of painting a target on a specific location — not the sort of dream the owner may have been looking for.

The obvious conclusion is that FreedomBox systems should not normally run with the default MAC address provided by the vendor. They should, instead, generate a new address, and that address should be changed frequently. Fortunately, much of this is easy to do; any even remotely contemporary hardware will allow the host system to provide a new MAC address, and the data link layer (and above) protocols are pretty good about responding to MAC address changes. So there is no obvious technical barrier preventing frequent changing of a system's MAC address.

But there is still the question of what that address should be. Nick had suggested defaulting to 00:00:00:00:00:00 by default, a choice that would clearly prevent the identification of specific FreedomBoxes. But there are problems with that choice, starting with the fact that confusion would result as soon as two FreedomBoxes appeared on the same network. So something a little smarter is needed.

One obvious possibility is to simply generate a six-byte random number and use that. Care would have to be taken to avoid MAC address collisions on any given net, but that is not a particularly hard problem to solve. There are also the usual issues with having enough entropy available to generate a proper random number at boot time; without an adequate level of care, that random address might be far less random than people expect. Once again, that is a problem that should be amenable to a proper solution.

But, as John pointed out, there is another problem: real-world MAC addresses follow a specific pattern; a random address, being unlikely to fit that pattern, would probably stand out like a neon sign to anybody who is looking for it. To be convincing, a system-chosen MAC address cannot be completely random. It should have a recognized manufacturer number, preferably a manufacturer that actually makes contemporary wireless network interfaces. The serial number also needs to fit into a range that was actually shipped by that manufacturer. In other words, a random MAC address will only blend in if it makes the device look like some other random piece of real-world hardware.

These problems are all tractable, but the solution requires a great deal of due care if it is not to expose its users to unwanted consequences. Indeed, the whole system must be designed and implemented with that level of care; that is part of why the FreedomBox has not come to fruition as quickly as many would have liked. Privacy is a surprisingly difficult problem, with many pitfalls for those who try for a quick solution.

Comments (36 posted)

Brief items

Security quotes of the week

My computer was arrested before me
-- Syrian protester Dr. Taymour Karim

… the FBI has access to … the emails of virtually everybody in the country.
-- NSA whistle-blower William Binney, interviewed on RT.com

Jellyfish are interesting to trojan writers. Deep at their heart they are colony creatures, with stealth capabilities. What could be more pertinent to those of us who feed on the world's information like opportunistic predators?

Right now my feeling is that the world has been lucky because most of the malicious software on the internet has been, at worst, a rapscallion, or a scofflaw, or perhaps a ne'er-do-well. And there are modern networks who fare pretty well against that kind of adversary. But longer term, there's going to be malware that resembles science fiction <http://www.immunityinc.com/downloads/TheLongRun.pdf>...or maybe jellyfish? :>

-- Dave Aitel

These companies own us, so they can sell us off -- again, like serfs -- to rival lords... or turn us in to the authorities.
-- Bruce Schneier

Comments (1 posted)

New vulnerabilities

apache2: denial of service

Package(s):apache2 CVE #(s):CVE-2012-4557
Created:November 30, 2012 Updated:December 5, 2012
Description:

From the Debian advisory:

A flaw was found when mod_proxy_ajp connects to a backend server that takes too long to respond. Given a specific configuration, a remote attacker could send certain requests, putting a backend server into an error state until the retry timeout expired. This could lead to a temporary denial of service.

Alerts:
Debian DSA-2579-1 2012-11-30
openSUSE openSUSE-SU-2013:0243-1 2013-02-05
openSUSE openSUSE-SU-2013:0248-1 2013-02-05
Red Hat RHSA-2013:0512-02 2013-02-21
Oracle ELSA-2013-0512 2013-02-25
Scientific Linux SL-http-20130228 2013-02-28
CentOS CESA-2013:0512 2013-03-09
Ubuntu USN-1765-1 2013-03-18

Comments (none posted)

claws-mail: user credential leak

Package(s):claws-mail CVE #(s):CVE-2012-5527
Created:December 3, 2012 Updated:January 18, 2013
Description: From the Red Hat bugzilla:

A security flaw was found in the way vCalendar plug-in of Claws Mail displayed user credential information in the system tray display when using https scheme. A local attacker could use this flaw to obtain user credentials (username and password) used for connection to remote point.

Alerts:
Fedora FEDORA-2012-18558 2012-12-03
Fedora FEDORA-2012-18559 2012-12-03
Fedora FEDORA-2012-18558 2012-12-03
Fedora FEDORA-2012-18559 2012-12-03
Mageia MGASA-2013-0014 2013-01-18

Comments (none posted)

firefox: multiple vulnerabilities

Package(s):Mozilla Firefox CVE #(s):CVE-2012-5837 CVE-2012-4206
Created:November 29, 2012 Updated:December 5, 2012
Description:

From the Mozilla advisory:

MFSA 2012-102 / CVE-2012-5837: Security researcher Masato Kinugawa reported that when script is entered into the Developer Toolbar, it runs in a chrome privileged context. This allows for arbitrary code execution or cross-site scripting (XSS) if a user can be convinced to paste malicious code into the Developer Toolbar.

MFSA 2012-98 / CVE-2012-4206: Security researcher Robert Kugler reported that when a specifically named DLL file on a Windows computer is placed in the default downloads directory with the Firefox installer, the Firefox installer will load this DLL when it is launched. In circumstances where the installer is run by an administrator privileged account, this allows for the downloaded DLL file to be run with administrator privileges. This can lead to arbitrary code execution from a privileged account.

Alerts:
SUSE SUSE-SU-2012:1592-1 2012-11-29
Ubuntu USN-1638-3 2012-12-03
Gentoo 201301-01 2013-01-07
openSUSE openSUSE-SU-2013:0175-1 2013-01-23

Comments (none posted)

kernel: information leak

Package(s):kernel CVE #(s):CVE-2012-4530
Created:December 3, 2012 Updated:January 15, 2013
Description: From the Red Hat bugzilla:

A memory disclosure flaw has been found in the way binfmt_script load_script() function handled excessive recursions. An unprivileged local user could use this flaw to leak kernel memory.

Alerts:
Fedora FEDORA-2012-19337 2012-12-01
Fedora FEDORA-2012-20240 2012-12-18
Ubuntu USN-1683-1 2013-01-10
Ubuntu USN-1684-1 2013-01-10
Ubuntu USN-1688-1 2013-01-15
Ubuntu USN-1689-1 2013-01-15
Ubuntu USN-1691-1 2013-01-15
Ubuntu USN-1696-1 2013-01-17
Ubuntu USN-1699-1 2013-01-17
Ubuntu USN-1698-1 2013-01-17
Ubuntu USN-1700-1 2013-01-17
Ubuntu USN-1704-1 2013-01-22
Mageia MGASA-2013-0016 2013-01-24
Ubuntu USN-1699-2 2013-02-01
Ubuntu USN-1700-2 2013-02-01
Ubuntu USN-1696-2 2013-02-01
Ubuntu USN-1698-2 2013-02-01
Ubuntu USN-1704-2 2013-02-01
Red Hat RHSA-2013:0223-01 2013-02-05
CentOS CESA-2013:0223 2013-02-06
Oracle ELSA-2013-0223 2013-02-06
Scientific Linux SL-kern-20130206 2013-02-06
Oracle ELSA-2013-2503 2013-02-07
Oracle ELSA-2013-2504 2013-02-07
Oracle ELSA-2013-2507 2013-02-28
openSUSE openSUSE-SU-2013:0396-1 2013-03-05
Red Hat RHSA-2013:0566-01 2013-03-06

Comments (none posted)

kernel: privilege escalation

Package(s):kernel CVE #(s):CVE-2012-5513
Created:December 5, 2012 Updated:December 24, 2012
Description: From the Red Hat advisory:

A flaw in the way the Xen hypervisor implementation range checked guest provided addresses in the XENMEM_exchange hypercall could allow a malicious, para-virtualized guest administrator to crash the hypervisor or, potentially, escalate their privileges, allowing them to execute arbitrary code at the hypervisor level.

Alerts:
Red Hat RHSA-2012:1540-01 2012-12-04
CentOS CESA-2012:1540 2012-12-05
SUSE SUSE-SU-2012:1606-1 2012-12-04
SUSE SUSE-SU-2012:1615-1 2012-12-06
Scientific Linux SL-kern-20121206 2012-12-06
Oracle ELSA-2012-1540 2012-12-05
Debian DSA-2582-1 2012-12-07
openSUSE openSUSE-SU-2012:1685-1 2012-12-23
openSUSE openSUSE-SU-2012:1687-1 2012-12-23
openSUSE openSUSE-SU-2013:0133-1 2013-01-23

Comments (none posted)

keystone: multiple vulnerabilities

Package(s):keystone CVE #(s):CVE-2012-5571 CVE-2012-5563
Created:November 29, 2012 Updated:December 11, 2012
Description:

From the Ubuntu advisory:

Vijaya Erukala discovered that Keystone did not properly invalidate EC2-style credentials such that if credentials were removed from a tenant, an authenticated and authorized user using those credentials may still be allowed access beyond the account owner's expectations. (CVE-2012-5571)

It was discovered that Keystone did not properly implement token expiration. A remote attacker could use this to continue to access an account that is disabled or has a changed password. This issue was previously fixed as CVE-2012-3426 but was reintroduced in Ubuntu 12.10. (CVE-2012-5563)

Alerts:
Ubuntu USN-1641-1 2012-11-28
Red Hat RHSA-2012:1556-01 2012-12-10
Red Hat RHSA-2012:1557-01 2012-12-10
Fedora FEDORA-2012-19341 2012-12-11

Comments (none posted)

libxml2: code execution

Package(s):libxml2 CVE #(s):CVE-2012-5134
Created:November 30, 2012 Updated:March 1, 2013
Description:

From the Red hat advisory:

A heap-based buffer underflow flaw was found in the way libxml2 decoded certain entities. A remote attacker could provide a specially-crafted XML file that, when opened in an application linked against libxml2, would cause the application to crash or, potentially, execute arbitrary code with the privileges of the user running the application. (CVE-2012-5134)

Alerts:
Red Hat RHSA-2012:1512-01 2012-11-29
CentOS CESA-2012:1512 2012-11-29
CentOS CESA-2012:1512 2012-11-29
Oracle ELSA-2012-1512 2012-11-29
Oracle ELSA-2012-1512 2012-11-29
Scientific Linux SL-libx-20121129 2012-11-29
Mageia MGASA-2012-0350 2012-11-30
Mandriva MDVSA-2012:176 2012-12-02
Debian DSA-2580-1 2012-12-02
Ubuntu USN-1656-1 2012-12-05
Slackware SSA:2012-341-03 2012-12-06
SUSE SUSE-SU-2012:1636-1 2012-12-12
openSUSE openSUSE-SU-2012:1647-1 2012-12-17
openSUSE openSUSE-SU-2013:0178-1 2013-01-23
Red Hat RHSA-2013:0217-01 2013-01-31
CentOS CESA-2013:0217 2013-02-01
Oracle ELSA-2013-0217 2013-02-01
Scientific Linux SL-ming-20130201 2013-02-01
Oracle ELSA-2013-0581 2013-03-01

Comments (none posted)

lynx: multiple vulnerabilities

Package(s):lynx-cur CVE #(s):CVE-2010-2810 CVE-2012-5821
Created:November 30, 2012 Updated:December 5, 2012
Description:

From the Ubuntu advisory:

Dan Rosenberg discovered a heap-based buffer overflow in Lynx. If a user were tricked into opening a specially crafted page, a remote attacker could cause a denial of service via application crash, or possibly execute arbitrary code as the user invoking the program. This issue only affected Ubuntu 10.04 LTS. (CVE-2010-2810)

It was discovered that Lynx did not properly verify that an HTTPS certificate was signed by a trusted certificate authority. This could allow an attacker to perform a "man in the middle" (MITM) attack which would make the user believe their connection is secure, but is actually being monitored. This update changes the behavior of Lynx such that self-signed certificates no longer validate. Users requiring the previous behavior can use the 'FORCE_SSL_PROMPT' option in lynx.cfg. (CVE-2012-5821)

Alerts:
Ubuntu USN-1642-1 2012-11-29
Mageia MGASA-2012-0351 2012-11-30

Comments (none posted)

mod_security: multipart/invalid part ruleset bypass

Package(s):mod_security CVE #(s):CVE-2012-4528
Created:December 3, 2012 Updated:January 1, 2013
Description: From the Red Hat bugzilla:

ModSecurity <= 2.6.8 is vulnerable to multipart/invalid part ruleset bypass, this was fixed in 2.7.0 (released on2012-10-16)

Alerts:
Fedora FEDORA-2012-18315 2012-12-01
Fedora FEDORA-2012-18315 2012-12-01
Mandriva MDVSA-2012:182 2012-12-23
Mandriva MDVSA-2012:183 2012-12-23
Mageia MGASA-2012-0371 2012-12-31

Comments (none posted)

mysql: code execution

Package(s):mysql-5.1 CVE #(s):CVE-2012-5611
Created:December 4, 2012 Updated:February 10, 2013
Description: From the CVE entry:

Stack-based buffer overflow in MySQL 5.5.19, 5.1.53, and possibly other versions, and MariaDB 5.5.2.x before 5.5.28a, 5.3.x before 5.3.11, 5.2.x before 5.2.13 and 5.1.x before 5.1.66, allows remote authenticated users to execute arbitrary code via a long argument to the GRANT FILE command.

Alerts:
Debian DSA-2581-1 2012-12-04
Mageia MGASA-2012-0349 2012-12-07
Red Hat RHSA-2012:1551-01 2012-12-07
CentOS CESA-2012:1551 2012-12-07
Scientific Linux SL-mysq-20121207 2012-12-07
Mandriva MDVSA-2012:178 2012-12-09
Oracle ELSA-2012-1551 2012-12-07
Ubuntu USN-1658-1 2012-12-10
Fedora FEDORA-2012-19833 2012-12-15
Fedora FEDORA-2012-19823 2012-12-21
openSUSE openSUSE-SU-2013:0011-1 2013-01-07
openSUSE openSUSE-SU-2013:0014-1 2013-01-07
openSUSE openSUSE-SU-2013:0013-1 2013-01-07
Ubuntu USN-1703-1 2013-01-22
Red Hat RHSA-2013:0180-01 2013-01-22
CentOS CESA-2013:0180 2013-01-22
Oracle ELSA-2013-0180 2013-01-22
openSUSE openSUSE-SU-2013:0135-1 2013-01-23
openSUSE openSUSE-SU-2013:0156-1 2013-01-23
Scientific Linux SL-mysq-20130123 2013-01-23
Mandriva MDVSA-2013:007 2013-02-05
Mandriva MDVSA-2013:008 2013-02-06
Mageia MGASA-2013-0046 2013-02-09
SUSE SUSE-SU-2013:0262-1 2013-02-09

Comments (none posted)

perl: code execution

Package(s):perl CVE #(s):CVE-2012-5195
Created:November 30, 2012 Updated:January 28, 2013
Description:

From the Ubuntu advisory:

It was discovered that Perl's 'x' string repeat operator is vulnerable to a heap-based buffer overflow. An attacker could use this to execute arbitrary code. (CVE-2012-5195)

Alerts:
Ubuntu USN-1643-1 2012-11-29
Mageia MGASA-2012-0352 2012-12-07
Debian DSA-2586-1 2012-12-11
Mandriva MDVSA-2013:005 2013-01-28
Red Hat RHSA-2013:0685-01 2013-03-26
CentOS CESA-2013:0685 2013-03-26
CentOS CESA-2013:0685 2013-03-26
Oracle ELSA-2013-0685 2013-03-26
Oracle ELSA-2013-0685 2013-03-27
Scientific Linux SL-perl-20130327 2013-03-27

Comments (none posted)

Page editor: Michael Kerrisk
Next page: Kernel development>>

Copyright © 2012, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds