Re: [PATCH] jfs: Fix buffer overrun in ea_get

2018-06-18 Thread Dave Kleikamp
On 06/18/2018 03:38 AM, Nikolay Borisov wrote: > Currently ea_buf->xattr buffer is allocated with min(min_size, ea_size). > This is wrong since after the xattr buffer is allocated the ->max_size > variable is actually rounded up to th next ->s_blocksize size. Fix this > by using the rounded up max_

[PATCH] jfs: Fix buffer overrun in ea_get

2018-06-18 Thread Nikolay Borisov
Currently ea_buf->xattr buffer is allocated with min(min_size, ea_size). This is wrong since after the xattr buffer is allocated the ->max_size variable is actually rounded up to th next ->s_blocksize size. Fix this by using the rounded up max_size as input to the malloc. Suggested-by: Shankara Pa