From 052d36f8658e248c066384b08c925f65e7074586 Mon Sep 17 00:00:00 2001 From: otto <> Date: Thu, 25 Feb 2021 15:20:18 +0000 Subject: - Make use of the fact that we know how the chunks are aligned, and write 8 bytes at the time by using a uint64_t pointer. For an allocation a max of 4 such uint64_t's are written spread over the allocation. For pages sized and larger, the first page is junked in such a way. - Delayed free of a small chunk checks the corresponiding way. - Pages ending up in the cache are validated upon unmapping or re-use. In snaps for a while --- src/lib/libc/stdlib/malloc.3 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/lib/libc/stdlib/malloc.3') diff --git a/src/lib/libc/stdlib/malloc.3 b/src/lib/libc/stdlib/malloc.3 index 0c7574034b..c27f965d0a 100644 --- a/src/lib/libc/stdlib/malloc.3 +++ b/src/lib/libc/stdlib/malloc.3 @@ -30,9 +30,9 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $OpenBSD: malloc.3,v 1.126 2019/09/14 13:16:50 otto Exp $ +.\" $OpenBSD: malloc.3,v 1.127 2021/02/25 15:20:18 otto Exp $ .\" -.Dd $Mdocdate: September 14 2019 $ +.Dd $Mdocdate: February 25 2021 $ .Dt MALLOC 3 .Os .Sh NAME @@ -619,7 +619,7 @@ or reallocate an unallocated pointer was made. .It Dq chunk is already free There was an attempt to free a chunk that had already been freed. -.It Dq use after free +.It Dq write after free A chunk has been modified after it was freed. .It Dq modified chunk-pointer The pointer passed to -- cgit v1.2.3-55-g6feb