Information Security 4 min read

A Developer’s Hidden Backdoor: MAC Address Modification Blocked by Intentional Code

The article recounts a real‑world incident where a device’s MAC address could not be changed because a previous engineer deliberately disabled the relevant function, discusses the discovery of the backdoor code, and examines the legal and ethical implications of such intentional vulnerabilities.

Top Architecture Tech Stack
Top Architecture Tech Stack
Top Architecture Tech Stack
A Developer’s Hidden Backdoor: MAC Address Modification Blocked by Intentional Code

On Zhihu, the author shares a puzzling problem encountered while preparing a small batch of a newly developed device for shipment: the device refused to change its MAC address using the standard ifconfig eth0 hw ether command, even though the author had always tested with the default address.

After suspecting a kernel issue, the author consulted a Field Application Engineer (FAE) who suggested several investigation directions. Eventually, the author discovered a function named asmmac_set_mac_address that unconditionally returned -EBUSY , effectively preventing any MAC address modification. The function contained a comment indicating it was added by a previous engineer, "maxiaojun," on 12 Jan 2017.

static int asmmac_set_mac_address(struct net_device *dev, void *addr) { /* MW:maxiaojun on: Thu, 12 Jan 2017 11:13:10 +0800 */ return -EBUSY; // End of MW:maxiaojun struct sockaddr *address = addr; if (netif_running(dev)) return -EBUSY; if (!is_valid_ether_addr(address->sa_data)) return -EADDRNOTAVAIL; memcpy(dev->dev_addr, address->sa_data, dev->addr_len); write_mac_addr(dev->dev_addr); return 0; }

The author concludes that the previous engineer deliberately left a backdoor—or rather, a deliberate blockage—so that only they knew how to bypass it, reflecting a mindset where some programmers treat their code as a personal artifact and may embed hidden behavior.

The article also touches on the legal perspective, noting that intentionally inserting such vulnerabilities can be considered illegal under computer crime statutes, potentially leading to civil liability or criminal charges if the backdoor is exploited and causes damage.

Finally, the author invites readers to share any personal experiences of hidden backdoors in code, prompting a discussion about ethics and security in software development.

Code ReviewsecurityLinux kernelbackdoorMAC address
Top Architecture Tech Stack
Written by

Top Architecture Tech Stack

Sharing Java and Python tech insights, with occasional practical development tool tips.

0 followers
Reader feedback

How this landed with the community

login Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.