All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexandru Hossu <hossu.alexandru@gmail.com>
To: linux-bluetooth@vger.kernel.org
Cc: marcel@holtmann.org, luiz.dentz@gmail.com
Subject: Bluetooth: ISO: null ptr deref in iso_recv() on ISO_END without prior ISO_START
Date: Fri, 15 May 2026 03:29:19 -0700 (PDT)	[thread overview]
Message-ID: <6a06f57f.07ac1395.28395d.c7d8@mx.google.com> (raw)

Hi,

I found a null pointer dereference in iso_recv() in net/bluetooth/iso.c.

At line 2595-2596:

    case ISO_END:
        skb_copy_from_linear_data(skb,
            skb_put(conn->rx_skb, skb->len), skb->len);

conn->rx_skb is passed to skb_put() without a NULL check.

It can be NULL in two cases. First, if ISO_END arrives without a prior
ISO_START frame, conn->rx_skb was never allocated. Second, the ISO_CONT
overflow error path at line 2581-2587 calls kfree_skb(conn->rx_skb) and
sets it to NULL. A subsequent ISO_END hits the same path.

The ISO_CONT case at line 2575 has a guard:

    if (!conn->rx_len) {
        goto drop;
    }

ISO_END has no equivalent protection.

Suggested fix:

    case ISO_END:
        if (!conn->rx_skb)
            goto drop;
        skb_copy_from_linear_data(skb,
            skb_put(conn->rx_skb, skb->len), skb->len);

Attack surface: CIS requires an established ACL connection. BIS requires
the victim to sync to a malicious broadcaster. Not zero-click but reachable
from an adjacent unauthenticated source on CIS paths.

Tested on linux-next commit e98d21c170b0 (2026-05-08).

Alexandru

                 reply	other threads:[~2026-05-15 10:29 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=6a06f57f.07ac1395.28395d.c7d8@mx.google.com \
    --to=hossu.alexandru@gmail.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=luiz.dentz@gmail.com \
    --cc=marcel@holtmann.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.