From 6bbb44e157818b52b2cf222f7cc299d42903f7b0 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Fri, 5 Mar 2021 14:45:13 -0800 Subject: [PATCH] Initialize ZIL buffers When populating a ZIL destination buffer ensure it is always zeroed before its contents are constructed. Reviewed-by: Matthew Ahrens Reviewed-by: Tom Caputi Signed-off-by: Brian Behlendorf Closes #11687 --- module/os/linux/zfs/zio_crypt.c | 1 + 1 file changed, 1 insertion(+) diff --git a/module/os/linux/zfs/zio_crypt.c b/module/os/linux/zfs/zio_crypt.c index 284ca706ede5..2c58fecb2066 100644 --- a/module/os/linux/zfs/zio_crypt.c +++ b/module/os/linux/zfs/zio_crypt.c @@ -1412,6 +1412,7 @@ zio_crypt_init_uios_zil(boolean_t encrypt, uint8_t *plainbuf, nr_src = 1; nr_dst = 0; } + bzero(dst, datalen); /* find the start and end record of the log block */ zilc = (zil_chain_t *)src;