mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: David Heidelberg <david@ixit.cz>
To: "Lekë Hapçiu" <snowwlake@icloud.com>, oe-linux-nfc@lists.linux.dev
Cc: davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
	pabeni@redhat.com, krzk@kernel.org, horms@kernel.org,
	linux-kernel@vger.kernel.org, netdev@vger.kernel.org
Subject: Re: [PATCH net v4 0/5] nfc: fix multiple OOB reads in NCI and LLCP parsing paths
Date: Wed, 24 Jun 2026 18:11:22 +0200	[thread overview]
Message-ID: <672cda18-3cbd-40a0-b830-7f267964bdb6@ixit.cz> (raw)
In-Reply-To: <20260424180151.3808557-1-snowwlake@icloud.com>

On 24/04/2026 20:01, Lekë Hapçiu wrote:
> This series fixes five out-of-bounds / underflow bugs in the kernel NFC
> stack.  All are reachable from a remote NFC peer that the local stack
> has already associated with; in the LLCP cases the peer only needs to
> send a malformed frame.
> 
>    1/5  nci: u8 underflow in nci_store_general_bytes_nfc_dep() lets the
>         attacker-controlled atr_res_len skip the GT-offset subtraction
>         and cause an OOB read/write against general_bytes[].
>    2/5  llcp: parse_gb_tlv() / parse_connection_tlv() trust the TLV
>         length byte without checking remaining buffer, and the tlv16
>         accessors read past the end when length < 2.
>    3/5  llcp: nfc_llcp_recv_snl() has the same TLV-length trust bug, and
>         its SDRES handler uses an unbounded "%.16s" pr_debug() that
>         walks past service_name_len.
>    4/5  llcp: nfc_llcp_recv_dm() reads skb->data[3] without checking
>         skb->len, giving a 1-byte heap OOB read.
>    5/5  llcp: nfc_llcp_connect_sn() walks the TLV array with no length
>         validation; a crafted CONNECT frame drops it into OOB reads /
>         an unbounded service-name pointer.
> 
> The series applies on top of net/main.
> 
> Lekë Hapçiu (5):
>    nfc: nci: fix u8 underflow in nci_store_general_bytes_nfc_dep
>    nfc: llcp: fix TLV parsing in parse_gb_tlv and parse_connection_tlv
>    nfc: llcp: fix TLV parsing OOB in nfc_llcp_recv_snl
>    nfc: llcp: fix OOB read of DM reason byte in nfc_llcp_recv_dm
>    nfc: llcp: fix TLV parsing OOB in nfc_llcp_connect_sn
> 
>   net/nfc/llcp_commands.c | 24 ++++++++++++++++++++++--
>   net/nfc/llcp_core.c     | 35 ++++++++++++++++++++++++++++++++---
>   net/nfc/nci/ntf.c       |  6 ++++++
>   3 files changed, 60 insertions(+), 5 deletions(-)
> 

Hello Lekë,

could you please rebase this series against NFC for-linus branch [1]?

Likely some checks has been added meanwhile, but I would love to get the 
remaining ones in!

Don't forget also add NFC mailing list oe-linux-nfc@lists.linux.dev .

Thank you
David

      parent reply	other threads:[~2026-06-24 16:11 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-24 18:01 Lekë Hapçiu
2026-04-24 18:13 ` [PATCH net v4 3/5] nfc: llcp: fix TLV parsing OOB in nfc_llcp_recv_snl Lekë Hapçiu
2026-04-24 18:13   ` [PATCH net v4 4/5] nfc: llcp: fix OOB read of DM reason byte in nfc_llcp_recv_dm Lekë Hapçiu
2026-04-24 18:13   ` [PATCH net v4 5/5] nfc: llcp: fix TLV parsing OOB in nfc_llcp_connect_sn Lekë Hapçiu
2026-04-28 12:55 ` [PATCH net v4 0/5] nfc: fix multiple OOB reads in NCI and LLCP parsing paths Simon Horman
2026-04-28 13:46   ` Paolo Abeni
2026-06-24 16:11 ` David Heidelberg [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=672cda18-3cbd-40a0-b830-7f267964bdb6@ixit.cz \
    --to=david@ixit.cz \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=krzk@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=oe-linux-nfc@lists.linux.dev \
    --cc=pabeni@redhat.com \
    --cc=snowwlake@icloud.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®