linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kees Cook <keescook@chromium.org>
To: Dave Jones <davej@codemonkey.org.uk>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Trond Myklebust <trond.myklebust@hammerspace.com>,
	Anna Schumaker <anna@kernel.org>,
	Linus Torvalds <torvalds@linux-foundation.org>
Subject: Re: 6.1rc1: NFS memcpy warning on mount
Date: Sun, 16 Oct 2022 21:57:59 -0700	[thread overview]
Message-ID: <202210162144.76FBC7271@keescook> (raw)
In-Reply-To: <Y0zEzZwhOxTDcBTB@codemonkey.org.uk>

On Sun, Oct 16, 2022 at 10:58:21PM -0400, Dave Jones wrote:
> [   19.617475] memcpy: detected field-spanning write (size 28) of single field "request.sap" at fs/nfs/super.c:857 (size 18446744073709551615)

I've sent this, which should fix it:
https://lore.kernel.org/lkml/20221017043107.never.457-kees@kernel.org/

However, the -1 size tells me something has gone slightly wrong with the
runtime warning, as it _should_ be ignoring destinations with "unknown"
size -- in this case, struct sockaddr has a trailing array, which is
treated (currently) as a fake flexible array, so __builtin_object_size()
is reporting the "-1". But with the coming -fstrict-flex-arrays, this
will need fixing anyway. I will re-check the runtime warning logic...

-- 
Kees Cook

  parent reply	other threads:[~2022-10-17  4:59 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-16 23:01 Linux 6.1-rc1 Linus Torvalds
2022-10-17  1:53 ` linux-next: stats for 6.1-rc1 (was: Linux 6.1-rc1) Stephen Rothwell
2022-10-17  2:58 ` 6.1rc1: NFS memcpy warning on mount Dave Jones
2022-10-17  3:58   ` Bagas Sanjaya
2022-10-17  4:17     ` Kees Cook
2022-10-17  4:20       ` Bagas Sanjaya
2022-10-17  4:57   ` Kees Cook [this message]
2022-10-17 12:34 ` Linux 6.1-rc1 Guenter Roeck
2022-10-17 17:39   ` Linus Torvalds
2022-10-17 18:28     ` Guenter Roeck
2022-10-17 18:54       ` Conor Dooley
2022-10-18  0:03     ` Jason A. Donenfeld

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=202210162144.76FBC7271@keescook \
    --to=keescook@chromium.org \
    --cc=anna@kernel.org \
    --cc=davej@codemonkey.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@linux-foundation.org \
    --cc=trond.myklebust@hammerspace.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).