Subject: [folded-merged] fs-nilfs2-fix-integer-overflow-in-nilfs_ioctl_wrap_copy-fix.patch removed from -mm tree To: konishi.ryusuke@xxxxxxxxxxxxx,fanwlexca@xxxxxxxxx,slava@xxxxxxxxxxx,mm-commits@xxxxxxxxxxxxxxx From: akpm@xxxxxxxxxxxxxxxxxxxx Date: Thu, 23 Jan 2014 15:27:59 -0800 The patch titled Subject: fs-nilfs2-fix-integer-overflow-in-nilfs_ioctl_wrap_copy-fix has been removed from the -mm tree. Its filename was fs-nilfs2-fix-integer-overflow-in-nilfs_ioctl_wrap_copy-fix.patch This patch was dropped because it was folded into fs-nilfs2-fix-integer-overflow-in-nilfs_ioctl_wrap_copy.patch ------------------------------------------------------ From: Ryusuke Konishi <konishi.ryusuke@xxxxxxxxxxxxx> Subject: fs-nilfs2-fix-integer-overflow-in-nilfs_ioctl_wrap_copy-fix Signed-off-by: Wenliang Fan <fanwlexca@xxxxxxxxx> Signed-off-by: Ryusuke Konishi <konishi.ryusuke@xxxxxxxxxxxxx> Cc: Vyacheslav Dubeyko <slava@xxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- fs/nilfs2/ioctl.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff -puN fs/nilfs2/ioctl.c~fs-nilfs2-fix-integer-overflow-in-nilfs_ioctl_wrap_copy-fix fs/nilfs2/ioctl.c --- a/fs/nilfs2/ioctl.c~fs-nilfs2-fix-integer-overflow-in-nilfs_ioctl_wrap_copy-fix +++ a/fs/nilfs2/ioctl.c @@ -57,7 +57,12 @@ static int nilfs_ioctl_wrap_copy(struct if (argv->v_size > PAGE_SIZE) return -EINVAL; - if (argv->v_index > (~(__u64)0 - argv->v_nmembs)) + /* + * Reject pairs of a start item position (argv->v_index) and a + * total count (argv->v_nmembs) which leads position 'pos' to + * overflow by the increment at the end of the loop. + */ + if (argv->v_index > ~(__u64)0 - argv->v_nmembs) return -EINVAL; buf = (void *)__get_free_pages(GFP_NOFS, 0); _ Patches currently in -mm which might be from konishi.ryusuke@xxxxxxxxxxxxx are fs-nilfs2-fix-integer-overflow-in-nilfs_ioctl_wrap_copy.patch nilfs2-add-comments-for-ioctls.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html