mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Kees Cook <kees@kernel.org>
To: Mirsad Todorovac <mtodorovac69@gmail.com>,
	linux-hardening@vger.kernel.org
Cc: Andy Lutomirski <luto@amacapital.net>,
	Will Drewry <wad@chromium.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PROBLEM linux-next] include/linux/fortify-string.h:580:25: error: call to ‘__read_overflow2_field’ declared with attribute warning: detected read beyond size of field
Date: Sun, 07 Jul 2024 08:22:13 -0700	[thread overview]
Message-ID: <3639BC84-F533-45A6-AB7D-CABA1A1673EF@kernel.org> (raw)
In-Reply-To: <9b69fb14-df89-4677-9c82-056ea9e706f5@gmail.com>



On July 6, 2024 5:26:25 PM PDT, Mirsad Todorovac <mtodorovac69@gmail.com> wrote:
>Hi, all!
>
>This is the result of testing randconfig with KCONFIG_SEED=0xEE7AB52F in next-20240703 vanilla tree on
>Ubuntu 22.04 LTS. GCC used is gcc (Ubuntu 12.3.0-1ubuntu1~22.04) 12.3.0.
>
>The particular error is as follows:
>
>In file included from ./include/linux/string.h:374,
>                 from ./arch/x86/include/asm/page_32.h:18,
>                 from ./arch/x86/include/asm/page.h:14,
>                 from ./arch/x86/include/asm/processor.h:20,
>                 from ./include/linux/sched.h:13,
>                 from ./include/linux/audit.h:12,
>                 from kernel/seccomp.c:19:
>In function ‘fortify_memcpy_chk’,
>    inlined from ‘syscall_get_arguments’ at ./arch/x86/include/asm/syscall.h:85:2,

memcpy(args, &regs->bx, 6 * sizeof(args[0]));

Yup, this reads from regs starting at bx, rather than only bx. I will send to patch to expand it (like is done for compat mode a few lines later).

-Kees

-- 
Kees Cook

      reply	other threads:[~2024-07-07 15:22 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-07  0:26 Mirsad Todorovac
2024-07-07 15:22 ` Kees Cook [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=3639BC84-F533-45A6-AB7D-CABA1A1673EF@kernel.org \
    --to=kees@kernel.org \
    --cc=linux-hardening@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@amacapital.net \
    --cc=mtodorovac69@gmail.com \
    --cc=wad@chromium.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®