Bug 447827 - [enh] support MAC address spoofing
Summary: [enh] support MAC address spoofing
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: NetworkManager
Version: rawhide
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Dan Williams
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 551272 572098 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-05-21 23:15 UTC by Cristian Ciupitu
Modified: 2011-02-24 05:19 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-02-24 05:19:40 UTC


Attachments (Terms of Use)
/etc/sysconfig/network-scripts/ifcfg-eth0 (179 bytes, text/plain)
2009-04-09 08:46 UTC, Cristian Ciupitu
no flags Details


Links
System ID Priority Status Summary Last Updated
GNOME Bugzilla 553771 None None None Never

Description Cristian Ciupitu 2008-05-21 23:15:19 UTC
NetworkManager can not set the MAC address for a device (wired Ethernet card) to
a custom value.

I'm using NetworkManager-0.7.0-0.9.3.svn3623.fc9.i386.rpm.

Steps to Reproduce:
1. Edit /etc/sysconfig/network-scripts/ifcfg-eth0
2. Comment out the HWADDR parameter ("# HWADDR=...")
3. Set the MACADDR parameter with the desired address ("MACADDR=...")
4. Reboot the system

The network card will have its real (factory set) MAC address and not the one
specified by the MACADDR parameter. The old network service works fine with this
configuration.

Comment 1 Niels Haase 2009-04-08 20:16:04 UTC
Reporter, are you still running Fedora 9, or have you upgraded to Fedora 10 or
Rawhide? In either case, can you let us know whether the issue is still happening, and give the current version of the kernel and NM packages you're
using. Thank you.


-- 
Fedora Bugzappers volunteer triage team
https://fedoraproject.org/wiki/BugZappers

Comment 2 Cristian Ciupitu 2009-04-09 08:42:12 UTC
I'm using Fedora 10 now. This what I have on my system:
kernel-2.6.27.21-170.2.56.fc10.i686.rpm
kernel-firmware-2.6.27.21-170.2.56.fc10.noarch.rpm
NetworkManager-0.7.0.99-5.git20090326.fc10.i386.rpm

Comment 3 Cristian Ciupitu 2009-04-09 08:46:20 UTC
Created attachment 338879 [details]
/etc/sysconfig/network-scripts/ifcfg-eth0

"ifcfg-eth0" configuration file that's working fine with the network service, but not with the NetworkManager service.

Comment 4 Cristian Ciupitu 2009-04-09 08:47:20 UTC
P.S.: I forgot to mention that the issue is still happening :-)

Comment 5 Dan Williams 2009-04-09 13:38:12 UTC
Yeah, MAC address spoofing isn't implemented in NM at this time.  You can achieve this functionality in the mean time with udev rules.  Marking as an ehancement request.

Comment 6 Cristian Ciupitu 2009-04-09 16:21:10 UTC
Shouldn't this enhancement be moved/duplicated to Fedora 10?
Also, if this network service feature is unsupported by the NetworkManager, shouldn't the release notes mention it (along with the udev workaround)?

Comment 7 Bug Zapper 2009-06-10 01:04:44 UTC
This message is a reminder that Fedora 9 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 9.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '9'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 9's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 9 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 8 Dan Williams 2010-02-09 02:12:32 UTC
*** Bug 551272 has been marked as a duplicate of this bug. ***

Comment 9 Jirka Klimes 2010-06-22 12:56:39 UTC
*** Bug 572098 has been marked as a duplicate of this bug. ***

Comment 10 Jirka Klimes 2010-06-22 13:14:33 UTC
The feature has been implemented and pushed upstream:
http://cgit.freedesktop.org/NetworkManager/NetworkManager/commit/?id=1b49f941a69af910b0e68530be7339e8053068e5
http://git.gnome.org/browse/network-manager-applet/commit/?id=68b4007877ab7efb2a298d6e8d0b8d49de8ec538

The MAC to be spoofed on an interface can be specified via "Cloned MAC address" in 'Wired'/'Wireless' tab in connection editor.

ifcfg-rh plugin has been enhanced to read/write cloned MAC through MACADDR variable.

One note:
At present MAC cloning will prevent wpa_supplicant from successfully associating with AP using WPA security. That is because wpa_supplicant doesn't update the MAC and still uses the old MAC. A patch has been proposed to wpa_supplicant's upstream to fix this issue.
WEP works well even with the current wpa_supplicant.

Comment 11 Alphonse Steiner 2010-08-26 16:18:06 UTC
Hello,
is wpa_supplicant really the problem ?
With a manual network configuration, I can change the MAC address
without any problem. Here are the steps :

ifconfig wlan0 down
ifconfig wlan0 hw ether <MACADDRESS>
/usr/sbin/wpa_supplicant -c /etc/wpa_supplicant/wpa_supplicant.conf -B \
 -u -f /var/log/wpa_supplicant.log -P /var/run/wpa_supplicant.pid
/sbin/ifconfig wlan0 <IPADDRESS> netmask <NETMASK> broadcast <BROADCAST>
/sbin/route add default dev wlan0 gw <GATEWAY>

I don't know how NetworkManager does the connection. 
I hope this can help.

Comment 12 Jirka Klimes 2010-08-27 12:48:57 UTC
The steps you use work because you change the MAC *before* starting wpa_supplicant. That's why wpa_supplicant gets the new MAC on its startup.

However when using NetworkManager, wpa_supplicant is running and remembers old MAC and doesn't update it. Thus the MAC wpa_supplicant has differs from the MAC present in packets and WPA computations fail.

Comment 13 Alphonse Steiner 2010-08-27 13:19:41 UTC
Thanks for the explanation.
You talk about a patch for wpa_supplicant. Do you have a link toward it ?

Comment 14 Dan Williams 2010-09-01 22:37:14 UTC
jklimes: yeah, if we can, lets try to upstream that patch.  I'm happy to push it up to Jouni if you can mail it to me again.

Comment 15 Jirka Klimes 2010-09-02 07:22:10 UTC
There is no link yet. I sent the patch on 15 June to hostap list, and recently resent on 27 August to hostap list and CC to Jouni. But still no answer :(

Okay, Dan, I mailed it to you. Thanks.

Comment 16 Cristian Ciupitu 2010-11-03 02:25:35 UTC
Just for the record: NetworkManager-0.8.1-9.git20100831.fc14.x86_64 works fine with my wired Ethernet card. Thank you Dan Williams for implementing this enhancement!

Comment 17 Dan Williams 2011-02-24 05:19:40 UTC
Should be long since fixed in Fedora updates.


Note You need to log in before you can comment on or make changes to this bug.