diff options
author | otto <> | 2023-06-04 06:58:33 +0000 |
---|---|---|
committer | otto <> | 2023-06-04 06:58:33 +0000 |
commit | 359dbb8e7485c66a6707470ce9d5af0ddbbff9f8 (patch) | |
tree | 658d7037f67b98a6598726569c6933ca718927f6 /src/usr.sbin | |
parent | 2cbf6fb83a2b98d0b6ffbb161bcc85c81e5f2b59 (diff) | |
download | openbsd-359dbb8e7485c66a6707470ce9d5af0ddbbff9f8.tar.gz openbsd-359dbb8e7485c66a6707470ce9d5af0ddbbff9f8.tar.bz2 openbsd-359dbb8e7485c66a6707470ce9d5af0ddbbff9f8.zip |
More thorough write-afetr-free checks.
On free, chunks (the pieces of a pages used for smaller allocations)
are junked and then validated after they leave the delayed free
list. So after free, a chunk always contains junk bytes. This means
that if we start with the right contents for a new page of chunks,
we can *validate* instead of *write* junk bytes when (re)-using a
chunk.
With this, we can detect write-after-free when a chunk is recycled,
not justy when a chunk is in the delayed free list. We do a little
bit more work on initial allocation of a page of chunks and when
re-using (as we validate now even on junk level 1).
Also: some extra consistency checks for recallocaray(3) and fixes
in error messages to make them more consistent, with man page bits.
Plus regress additions.
Diffstat (limited to 'src/usr.sbin')
0 files changed, 0 insertions, 0 deletions