Received: by 2002:a05:6358:53a8:b0:117:f937:c515 with SMTP id z40csp4369608rwe; Mon, 17 Apr 2023 11:31:48 -0700 (PDT) X-Google-Smtp-Source: AKy350bppqYyyxxapMW9gNRDzIfxHDJ2jZwaHFcuzMej9I/JKr5dWjy+1CgPnLL+QnkZh0X0Rd0M X-Received: by 2002:a17:903:1245:b0:1a3:c8a9:7eff with SMTP id u5-20020a170903124500b001a3c8a97effmr15676561plh.55.1681756307931; Mon, 17 Apr 2023 11:31:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681756307; cv=none; d=google.com; s=arc-20160816; b=RSVc83We6mXAmxvnp9BOKLAIvUkU/2B7zuTXkUxiHhJJTEc/wHcVigq9vv4c3ZmutS Wliu5UL+KpQKVDIvMArhEgcFY4nZHT8SS+BGCIs7EjaZLnBkZPOCFha0/j0Ri3iZSHzk BpB5hktFQp+bu+5YqUx1EQCTYpEc966B4p0Ca/eFXiQwk7GwFhO9fFKMHn4jzmvzCMog UaPMonWJXbtFtLC7FvrsmEGiRCxRKF0ogxl3Bzu4vpA/txUuCbpJbTEcmlgwreYDjERr gRyVZLQTJpUDVPtZhoeFoHWEAOj2ZIltDeAe++IkZzYWmnsNOoCB0MbHclXxyTFupO5d 605A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:date:message-id :from:subject:content-transfer-encoding:mime-version:dkim-signature; bh=xYvCCejzA0w9eGmm71lQdolyqyF51EGGnLznzmDqP3w=; b=fartNENxT3FMHkJJNdu9s+isZVuIsdMSuEGY92NSqusszpCkD88H968b3NfQAYLs9H sN1CRDGpCeZ+JF3IhHxFkvUo5T0Uj2x1hPmOSCQXz/tnAldYT5yooEtQRDS+tmBNcjYB zYA0STlha1qzp16x9cWioCnY2nYwa5izwY96c9rA1fM5NZG9HsfVTc7JRDRfqRn2hTMQ b3gvSxlDvTju8ClTikqZtUOzAlBeO/SpJGgDohuVKnlFUoLtDwUp0Eb8u8HdzI5KVN6c 7SoxAgN+XHywJ0bu4RyisUZ+UTyMZihgCfe20hk8DnVdp7kFFnBbTRJg3xCoSgs9hCn8 YJ9A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=U5KYcK8V; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u10-20020a170902e5ca00b001a1eac2df75si13626507plf.490.2023.04.17.11.31.33; Mon, 17 Apr 2023 11:31:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=U5KYcK8V; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230164AbjDQSaw (ORCPT + 99 others); Mon, 17 Apr 2023 14:30:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41956 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229576AbjDQSat (ORCPT ); Mon, 17 Apr 2023 14:30:49 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DEA876180 for ; Mon, 17 Apr 2023 11:30:20 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 63FAB62954 for ; Mon, 17 Apr 2023 18:30:20 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPS id 7F8D5C433A4; Mon, 17 Apr 2023 18:30:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1681756219; bh=QEsoBcdPaH6i9b5R0ZYz0t3TcCsKT3tcxEej34YSqcM=; h=Subject:From:Date:References:In-Reply-To:To:Cc:From; b=U5KYcK8VWfoB1O8WapgsH3R6movvW+I60FDUENU9MXt94TwfR24RtrCgxCdL0/TTD PKhSRLCkMBDg5ubyoQ4M4PwZvGUnhBjY/SRO0mpjhg2CUmNqdiuf/Ma9QwBR3TTG1q 3jhjRAFrSAIiz2DuvVNyeh1a156CC3+TTLwn6CRgX4cfno6xgZO05ycaeCDWn6GIiz 8kl0sfj0vDlwkGXzJ04PYD7XBjuByHFQZxagSJsxcyJh8OoGJ1fzmAPqK1dAQxx2yP EDeJtQE30AfoUkv782t0acnBMdaoqnr4+Y+6X2x4X52eviglpm/CfT0twGBB7QUYGD SYMkwksrpBNCQ== Received: from aws-us-west-2-korg-oddjob-1.ci.codeaurora.org (localhost.localdomain [127.0.0.1]) by aws-us-west-2-korg-oddjob-1.ci.codeaurora.org (Postfix) with ESMTP id 605A2C561EE; Mon, 17 Apr 2023 18:30:19 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: Re: [PATCH] bluetooth: Add cmd validity checks at the start of hci_sock_ioctl() From: patchwork-bot+bluetooth@kernel.org Message-Id: <168175621938.2755.3988233703199508689.git-patchwork-notify@kernel.org> Date: Mon, 17 Apr 2023 18:30:19 +0000 References: <20230416080251.7717-1-lrh2000@pku.edu.cn> In-Reply-To: <20230416080251.7717-1-lrh2000@pku.edu.cn> To: Ruihan Li Cc: linux-bluetooth@vger.kernel.org, marcel@holtmann.org, johan.hedberg@gmail.com, luiz.dentz@gmail.com X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org Hello: This patch was applied to bluetooth/bluetooth-next.git (master) by Luiz Augusto von Dentz : On Sun, 16 Apr 2023 16:02:51 +0800 you wrote: > Previously, channel open messages were always sent to monitors on the first > ioctl() call for unbound HCI sockets, even if the command and arguments > were completely invalid. This can leave an exploitable hole with the abuse > of invalid ioctl calls. > > This commit hardens the ioctl processing logic by first checking if the > command is valid, and immediately returning with an ENOIOCTLCMD error code > if it is not. This ensures that ioctl calls with invalid commands are free > of side effects, and increases the difficulty of further exploitation by > forcing exploitation to find a way to pass a valid command first. > > [...] Here is the summary with links: - bluetooth: Add cmd validity checks at the start of hci_sock_ioctl() https://git.kernel.org/bluetooth/bluetooth-next/c/5612e6a8ff35 You are awesome, thank you! -- Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html