From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-qk1-f170.google.com (mail-qk1-f170.google.com [209.85.222.170]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C4BCF39E6F0 for ; Tue, 7 Jul 2026 22:05:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.222.170 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783461944; cv=none; b=jM6coEoq8YfQ3iufKqKUmKsgAmL0NG0ojPucOM3Uu5ZUT/kxrdwmZ77haHHcIaaI70/nL6p37ZWDvPXP1wqHG2nDzEUfp0/5LraQP1eoS7OtaV2msCNIqf0N5Lct3w1JXn3IpLqIfZXVmKErYwJrs+rhRYsnvsg/Jl7nrYUeTjU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783461944; c=relaxed/simple; bh=e2P5r8XA3RGJrJLw1cxuTkaS4mej/2Imv19r1823bMo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=DFI7ADJqOoVj2aIruL/gOGA2C9uj9/tFu2tpBzQJ5+sNiLlls01xRwijl/SQCvjD0dSsIFK8iFNKbr78RindCsebEgvps2icnEhT3p9szwnkBS3mYeHpCVBqrkX3Ik9YG3oJPKvDXYaNYJi4C/rOT5M08+C9gS+JpB3T0lrYtcw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=JlNxmkQG; arc=none smtp.client-ip=209.85.222.170 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="JlNxmkQG" Received: by mail-qk1-f170.google.com with SMTP id af79cd13be357-92e622cc874so8685a.0 for ; Tue, 07 Jul 2026 15:05:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1783461939; x=1784066739; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=utjog+6AQ/2tRyz48wuvZRgUxH52Ru+dsh50BRKnIuc=; b=JlNxmkQG+yF9rJBOPvk8CaB7E/GIa7V8mNOYMGEqRKotHc7XQC+b0yHOwmDN2UnM11 jtSjLc99W+gjeT0zBbUODfpKOxTc9tUiN9LxkJ6wuhpFClP0Pt98yBoTuO28DfxIPQ2f Hp7y9s/3CQWfwIgwaHnkFKOmKtxeWefb5GiWu119F1fBNLbFxENQj0uyxCvCvKg7BT4t i2i8vDg2vYBPMVmXrtmvd4AoNBWzrLfbE5EQ5h7SQ8fWISVjm90NakAxCqJwD9JmLa1R 7HqJyZs/n1gCb50ac9ruqogSNyl6FrWVZRnjwhPAO2irpHVHRvsO/tzTYS0Sz/fSDHQm 2mRw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1783461939; x=1784066739; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=utjog+6AQ/2tRyz48wuvZRgUxH52Ru+dsh50BRKnIuc=; b=c89lTq90+79dXqXe//K0uY5EevaHKINx74qft0j/oXVg0PNoYIOBIkQF10/mFlZrKR 26djRkxPIS9EsWq5S4ZB9i4GqHYLHDV7fOeAj8HyMIcl/VJoJYEzokM80xIa1wVLFSTV VwyzlltQzIjIBDm3VdhgQcBtGJ/vlYjLTXPM7sL2t8W85LASAu1vKW4O/yfqDk+psYuI LP1vcDNibiMjJM39CNCHaa0fZ9P6MyQEDUGKFDDCAugIdj3KAIjOcnMqyj0pCHDy+tS/ TcemlIkRrDtrUKM4PyVR/gfquqxgCoR0Xmd6gj8lwf+NulnNW8ocGxfvo1auJbvYSOU2 lZAQ== X-Forwarded-Encrypted: i=1; AHgh+RrPfT3QZz3KXXuQ39Fuq6v9ExP3TWWCCIhkiuqx4F4w/j4lOXS66jwjpANkhJf2PLVDxh0JHjxd5dU3vts=@vger.kernel.org X-Gm-Message-State: AOJu0YwOKPYbkMdbnAiyzyrxYbGK152HI9ovvRl71EJO9GZd6BXuNT4c 1XnpNqpmsbb51+HYxQB2+uvVbFw2GWZnZPciU10f8D61OaDrA9VXQ4Tg X-Gm-Gg: AfdE7cmQgKIYVNsg/B96CGqnBm1M11WtIpO109HQW5PFX+ArKzpMkY8D8WsfLkfFmnH 9QzAAlw8M/0AhbX028+ZBluS3suwYtKuE7TOKBvirn4Kx7Pi1najdgb/f5xcGLsWx5SLLTwy2i5 bnYiZRjbg2RnBTmQREN+vAT+87wvAwNfR3lJW4JrrZ6/EtwWJs5x+u2lgnwdk2bCrE7yFNrGOPT u2zPZSUtpaxIKNDLMH7WsVZPgVp0z54nw5SckXQS6cptvGYKQMXJGINxjFD7Nt0K2507DnJjV0G wnDJk8+5fUpWNBR2VY0N3hSAD0VGlBYEFu/EowqRNvohvTC5Ts2ky9Vubl3pkuEMfL/qjTv34Fj LT1+YCkSlgkodCZ87N5rH85U7BnealCu/hBvA+t93KhN+sQqaeK2+Eh0V2O2OOcMo2FbKpp5nxD +jv9tSasS7hWJmqUfeNPEq00Iat/egJhoWWU3U8+qd9rAP8u4M2fP8i4ftW4H1QvTWXfb6l1sPy CIysB75/KGc93NsR+CPkqPsZR/v5wy8QB9v X-Received: by 2002:a05:620a:1712:b0:921:dae6:a701 with SMTP id af79cd13be357-92ebb5976ddmr834874885a.54.1783461933994; Tue, 07 Jul 2026 15:05:33 -0700 (PDT) Received: from jeremy.kali (srv1619992.hstgr.cloud. [2a02:4780:75:55a3::1]) by smtp.gmail.com with ESMTPSA id af79cd13be357-92e90cc18f1sm1250745685a.40.2026.07.07.15.05.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Jul 2026 15:05:33 -0700 (PDT) From: "Jeremy Erazo (Devel Group)" To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , Sasha Levin , Luiz Augusto von Dentz , Marcel Holtmann , Johan Hedberg , Claudia Draghicescu , linux-bluetooth@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 0/2] Bluetooth: ISO: backport missed OOB write fix to 6.6.y and 6.1.y Date: Tue, 7 Jul 2026 22:05:24 +0000 Message-ID: <20260707220526.271712-1-mendozayt13@gmail.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260702144207.320421-1-mendozayt13@gmail.com> References: <20260702144207.320421-1-mendozayt13@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Jeremy Erazo Hi Greg, Sasha, Luiz, v2 respin. Two things fixed vs v1: * The 40-char upstream SHA I put in the "commit upstream." line of both patches was garbage. The 12-char prefix f4da3ee15de9 was correct but I hand-expanded the tail wrong, so `git cat-file` on it fails. Corrected to f4da3ee15de9944482382181329bb6d7335ca003. Thanks Sasha for catching that. * The v1 patches were asymmetric: 6.6.y accidentally carried the put_user() hunk in iso_sock_getsockopt() that 6.1.y omitted. There was no reason for that split; my mistake in v1. v2 drops the put_user hunk from 6.6.y so both branches now carry identical mechanics against their own net/bluetooth/iso.c (add #include "eir.h", add EIR_BAA_SERVICE_UUID define, replace the memcpy() with the eir_get_service_data() + bounds-check pattern). The put_user() correction is a separate getsockopt correctness fix; if that hunk is wanted in stable it should travel as its own patch. Everything else in v1 still stands: root cause, affected branch matrix, reachability, build verification. Re-stated below for the archive. Root cause: upstream commit f4da3ee15de9944482382181329bb6d7335ca003 ("Bluetooth: ISO: Copy BASE if service data matches EIR_BAA_SERVICE_UUID", 2023-09-28, mainline v6.7) addressed the OOB write in iso_connect_ind() but landed without a Fixes: tag, so the stable autoselect bot never picked it up. linux-6.6.y (v6.6.143) and linux-6.1.y (v6.1.176) both still ship the pre-fix code where ev3->length, a __u8 in [0, 255], drives memcpy() directly into iso_pi(sk)->base[248]. Values in [249, 255] overflow 1 to 7 bytes into adjacent fields of struct iso_pinfo, including the low bytes of iso_pi(sk)->conn. FORTIFY_SOURCE flags the write but does not block it. Affected branch matrix (as of today, 2026-07-07): * linux-6.6.y (v6.6.143) vulnerable - patch 1/2 * linux-6.1.y (v6.1.176) vulnerable - patch 2/2 * linux-5.15.y NOT affected - iso_connect_ind PA-report handling was introduced by commit 9c0826310bfb in v6.5, after 5.15.y branched. Both patches carry the same three hunks against their own iso.c: * add #include "eir.h" * add #define EIR_BAA_SERVICE_UUID 0x1851 * replace the unbounded memcpy() with the upstream pattern (eir_get_service_data() + base_len <= sizeof(iso_pi(sk)->base) guard) Reachability of the underlying bug: any host with an ISO listening socket bound as a broadcast sink (LE Audio / Auracast use case). No pairing required, single HCI_EV_LE_PER_ADV_REPORT event within BLE radio range. Build verification: net/bluetooth/iso.o builds cleanly in both trees with BT + BT_LE + BT_HCIVHCI enabled on x86_64 defconfig. No new checkpatch errors; two warnings reported are "unknown commit id" (shallow clone) and one long line in the backport-note paragraph. I did not include a reproducer or PoC in this series because the fix is the one Luiz/Claudia already landed upstream and there is no dispute about the OOB write. A userspace reproducer against /dev/vhci exists locally and is available on request if the maintainers want to confirm on their side. Changes in v2: * Fix incorrect 40-char upstream SHA in the "upstream." line of both patches (thanks Sasha). * Drop the getsockopt put_user() hunk from 6.6.y so both patches are symmetric. Jeremy Erazo (2): Bluetooth: ISO: Copy BASE if service data matches EIR_BAA_SERVICE_UUID Bluetooth: ISO: Copy BASE if service data matches EIR_BAA_SERVICE_UUID net/bluetooth/iso.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) -- 2.53.0