From: Greg Kroah-Hartman Date: Tue, 4 Jun 2019 13:56:16 +0000 (+0200) Subject: fix staging 4.19 patch as well. X-Git-Tag: v5.1.8~26 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=abebae84ef6f6622468faecc16d7643992560d58;p=thirdparty%2Fkernel%2Fstable-queue.git fix staging 4.19 patch as well. --- diff --git a/queue-4.19/staging-vc04_services-prevent-integer-overflow-in-create_pagelist.patch b/queue-4.19/staging-vc04_services-prevent-integer-overflow-in-create_pagelist.patch index a76aa10c104..94444713c9c 100644 --- a/queue-4.19/staging-vc04_services-prevent-integer-overflow-in-create_pagelist.patch +++ b/queue-4.19/staging-vc04_services-prevent-integer-overflow-in-create_pagelist.patch @@ -45,7 +45,7 @@ Signed-off-by: Greg Kroah-Hartman 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)))