MAC spoofing failure doesn't result in panic mode (module removal), bis
On a feature/jessie built on 20150528, MAC spoofing fails for wlan0 (silly
wl driver's fault) but successes for eth0. And then, then network is left enabled.
Fix panic mode on MAC spoofing failure, bis repetita.
In the past, we had "exit 1" in there. This problem was identified (#8571) and
fixed (commit 1b46b5b) in Tails 1.2.3, by replacing this "exit 1"
with "return 1".
Then, while working on another, minor problem (#8687), the "exit 1" was
reintroduced (commit 4ea050a) in Tails 1.3.2, presumably because we pasted
sample code from the ticket, that had been drafted before #8571 was fixed.
Sadly, nobody noticed in time.
I cannot easily reproduce the bug on Tails/Wheezy (because I lack hardware whose
MAC address fails to be spoofed there), but I could reproduce it with
Tails/Jessie ("thanks" to the fact we're currently shipping the buggy 'wl'
kernel module in there).
#1 Updated by intrigeri over 2 years ago
- Priority changed from Normal to High
- Type of work changed from Code to Test
Next step: try to reproduce on Tails/Wheezy (it might be that when we have more than 1 network interface and the 2nd one's MAC address spoofing works, we fail to disable the network).
#2 Updated by intrigeri over 2 years ago
The way our system is meant to work is that if MAC spoofing fails for 1 device out of 2, then only that device will be disabled. If that fails, then NetworkManager will be stopped. So, what needs to be tested is that the system actually works this way: my initial report doesn't make it clear whether the iface whose MAC address wasn't spoofed was left enabled, or whether I was just surprised to see the network stack not fully disabled in the end.
#3 Updated by intrigeri over 2 years ago
Reproduced on current feature/jessie, and bad news: wlan0 is still present. I see the "macchanger failed for NIC" message, but nothing about going to panic mode. Maybe the
exit 1 that replaced
return 1 in 4ea050a is responsible? It's weird that this code landed, since 1b46b5b precisely replaced
exit 1 with
return 1, with a justification that makes sense to me.
#4 Updated by intrigeri over 2 years ago
- Subject changed from Jessie: network is unblocked even though MAC spoofing failed to MAC spoofing failure doesn't result in panic mode (module removal), bis
- Target version changed from Tails_2.0 to Tails_1.5
- Type of work changed from Test to Code
OK, I can't reproduce this on Tails/Wheezy because we don't ship the
wl driver in there, so on the same hardware MAC spoofing works there even for wlan0. Anyway, my understanding of the code, and the historical info in #9531#note-3, make me confident that this buggy
exit 1 was reintroduced by mistake: the example code on #8687 has
exit 1, and was added before we fixed the code to instead
return 1, and I bet it was simply copied'n'pasted, and neither the developer nor the reviewers noticed.
=> I'll bring the
return 1 back for Tails 1.5.
#10 Updated by anonym over 2 years ago
- Assignee set to anonym