15

I have just read this question: Could this code damage my processor? and this made me think.

Is it possible to damage hardware just by software? I heard that "in the good old days" (TM), when hard disk actuators were controlled by software, they could be hit against the central spindle, which would damage the drive permanently.

There was also the infamous Chernobyl virus which just killed the BIOS and rendered the machine useless, until someone reflashed it.

And there are microcode updates, which can be flashed to the CPU (and I don't know much about them).

But is this still possible today? Could you damage hardware by software? Execute the hcf (Halt & Catch fire) instruction? Grill the cat by increasing WLAN output power?

1
  • Yeah, some of the early voice coil hard drives weren't too smart and would very willingly attempt to seek to cylinders that don't exist. Leading to slamming into the stops over and over again as they were unable to locate the specified cylinder while seeking. Story is that enough times and they'd break. Supposedly was used by at least one virus, but I never saw it first person. Feb 15, 2012 at 20:12

4 Answers 4

13

Yes, you sure can in general. Sometimes in practice it is harder than you think, sometimes very easy.

Say for example you have a gpio pin, that is used as an input and tied to Vcc. Make it an output and drive it low, you can usually sink more than you can source so you can absorb a lot but if this is a voltage rail and they didnt put some limiting resistors in there, a power up strap option for example, the smoke will come out.

Even in PC's i2c is bit banged in some places, same deal you have a bug, accidental or intentional, do enough i2c to get the target to think it is its turn to drive the data line, but you drive the data line to, in the opposite direction. you can sink more than source, whoever is sourcing is likely to melt down their output.

I think I heard that one of the (popular family of) graphics processors is no where near capable of handling sustained operations at that clock rate. Think about a machine gun that can fire X bullets per minute, very few can SUSTAIN that for very long without melting the barrel. Thats what they did here, if you do too much with the gpus you will melt the chip without the heat sink being able to do anything no matter how much cooling you attach to the case. this may be a myth, who knows...things like this have happened. Normally you put temp sensors in the chip that cause something in the power system outside to reset the chip/board or turn it off. which is why your pc will go into panic beeping when you try to bring it up without the heat sink on the cpu. You can try this yourself, leave the heat sink fan in to keep the tach up but dont have it touch the cpu. you might destroy the cpu or motherboard so try this at your own risk.

Generally the problems that you might have had inside a chip where you could do a few things and the chip would fail from the inside. We dont normally hand route the whole thing, there are tools that do a lot of that work or check that work to prevent these sorts of things, not fool proof of course, but less likely. board designs though, still very much hand built, and the software drivers normally dont try to do bad things like drive gpio lines against sources and things like that. Not as easy to bang the head of a floppy or hard drive against the inside of the case as it used to be, that sort of thing, although it wouldnt surprise me if you could mess with some settings and gouge a grove in a disk platter or something like that. a Lot harder to catch a monitor on fire.

As already mentioned by other posters, pushing and stressing components, excessive computations, things like that. for computers where there are software controlled cooling fans you can probably go in and turn off the automated, if any, control system and set the fan at a fixed speed, of say...off...turn them all off and see what happens. Some brand of laptop had that problem you upgrade the bios and it slowed the cpu fan down causing hard drive failures and/or other failures in the system. change the bios setting or install the right bios and replace the damaged hardware (if possible/practical) and not dead.

For a while there Linux was excessively parking hard drive heads on laptops or something like that, causing premature disk failure.

Apple is well known for hardware failure, a long lists of class action suits. Some driven by software. Not that other brands dont have bad stuff from time to time, but other brands normally dont control the hardware and software in one package making it harder to isolate one company, or worse a company that should know better than to destroy its own stuff. Apple often likes to get their name in the news anyway, free or cheap advertising.

It has been shown, or at least I read, that you can infect a mac battery, batteries are smart now in laptops, with a virus, such that after a clean wipe and re-install of the operating system the battery will re-infect the system with the virus. (just a matter of time for this to happen on any platform not just the one) I wonder what else you can do to modern laptop batteries firmware, it is very easy to catch modern battery technologies on fire, perhaps you could do that with software.

You can software control the disc tray in desktop computers, you could open and close it until it fails (I saw a thereifixed it where the cdrom tray was used to rock a baby cradle this way).

With fanless handhelds, smartphones, tablets. I bet you could defeat the temperature limits and stress components to create heat, probably causing the battery to go.

blowing speakers is an easy one, just do it.

A lot of stuff uses ftdi chips to interface usb to pretty much anything. some of those can have the pins changed from whatever function they are normally, a serial port perhaps, to software bit-banged control, and it is where i started at the top, take what was supposed to be an input, make it an output and drive the other way until something melts down.

11

Being someone who likes to build and overclock computers, I can name a few (very extreme) cases where this could potentially happen. (I emphasize potentially because such conditions are somewhat unrealistic in most machines today.)

The first example is a BIOS flash. Some motherboards allow you to flash (modify) the BIOS via software from within the OS. This opens a backdoor for malware to flash the BIOS to something that will damage the processor. (for example, increase the voltage to 2V - and BOOM!!!)

In a second case, some motherboard provide overclocking tools that allow you to change CPU settings from within the OS. If a virus takes over that - then like in the first example, set your CPU to settings that are damaging and fry it.

In a third example (possibly the most realistic ones) are the stress-tests and intensive applications. For example, most laptops today aren't designed to run numerical code for very long durations and may overheat. Although hardware temperature sensors will usually shutdown a machine that has overheated to a certain point, the thresholds tend to be very high - and it is not safe to sustain a CPU at a temperature just below the safety shutdown threshold.

An example of some code that has the potential to overheat a CPU is my answer to this micro-optimization question: How do I achieve the theoretical maximum of 4 FLOPs per cycle?

2
  • 1
    Best answer so far. Especially the point that voltages on the mainboard can be controlled with software - this is a sure way to put some components to a sudden and permanent death. Stress tests OTOH should not damage your hardware or even decrease functionality - if they do, the hardware does not run within the specs or is of inferior quality. So in this case the software reveals a damage with has been already there (IMHO). Feb 15, 2012 at 8:13
  • My laptop can run Prime95 for at least 1 hour (haven't tested longer).
    – Suici Doga
    Jul 30, 2016 at 1:53
5

Depending on your definition of "damage", definitively:

  • CPU - make your CPU usage 100% (or better yet - read the temperature and the max temp CPU withstands, then try to balance just under that), this will definitively shorten the life span of it
  • USB drives - you can write on the USB drive a few hundred million times, which will make it unusable (see this: http://www.bress.net/blog/archives/114-How-Long-Does-a-Flash-Drive-Last.html)
  • HDD drives - seek, write and read like crazy, if possible by reading the drive geometry and issuing the worst possible commands (i.e. seek to the position which the furthest possible from the current one), that will certainly make it very hot soon and shorten its lifespan
  • Monitors - put it to sleep and out of sleep and change resolutions a few hundred thousand times
  • GPUs - run 10 instances of Battle Field 3 and then boil eggs
  • USB devices - turn power on and off (e.g. to your external USB HDD) in 2s intervals
  • Speakers - volume to 100% and then enjoy some of this, this or this (or your favorite) for a couple of weeks :)

Obviously:

  • These are extremes
  • It depends on the quality of your components
  • You will probably notice any of these actions, so they are viable only if you on purpose want to damage your hardware or if you are on vacation while your Internet-accessible web server is being hacked
  • Unlikely - while these will probably damage most of the hardware, to make it unusable you need a lot of time
1
  • i would like to use GPUs in winter :P
    – user889030
    Jun 25, 2016 at 20:58
2

Firmware aka. microcode is software. I'm sure you can destroy hardware by writing bad firmware. However most firmware these days are hard to accidentally or even maliciously modify as they usually require a reboot and re/flash of the ROM.

Not the answer you're looking for? Browse other questions tagged or ask your own question.