From: patchwork-bot+netdevbpf@kernel.org
To: Tatsuhiko Yasumatsu <th.yasumatsu@gmail.com>
Cc: ast@kernel.org, daniel@iogearbox.net, andrii@kernel.org,
kafai@fb.com, songliubraving@fb.com, yhs@fb.com,
john.fastabend@gmail.com, kpsingh@kernel.org,
netdev@vger.kernel.org, bpf@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] bpf: Fix integer overflow in prealloc_elems_and_freelist()
Date: Thu, 30 Sep 2021 16:20:07 +0000 [thread overview]
Message-ID: <163301880750.556.15888903601273023133.git-patchwork-notify@kernel.org> (raw)
In-Reply-To: <20210930135545.173698-1-th.yasumatsu@gmail.com>
Hello:
This patch was applied to bpf/bpf.git (refs/heads/master):
On Thu, 30 Sep 2021 22:55:45 +0900 you wrote:
> In prealloc_elems_and_freelist(), the multiplication to calculate the
> size passed to bpf_map_area_alloc() could lead to an integer overflow.
> As a result, out-of-bounds write could occur in pcpu_freelist_populate()
> as reported by KASAN:
>
> [...]
> [ 16.968613] BUG: KASAN: slab-out-of-bounds in pcpu_freelist_populate+0xd9/0x100
> [ 16.969408] Write of size 8 at addr ffff888104fc6ea0 by task crash/78
> [ 16.970038]
> [ 16.970195] CPU: 0 PID: 78 Comm: crash Not tainted 5.15.0-rc2+ #1
> [ 16.970878] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.13.0-1ubuntu1.1 04/01/2014
> [ 16.972026] Call Trace:
> [ 16.972306] dump_stack_lvl+0x34/0x44
> [ 16.972687] print_address_description.constprop.0+0x21/0x140
> [ 16.973297] ? pcpu_freelist_populate+0xd9/0x100
> [ 16.973777] ? pcpu_freelist_populate+0xd9/0x100
> [ 16.974257] kasan_report.cold+0x7f/0x11b
> [ 16.974681] ? pcpu_freelist_populate+0xd9/0x100
> [ 16.975190] pcpu_freelist_populate+0xd9/0x100
> [ 16.975669] stack_map_alloc+0x209/0x2a0
> [ 16.976106] __sys_bpf+0xd83/0x2ce0
> [...]
>
> [...]
Here is the summary with links:
- [v2] bpf: Fix integer overflow in prealloc_elems_and_freelist()
https://git.kernel.org/bpf/bpf/c/30e29a9a2bc6
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-09-30 16:20 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-30 13:55 [PATCH v2] bpf: Fix integer overflow in prealloc_elems_and_freelist() Tatsuhiko Yasumatsu
2021-09-30 16:20 ` 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=163301880750.556.15888903601273023133.git-patchwork-notify@kernel.org \
--to=patchwork-bot+netdevbpf@kernel.org \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=john.fastabend@gmail.com \
--cc=kafai@fb.com \
--cc=kpsingh@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=songliubraving@fb.com \
--cc=th.yasumatsu@gmail.com \
--cc=yhs@fb.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).