And it's even worse then just "accidentally" discovering passwords:
If you can read kernel space, then most likely you can also read other processes' memory. If you are considering a scenario where you can only read kernel space, then you can still read disk buffers, I/O buffers etc., so you can see all I/O to and from other processes.
That means all credentials, passwords and secrets are now yours for the taking: You just need to try to authenticate (e.g. execute sudo
, etc.), and then watch what the other process does. Either it has credentials in process memory, or you can reconstruct them from the I/O you can see (because all computation is deterministic, and you'll be able to imitate what the other process does, even if you can't read its memory).
So being able to read kernel space gives you root credentials. Then you can do everything.