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 C7165257854; Thu, 28 May 2026 20:16:39 +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=1779999400; cv=none; b=ubqpySHjTv4tiNPHh9Y/XW/9H36L1jS1P6FOZSs8Pe3KLTN3a1gQyoXx5jUso5WoblEis0jb9uyo/DIgtK4187klqUp2ZYcHViksVhLYYEwX6FT5P6K/fkOJ3ZG5H5wgz3y8ydReZ2XPQadwS+aGBJRmXvmicibr0r7fpd/njSM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779999400; c=relaxed/simple; bh=O7Zvf5pMThuZU8TrkpNQv8WtlFzq/e47PBl8g6do0Yc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=HG8+mez1b/akQhbYnsNiLVuwvk2zaKLcGMVJlSuw4Ra1se5GvF5Q9OFuAb7s6pqdbANk6926je51LPLHEc2y1/3RLgHY3tzRgVeUzDeayMMSB9A1oKtSivayrESJw5tUKnrJ+3hQbwIFx6jvMVJhQctfqVlEbHLYeSct+bDMe2g= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=Qf8Yg78J; 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="Qf8Yg78J" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 32DF01F000E9; Thu, 28 May 2026 20:16:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1779999399; bh=ZwgNxXT0zS26gpbPpaGmhquEmm2f7A4ljY8eKLwhjUU=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=Qf8Yg78JgMjGK9OrzWnTe/W40O5fKOZqLKd4lrQaZ0z4n0a2x3sNhor8pTVwI3BCP BdmpWpQ9yDPEWx0OduUIPnq3DA07l2EIddYydZhjBHAlZ/uTuCNzNq6vBx7h+WyLuU JsfK/L7ec+LHnCHFZaDcqbDa0L9tuNwlNtkn7s0s= 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.18 053/377] Bluetooth: ISO: drop ISO_END frames received without prior ISO_START Date: Thu, 28 May 2026 21:44:51 +0200 Message-ID: <20260528194639.906554789@linuxfoundation.org> X-Mailer: git-send-email 2.54.0 In-Reply-To: <20260528194638.371537336@linuxfoundation.org> References: <20260528194638.371537336@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.18-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 @@ -2461,6 +2461,11 @@ int iso_recv(struct hci_dev *hdev, u16 h 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;