From: patchwork-bot+bluetooth@kernel.org
To: Kees Cook <keescook@chromium.org>
Cc: luiz.von.dentz@intel.com, twuufnxlz@gmail.com,
marcel@holtmann.org, johan.hedberg@gmail.com,
davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
pabeni@redhat.com, linux-bluetooth@vger.kernel.org,
netdev@vger.kernel.org, luiz.dentz@gmail.com,
linux-kernel@vger.kernel.org,
syzbot+c90849c50ed209d77689@syzkaller.appspotmail.com,
linux-hardening@vger.kernel.org
Subject: Re: [PATCH] Bluetooth: hci_sock: Correctly bounds check and pad HCI_MON_NEW_INDEX name
Date: Wed, 11 Oct 2023 17:40:25 +0000 [thread overview]
Message-ID: <169704602521.20012.6049823285233364562.git-patchwork-notify@kernel.org> (raw)
In-Reply-To: <20231011163140.work.317-kees@kernel.org>
Hello:
This patch was applied to bluetooth/bluetooth-next.git (master)
by Luiz Augusto von Dentz <luiz.von.dentz@intel.com>:
On Wed, 11 Oct 2023 09:31:44 -0700 you wrote:
> The code pattern of memcpy(dst, src, strlen(src)) is almost always
> wrong. In this case it is wrong because it leaves memory uninitialized
> if it is less than sizeof(ni->name), and overflows ni->name when longer.
>
> Normally strtomem_pad() could be used here, but since ni->name is a
> trailing array in struct hci_mon_new_index, compilers that don't support
> -fstrict-flex-arrays=3 can't tell how large this array is via
> __builtin_object_size(). Instead, open-code the helper and use sizeof()
> since it will work correctly.
>
> [...]
Here is the summary with links:
- Bluetooth: hci_sock: Correctly bounds check and pad HCI_MON_NEW_INDEX name
https://git.kernel.org/bluetooth/bluetooth-next/c/fbd34cc57479
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:[~2023-10-11 17:40 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-11 16:31 [PATCH] Bluetooth: hci_sock: Correctly bounds check and pad HCI_MON_NEW_INDEX name Kees Cook
2023-10-11 17:40 ` patchwork-bot+bluetooth [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=169704602521.20012.6049823285233364562.git-patchwork-notify@kernel.org \
--to=patchwork-bot+bluetooth@kernel.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=johan.hedberg@gmail.com \
--cc=keescook@chromium.org \
--cc=kuba@kernel.org \
--cc=linux-bluetooth@vger.kernel.org \
--cc=linux-hardening@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luiz.dentz@gmail.com \
--cc=luiz.von.dentz@intel.com \
--cc=marcel@holtmann.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=syzbot+c90849c50ed209d77689@syzkaller.appspotmail.com \
--cc=twuufnxlz@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).