This Week In Security: Samba, Wormhole Crypto Heist, And A Bogus CVE

Samba has a very serious vulnerability, CVE-2021-44142, that was just patched in new releases 4.13.17, 4.14.12, and 4.15.5. Discovered by researchers at TrendMicro, this unauthenticated RCE bug weighs in at a CVSS 9.9. The saving grace is that it requires the fruit VFS module to be enabled, which is used to support MacOS client and server interop. If enabled, the default settings are vulnerable. Attacks haven’t been seen in the wild yet, but go ahead and get updated, as PoC code will likely drop soon.

Crypto Down the Wormhole

One notable selling point to cryptocurrencies and Web3 are smart contracts, little computer programs running directly on the blockchain that can move funds around very quickly, without intervention. It’s quickly becoming apparent that the glaring disadvantage is these are computer programs that can move money around very quickly, without intervention. This week there was another example of smart contracts at work, when an attacker stole $326 million worth of Ethereum via the Wormhole bridge. A cryptocurrency bridge is a service that exists as linked smart contracts on two different blockchains. These contracts let you put a currency in on one side, and take it out on the other, effectively transferring currency to a different blockchain. Helping us make sense of what went wrong is [Kelvin Fichter], also known appropriately as [smartcontracts].

When the bridge makes a transfer, tokens are deposited in the smart contract on one blockchain, and a transfer message is produced. This message is like a digital checking account check, which you take to the other side of the bridge to cash. The other end of the bridge verifies the signature on the “check”, and if everything matches, your funds show up. The problem is that one one side of the bridge, the verification routine could be replaced by a dummy routine, by the end user, and the code didn’t catch it.

It’s a hot check scam. The attacker created a spoofed transfer message, provided a bogus verification routine, and the bridge accepted it as genuine. The majority of the money was transferred back across the bridge, where other user’s valid tokens were being held, and the attacker walked away with 90,000 of those ETH tokens. Continue reading “This Week In Security: Samba, Wormhole Crypto Heist, And A Bogus CVE”

As apples travel down the conveyor belt, they are scanned using InGaAs and CMOS cameras. The InGaAs camera will show defects beginning to form under the skin that a human eye cannot see; the CMOS camera will show visible defects. (Credit: Hamamatsu)

Shining A Different Light On Reality With Short-Wave Infrared Radiation

As great as cameras that operate in the visual light spectrum are, they omit a lot of the information that can be gleaned from other wavelengths. There is also the minor issue that visibility is often impacted, such as when it’s raining, or foggy. When this happens, applications such as self-driving cars which rely on this, have a major issue. Through the use of sensors that are sensitive to other wavelengths, we can however avoid many of these issues.

Short-wave infrared radiation (SWIR) is roughly the part of the electromagnetic spectrum between 1.4 μm – 3 μm, or 100 THz – 214 THz. This places it between visible light and microwaves, and above long-wave IR at 20 THz – 37 THz. LWIR is what thermal cameras use, with LWIR also emitted by warm objects, such as the human body.

SWIR is largely unaffected by water in the atmosphere, while also passing through materials that are opaque to visible light. This allowing SWIR to be used for the analysis and inspection of everything from PCBs and fruit to works of art to capture details that are otherwise invisible or very hard to see.

Unfortunately, much like thermal camera sensors, SWIR sensors are rather expensive. Or they were, until quite recently, with the emergence of quantum-dot-based sensors that significantly decrease the costs of these sensors.

Continue reading “Shining A Different Light On Reality With Short-Wave Infrared Radiation”

Know Audio: A Mess Of Cables

We’ve now spent several months in this series journeying through the world of audio, and along the way we’ve looked at the various parts of a Hi-Fi system from the speaker backwards to the source. It’s been an enjoyable ride full of technical detail and examining Hi-Fi myths in equal measure, but now it’s time to descend into one of the simplest yet most controversial areas of audio reproduction. Every audio component, whether digital or analogue, must be connected into whatever system it is part of, and this is the job of audio cables, sometimes referred to as interconnects. They are probably the single component most susceptible to tenuous claims about their performance, with audiophiles prepared to spend vast sums on cables claimed to deliver that extra bit of listening performance. Is there something in it, or are they all the same bits of wire with the expensive ones being a scam? Time to take a look.

What Makes A Nearly Good Cable

In a typical domestic audio system with digital and analogue signals you might expect to find two types of cable, electrical interconnects that could carry either analogue or digital signals, and optical ones for digital signals. We’re here to talk about the electrical cables here as they’re the ones used for analogue signals, so lets start with a little transmission line theory. Continue reading “Know Audio: A Mess Of Cables”

Underwater Tanks Turn Energy Storage Upside-Down

Pumped hydro storage is one of the oldest grid storage technologies, and one of the most widely deployed, too. The concept is simple – use excess energy to pump a lot of water up high, then run it back through a turbine when you want to get the energy back later.

With the rise in renewable energy deployments around the world, there is much interest in finding ways to store energy from these often-intermittent sources. Traditional pumped hydro can help, but there is only so much suitable land to work with.

However, there could be a solution, and it lurks deep under the waves. Yes, we’re talking about underwater pumped hydro storage!

Continue reading “Underwater Tanks Turn Energy Storage Upside-Down”

A pinout diagram of the new Pi 4, showing all the alternate interfaces available.

Did You Know That The Raspberry Pi 4 Has More SPI, I2C, UART Ports?

We’ve gotten used to the GPIO-available functions of Raspberry Pi computers remaining largely the same over the years, which is why it might have flown a little bit under the radar: the Raspberry Pi 4 has six SPI controllers, six I2C controllers, and six UARTs – all on its 40-pin header. You can’t make use of all of these at once, but with up to four different connections wired to a single pin you can carve out a pretty powerful combination of peripherals for your next robotics, automation or cat herding project.

The datasheet for these peripherals is pleasant to go through, with all the register maps nicely laid out – even if you don’t plan to work with the register mappings yourself, the maintainers of your preferred hardware enablement libraries will have an easier time! And, of course, these peripherals are present on the Compute Module 4, too. It might feel like such a deluge of interfaces is excessive, however, it lets you achieve some pretty cool stuff that wouldn’t be possible otherwise.

Having multiple I2C interfaces helps deal with various I2C-specific problems, such as address conflicts, throughput issues, and mixing devices that support different maximum speeds, which means you no longer need fancy mux chips to run five low-resolution Melexis thermal camera sensors at once. (Oh, and the I2C clock stretching bug has been fixed!) SPI interfaces are used for devices with high bandwidth, and with a few separate SPI ports, you could run multiple relatively high-resolution displays at once, No-Nixie Nixie clock style.

As for UARTs, the Raspberry Pi’s one-and-a-half UART interface has long been an issue in robotics and home automation applications. With a slew of devices like radio receivers/transmitters, LIDARs and resilient RS485 multi-drop interfaces available in UART form, it’s nice that you no longer have to sacrifice Bluetooth or a debug console to get some fancy sensors wired up to your robot’s brain. You can enable up to six UARTs. Continue reading “Did You Know That The Raspberry Pi 4 Has More SPI, I2C, UART Ports?”

How The Hunga Tonga Volcano Eruption Was Felt Around The World

On the 14th of January, 2022, the Hunga Tonga-Hunga Ha’apai volcano began a gigantic eruption that would go on to peak in ferocity the next day. The uninhabited island volcano would quickly make headlines as the country of Tonga was cut off the world and tsunamis bore out from the eurption zone.

In a volcanic event of this size, the effects can be felt around the world. With modern instruments, they can be properly understood too. Let’s take a look at how the effects of the Hunga Tonga eruption were captured and measured across the globe.

Continue reading “How The Hunga Tonga Volcano Eruption Was Felt Around The World”

Art of 3D printer in the middle of printing a Hackaday Jolly Wrencher logo

3D Printering: Water-Cooled Hotends

There’s an old joke about the Thermos bottle that keeps things hot and cold, so someone loaded it with soup and ice cream. That joke is a little close to home when it comes to FDM 3D printers.

You want to melt plastic, of course, or things won’t print, so you need heat. But if the plastic filament gets hot too early, it will get soft, expand, and jam. Heat crawling up the hot end like this is known as heat creep and there are a variety of ways that hot ends try to cope with the need to be hot and cold at the same time. Most hotends today are air-cooled with a small fan. But water-cooled hotends have been around for a while and are showing up more and more. Is it a gimmick? Are you using, planning to use, or have used (and abandoned) water cooling on your hot end?

Heat Break

The most common method is to use a heat-break between the heating block and the rest of the filament path. The heat-break is designed to transfer as little heat as necessary, and it usually screws into a large heat sink that has a fan running over it. What heat makes it across the break should blow away with the fan cooling.

From Thomas Sanladerer’s review of the Copperhead hotend. Heat break in the middle.

High tech solutions include making heat-breaks out of titanium or even two dissimilar metals, all with the aim of transferring less heat into the cooler part of the hot end. More modern hot ends use support structures so the heatbreak doesn’t need mechanical rigidity, and they can make very thin-walled heatbreaks that don’t transmit much heat. Surely, then, this is case closed, right? Maybe not.

While it is true that a standard heat-break and a fan can do the job for common 3D printing tasks, there can be problems. First, if you want to print fast — time is money, after all — you need more power to melt more filament per second. If a heatbreak transfers 10% of the heat, this increases demands on the upstream cooling. Some engineering materials want to print at higher temperatures, so you can have the same problem there as well. If you want to heat the entire print chamber, which can help with certain printing materials, that can also cause problems since the ambient air is now hotter. Blowing hot air around isn’t going to cool as effectively. Not to mention, fans that can operate at high temperatures are notoriously expensive.

There are other downsides to fans. Over a long print, a marginal system might eventually let enough heat creep up. Then there’s the noise of a fan blowing during operation. True, you probably have other fans and noisy parts, but it is still one more noise source. With water cooling, you can move the radiator outside a heated enclosure and use larger, slower, and quieter fans while getting more cooling right where you want it. Continue reading “3D Printering: Water-Cooled Hotends”