summaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorHaogang Chen <haogangchen@gmail.com>2012-05-28 14:21:55 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-06-10 00:36:16 +0900
commita9ea4481033197d29c606a935b24336a96cb3082 (patch)
treed1236a43ca42a124c272e9fb5ca3a15bbd573d90 /kernel
parent3c7f096206323ae4c9ad3db62fece0b19df21532 (diff)
ext4: fix potential integer overflow in alloc_flex_gd()
commit 967ac8af4475ce45474800709b12137aa7634c77 upstream. In alloc_flex_gd(), when flexbg_size is large, kmalloc size would overflow and flex_gd->groups would point to a buffer smaller than expected, causing OOB accesses when it is used. Note that in ext4_resize_fs(), flexbg_size is calculated using sbi->s_log_groups_per_flex, which is read from the disk and only bounded to [1, 31]. The patch returns NULL for too large flexbg_size. Reviewed-by: Eric Sandeen <sandeen@redhat.com> Signed-off-by: Haogang Chen <haogangchen@gmail.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'kernel')
0 files changed, 0 insertions, 0 deletions