From: patchwork-bot+netdevbpf@kernel.org
To: Haimin Zhang <tcs.kernel@gmail.com>
Cc: greg@kroah.com, ast@kernel.org, daniel@iogearbox.net,
andrii@kernel.org, kuba@kernel.org, security@kernel.org,
elijahbai@tencent.com, netdev@vger.kernel.org
Subject: Re: [PATCH v4] netdevsim: Zero-initialize memory for new map's value in function nsim_bpf_map_alloc
Date: Thu, 16 Dec 2021 02:50:09 +0000 [thread overview]
Message-ID: <163962300995.8380.8008869422888743193.git-patchwork-notify@kernel.org> (raw)
In-Reply-To: <20211215111530.72103-1-tcs.kernel@gmail.com>
Hello:
This patch was applied to netdev/net.git (master)
by Jakub Kicinski <kuba@kernel.org>:
On Wed, 15 Dec 2021 19:15:30 +0800 you wrote:
> Zero-initialize memory for new map's value in function nsim_bpf_map_alloc
> since it may cause a potential kernel information leak issue, as follows:
> 1. nsim_bpf_map_alloc calls nsim_map_alloc_elem to allocate elements for
> a new map.
> 2. nsim_map_alloc_elem uses kmalloc to allocate map's value, but doesn't
> zero it.
> 3. A user application can use IOCTL BPF_MAP_LOOKUP_ELEM to get specific
> element's information in the map.
> 4. The kernel function map_lookup_elem will call bpf_map_copy_value to get
> the information allocated at step-2, then use copy_to_user to copy to the
> user buffer.
> This can only leak information for an array map.
>
> [...]
Here is the summary with links:
- [v4] netdevsim: Zero-initialize memory for new map's value in function nsim_bpf_map_alloc
https://git.kernel.org/netdev/net/c/481221775d53
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
prev parent reply other threads:[~2021-12-16 2:50 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-15 11:15 [PATCH v4] netdevsim: Zero-initialize memory for new map's value in function nsim_bpf_map_alloc Haimin Zhang
2021-12-16 2:50 ` patchwork-bot+netdevbpf [this message]
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=163962300995.8380.8008869422888743193.git-patchwork-notify@kernel.org \
--to=patchwork-bot+netdevbpf@kernel.org \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=daniel@iogearbox.net \
--cc=elijahbai@tencent.com \
--cc=greg@kroah.com \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=security@kernel.org \
--cc=tcs.kernel@gmail.com \
/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).