From: Jeff Johnson <quic_jjohnson@quicinc.com>
To: Kees Cook <keescook@chromium.org>
Cc: Kalle Valo <kvalo@kernel.org>,
Justin Stitt <justinstitt@google.com>,
<ath10k@lists.infradead.org>, <linux-wireless@vger.kernel.org>,
<linux-kernel@vger.kernel.org>, <linux-hardening@vger.kernel.org>
Subject: Re: [PATCH] ath10k: replace deprecated strncpy with strtomem_pad
Date: Tue, 24 Oct 2023 16:25:35 -0700 [thread overview]
Message-ID: <57a56da6-a86f-4bc3-beb6-8ef6dbbbb3bd@quicinc.com> (raw)
In-Reply-To: <202310241442.0E90AB9@keescook>
On 10/24/2023 2:43 PM, Kees Cook wrote:
> On Tue, Oct 24, 2023 at 07:11:51AM -0700, Jeff Johnson wrote:
>> On 10/24/2023 6:03 AM, Kalle Valo wrote:
>>> What about using just memcpy() to make it clear it's not really a proper
>>> string:
>>>
>>> arvif->u.ap.ssid_len = 4;
>>> memcpy(arvif->u.ap.ssid, "mesh", arvif->u.ap.ssid_len);
>>>
>>
>> In the "changed & BSS_CHANGED_SSID" case that comes soon after this we just
>> set the length and use memcpy without clearing the rest of the buffer, so
>> doing the same here, as you suggest, would be consistent.
>
> Ah, please ignore my other email asking about memcpy safety -- I'm
> reading threads backwards. :)
>
And I'm replying without first reading through my mail queue
next prev parent reply other threads:[~2023-10-24 23:26 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-13 20:33 Justin Stitt
2023-10-14 0:58 ` Jeff Johnson
2023-10-18 23:35 ` Kees Cook
2023-10-23 23:40 ` Jeff Johnson
2023-10-24 13:03 ` Kalle Valo
2023-10-24 14:11 ` Jeff Johnson
2023-10-24 21:43 ` Kees Cook
2023-10-24 23:25 ` Jeff Johnson [this message]
2023-10-24 23:40 ` Kees Cook
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=57a56da6-a86f-4bc3-beb6-8ef6dbbbb3bd@quicinc.com \
--to=quic_jjohnson@quicinc.com \
--cc=ath10k@lists.infradead.org \
--cc=justinstitt@google.com \
--cc=keescook@chromium.org \
--cc=kvalo@kernel.org \
--cc=linux-hardening@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@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
all inboxes | Powered by JetHome®