UPSTREAM: f2fs: fix several potential integer overflows in file offsets
When dealing with large extents and calculating file offsets by summing up according extent offsets and lengths of unsigned int type, one may encounter possible integer overflow if the values are big enough. Prevent this from happening by expanding one of the addends to (pgoff_t) type. Found by Linux Verification Center (linuxtesting.org) with static analysis tool SVACE. Fixes: d323d005 ("f2fs: support file defragment") Cc: stable@vger.kernel.org Change-Id: I7062d60703b99ae22bcb882dbab77dd68ef431ae Signed-off-by:Nikita Zhandarovich <n.zhandarovich@fintech.ru> Reviewed-by:
Chao Yu <chao@kernel.org> Signed-off-by:
Jaegeuk Kim <jaegeuk@kernel.org> (cherry picked from commit 1cade98c)
Loading
Please sign in to comment