Torvalds Warns the World: Don’t Use the Linux 5.12-rc1 Kernel
“In a message to the Linux Kernel Mailing List Wednesday, founding developer Linus Torvalds warned the world not to use the 5.12-rc1 kernel in his public git tree…” writes Ars Technica:

As it turns out, when Linus Torvalds flags some code dontuse, he really means it — the problem with this 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 filesystem, with the obvious catastrophic end results.”

If your imagination is insufficient, this means that 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 means overwriting not only data in existing files, but also rather large chunks of metadata whose corruption would likely render the entire filesystem unmountable and unusable.

Torvalds goes on to point out that if you aren’t using swap at all, this problem wouldn’t bite you. 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’.”

Read more of this story at Slashdot.

By admin