Re: [PATCH] ovl: explicitly initialize error in ovl_copy_xattr()

2020-06-05 Thread Miklos Szeredi
On Thu, Jun 4, 2020 at 5:57 PM Kees Cook wrote: > > On Thu, Jun 04, 2020 at 10:42:45AM +0200, gli...@google.com wrote: > > Under certain circumstances (we found this out running Docker on a > > Clang-built kernel with CONFIG_INIT_STACK_ALL) ovl_copy_xattr() may > > return uninitialized value of

Re: [PATCH] ovl: explicitly initialize error in ovl_copy_xattr()

2020-06-05 Thread Alexander Potapenko
On Thu, Jun 4, 2020 at 5:57 PM Kees Cook wrote: > > On Thu, Jun 04, 2020 at 10:42:45AM +0200, gli...@google.com wrote: > > Under certain circumstances (we found this out running Docker on a > > Clang-built kernel with CONFIG_INIT_STACK_ALL) ovl_copy_xattr() may > > return uninitialized value of

Re: [PATCH] ovl: explicitly initialize error in ovl_copy_xattr()

2020-06-04 Thread Kees Cook
On Thu, Jun 04, 2020 at 10:57:24AM +0200, Miklos Szeredi wrote: > On Thu, Jun 4, 2020 at 10:43 AM wrote: > > > > Under certain circumstances (we found this out running Docker on a > > Clang-built kernel with CONFIG_INIT_STACK_ALL) ovl_copy_xattr() may > > return uninitialized value of |error|

Re: [PATCH] ovl: explicitly initialize error in ovl_copy_xattr()

2020-06-04 Thread Kees Cook
On Thu, Jun 04, 2020 at 10:42:45AM +0200, gli...@google.com wrote: > Under certain circumstances (we found this out running Docker on a > Clang-built kernel with CONFIG_INIT_STACK_ALL) ovl_copy_xattr() may > return uninitialized value of |error| from ovl_copy_xattr(). > It is then returned by

Re: [PATCH] ovl: explicitly initialize error in ovl_copy_xattr()

2020-06-04 Thread Miklos Szeredi
On Thu, Jun 4, 2020 at 10:43 AM wrote: > > Under certain circumstances (we found this out running Docker on a > Clang-built kernel with CONFIG_INIT_STACK_ALL) ovl_copy_xattr() may > return uninitialized value of |error| from ovl_copy_xattr(). > It is then returned by ovl_create() to

[PATCH] ovl: explicitly initialize error in ovl_copy_xattr()

2020-06-04 Thread glider
Under certain circumstances (we found this out running Docker on a Clang-built kernel with CONFIG_INIT_STACK_ALL) ovl_copy_xattr() may return uninitialized value of |error| from ovl_copy_xattr(). It is then returned by ovl_create() to lookup_open(), which casts it to an invalid dentry pointer,

Re: [PATCH] ovl: explicitly initialize error in ovl_copy_xattr()

2020-06-04 Thread Alexander Potapenko
On Wed, Jun 3, 2020 at 11:46 PM Vivek Goyal wrote: > > On Wed, Jun 03, 2020 at 07:47:14PM +0200, gli...@google.com wrote: > > Under certain circumstances (we found this out running Docker on a > > Clang-built kernel with CONFIG_INIT_STACK_ALL) ovl_copy_xattr() may > > return uninitialized value

Re: [PATCH] ovl: explicitly initialize error in ovl_copy_xattr()

2020-06-03 Thread Vivek Goyal
On Wed, Jun 03, 2020 at 07:47:14PM +0200, gli...@google.com wrote: > Under certain circumstances (we found this out running Docker on a > Clang-built kernel with CONFIG_INIT_STACK_ALL) ovl_copy_xattr() may > return uninitialized value of |error| from ovl_copy_xattr(). If we are returning

Re: [PATCH] ovl: explicitly initialize error in ovl_copy_xattr()

2020-06-03 Thread Kees Cook
On Wed, Jun 03, 2020 at 07:47:14PM +0200, gli...@google.com wrote: > Under certain circumstances (we found this out running Docker on a > Clang-built kernel with CONFIG_INIT_STACK_ALL) ovl_copy_xattr() may > return uninitialized value of |error| from ovl_copy_xattr(). > It is then returned by

[PATCH] ovl: explicitly initialize error in ovl_copy_xattr()

2020-06-03 Thread glider
Under certain circumstances (we found this out running Docker on a Clang-built kernel with CONFIG_INIT_STACK_ALL) ovl_copy_xattr() may return uninitialized value of |error| from ovl_copy_xattr(). It is then returned by ovl_create() to lookup_open(), which casts it to an invalid dentry pointer,