Cannot change mac with --random

Bug #1316278 reported by wizwiz50 on 2014-05-05
This bug affects 9 people
Affects Status Importance Assigned to Milestone
macchanger (Debian)
Fix Released
macchanger (Ubuntu)

Bug Description

A bad patch prevents the --random option from working at all.

This was corrected in Debian, and in newer Ubuntu releases, but has not been corrected in Trusty. This SRU contains the corrected patch.

[Test Case]
- Use --random option
- See if MAC changed or if resulted in error message

[Regression Potential]
Since this code simply doesn't work at all at the moment, the only regression would be for it to crash instead of not printing the error message.

Original description:


macchanger works only when I'm specifying which MAC to use. Using macchanger with --random always return 'It's the same MAC!!'.

I think I find out why, there's something in this patch made to improve random MAC generation :

In mc_mac_random()
- 'mac' argument is saved into 'newmac', on the stack (line 40)
- the MAC is randomized and every byte of 'mac' is changed (line 48...)
- 'mac' is overwritten by 'newmac' value (line 82)

Thank you

Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in macchanger (Ubuntu):
status: New → Confirmed
Andreas Marc (alivance) wrote :

I confirm this is the problem, it says constantly "it's the same mac", also now -A and -a are doing the same thing, changing by using -a or -A you obtain the same change to the mac, the last 24 bits remain the same.

Fabien of Hill (fabien-of-hill) wrote :

Temporary fix I used: install an older version

1) you need to uninstall current
sudo apt-get remove macchanger

2) download previous package
If you're on 64 bit version:

Or 32 bit:

3) click on the package and install it

4) disable update for this package only
sudo apt-mark hold macchanger

Later) When you'll be switching to 14.10 or later you can put the
package update back with
sudo apt-mark unhold macchanger


Changed in macchanger (Ubuntu):
status: Confirmed → Fix Committed
Changed in macchanger (Debian):
status: Unknown → Fix Released

The problem still exists in 1.7.0-1 on tursty
-A works fine but -r just gets the same MAC

Amr Ibrahim (amribrahim1987) wrote :

This should be updated in trusty as a security fix just like in Debian.

Changed in macchanger (Ubuntu):
status: Fix Committed → Fix Released
information type: Public → Public Security
tags: added: trusty
Seth Arnold (seth-arnold) wrote :

The fastest way for this to get fixed is for someone who is affected to prepare a debdiff to include the above patch, and propose the new package for a stable release update:


Changed in macchanger (Ubuntu):
status: Fix Released → Confirmed
information type: Public Security → Public

Here is the debdiff I made from the patch in the Debian bug report. I tested it and random mac generation works.

The attachment "macchanger.patch" seems to be a debdiff. The ubuntu-sponsors team has been subscribed to the bug report so that they can review and hopefully sponsor the debdiff. If the attachment isn't a patch, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are member of the ~ubuntu-sponsors, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issue please contact him.]

tags: added: patch
Changed in macchanger (Ubuntu Trusty):
status: New → Confirmed
Changed in macchanger (Ubuntu Wily):
status: New → Fix Released
Changed in macchanger (Ubuntu Xenial):
status: Confirmed → Fix Released
Marc Deslauriers (mdeslaur) wrote :

Debdiff in #7 looks good, uploaded for processing by the SRU team.


description: updated
Changed in macchanger (Ubuntu Trusty):
status: Confirmed → In Progress
Changed in macchanger (Ubuntu Xenial):
importance: Undecided → Medium
Changed in macchanger (Ubuntu Wily):
importance: Undecided → Medium
Changed in macchanger (Ubuntu Trusty):
importance: Undecided → Medium

Hello wizwiz50, or anyone else affected,

Accepted macchanger into trusty-proposed. The package will build now and be available at in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at . Thank you in advance!

Changed in macchanger (Ubuntu Trusty):
status: In Progress → Fix Committed
tags: added: verification-needed

The fix for this bug has been awaiting testing feedback in the -proposed repository for trusty for more than 90 days. Please test this fix and update the bug appropriately with the results. In the event that the fix for this bug is still not verified 15 days from now, the package will be removed from the -proposed repository.

tags: added: removal-candidate

The version of macchanger in the proposed pocket of Trusty that was purported to fix this bug report has been removed because the bugs that were to be fixed by the upload were not verified in a timely (105 days) fashion.

Changed in macchanger (Ubuntu Trusty):
status: Fix Committed → Won't Fix
tags: removed: verification-needed
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.