Re: [PATCH 1/2] ima: check xattr value length in ima_inode_setxattr()

2014-10-23 Thread Mimi Zohar
On Fri, 2014-10-24 at 13:55 +1100, James Morris wrote: > On Thu, 23 Oct 2014, Dmitry Kasatkin wrote: > > > ima_inode_setxattr() can be called with no value. Function does not > > check the length so that following command can be used to produce > > kernel oops: setfattr -n security.ima FOO. This

Re: [PATCH 1/2] ima: check xattr value length in ima_inode_setxattr()

2014-10-23 Thread James Morris
On Thu, 23 Oct 2014, Dmitry Kasatkin wrote: > ima_inode_setxattr() can be called with no value. Function does not > check the length so that following command can be used to produce > kernel oops: setfattr -n security.ima FOO. This patch fixes it. I'd like to see more review/acks on this before s

Re: [PATCH 1/2] ima: check xattr value length in ima_inode_setxattr()

2014-10-23 Thread Jan Kara
On Thu 23-10-14 18:59:07, Dmitry Kasatkin wrote: > On 23 October 2014 18:40, Jan Kara wrote: > > On Thu 23-10-14 16:47:17, Dmitry Kasatkin wrote: > >> ima_inode_setxattr() can be called with no value. Function does not > >> check the length so that following command can be used to produce > >> ker

Re: [PATCH 1/2] ima: check xattr value length in ima_inode_setxattr()

2014-10-23 Thread Dmitry Kasatkin
On 23 October 2014 18:40, Jan Kara wrote: > On Thu 23-10-14 16:47:17, Dmitry Kasatkin wrote: >> ima_inode_setxattr() can be called with no value. Function does not >> check the length so that following command can be used to produce >> kernel oops: setfattr -n security.ima FOO. This patch fixes it

Re: [PATCH 1/2] ima: check xattr value length in ima_inode_setxattr()

2014-10-23 Thread Jan Kara
On Thu 23-10-14 16:47:17, Dmitry Kasatkin wrote: > ima_inode_setxattr() can be called with no value. Function does not > check the length so that following command can be used to produce > kernel oops: setfattr -n security.ima FOO. This patch fixes it. > .. > > Reported-by: Jan Kara > Signed-off

[PATCH 1/2] ima: check xattr value length in ima_inode_setxattr()

2014-10-23 Thread Dmitry Kasatkin
ima_inode_setxattr() can be called with no value. Function does not check the length so that following command can be used to produce kernel oops: setfattr -n security.ima FOO. This patch fixes it. [ 261.562522] BUG: unable to handle kernel NULL pointer dereference at (null) [ 261.564