'Urgent data corruption issue' destroys filesystems in Linux 4.14

Using bcache to speed Linux 4.14? Stop if you want your data to live

By Simon Sharwood, APAC Editor

Posted in Storage, 22nd November 2017 08:35 GMT

A filesystem-eating bug has been found in Linux 4.14.

First reported last week by developer Pavel Goran, the problem struck bcache, a tool that lets one use a solid state disk drive as a read/write cache for another drive. bcache is often used to store data from a slow disk on faster media.

Goran noticed the problem after trying to upgrade Gentoo from version 4.13 of the Linux kernel to version 4.14. During that effort he noticed “reads from the bcache device produce different data in 4.14 and 4.13.”

After plenty of analysis, he concluded that “this looks like a very serious bug that can corrupt or completely destroy the data on bcache devices.

Others agreed with Goran, as his report quickly made its way onto the Gentoo bugs list and was later identified as having the following cause:

A new field was introduced in 74d46992e0d9, bi_partno, instead of using bdev->bd_contains and encoding the partition information in the bi_bdev field. __bio_clone_fast was changed to copy the disk information, but not the partition information. At minimum, this regressed bcache and caused data corruption.

A fix has since been implemented and will appear in Linux 4.14.1 and eventually Linux 4.15, which is due in about two months. ®

Sign up to our NewsletterGet IT in your inbox daily

54 Comments

More from The Register

Why did I buy a gadget I know I'll never use?

Something for the Weekend, Sir? Just put it under the desk along with all the others

Ever wondered why tech products fail so frequently? No, me neither

Something for the Weekend, Sir? Celestial choirs are coming to your screen soon

The day I almost pinned my tushie as a Google Maps landmark

Something for the Weekend, Sir? My blue jean contents are disruptive

Those IT gadget freebies you picked up this year? They make AWFUL Christmas presents

Something for the Weekend, Sir? Cyber Monday is coming but I still feel so green

The healing hands of customer support get an acronym: Do YOU have 'tallah-toe-big'?

Something for the Weekend, Sir? My computer's crashed! I've lost everythi… oh, never mind, it's working again

Web searching died the day they invented SEO

Something for the Weekend, Sir? The truth is out there but you'll never find it

Your data will get hacked anyway so you might as well give up protecting it

Something for the Weekend, Sir? Spend the money on freezing your brain

HomePod, you say? Sex sex sex, that's all you think about

Something for the Weekend, Sir? Apple suggests wiping your ROD and oiling your ring

It's artificial! It's intelligent! It's in my home! And it's gone bonkers!

Something for the Weekend, Sir? Discoursing Descartes with my robotic pet

Car trouble: Keyless and lockless is no match for brainless

Something for the Weekend, Sir? Nissan brings new meaning to 'open door policy'