]> git.proxmox.com Git - mirror_zfs.git/commit
ZIO: Add overflow checks for linear buffers
authorAlexander Motin <mav@FreeBSD.org>
Fri, 1 Dec 2023 19:50:10 +0000 (14:50 -0500)
committerGitHub <noreply@github.com>
Fri, 1 Dec 2023 19:50:10 +0000 (11:50 -0800)
commitadcea23cb0d18a94e20249a40945ca107c4dc85d
treed4c73381e00e5f96490c0ce8740e51d0c96b4fff
parent3e4bef52b084dacc0f1abdaec428c0bdfb73f96d
ZIO: Add overflow checks for linear buffers

Since we use a limited set of kmem caches, quite often we have unused
memory after the end of the buffer.  Put there up to a 512-byte canary
when built with debug to detect buffer overflows at the free time.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Alexander Motin <mav@FreeBSD.org>
Sponsored by: iXsystems, Inc.
Closes #15553
lib/libspl/include/assert.h
module/zfs/zio.c