Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kernel: Request random numberfs for syscall stack noise in larger chunks #3125

Merged
merged 1 commit into from
Aug 13, 2020

Conversation

nico
Copy link
Contributor

@nico nico commented Aug 13, 2020

Cuts time needed for disasm /bin/id from 2.5s to 1s -- identical
to the time it needs when not doing the random adjustment at all.

The downside is that it's now very easy to get the random offsets
with out-of-bounds reads, so it does make this mitigation less
effective.

--

Not sure if we want this, but it does make syscall-heavy programs much faster.

We can probably get the 2.5s down some more by optimizing the rng code more, but likely not this low.

@alimpfard
Copy link
Member

Take the next byte and index into the array by that?
Not a perfect solution, but an exploit would now require two successful reads instead of one 🤷

@awesomekling
Copy link
Collaborator

Given the magnitude of the slowdown, I think the risk of buffering some randomness is acceptable.

Cuts time needed for `disasm /bin/id` from 2.5s to 1s -- identical
to the time it needs when not doing the random adjustment at all.

The downside is that it's now very easy to get the random offsets
with out-of-bounds reads, so it does make this mitigation less
effective.
@awesomekling awesomekling merged commit df62e54 into SerenityOS:master Aug 13, 2020
@nico nico deleted the randombuf branch August 13, 2020 19:05
@awesomekling
Copy link
Collaborator

This basically made everything a lot faster.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants