From: Jan Beulich <jbeulich@suse.com>
To: "xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>
Cc: Christopher Clark <christopher.w.clark@gmail.com>
Subject: [PATCH] argo: don't leak stack contents when returning ring info
Date: Thu, 14 Jan 2021 15:01:06 +0100 [thread overview]
Message-ID: <a2621d1e-dd52-4e46-9e4b-dffd94e73993@suse.com> (raw)
The max_message_size field of the output gets filled only when the flags
field is non-zero. Don't copy back uninitialized data to guest context.
Signed-off-by: Jan Beulich <jbeulich@suse.com>
--- a/xen/common/argo.c
+++ b/xen/common/argo.c
@@ -1405,7 +1405,8 @@ fill_ring_data(const struct domain *curr
rcu_unlock_domain(dst_d);
if ( !ret && (__copy_field_to_guest(data_ent_hnd, &ent, flags) ||
- __copy_field_to_guest(data_ent_hnd, &ent, max_message_size)) )
+ (ent.flags &&
+ __copy_field_to_guest(data_ent_hnd, &ent, max_message_size))) )
return -EFAULT;
return ret;
next reply other threads:[~2021-01-14 14:01 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-14 14:01 Jan Beulich [this message]
2021-01-14 16:59 ` [PATCH] argo: don't leak stack contents when returning ring info Roger Pau Monné
2021-01-14 17:01 ` Jan Beulich
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=a2621d1e-dd52-4e46-9e4b-dffd94e73993@suse.com \
--to=jbeulich@suse.com \
--cc=christopher.w.clark@gmail.com \
--cc=xen-devel@lists.xenproject.org \
/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 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.