From: Thomas Graf <tgraf@suug.ch>
To: Jiri Benc <jbenc@redhat.com>
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH net] netlink: pad nla_memcpy dest buffer with zeroes
Date: Mon, 30 Mar 2015 12:31:30 +0100 [thread overview]
Message-ID: <20150330113130.GA28989@casper.infradead.org> (raw)
In-Reply-To: <34fc9fcd5e67ad578fc5a1a2eb30cf52ffbba082.1427637780.git.jbenc@redhat.com>
On 03/29/15 at 04:05pm, Jiri Benc wrote:
> This is especially important in cases where the kernel allocs a new
> structure and expects a field to be set from a netlink attribute. If such
> attribute is shorter than expected, the rest of the field is left containing
> previous data. When such field is read back by the user space, kernel memory
> content is leaked.
>
> Signed-off-by: Jiri Benc <jbenc@redhat.com>
I think it is safe to assume that the caller intents to get all
of the destination buffer filled just as memcpy() would do.
Acked-by: Thomas Graf <tgraf@suug.ch>
next prev parent reply other threads:[~2015-03-30 11:31 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-29 14:05 [PATCH net] netlink: pad nla_memcpy dest buffer with zeroes Jiri Benc
2015-03-30 11:31 ` Thomas Graf [this message]
2015-03-31 18:07 ` David Miller
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=20150330113130.GA28989@casper.infradead.org \
--to=tgraf@suug.ch \
--cc=jbenc@redhat.com \
--cc=netdev@vger.kernel.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 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).