From: Vlad Tsyrklevich <vlad@tsyrklevich.net>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] [PATCH] fs/dlm: Fix kernel memory disclosure
Date: Mon, 9 Jan 2017 20:27:24 +0700 [thread overview]
Message-ID: <1483968444-5460-1-git-send-email-vlad@tsyrklevich.net> (raw)
Clear the 'unused' field 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..0570711 100644
--- a/fs/dlm/user.c
+++ b/fs/dlm/user.c
@@ -138,6 +138,8 @@ static void compat_output(struct dlm_lock_result *res,
res32->lksb.sb_flags = res->lksb.sb_flags;
res32->lksb.sb_lkid = res->lksb.sb_lkid;
res32->lksb.sb_lvbptr = (__u32)(long)res->lksb.sb_lvbptr;
+
+ memset(&res32->unused, 0, sizeof(res32->unused));
}
#endif
--
2.7.0
next reply other threads:[~2017-01-09 13:27 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-09 13:27 Vlad Tsyrklevich [this message]
2017-01-26 8:54 ` [Cluster-devel] [PATCH] fs/dlm: Fix kernel memory disclosure Vlad Tsyrklevich
2017-01-26 10:54 ` Steven Whitehouse
2017-02-02 16:58 ` Vlad Tsyrklevich
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1483968444-5460-1-git-send-email-vlad@tsyrklevich.net \
--to=vlad@tsyrklevich.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).