Earlier quoted context omitted.
> To what extent do you trust "well-tested" code? I don't, which is why I use Qubes OS providing security through compartmentalization.
Then the question becomes: to what extent do you trust Xen and Qubes RPC?
Kernel bugs hide for 2 years on average. Some hide for 20
131–140 of 186 posts
Re: Kernel bugs hide for 2 years on average. Some hide for 20
#132Before the "rewrite it in Rust" comments take over the thread: It is worth noting that the class of bugs described here (logic errors in highly concurrent state machines, incorrect hardware assumptions) wouldn't necessarily be caught by the borrow checker. Rust is fantastic for memory safety, but it will not stop you from misunderstanding the spec of a network card or writing a race condition in unsafe logic that int…
Re: Kernel bugs hide for 2 years on average. Some hide for 20
#133Before the "rewrite it in Rust" comments take over the thread: It is worth noting that the class of bugs described here (logic errors in highly concurrent state machines, incorrect hardware assumptions) wouldn't necessarily be caught by the borrow checker. Rust is fantastic for memory safety, but it will not stop you from misunderstanding the spec of a network card or writing a race condition in unsafe logic that int…
> It is worth noting that the class of bugs described here (logic errors in highly concurrent state machines, incorrect hardware assumptions) While the bugs you describe are indeed things that aren't directly addressed by Rust's borrow checker, I think the article covers more ground than your comment implies. For example, a significant portion (most?) of the article is simply analyzing the gathered data, like groupin…
Re: Kernel bugs hide for 2 years on average. Some hide for 20
#134Earlier quoted context omitted.
I guess because I work in security the "unintentionally" doesn't matter much to me.
But it matters for detection time, because there's a lot more "normal" use of any given piece of code than intentional attempts to break it. If a bug can't be triggered unintentionally it'll never get detected through normal use, which can lead to it staying hidden for longer.
Re: Kernel bugs hide for 2 years on average. Some hide for 20
#135Re: Kernel bugs hide for 2 years on average. Some hide for 20
#136Earlier quoted context omitted.
It depends what they mean by some of these: are the state machine race conditions logic races (which Rust won’t trivially solve) or data races? If they are data races, are they the kind of ones that Rust will catch (missing atomics/synchronization) or the ones it won’t (bad atomic orderings, etc.). It’s also worth noting that Rust doesn’t prevent integer overflow, and it doesn’t panic on it by default in release buil…
I don’t think that the parent comment is saying all of the bugs would have been prevented by using Rust. But in the listed categories, I’m equally skeptical that none of them would have benefited from Rust even a bit.
Re: Kernel bugs hide for 2 years on average. Some hide for 20
#137Earlier quoted context omitted.
What warranties? I assume you’re comparing it to ext4 and not e.g. ZFS?
Here are a few - mandatory byte-range locks enforced by the kernel - explicit sharing modes - guarantees around write ordering and durability - safe delete-on-close - first-class cache coherency contracts for networked access POSIX aims for portability while NTFS/Win32 aims for explicit contracts and enforced behavior. For apps assuming POSIX semantics (e.g. git) NTFS feels rigid and weird. Coming the other way from…
`FILE_FLAG_DELETE_ON_CLOSE`’s equivalent on Posix is just rm. Windows doesn’t let you open new handles to `FILE_FLAG_DELETE_ON_CLOSE`ed files anyway, so it’s effectively the same. The inode will get deleted when the last file description is removed.
NFS is a disaster though, I’ll give you that one. Though mandatory locks on SMB shares hanging is also very aggravating in its own right.
Re: Kernel bugs hide for 2 years on average. Some hide for 20
#138Earlier quoted context omitted.
> …lurked for years and even decades. Heartbleed comes to mind. I don’t know much about Heartbleed, but Wikipedia says: > Heartbleed is a security bug… It was introduced into the software in 2012 and publicly disclosed in April 2014. Two years doesn’t sound like “years or even decades” to me? But again, I don’t know much about Heartbleed so I may be missing something. It does say it was also patched in 2014, not just…
This may just be me misremembering, but as I recall, the bug of Heartbleed was ultimately a very complex macro system which supported multiple very old architectures. The bug, IIRC, was the interaction between that old macro system and the new code which is what made it hard to recognize as a bug. Part of the resolution to the problem was I believe they ended up removing a fair number of unsupported platforms. It als…
https://en.wikipedia.org/wiki/Shellshock_(software_bug)
The bug was introduced into the code in 1989, and only found and exploited in 2014.
Re: Kernel bugs hide for 2 years on average. Some hide for 20
#139Earlier quoted context omitted.
Mach is not a very good microkernel at all, because the overhead is much higher than necessary. The L4 family’s IPC design is substantially more efficient, and that’s why they’re used in actual systems. Fuchsia/Zircon have improved on the model further. Someone will of course bring up XNU, but the microkernel aspect of it died when they smashed the FreeBSD kernel into the codebase. DriverKit has brought some userspac…
> Mach is not a very good microkernel at all, because the overhead is much higher than necessary. The L4 family’s IPC design is substantially more efficient, and that’s why they’re used in actual systems. As opposed to Mach, which is not used in any actual systems
Re: Kernel bugs hide for 2 years on average. Some hide for 20
#140[flagged]
Yea, it's pretty common. We had a customer years ago that was having a rare and random application crash under load. Never could figure out where it was from. Quite some time later a batch load interface was added to the app and with the rate things were input with it the crash could be triggered reliably.
It's something else that's added/changed in the application that eventually makes the bug stand out.