mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
To: Kees Cook <keescook@chromium.org>
Cc: syzbot+210e196cef4711b65139@syzkaller.appspotmail.com,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	netdev@vger.kernel.org,
	"John W. Linville" <linville@tuxdriver.com>,
	Ilan Elias <ilane@ti.com>,
	linux-kernel@vger.kernel.org, linux-hardening@vger.kernel.org
Subject: Re: [PATCH] NFC: nci: Bounds check struct nfc_target arrays
Date: Mon, 5 Dec 2022 09:17:24 +0100	[thread overview]
Message-ID: <a2458e6a-6b19-cd67-2b84-5cef6388e011@linaro.org> (raw)
In-Reply-To: <20221202214410.never.693-kees@kernel.org>

On 02/12/2022 22:44, Kees Cook wrote:
> While running under CONFIG_FORTIFY_SOURCE=y, syzkaller reported:
> 
>   memcpy: detected field-spanning write (size 129) of single field "target->sensf_res" at net/nfc/nci/ntf.c:260 (size 18)
> 
> This appears to be a legitimate lack of bounds checking in
> nci_add_new_protocol(). Add the missing checks.
> 
> Reported-by: syzbot+210e196cef4711b65139@syzkaller.appspotmail.com
> Link: https://lore.kernel.org/lkml/0000000000001c590f05ee7b3ff4@google.com
> Fixes: 019c4fbaa790 ("NFC: Add NCI multiple targets support")
> Cc: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> Cc: "David S. Miller" <davem@davemloft.net>
> Cc: Eric Dumazet <edumazet@google.com>
> Cc: Jakub Kicinski <kuba@kernel.org>
> Cc: Paolo Abeni <pabeni@redhat.com>
> Cc: netdev@vger.kernel.org
> Signed-off-by: Kees Cook <keescook@chromium.org>
> ---


Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

Best regards,
Krzysztof


  reply	other threads:[~2022-12-05  8:17 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-02 21:44 Kees Cook
2022-12-05  8:17 ` Krzysztof Kozlowski [this message]
2022-12-06  5:00 ` patchwork-bot+netdevbpf

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=a2458e6a-6b19-cd67-2b84-5cef6388e011@linaro.org \
    --to=krzysztof.kozlowski@linaro.org \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=ilane@ti.com \
    --cc=keescook@chromium.org \
    --cc=kuba@kernel.org \
    --cc=linux-hardening@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=syzbot+210e196cef4711b65139@syzkaller.appspotmail.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

all inboxes | Powered by JetHome®