Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp199208ybh; Mon, 9 Mar 2020 19:36:37 -0700 (PDT) X-Google-Smtp-Source: ADFU+vsC1IA16zDaU2pq8ZZI8sPGkMUWAfDktIVq1zMXYjP03L25gZMsl8Nj+mW7ZSpVXNlrH2cA X-Received: by 2002:a9d:720a:: with SMTP id u10mr3492672otj.177.1583807796934; Mon, 09 Mar 2020 19:36:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1583807796; cv=none; d=google.com; s=arc-20160816; b=yfAysum4CEoAv25WCnEsymcFH86szOSIPTnCoXuqs+nrmglqgvaiVnTj3dKVzPW5MV fG6QGFKGpBRrdNruNcB8y1iqApUuNDQqhdCIXTRamozj3cCpbMActjb9Lm8QwuC4dx5G vuJz0DrV2fYCxjg9ujTrGZcAOkMy2oPOOtnlr2HHajhEeQCqjBqjQAvCMl2jxOcKvUJr xT6QA1Xk3c0SV+N1AMpV7KQEuhVKekJ5rNfpFKSW3TBUEaEKxNqKm4WlUm3P6suMMaD2 ytelMq8NkFx46P5VgY/iG22EtxlhuXKbF5esLwUJU/bF6WBLOGUqIQhemTqtPH5dYC5R i8kg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=6IdBxYCIYqV3HQIJkWlJWsdSuE1kyl5MLjvSqtdIbQg=; b=WPtT7zu9qg7TRVYm9aDjNhw+1SkNku5UjLyjJ9PDTTHg6I85zucLksCeSKJiVpifp+ YkQ+YDedzMsEpVUAM348FdRZ39i3oBbDo9zVyuvLHtqcYod1eYEny6iLbwlCXdkykXah EPPjlEXANnqw9ehNCsPBuJzGiFxjBV7xPDMYB82gk6H80XpQYfAVJnujNySVKXXgJsql y8FjIh6gF5pD4mgBz/MkrC7Cij2xdl4W6WsoFA/bDRl22ZGfevyyP/E1lMZBNakUuNYa i5eDXgz2kdSI4QT1o/h+O/9lUF5jg6v1Ub0ksSFvX5r3y67UerO8aoTRRHkhgxitlnpP jOGw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=BwPzyy9h; spf=pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r13si6894674otq.279.2020.03.09.19.36.23; Mon, 09 Mar 2020 19:36:36 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=BwPzyy9h; spf=pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726642AbgCJCgD (ORCPT + 99 others); Mon, 9 Mar 2020 22:36:03 -0400 Received: from mail-ua1-f45.google.com ([209.85.222.45]:43030 "EHLO mail-ua1-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726533AbgCJCgD (ORCPT ); Mon, 9 Mar 2020 22:36:03 -0400 Received: by mail-ua1-f45.google.com with SMTP id o42so4113853uad.10 for ; Mon, 09 Mar 2020 19:36:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=6IdBxYCIYqV3HQIJkWlJWsdSuE1kyl5MLjvSqtdIbQg=; b=BwPzyy9hDQE5icXIe9swdaALl1B/nUfV97b2Bz8Y0r5N1L/xt30fD71Qu+SvBv02m8 bPQaYU0I2RjzAF9kVx+YLsDpWQW4N9GZL0K0LC9NPyN4GdQ320JR8BuLcNioaSwzZjZC hcWilGn7rljaMv7bhh7LCXCntGYOYjed11CS0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=6IdBxYCIYqV3HQIJkWlJWsdSuE1kyl5MLjvSqtdIbQg=; b=s5OC9B5NiwhYoYZ9tgiVluO+oAkiHwrGLyylL+coGM+QRS/yybgqoVmGXKfQj4SVOu zGZZ82YbMU3OuYytmXXJy2VFc9+GnXHwiCPC+U5KfyMaVzYSsd4a4XZWI0HAWRTcO8CA ZAjrNl5wx5AWpaI8OXHdseNEv5DZimi9hrkXIwLcd118xOHYboBQBiXHYrNmFGjWeXPl UP1622s+3BdKs2ZjGmUksZiKRnAghSTVtWws99t8cOrqcCzy1ve3lctsZ3sa/QzcTN+b ziPpMBGFH2zIxtasBMyWm0NcIXh6twvl6CIyU/hYb/kcoYtZtKyVXIO0Ja7m09EwXFGq j6gQ== X-Gm-Message-State: ANhLgQ1fbpbik8tGMmIl2OTkQfkaTsUjFHN+vvQObb7py+ADxJBAQNyZ xtoPKua3v8/jJp115sWIzTYPy6ZTX4Y= X-Received: by 2002:ab0:26cd:: with SMTP id b13mr10539813uap.24.1583807761792; Mon, 09 Mar 2020 19:36:01 -0700 (PDT) Received: from alain.c.googlers.com.com (57.152.190.35.bc.googleusercontent.com. [35.190.152.57]) by smtp.gmail.com with ESMTPSA id p24sm2767024uao.4.2020.03.09.19.36.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Mar 2020 19:36:01 -0700 (PDT) From: Alain Michaud To: linux-bluetooth@vger.kernel.org Cc: Alain Michaud Subject: [BlueZ PATCH 1/2] HOGP must only accept data from bonded devices. Date: Tue, 10 Mar 2020 02:35:16 +0000 Message-Id: <20200310023516.209146-2-alainm@chromium.org> X-Mailer: git-send-email 2.25.1.481.gfbce0eb801-goog In-Reply-To: <20200310023516.209146-1-alainm@chromium.org> References: <20200310023516.209146-1-alainm@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-bluetooth-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org HOGP 1.0 Section 6.1 establishes that the HOGP must require bonding. Reference: https://www.intel.com/content/www/us/en/security-center/advisory/intel-sa-00352.htm --- profiles/input/hog.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/profiles/input/hog.c b/profiles/input/hog.c index 83c017dcb..dfac68921 100644 --- a/profiles/input/hog.c +++ b/profiles/input/hog.c @@ -186,6 +186,10 @@ static int hog_accept(struct btd_service *service) return -EINVAL; } + /* HOGP 1.0 Section 6.1 requires bonding */ + if (!device_is_bonded(device, btd_device_get_bdaddr_type(device))) + return -ECONNREFUSED; + /* TODO: Replace GAttrib with bt_gatt_client */ bt_hog_attach(dev->hog, attrib); -- 2.25.1.481.gfbce0eb801-goog