diff options
author | Otto Moerbeek <otto@cvs.openbsd.org> | 2023-06-04 06:58:34 +0000 |
---|---|---|
committer | Otto Moerbeek <otto@cvs.openbsd.org> | 2023-06-04 06:58:34 +0000 |
commit | 83b6ab286aa0181d0856c836d853699811b875f0 (patch) | |
tree | 21f1e76b0de73d1b141f0e9d07ca42a1af881663 /usr.sbin/unbound | |
parent | 61ce8736137b64d885d17d4fb5306bcb41ec9945 (diff) |
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 'usr.sbin/unbound')
0 files changed, 0 insertions, 0 deletions