Re: [PATCH] hugetlbfs: Fix integer overflow check in hugetlbfs_file_mmap()

From: linke li
Date: Thu Jul 13 2023 - 03:57:45 EST


> However, if this is a real issue it would make more
> sense to look for and change all such checks rather than one single occurrence.

Hi, Mike. I have checked the example code you provided, and the
difference between
those codes and the patched code is that those checks are checks for
unsigned integer
overflow, which is well-defined. Only undefined behavior poses a
security risk. So they
don't need any modifications. I have only found one occurrence of
signed number
overflow so far.

Thank you for your valuable feedback.