]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
fix staging 4.19 patch as well.
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 4 Jun 2019 13:56:16 +0000 (15:56 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 4 Jun 2019 13:56:16 +0000 (15:56 +0200)
queue-4.19/staging-vc04_services-prevent-integer-overflow-in-create_pagelist.patch

index a76aa10c104b93802641c15ba98d824b40e48e78..94444713c9c872e99129e5e478c5c234ef087066 100644 (file)
@@ -45,7 +45,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
        offset = ((unsigned int)(unsigned long)buf & (PAGE_SIZE - 1));
        num_pages = DIV_ROUND_UP(count + offset, PAGE_SIZE);
  
-+      if (num_pages > (SIZE_MAX - sizeof(struct pagelist) -
++      if (num_pages > (SIZE_MAX - sizeof(PAGELIST_T) -
 +                       sizeof(struct vchiq_pagelist_info)) /
 +                      (sizeof(u32) + sizeof(pages[0]) +
 +                       sizeof(struct scatterlist)))