]> granicus.if.org Git - zfs/commitdiff
Fix for #6714
authorTom Caputi <tcaputi@datto.com>
Thu, 5 Oct 2017 17:43:34 +0000 (13:43 -0400)
committerTom Caputi <tcaputi@datto.com>
Wed, 11 Oct 2017 20:59:42 +0000 (16:59 -0400)
This 2 line patch fixes a possible integer overflow reported by grsec.

Signed-off-by: Tom Caputi <tcaputi@datto.com>
module/zfs/zio_crypt.c

index 6238e6f74ac6cde2bf220865d4d63bde0d7a68a0..5ffa1e8b0ce22a8e82c0ad5d22080fee80e7257a 100644 (file)
@@ -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;