Received: by 2002:ab2:7855:0:b0:1f9:5764:f03e with SMTP id m21csp807404lqp; Wed, 22 May 2024 23:47:46 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCX9ddyyZysyK7aqxsO/hUAgDw6ZHQ6CTUv/D7BeAdwBQ3cpU1qxUnI1kdmlBZ0JMt+RKP5BXRNjTMo9JyrhEnl4Pr89++avwfFY5hxXCQ== X-Google-Smtp-Source: AGHT+IGMCq8fw/rnX2Z4ohUqDo6f5ZYwLdjt7j21REslp/1/vcbIaGuS74TH7JbU19+4ZlP54tK3 X-Received: by 2002:a50:c058:0:b0:56c:522f:53e1 with SMTP id 4fb4d7f45d1cf-578329fe256mr3313473a12.17.1716446866184; Wed, 22 May 2024 23:47:46 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716446866; cv=pass; d=google.com; s=arc-20160816; b=KqBf9YG1ipa2GlNOaMmZcfiryGc2+3EkiAv5qcoRoy0gyRPmPdYiAelhx3DfBlmJZv UrjvStt834YcjjOwQBrHiKTf6DcyNSxLpN0t3cYfIeWKEpYolyJXJumbKKkqjkZXK3Jt 1fKwLQgSJLDX1xCaJWbRfqzLtg5vkDcO7gsY9TMMHOWafoamE+6ejnBtKHOGW6vbK1WG 4yxKc4ztOQf0d4UmjXxpJ9BINYN0LjjxlmsWttwS7a3KbWtBQRgqbe6SQSGI3w/1WX37 5T0NaWDBM9JFmk5riz5HEbzLtmZc920vzx5AkPVTaUCb9UikkanwuNDcjOHO4wTf0ry6 nSAw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=2TOdKWJbhB8342cTih0zby2alMuJaJVHr29/3xXnmzg=; fh=TNwlIHRoVGRRCWN5CzNZBp/Rjj0uK086ZMA8ZvEZnsk=; b=ExlUJ44CCfnUD24aiTWuxqwGMY+vRzhWlVPp/b6XZ6vVoDI2dDIc0Qil9ZyE8DGj5H NVztfIQMaMLC8nnh92AUxHX6YBDlNLYChnJIfph32b3TrNpktQRjU3W1B54wPayY90NF hxHkdGiquzabwbOZvlaCK1c+8TVrJvOWQ7spA0Clf1BzMx9TPBq1Q61+Rx1q6kfAHs0F l+cYyOMPUe2LJTK/F8RdSTvljCPv0X/laPDX/Esa3556TCX4UMvstFrNLw7c14JHH5dt p8vjP58l49wpgDW5zCvrRkR2bzi4sx4znu0CTHVGwWXp9YQOjhOdq2WKG0m1ugizZ9+D kTsQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@canonical.com header.s=20210705 header.b=HZYcJO3H; arc=pass (i=1 spf=pass spfdomain=canonical.com dkim=pass dkdomain=canonical.com dmarc=pass fromdomain=canonical.com); spf=pass (google.com: domain of linux-bluetooth+bounces-4879-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-4879-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=canonical.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id 4fb4d7f45d1cf-5733c3271e2si15825084a12.388.2024.05.22.23.47.46 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 May 2024 23:47:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-bluetooth+bounces-4879-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@canonical.com header.s=20210705 header.b=HZYcJO3H; arc=pass (i=1 spf=pass spfdomain=canonical.com dkim=pass dkdomain=canonical.com dmarc=pass fromdomain=canonical.com); spf=pass (google.com: domain of linux-bluetooth+bounces-4879-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-4879-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=canonical.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id D08E61F217F6 for ; Thu, 23 May 2024 06:47:45 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8D31113C832; Thu, 23 May 2024 06:47:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=canonical.com header.i=@canonical.com header.b="HZYcJO3H" X-Original-To: linux-bluetooth@vger.kernel.org Received: from smtp-relay-canonical-1.canonical.com (smtp-relay-canonical-1.canonical.com [185.125.188.121]) (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 532D2EC5 for ; Thu, 23 May 2024 06:47:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.125.188.121 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716446860; cv=none; b=baxzqes9zsZazM4dNQK4v6ofDvCN4ZS1QphZ1IVBR9UkyxWxXRYj81eqrckIductreLaX3HhVqkBkbWNY5nVl4u0MBrItWaw/Xr5txDNmzJNoeEvQIV/bggQbhE7FQfIMHC8qMPwrRQFO6qlC8g70aJdms2TObuqPR+pbzup/os= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716446860; c=relaxed/simple; bh=UQWqc1Klr6h7jVTl0nun0UfUHaes9v4JWDXYXkpJqk4=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=jY5RxKBPqLP0/Q94oe/g9MCNFN/jXQt/Os3R3x9DfyFdpE/GuN7uu30CkZNqN7JWUXi2Sc+nKRMP3IvycLUXkU0YR3qDtsHzWwoPr8NwyjBVIgbUdSY/zyXloJndEKovnaBxp4S1XX9U06tRxETO2bYi1nyMLDplvtrKmRWKARM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=canonical.com; spf=pass smtp.mailfrom=canonical.com; dkim=pass (2048-bit key) header.d=canonical.com header.i=@canonical.com header.b=HZYcJO3H; arc=none smtp.client-ip=185.125.188.121 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=canonical.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=canonical.com Received: from 0xff07.. (unknown [10.102.136.211]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-canonical-1.canonical.com (Postfix) with ESMTPSA id 3F9683F3BD; Thu, 23 May 2024 06:47:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1716446856; bh=2TOdKWJbhB8342cTih0zby2alMuJaJVHr29/3xXnmzg=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=HZYcJO3HRsD+RDoWOif6QUm7LzjJHnQXZ3fPHMzpoYbSu6ZkHsAMd6G74+zFFnxyW X9mApuoWE936vXSlKnQhVrKVhA8Jbg04jbJ3QlSp96bMcl7nLDs6uvXhQpAg/T3w5h n/4UvaIZq/hdNAtuCIHPZ9+46Jri3hiwK1BBrZUd8zFyOOkkY1xcQdyHzVcD83U3+b ji7N9O9C7wuqDm9RYuQHoPpZgCo1W0nWJcvESPvH/0F5lUwvglRMnwoTb5BTIIQQl0 rjdoMQhur2WwLt9Eg+IbwVCKRL+DgnLhuoHO/bknKVWie5FEXgJaavaLRV+axUsive ILgAp7K+/SV2Q== From: "Yo-Jung (Leo) Lin" To: luiz.dentz@gmail.com Cc: linux-bluetooth@vger.kernel.org, kai.heng.feng@canonical.com, 0xff07@gmail.com, Yo-Jung Lin Subject: Re: [PATCH v3] Bluetooth: L2CAP: Fix rejecting L2CAP_CONN_PARAM_UPDATE_REQ Date: Thu, 23 May 2024 14:45:08 +0800 Message-Id: <20240523064508.6293-1-leo.lin@canonical.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240521143521.1568672-1-luiz.dentz@gmail.com> References: <20240521143521.1568672-1-luiz.dentz@gmail.com> Precedence: bulk X-Mailing-List: linux-bluetooth@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit I tested it using the bluetooth-next, with HEAD at a3975db95fcd8e304f1ee4b0be1895038942a8ef. It rejects the connection parameter update request at least for the case where the min > max, which is one of the failed conditions for the hci_check_conn_params() Note that TSPX_iut_invalid_connection_interval_{min, max} in the IXIT can be used to create faulty connection parameters. The specific test steps are: 1. Set TSPX_iut_invalid_connection_interval_min to a value larger than TSPX_iut_invalid_connection_interval_max, e.g. 0xAB and 0xAA respectively. 2. Start the GAP/CONN/CPUP/BV-05-C case on PTS. 3. Enter bluetoothctl. Use "scan on" to find the address of PTS dongle. 4. Meanwhile, PTS will ask for connect request. Connect to it by running "connect $PTS_ADDR" in bluetoothctl. 5. At this point the PTS would send the parameter update request with faulty parameters set in the IXIT. Kernel will reject this request. 6. PST will then ask to send a disconnect request. Run "disconnect" in bluetoothctl. The test case should pass after disconnection. Tested-by: Yo-Jung (Leo) Lin