From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2514D30E851; Thu, 28 May 2026 20:46:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780001180; cv=none; b=Oiv6v6o50qYFaG/uMq9rlSCeTLHz6yKe7jLPA0EedOB0q2q27QDwlnZpqta0uA3mAukIL2UfQMexsWPJOUPpRnJq16VaJaiX3l8cKi0+JSlxLGnBq1XLxgigv64RfvVwxzTKQSwVWZMSR3iSE9fAxKifQiYAsuVygMr8mcHW+eo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780001180; c=relaxed/simple; bh=+SBszEuWkZ5+BggvJx/AXRK3LIi5C/ApYNL6V2s9E1I=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=OsgVze+rl3WgcAW3k9wjq4/fIdZ74A8paz/NnVjJr2vTtANyiin/IYSsIrBLgwNjbuCjdEHv0Khvu9R6/UeMuBWDOjPXbsmz28YBf50cBuimtCjU1tjFiagqvSSrlIkyw5W2OSdRXvUdh0J01abA+HCTCyKr54bCUsgpbe9oFK0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=upqH1yck; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="upqH1yck" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 49AE11F000E9; Thu, 28 May 2026 20:46:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1780001178; bh=9vrCWqoLP9nIAR9ytfiR+jHeXJtayBpqKU+6dDMG4ek=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=upqH1yckrnKJZNNCBXqvPamUE7iHgjwDOrcwyusT+l7wwtlxg3Jh/VCwhXUBWTJ3c UTtePDoeOOFUsBN5rNsNjCRM+UvpCwBjx7PqBnkiMpyncAyuLzN9dtamOkWlgb/3QL 0Uc0ZtRHT3NCdOZwHFurfvFVa7MrqYwfKGQmp6Tw= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, David Carlier , Luiz Augusto von Dentz Subject: [PATCH 6.6 036/186] Bluetooth: ISO: drop ISO_END frames received without prior ISO_START Date: Thu, 28 May 2026 21:48:36 +0200 Message-ID: <20260528194929.939628628@linuxfoundation.org> X-Mailer: git-send-email 2.54.0 In-Reply-To: <20260528194928.941004471@linuxfoundation.org> References: <20260528194928.941004471@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.6-stable review patch. If anyone has any objections, please let me know. ------------------ From: David Carlier commit 84c24fb151fc1179355296d7ff29129ac7c42129 upstream. ISO data PDUs carry a packet-boundary flag indicating START, CONT, END or SINGLE. The ISO_CONT branch of iso_recv() guards against a missing ISO_START by checking conn->rx_len before touching conn->rx_skb, but ISO_END does not. If a peer sends an ISO_END as the first packet on a fresh ISO connection, conn->rx_skb is still NULL and conn->rx_len is zero, so skb_put(conn->rx_skb, ...) dereferences NULL and oopses. For BIS, where receivers sync to a broadcaster without pairing, any broadcaster on the air can trigger this. Mirror the ISO_CONT check at the top of ISO_END so a stray end fragment is logged and dropped instead of crashing the host. Fixes: ccf74f2390d6 ("Bluetooth: Add BTPROTO_ISO socket type") Cc: stable@vger.kernel.org Assisted-by: Claude:claude-opus-4-7 Signed-off-by: David Carlier Signed-off-by: Luiz Augusto von Dentz Signed-off-by: Greg Kroah-Hartman --- net/bluetooth/iso.c | 5 +++++ 1 file changed, 5 insertions(+) --- a/net/bluetooth/iso.c +++ b/net/bluetooth/iso.c @@ -2107,6 +2107,11 @@ void iso_recv(struct hci_conn *hcon, str break; case ISO_END: + if (!conn->rx_len) { + BT_ERR("Unexpected end frame (len %d)", skb->len); + goto drop; + } + skb_copy_from_linear_data(skb, skb_put(conn->rx_skb, skb->len), skb->len); conn->rx_len -= skb->len;