Published in News

Torvalds warns against the 5.12-rc1 kernel

by on08 March 2021


Borked, must have been on the open sauce when he let it through 


The IT industry’s Mr Sweary has warned punters not to use the 5.12-rc1 kernel in his public git tree.

In a message to the Linux Kernel Mailing List Torvalds said the 5.12 release candidate broke swapfile handling in a very unpleasant way.

Specifically, the updated code would lose the proper offset pointing to the beginning of the swapfile. Again, in Torvalds' own words, "swapping still happened, but it happened to the wrong part of the file system, with the obvious catastrophic end results".

So when the kernel paged contents of memory out to disk, the data would land on random parts of the same disk and partition the swapfile lived on... not as files, mind you, but as garbage spewed directly to raw sectors on the disk.

This would mean it would overwrite data in existing files and rather large chunks of metadata whose corruption would likely render the entire filesystem unmountable and unusable.

The only way to be safe was not to use swap at all and if you're using swap partitions, rather than swap files, you'd be similarly unaffected...

Torvalds also advised anyone who'd already pulled his git tree to do a git tag -d v5.12-rc1 "to actually get rid of the original tag name..." — or at least, to not use it for anything.

"I want everybody to be aware..." Torvalds writes, "because _if_ it bites you, it bites you hard, and you can end up with a filesystem that is essentially overwritten by random swap data. This is what we in the industry call 'double ungood'".

Last modified on 08 March 2021
Rate this item
(1 Vote)

Read more about: