From 9bae371ce69187f14e15129173ba0b138a965ada Mon Sep 17 00:00:00 2001 From: Tom Caputi Date: Thu, 5 Oct 2017 13:43:34 -0400 Subject: Fix for #6714 This 2 line patch fixes a possible integer overflow reported by grsec. Signed-off-by: Tom Caputi --- module/zfs/zio_crypt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'module/zfs') diff --git a/module/zfs/zio_crypt.c b/module/zfs/zio_crypt.c index 6238e6f74..5ffa1e8b0 100644 --- a/module/zfs/zio_crypt.c +++ b/module/zfs/zio_crypt.c @@ -1251,8 +1251,8 @@ zio_crypt_init_uios_zil(boolean_t encrypt, uint8_t *plainbuf, boolean_t *no_crypt) { int ret; - uint64_t txtype; - uint_t nr_src, nr_dst, lr_len, crypt_len; + uint64_t txtype, lr_len; + uint_t nr_src, nr_dst, crypt_len; uint_t aad_len = 0, nr_iovecs = 0, total_len = 0; iovec_t *src_iovecs = NULL, *dst_iovecs = NULL; uint8_t *src, *dst, *slrp, *dlrp, *blkend, *aadp; -- cgit v1.2.3