All of lore.kernel.org
 help / color / mirror / Atom feed
* [Cluster-devel] [PATCH v2] fs/dlm: Fix kernel memory disclosure
@ 2017-02-02 16:57 Vlad Tsyrklevich
  0 siblings, 0 replies; 4+ messages in thread
From: Vlad Tsyrklevich @ 2017-02-02 16:57 UTC (permalink / raw)
  To: cluster-devel.redhat.com

Clear the 'unused' field and the uninitialized padding in 'lksb' to
avoid leaking memory to userland in copy_result_to_user().

Signed-off-by: Vlad Tsyrklevich <vlad@tsyrklevich.net>
---
 fs/dlm/user.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/fs/dlm/user.c b/fs/dlm/user.c
index 1ce908c..83ddd47 100644
--- a/fs/dlm/user.c
+++ b/fs/dlm/user.c
@@ -122,6 +122,8 @@ static void compat_input(struct dlm_write_request *kb,
 static void compat_output(struct dlm_lock_result *res,
 			  struct dlm_lock_result32 *res32)
 {
+	memset(res32, 0, sizeof(*res32));
+
 	res32->version[0] = res->version[0];
 	res32->version[1] = res->version[1];
 	res32->version[2] = res->version[2];
-- 
2.7.0



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [Cluster-devel] [PATCH v2] fs/dlm: Fix kernel memory disclosure
@ 2017-02-22  7:45 Vlad Tsyrklevich
  2017-02-22 10:55 ` Steven Whitehouse
  2017-02-22 21:34 ` David Teigland
  0 siblings, 2 replies; 4+ messages in thread
From: Vlad Tsyrklevich @ 2017-02-22  7:45 UTC (permalink / raw)
  To: cluster-devel.redhat.com

Hello, I wanted to ping the list and see if this could get a review:

> Clear the 'unused' field and the uninitialized padding in 'lksb' to
> avoid leaking memory to userland in copy_result_to_user().
>
> Signed-off-by: Vlad Tsyrklevich <vlad@tsyrklevich.net>
> ---
>  fs/dlm/user.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/fs/dlm/user.c b/fs/dlm/user.c
> index 1ce908c..83ddd47 100644
> --- a/fs/dlm/user.c
> +++ b/fs/dlm/user.c
> @@ -122,6 +122,8 @@ static void compat_input(struct dlm_write_request *kb,
>  static void compat_output(struct dlm_lock_result *res,
>                           struct dlm_lock_result32 *res32)
>  {
> +       memset(res32, 0, sizeof(*res32));
> +
>         res32->version[0] = res->version[0];
>         res32->version[1] = res->version[1];
>         res32->version[2] = res->version[2];



^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Cluster-devel] [PATCH v2] fs/dlm: Fix kernel memory disclosure
  2017-02-22  7:45 [Cluster-devel] [PATCH v2] fs/dlm: Fix kernel memory disclosure Vlad Tsyrklevich
@ 2017-02-22 10:55 ` Steven Whitehouse
  2017-02-22 21:34 ` David Teigland
  1 sibling, 0 replies; 4+ messages in thread
From: Steven Whitehouse @ 2017-02-22 10:55 UTC (permalink / raw)
  To: cluster-devel.redhat.com

Hi,


On 22/02/17 07:45, Vlad Tsyrklevich wrote:
> Hello, I wanted to ping the list and see if this could get a review:
It looks good to me,

Steve.

>> Clear the 'unused' field and the uninitialized padding in 'lksb' to
>> avoid leaking memory to userland in copy_result_to_user().
>>
>> Signed-off-by: Vlad Tsyrklevich <vlad@tsyrklevich.net>
>> ---
>>   fs/dlm/user.c | 2 ++
>>   1 file changed, 2 insertions(+)
>>
>> diff --git a/fs/dlm/user.c b/fs/dlm/user.c
>> index 1ce908c..83ddd47 100644
>> --- a/fs/dlm/user.c
>> +++ b/fs/dlm/user.c
>> @@ -122,6 +122,8 @@ static void compat_input(struct dlm_write_request *kb,
>>   static void compat_output(struct dlm_lock_result *res,
>>                            struct dlm_lock_result32 *res32)
>>   {
>> +       memset(res32, 0, sizeof(*res32));
>> +
>>          res32->version[0] = res->version[0];
>>          res32->version[1] = res->version[1];
>>          res32->version[2] = res->version[2];



^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Cluster-devel] [PATCH v2] fs/dlm: Fix kernel memory disclosure
  2017-02-22  7:45 [Cluster-devel] [PATCH v2] fs/dlm: Fix kernel memory disclosure Vlad Tsyrklevich
  2017-02-22 10:55 ` Steven Whitehouse
@ 2017-02-22 21:34 ` David Teigland
  1 sibling, 0 replies; 4+ messages in thread
From: David Teigland @ 2017-02-22 21:34 UTC (permalink / raw)
  To: cluster-devel.redhat.com

On Wed, Feb 22, 2017 at 03:45:34PM +0800, Vlad Tsyrklevich wrote:
> Hello, I wanted to ping the list and see if this could get a review:

now pushed to linux-dlm.git

> > Clear the 'unused' field and the uninitialized padding in 'lksb' to
> > avoid leaking memory to userland in copy_result_to_user().
> >
> > Signed-off-by: Vlad Tsyrklevich <vlad@tsyrklevich.net>
> > ---
> >  fs/dlm/user.c | 2 ++
> >  1 file changed, 2 insertions(+)
> >
> > diff --git a/fs/dlm/user.c b/fs/dlm/user.c
> > index 1ce908c..83ddd47 100644
> > --- a/fs/dlm/user.c
> > +++ b/fs/dlm/user.c
> > @@ -122,6 +122,8 @@ static void compat_input(struct dlm_write_request *kb,
> >  static void compat_output(struct dlm_lock_result *res,
> >                           struct dlm_lock_result32 *res32)
> >  {
> > +       memset(res32, 0, sizeof(*res32));
> > +
> >         res32->version[0] = res->version[0];
> >         res32->version[1] = res->version[1];
> >         res32->version[2] = res->version[2];



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-02-22 21:34 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-02-22  7:45 [Cluster-devel] [PATCH v2] fs/dlm: Fix kernel memory disclosure Vlad Tsyrklevich
2017-02-22 10:55 ` Steven Whitehouse
2017-02-22 21:34 ` David Teigland
  -- strict thread matches above, loose matches on Subject: below --
2017-02-02 16:57 Vlad Tsyrklevich

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.