Linux wireless drivers development
 help / color / mirror / Atom feed
From: George Valkov <gvalkov@gmail.com>
To: Dan Carpenter <error27@gmail.com>,
	Francesco Dolcini <francesco@dolcini.it>,
	johannes.berg@intel.com
Cc: briannorris@chromium.org, kees@kernel.org, bhelgaas@google.com,
	s.kerkmann@pengutronix.de, linux-wireless@vger.kernel.org,
	linux-kernel@vger.kernel.org, stable@vger.kernel.org
Subject: Re: [PATCH v3] wifi: mwifiex: replace one-element arrays with flexible array members
Date: Thu, 16 Jul 2026 09:42:42 +0300	[thread overview]
Message-ID: <55FE8005-625D-43FF-BA57-E2E94C6EF694@gmail.com> (raw)
In-Reply-To: <alh5y74H5bJyDSSP@stanley.mountain>





> On 16 Jul 2026, at 9:27 AM, Dan Carpenter <error27@gmail.com> wrote:
> 
> On Thu, Jul 16, 2026 at 08:16:38AM +0200, Francesco Dolcini wrote:
>> On Thu, Jul 16, 2026 at 03:17:28AM +0300, Georgi Valkov wrote:
>>> Replace deprecated one-element arrays with flexible array members.
>>> CONFIG_FORTIFY_SOURCE reports the following warning when
>>> one-element arrays are used as variable-length buffers:
>>> 
>>> sta_cmd.c:1033 mwifiex_sta_prepare_cmd
>>> memcpy: detected field-spanning write (size 84) of single field
>>> "domain->triplet" at .../marvell/mwifiex/sta_cmd.c:1033 (size 3)
>>> 
>>> Convert affected structs to use flexible array members.
>>> - Preserve existing wire layouts.
>>> - Use DECLARE_FLEX_ARRAY() for structs inside affected unions.
>>> 
>>> Tested-on: WRT3200ACM, OpenWrt
>>> Signed-off-by: Georgi Valkov <gvalkov@gmail.com>
>> 
>> Cc: stable@vger.kernel.org # 6.12+
>> Reviewed-by: Francesco Dolcini <francesco.dolcini@toradex.com>
> 
> Are we CCing stable for this sort of thing?

Yes, please add stable if possible.
I am new to this process and still learning the rules.


> How many FORTIFY_SOURCE
> warnings are still remaining?

So far I have observed only the warning on sta_cmd.c:1033.
I made the rest of the changes as preventative measures,
because they are flexible arrays used in the same way.

Georgi Valkov

      parent reply	other threads:[~2026-07-16  6:42 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-12 22:23 [PATCH] wifi: mwifiex: replace one-element arrays with flexible array members Georgi Valkov
2026-07-15 16:14 ` Francesco Dolcini
2026-07-15 16:35 ` Kees Cook
2026-07-15 22:59   ` George Valkov
2026-07-16  0:17   ` [PATCH v3] " Georgi Valkov
2026-07-16  6:16     ` Francesco Dolcini
2026-07-16  6:27       ` Dan Carpenter
2026-07-16  6:32         ` Francesco Dolcini
2026-07-16  6:55           ` Dan Carpenter
2026-07-16  8:09             ` George Valkov
2026-07-16  6:42         ` George Valkov [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=55FE8005-625D-43FF-BA57-E2E94C6EF694@gmail.com \
    --to=gvalkov@gmail.com \
    --cc=bhelgaas@google.com \
    --cc=briannorris@chromium.org \
    --cc=error27@gmail.com \
    --cc=francesco@dolcini.it \
    --cc=johannes.berg@intel.com \
    --cc=kees@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=s.kerkmann@pengutronix.de \
    --cc=stable@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