public inbox for linux-wireless@vger.kernel.org
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: Stanislaw Gruszka <stf_xl@wp.pl>
Cc: Kees Cook <keescook@chromium.org>,
	"Gustavo A. R. Silva" <gustavoars@kernel.org>,
	Xose Vazquez Perez <xose.vazquez@gmail.com>,
	 linux-wireless@vger.kernel.org, linux-hardening@vger.kernel.org
Subject: Re: [WARNING] memcpy: detected field-spanning write (size 1005) of single field "&out_cmd->cmd.payload" at drivers/net/wireless/intel/iwlegacy/common.c:3173 (size 320)
Date: Mon, 20 May 2024 17:10:18 +0200	[thread overview]
Message-ID: <daf3e4248061c21db623be84136f3da1da5de513.camel@sipsolutions.net> (raw)
In-Reply-To: <20240520150857.GA709412@wp.pl>

On Mon, 2024-05-20 at 17:08 +0200, Stanislaw Gruszka wrote:
> > 
> > I don't think this is right, now the raw comes after
> > DEF_CMD_PAYLOAD_SIZE? You want it to be a union with payload, I'd think.
> 
> Not sure if I understand. I think we have union with payload with 
> the patch. The structure looks like this:
> 
> struct il_device_cmd {
> 	struct il_cmd_header hdr;	/* uCode API */
> 	union {
> 		u32 flags;
> 		u8 val8;
> 		u16 val16;
> 		u32 val32;
> 		struct il_tx_cmd tx;
> 		u8 payload[DEF_CMD_PAYLOAD_SIZE];
> 		DECLARE_FLEX_ARRAY(u8, raw);
> 	} __packed cmd;
> } __packed;
> 

Oh, sorry, my bad. I confused the tx_cmd and the cmd_header.

johannes

      reply	other threads:[~2024-05-20 15:10 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-12 17:48 [WARNING] memcpy: detected field-spanning write (size 1005) of single field "&out_cmd->cmd.payload" at drivers/net/wireless/intel/iwlegacy/common.c:3173 (size 320) Xose Vazquez Perez
2024-05-18  9:29 ` Stanislaw Gruszka
2024-05-18 17:48   ` Kees Cook
2024-05-20  7:32     ` Stanislaw Gruszka
2024-05-20 11:45       ` Johannes Berg
2024-05-20 15:08         ` Stanislaw Gruszka
2024-05-20 15:10           ` Johannes Berg [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=daf3e4248061c21db623be84136f3da1da5de513.camel@sipsolutions.net \
    --to=johannes@sipsolutions.net \
    --cc=gustavoars@kernel.org \
    --cc=keescook@chromium.org \
    --cc=linux-hardening@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=stf_xl@wp.pl \
    --cc=xose.vazquez@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