Re: Slab out of bounds in setxattr

2018-06-04 Thread shankarapailoor
Sorry, Sent the same thing twice. Here is the updated one. On Mon, Jun 4, 2018 at 1:22 PM, shankarapailoor wrote: > Hi Dave, > > I've updated the patch accordingly. > > Regards, > Shankara > > On Mon, Jun 4, 2018 at 11:39 AM, Dave Kleikamp > wrote: >> On 06/04/2018 01:30 PM, shankarapailoor

Re: Slab out of bounds in setxattr

2018-06-04 Thread shankarapailoor
Sorry, Sent the same thing twice. Here is the updated one. On Mon, Jun 4, 2018 at 1:22 PM, shankarapailoor wrote: > Hi Dave, > > I've updated the patch accordingly. > > Regards, > Shankara > > On Mon, Jun 4, 2018 at 11:39 AM, Dave Kleikamp > wrote: >> On 06/04/2018 01:30 PM, shankarapailoor

Re: Slab out of bounds in setxattr

2018-06-04 Thread shankarapailoor
Hi Dave, I've updated the patch accordingly. Regards, Shankara On Mon, Jun 4, 2018 at 11:39 AM, Dave Kleikamp wrote: > On 06/04/2018 01:30 PM, shankarapailoor wrote: >> Hi Dave, >> >> Attached is my proposed patch. It solves the problem as you suggest >> and I don't see the KASAN complaint. >

Re: Slab out of bounds in setxattr

2018-06-04 Thread shankarapailoor
Hi Dave, I've updated the patch accordingly. Regards, Shankara On Mon, Jun 4, 2018 at 11:39 AM, Dave Kleikamp wrote: > On 06/04/2018 01:30 PM, shankarapailoor wrote: >> Hi Dave, >> >> Attached is my proposed patch. It solves the problem as you suggest >> and I don't see the KASAN complaint. >

Re: Slab out of bounds in setxattr

2018-06-04 Thread Dave Kleikamp
On 06/04/2018 01:30 PM, shankarapailoor wrote: > Hi Dave, > > Attached is my proposed patch. It solves the problem as you suggest > and I don't see the KASAN complaint. That looks good to me. Add a description and a Signed-off-by: and I'll get it pushed upstream. Thanks for finding this.

Re: Slab out of bounds in setxattr

2018-06-04 Thread Dave Kleikamp
On 06/04/2018 01:30 PM, shankarapailoor wrote: > Hi Dave, > > Attached is my proposed patch. It solves the problem as you suggest > and I don't see the KASAN complaint. That looks good to me. Add a description and a Signed-off-by: and I'll get it pushed upstream. Thanks for finding this.

Re: Slab out of bounds in setxattr

2018-06-04 Thread shankarapailoor
Hi Dave, Attached is my proposed patch. It solves the problem as you suggest and I don't see the KASAN complaint. Regards, Shankara On Mon, Jun 4, 2018 at 11:24 AM, Dave Kleikamp wrote: > On 06/01/2018 11:06 PM, shankarapailoor wrote: >> Hi, >> >> Looking at the crash some more, it seems that

Re: Slab out of bounds in setxattr

2018-06-04 Thread shankarapailoor
Hi Dave, Attached is my proposed patch. It solves the problem as you suggest and I don't see the KASAN complaint. Regards, Shankara On Mon, Jun 4, 2018 at 11:24 AM, Dave Kleikamp wrote: > On 06/01/2018 11:06 PM, shankarapailoor wrote: >> Hi, >> >> Looking at the crash some more, it seems that

Re: Slab out of bounds in setxattr

2018-06-04 Thread Dave Kleikamp
On 06/01/2018 11:06 PM, shankarapailoor wrote: > Hi, > > Looking at the crash some more, it seems that if value_len > PAGE_SIZE > then e_buf->max_size is rounded up nearest page size [1]. If a new > attribute is added with value_len < e_buf->max_size - EA_SIZE(ea) then > no new space is allocated

Re: Slab out of bounds in setxattr

2018-06-04 Thread Dave Kleikamp
On 06/01/2018 11:06 PM, shankarapailoor wrote: > Hi, > > Looking at the crash some more, it seems that if value_len > PAGE_SIZE > then e_buf->max_size is rounded up nearest page size [1]. If a new > attribute is added with value_len < e_buf->max_size - EA_SIZE(ea) then > no new space is allocated

Re: Slab out of bounds in setxattr

2018-06-01 Thread shankarapailoor
Hi, Looking at the crash some more, it seems that if value_len > PAGE_SIZE then e_buf->max_size is rounded up nearest page size [1]. If a new attribute is added with value_len < e_buf->max_size - EA_SIZE(ea) then no new space is allocated for the attiribute list [2] and this triggers the KASAN

Re: Slab out of bounds in setxattr

2018-06-01 Thread shankarapailoor
Hi, Looking at the crash some more, it seems that if value_len > PAGE_SIZE then e_buf->max_size is rounded up nearest page size [1]. If a new attribute is added with value_len < e_buf->max_size - EA_SIZE(ea) then no new space is allocated for the attiribute list [2] and this triggers the KASAN