diff options
author | otto <> | 2023-06-04 06:58:33 +0000 |
---|---|---|
committer | otto <> | 2023-06-04 06:58:33 +0000 |
commit | 2a8b47d0250685d7abc14fa96be74d04d0b8c8ec (patch) | |
tree | 658d7037f67b98a6598726569c6933ca718927f6 /src/lib/libc/stdlib/setenv.c | |
parent | 7819892ebb6ce6589ed0a5ef4e5079e4219f9df2 (diff) | |
download | openbsd-2a8b47d0250685d7abc14fa96be74d04d0b8c8ec.tar.gz openbsd-2a8b47d0250685d7abc14fa96be74d04d0b8c8ec.tar.bz2 openbsd-2a8b47d0250685d7abc14fa96be74d04d0b8c8ec.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/lib/libc/stdlib/setenv.c')
0 files changed, 0 insertions, 0 deletions