Apple Kernel Code Vulnerability Affected All Devices

Another day, another vulnerability. Discovered by [Kevin Backhouse], CVE-2018-4407 is a particularly serious problem because it is present all throughout Apple’s product line, from the Macbook to the Apple Watch. The flaw is in the XNU kernel shared by all of these products.

This is a buffer overflow issue in the error handling for network packets. The kernel is expecting a fixed length of those packets but doesn’t check to prevent writing past the end of the buffer. The fact Apple’s XNU kernel powers all their products is remarkable, but issues like this are a reminder of the potential downside to that approach. Thanks to responsible disclosure, a patch was pushed out in September.

Anatomy of a Buffer Overflow

Buffer overflows aren’t new, but a reminder on what exactly is going on might be in order. In low level languages like C, the software designer is responsible for managing computer memory manually. They allocate memory, tagging a certain number of bytes for a given use. A buffer overflow is when the program writes more bytes into the memory location than are allocated, writing past the intended limit into parts of memory that are likely being used for a different purpose. In short, this overflow is written into memory that can contain other data or even executable code.

With a buffer overflow vulnerability, an attacker can write whatever code they wish to that out-of-bounds memory space, then manipulate the program to jump into that newly written code. This is referred to as arbitrary code execution. [Computerphile] has a great walk-through on buffer overflows and how they lead to code execution.

This Overflow Vulnerabilty Strikes Apple’s XNU Kernel

[Kevin] took the time to explain the issue he found in further depth. The vulnerability stems from the kernel code making an assumption about incoming packets. ICMP error messages are sent automatically in response to various network events. We’re probably most familiar with the “connection refused’ message, indicating a port closed by the firewall. These ICMP packets include the IP header of the packet that triggered the error. The XNU implementation of this process makes the assumption that the incoming packet will always have a header of the correct length, and copies that header into a buffer without first checking the length. A specially crafted packet can have a longer header, and this is the data that overflows the buffer.

Because of the role ICMP plays in communicating network status, a closed firewall isn’t enough to mitigate the attack. Even when sent to a closed port, the vulnerability can still trigger. Aside from updating to a patched OS release, the only mitigation is to run the macOS firewall in what it calls “stealth mode”. This mode doesn’t respond to pings, and more importantly, silently drops packets rather than sending ICMP error responses. This mitigation isn’t possible for watchOS and iOS devices.

The good news about the vulnerability is that a packet, malformed in this way, has little chance of being passed through a router at all. An attacker must be on the same physical network in order to send the malicious packet. The most likely attack vector, then, is the public WiFi at the local coffee shop.

Come back after the break for a demonstration of this attack in action.

Continue reading “Apple Kernel Code Vulnerability Affected All Devices”

This Weekend: The Greatest Hardware Conference

The Hackaday Superconference is this weekend and it’s the greatest hardware con on the planet. Tickets are completely sold out, but you can still get in on the fun by watching the livestream and joining Supercon chat.

For everyone who will be here in person, the entire Hackaday crew is busy as beavers preparing for your arrival. We’re assembling badges, rigging AV for the talks, stuffing goodie bags, calling caterers, and taping cables to the floor. This is by far the biggest Superconference yet.

Doors open at 9 am Friday at the Supplyframe HQ. This is your first chance to get your hands on the fantastic Supercon Badge that’s a freakin’ computer. The day is filled with badge hacking, workshops, badge talks, and a launch party. [Rich Hogben] and [Andrew Bakhit] will be doing live IDM sets on Friday night, as we celebrate into the wee hours of the morning.

Saturday, doors open at 9 am over at the Supplyframe Design Lab as we turn on the livestream and get the main event under way with over 50 speakers and workshops. Badge hacking continues throughout the weekend, and this year we’ve added the SMD Soldering Challenge to the fun. There will be meetups during Supercon; the Tindie meetup and the amateur radio meetup are both Saturday at 1 pm.

Subscribe to Hackaday on YouTube and follow us on Facebook to keep up with everything going on.

Ask Hackaday: What Are Your Less Extreme Brain Hacks?

Kahn — perhaps Star Trek’s best-hated villain — said: “Improve a mechanical device and you may double productivity, but improve man and you gain a thousandfold.” In fact, a lot of hacking effort goes into doing just that. Your phone has become an extension of your memory, for example. We use glasses, cameras, and hearing aids to shore up failing senses or even give us better senses than normal. But hacking your body — or someone else’s — has always been controversial. While putting an RFID chip in your finger is one thing, would you consider having a part of your brain removed? That sounds crazy, but apparently, there is a growing interest in having your amygdala removed.

To be clear: we think this is a terrible idea. The science is shaky, at best, and we certainly wouldn’t want to be among the first to try something so radical. But why is anyone even talking about it?

The amygdala is part of your brain that causes at least some of your fear and anxiety. Get rid of your amygdala, get rid of anxiety? What’s even stranger is this the procedure — an amygdalectomy — has been going on since the 1960s! Injections of oil and wax destroy the tissue and this treatment is used for some forms of epilepsy and to manage certain aggressive behavior problems in mentally ill patients. In modern times, the procedure is not very common although it appears that it does still occur in some places. But the technology to do it does exist. There have also been documented cases where people lose their amygdala from natural causes that gives us some clues of what life would be like without one.

However, it is hard to say if these people lost fear. Most of the surgical patients were already suffering from a variety of problems. There is some evidence that the naturally occurring amygdalaless patients experienced less fear in some situations, but may experience more fear in others. They also may have other problems such as difficulty understanding social cues or making eye contact. We’re not 100% sure what the amygdala does, even disregarding potential side effects.

Continue reading “Ask Hackaday: What Are Your Less Extreme Brain Hacks?”

Oliver Heaviside: Rags To Recognition, To Madness

Like any complex topic, electromagnetic theory has its own vocabulary. When speaking about dielectrics we may refer to their permittivity, and discussions on magnetic circuits might find terms like reluctance and inductance bandied about. At a more practical level, a ham radio operator might discuss the impedance of the coaxial cable used to send signals to an antenna that will then be bounced off the ionosphere for long-range communications.

It’s everyday stuff to most of us, but none of this vocabulary would exist if it hadn’t been for Oliver Heaviside, the brilliant but challenging self-taught British electrical engineer and researcher. He coined all these terms and many more in his life-long quest to understand the mysteries of the electromagnetic world, and gave us much of the theoretical basis for telecommunications.

Continue reading “Oliver Heaviside: Rags To Recognition, To Madness”

New Part Day: ST’s New 3D Printer Motor Driver

ST has released a new evaluation board for a stepper motor driver. It’ll plug right into your 3D printer, and if you’re looking for a chip to build a cheap 3D printer controller board around, this might be the one.

We’ve come a long way in the field of stepper motor drivers in just a few short years. The first popular driver for RepRap electronics was ‘the Pololu’, a stepper motor carrier board using Allegro’s A4988 driver. If you had a big heat sink, this driver could deliver 2 A per coil, operated between 8 and 35 V, and had microstep resolution down to 1/16th. Was it the best stepper driver around? No, but it was cheap, it was everywhere, and RAMPS, the popular RepRap control electronics picked up on its pinout and accidentally created a standard. The DRV8825 motor driver from TI followed next, with microstepping down to 1/32nd, a little more current per coil, and arguably a better thermal design.

Then the wave of Trinamic drivers happened. The Trinamic TMC2100 was a silent stepper motor driver when running a motor at medium or low speeds. With this driver, you could run a motor more efficiently, which means the motor doesn’t get as hot. There are diagnostics via SPI. Tom liked it, and now in every Prusa i3, you’ll find a bunch of Trinamic drivers.

ST’s new offering, the STSPIN820, doesn’t have the fancy-schmancy features the Trinamic driver does, but the chip itself is fantastically cheap, at about 1/5th the price of a Trinamic driver. As far as feature set, you should probably look at this new chip as an upgrade to the A4988, with much higher microstepping and slightly higher current handling.

If you’d like to experiment with the evaluation module, you can grab one from an ST distributor; at the time of this writing, there were seventeen of these modules available worldwide. If you’d just like to play with the STSPIN820 motor driver chip, ten thousand are available between Mouser and Digikey, starting at $2.97 in quantity one. If someone could tell electronics manufacturers to build more than a dozen evaluation boards at a time, that would be great.

The Incredible Judges Of The Hackaday Prize

The time to enter The Hackaday Prize has ended, but that doesn’t mean we’re done with the world’s greatest hardware competition just yet. Over the past few months, we’ve gotten a sneak peek at over a thousand amazing projects, from Open Hardware to Human Computer Interfaces. This is a contest, though, and to decide the winner, we’re tapping some of the greats in the hardware world to judge these astonishing projects.

Below are just a preview of the judges in this year’s Hackaday Prize. They’ve been busy looking over all of the finalists and on Saturday we’ll announce the winners of the Hackaday Prize at the Hackaday Superconference in Pasadena. This is not an event to be missed — not only are we going to hear some fantastic technical talks from the hardware greats, but we’re also going to see who will walk away with the Grand Prize of $50,000.


Quinn Dunki

The mighty Quinn has been making games for 36 years on platforms ranging from the Apple II to all manner of newfangled things. She currently manages engineering for mobile games at Scopely, and pursues consulting, independent development, mixed-media engineering projects, and writing. Quinn is best known to the Hackaday crowd for Veronica, the 6502 system with everything and the kitchen sink on a backplane. It’s got PS/2, VGA, and Pong in ROM. The build log for Veronica has been an inspiration to many, and served as the basis for numerous homebrew systems. She continues to inspire with her blog, her YouTube Channel, and of course her Hackaday articles.

Eben Upton

In his earlier life, Eben founded two successful mobile game and middleware companies, but right now he’s most famous for founding the Raspberry Pi foundation and serving as the CEO of Raspberry Pi (Trading) LTD. Under his leadership, the Raspberry Pi has grown from some weird looking board with a USB port on one end, HDMI on the other, and a camera stuck in the middle. After months of work, hopes this computer might not be vaporware grew, and now the Raspberry Pi is the best-selling computer ever made (with apologies to the engineers behind the best selling home computer ever made).

Lauren McCarthy

Lauren McCarthy is an artist based in Los Angles and Brooklyn whose work explores systems for being a person and interacting with other people. She is an Assistant Professor at UCLA Design Media Arts, a Sundance Institute Fellow, and was previously a resident at CMU STUDIO for Creative Inquiry, Eyebeam, Autodesk, and more. Lauren’s work has been exhibited internationally, at places such as Ars Electronica, Fotomuseum Winterthur, SIGGRAPH, Onassis Cultural Center, IDFA DocLab, and the Japan Media Arts Festival. She is the creator of p5.js, an open source platform for learning creative expression through code online.

Chris Anderson

From 2001 through 2012, Chris was the Editor in Chief of Wired Magazine, but now he’s the CEO of 3DR and founder of DIY Drones and DIY Robotcars. These Robocar races are held monthly-ish, and have so far proven an ideal platform to teach kids STEM, and have become something like the next generation of BattleBots, only with a few more computer vision algorithms and a few less RC transmitters. In addition to Robocars, Chris is one of the greatest advocates for flying drones, including those of the fixed-wing variety.

 

These are just a few of the amazingly accomplished judges we have lined up to determine the winner of this year’s Hackaday Prize. The winner will be announced on November 3rd at the Hackaday Superconference. If you can’t join us in person, don’t worry. We’re going to be live streaming everything, including the prize ceremony, where one team will walk away with the grand prize of $50,000. It’s not an event to miss.

History Of White LEDs

Compared to incandescent lightbulbs, LEDs produce a lot more lumens per watt of input power — they’re more efficient at producing light.  Of course, that means that incandescent light bulbs are more efficient at producing heat, and as the days get shorter, and the nights get colder, somewhere, someone who took the leap to LED lighting has a furnace that’s working overtime. And that someone might also wonder how we got here: a world lit by esoteric inorganic semiconductors illuminating phosphors.

The fact that diodes emit light under certain conditions has been known for over 100 years; the first light-emitting diode was discovered at Marconi Labs in 1907 in a cat’s whisker detector, the first kind of diode. This discovery was simply a scientific curiosity until another discovery at Texas Instruments revealed infrared light emissions from a tunnel diode constructed from a gallium arsenide substrate. This infrared LED was then patented by TI, and a project began to manufacture these infrared light emitting diodes.

Continue reading “History Of White LEDs”