Control: tags 774898 + pending Dear maintainer,
I've prepared an NMU for macchanger (versioned as 1.7.0-5.3) with Joey's patch and uploaded it to DELAYED/2. Please feel free to tell me if I should delay it longer. Regards. -- .''`. Homepage: http://info.comodo.priv.at/ - OpenPGP key 0xBB3A68018649AA06 : :' : Debian GNU/Linux user, admin, and developer - https://www.debian.org/ `. `' Member of VIBE!AT & SPI, fellow of the Free Software Foundation Europe `- NP: Bob Dylan: Not Dark Yet
diff -Nru macchanger-1.7.0/debian/changelog macchanger-1.7.0/debian/changelog --- macchanger-1.7.0/debian/changelog 2015-01-17 12:47:56.000000000 +0100 +++ macchanger-1.7.0/debian/changelog 2015-02-07 17:41:09.000000000 +0100 @@ -1,3 +1,13 @@ +macchanger (1.7.0-5.3) unstable; urgency=medium + + * Non-maintainer upload. + * Fix "fails to detect silent driver failure to change MAC": + Add patch verify-changed-MAC.patch from Joey Hess: + actively check the new MAC after trying to change it. + (Closes: #774898) + + -- gregor herrmann <[email protected]> Sat, 07 Feb 2015 17:40:59 +0100 + macchanger (1.7.0-5.2) unstable; urgency=medium * Non-maintainer upload diff -Nru macchanger-1.7.0/debian/patches/series macchanger-1.7.0/debian/patches/series --- macchanger-1.7.0/debian/patches/series 2015-01-16 23:51:05.000000000 +0100 +++ macchanger-1.7.0/debian/patches/series 2015-02-07 17:26:51.000000000 +0100 @@ -2,3 +2,4 @@ 06-update_OUI_list.patch 08-fix_random_MAC_choice.patch check-random-device-read-errors.patch +verify-changed-MAC.patch diff -Nru macchanger-1.7.0/debian/patches/verify-changed-MAC.patch macchanger-1.7.0/debian/patches/verify-changed-MAC.patch --- macchanger-1.7.0/debian/patches/verify-changed-MAC.patch 1970-01-01 01:00:00.000000000 +0100 +++ macchanger-1.7.0/debian/patches/verify-changed-MAC.patch 2015-02-07 17:33:06.000000000 +0100 @@ -0,0 +1,51 @@ +Description: actively verify if the MAC was changed + macchanger tries to detect if the new MAC is the same as the old. However, + it does this by calling mc_net_info_get_mac, on the same net_info structure + that it's called mc_net_info_set_mac on. + . + So, mc_net_info_set_mac sets the mac *in the data structure*, then calls + SIOCSIFHWADDR, which returns success even without doing anything if the + kernel driver is buggy. And then mc_net_info_get_mac examines the data + structure, without calling SIOCGIFHWADDR to check if the MAC was actually + changed. + . + This patch actively verifies if the MAC was changed. +Origin: vendor +Bug-Debian: https://bugs.debian.org/774898 +Forwarded: no +Author: Joey Hess <[email protected]> +Reviewed-by: gregor herrmann <[email protected]> +Last-Update: 2015-02-07 + +--- a/src/main.c ++++ b/src/main.c +@@ -276,10 +276,6 @@ + /* Set the new MAC */ + ret = mc_net_info_set_mac (net, mac_faked); + if (ret == 0) { +- /* Re-read the MAC */ +- mc_mac_free (mac_faked); +- mac_faked = mc_net_info_get_mac(net); +- + /* Print it */ + print_mac ("New MAC: ", mac_faked); + +@@ -288,6 +284,18 @@ + printf ("It's the same MAC!!\n"); + exit (EXIT_ERROR); + } ++ ++ /* Re-read the MAC in case a driver silently ignores ++ * attempt to set it */ ++ mc_net_info_free (net); ++ if ((net = mc_net_info_new(device_name)) == NULL) { ++ exit (EXIT_ERROR); ++ } ++ mac = mc_net_info_get_mac(net); ++ if (! mc_mac_equal (mac, mac_faked)) { ++ printf ("Network driver didn't actually change to the new MAC!!\n"); ++ exit (EXIT_ERROR); ++ } + } + + /* Memory free */
signature.asc
Description: Digital Signature

