LaurieWired Profile picture
Dec 26, 2024 5 tweets 2 min read Read on X
“My wife complains that open office will never print on Tuesdays”

A bizarre sentence; which kicked off one of the most interesting bug hunts in Ubuntu’s history.

It all starts with some goofy pattern matching. Image
It’s not a bug with the printer, or OpenOffice, or the printer driver.

It’s a mistake in the way the “file” utility parses file signatures.

When printing from OpenOffice, a PostScript file is created with the creation date. Image
CUPS, the Common Unix Printing System, then uses the file utility as part of its pipeline to determine the type.

But if "Tue" appears at byte 4 (Tuesday's creation date), it's mistakenly identified as an Erlang JAM file, causing the print job to fail.
Essentially, the logic in the file utility for recognizing Erlang JAM files were too broad.

Looking for a single static string position is an extremely fragile detection method.

Simply changing the creation date to “XTue” completely solves the problem! Image
After some back and forth, the logic in the file utility was improved, and the bug was fixed.

It’s a good lesson for us programmers to not blindly dismiss “implausible” sounding issues.

Next time someone makes an outlandish claim; take a closer look. You might just be onto a bizarre edge case!

Here’s the original bug report:
bugs.launchpad.net/ubuntu/+source…

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with LaurieWired

LaurieWired Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @lauriewired

Mar 27
HTTP code 418 began as an April Fool’s prank to signal “I’m a teapot”.

Later, it acted as a DDoS defense mechanism during the Ukraine war.

In 1998, the HTCPCP standard defined communication for…coffee pots.

Turns out, that wasn't the only thing brewing. Image
Image
Even the original RFC pokes fun at itself, stating:

"This has a serious purpose – it identifies many of the ways in which HTTP has been extended inappropriately."

Despite the joke, frameworks began treating the error code as valid; leading to unexpected consequences. Image
Code 418 became a method for developers to confuse attackers.

Instead of an ordinary 404, 418 acted as a marker for suspicious or invalid requests.

It’s essentially a wink at the attacker saying “I know you’re here, and I know what you’re trying to do. Image
Read 4 tweets
Mar 23
China’s leap in computer science stemmed from a Soviet disagreement.

Soviet computer tech exchanged between the two countries, until tensions between Mao and Khrushchev abruptly ended the swap.

Suddenly isolated, China was forced to create their own computer, the Model 107. Image
Image
For CS researchers, this was brutal.

1000+ Soviet experts were ordered to leave the country within the month. Their tech was the backbone of China’s early machines.

Self-reliance was the new game, yet they were intellectually isolated from the rest of the world. Image
Three researchers were tasked with creating a home-grown computer at the Chinese Academy of Science.

Two dropped out.

Xia Peisu, a female researcher, didn’t flinch.

The last person standing, she either had to finish to project, or doom the country to technical stagnation. Image
Read 4 tweets
Mar 21
Water can solve differential equations.

Lukyanov, a Soviet engineer, was trying to calculate heat transfer in concrete structures.

Hand calculation was cumbersome, so he developed an analog computer to physically model the math relationships.

It worked *really* well. Image
Known as the “Water Integrator”, it solved partial differentials with just gravity, with an error rate around 2-3%.

Because of the simplicity of “programming” with valves, it was successfully used for Geology, thermal physics, metallurgy, and even rocket engineering. Image
The insane part? Digital computers weren’t able to match the utility of the Water Integrator for DECADES.

In the mid-70s, they were still being used at over 115 Soviet research sites.

These “Lukyanov integrators” weren’t decommissioned until the late 1980s! Image
Image
Read 4 tweets
Mar 18
The term “Hacker” originated from a bunch of MIT students obsessed with model trains.

In the late 1950s, the Tech Model Railroad Club was split into two primary factions:

- Knife and Paintbrush
- Signals and Power (S&P)

S&P played fast and loose; disliking authority. Image
S&P hated formal engineering procedures.

They wanted to use the multi-million dollar mainframe (IBM 704) in Building 26 to calculate their control system.

Turns out, time on that mainframe was restricted to “important” things like defense (lame). Image
The nerds were out of control.

Eventually, S&P got access to the TX-0, a $3 million experimental computer at Lincoln Labs.

Complexity went off the rails.

Virtualized “j trains” could be simulated on top of the physical network, allowing algorithmic experiments. Image
Read 5 tweets
Mar 13
Ken Thompson, upon receiving the Turing award, wrote a terrifying paper.

“Reflections on Trusting Trust” illustrates a scenario of original sin.

Because the C compiler is written in C itself, a compromised compiler can self-replicate with no trace in source code. Image
If you can’t trust your compiler, you can’t trust any compiler you build with it either.

Sin in the family tree, no matter how distant, can propagate to your clean code even decades later.
This creates a recursive paradox. What if the tools used to validate a compiler, are themselves products of said compiler?

Source review never guarantees security. You have to verify the entire ancestry. Image
Read 4 tweets
Mar 10
In 1960s Soviet Russia, a computer network was proposed decades before the internet.

“ОГАС” had concepts of Cloud Computing, virtual currencies, and a data-driven economy.

At a cost of $300 million, 300k operators, and a 30-year rollout, it was killed by politics. ОГАС, National Automated System for Computation and Information Processing
Glushkov, the creator, envisioned technology as a tool for government optimization.

The claimed savings returns would be fivefold over a 15 year period.

Banks, factories, and offices hooked up to cities; with information further distilled to a central hub at Moscow. Image
But it didn’t stop there.

OGAS was not just a mere optimization system. Natural language processing would allow humans to communicate directly with computers.

Eventually, they sought to achieve a sort of “information immortality”; the upload of human minds.
Read 5 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Don't want to be a Premium member but still want to support us?

Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal

Or Donate anonymously using crypto!

Ethereum

0xfe58350B80634f60Fa6Dc149a72b4DFbc17D341E copy

Bitcoin

3ATGMxNzCUFzxpMCHL5sWSt4DVtS8UqXpi copy

Thank you for your support!

Follow Us!

:(