fs/btrfs: Integer overflow in btrfs_ioctl_resize()
authorWenliang Fan <[email protected]>
Fri, 20 Dec 2013 07:28:56 +0000 (15:28 +0800)
committerChris Mason <[email protected]>
Tue, 28 Jan 2014 21:20:11 +0000 (13:20 -0800)
commiteb8052e015f2c015926db45943f8ee724ace97e5
tree0bc0bbe9ac1804dd4a3e658f2a17efb59328ac6b
parentc9ea7b24ce5863d65efb1134319cede160674d41
fs/btrfs: Integer overflow in btrfs_ioctl_resize()

The local variable 'new_size' comes from userspace. If a large number
was passed, there would be an integer overflow in the following line:
new_size = old_size + new_size;

Signed-off-by: Wenliang Fan <[email protected]>
Signed-off-by: Josef Bacik <[email protected]>
Signed-off-by: Chris Mason <[email protected]>
fs/btrfs/ioctl.c