Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp1203474ybl; Wed, 8 Jan 2020 12:54:06 -0800 (PST) X-Google-Smtp-Source: APXvYqy96MKoqNyIGd6aHWRXKY9r1ULx5GNYSJlbNEZiECAAGvPJFf1krqvaEQnPqoTQH8C8ecPN X-Received: by 2002:a9d:4c82:: with SMTP id m2mr5629290otf.199.1578516846152; Wed, 08 Jan 2020 12:54:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578516846; cv=none; d=google.com; s=arc-20160816; b=lOEhYyRHCLvxFMJ3mhM+LaLHnwLkomyG0NL7RsbXe07uVMjmZZzFyiQbb2UJi+UQtC BNWl91jeK9cGWOpyRm5lOVpU4G6uXl16hWD7tmd0Lj5xpCTOBC+ZFd8vDYMZMCCDMlX0 WOyeVvma9s0M7yV0rVT4HwVWAaJE51zJR9fdKGVB7EDgyutNm39O1eNhL6XvfiWgTO4p ZufuRwZCTHKO718rx2Q5cRxo6PJRHp9TiAWUhSCHG89u7NxG+5uiCHU+Z3i041Jgo+P3 5gIqpw/Ed7ZUhjZtjEcZkHhgDv0XvcZb1swusX5yDN158x2F8NhGNT6rPmfHPRdpCVx3 8/1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=7Z1gHOeWqaHhh5ruaHpP7OWGZVt4+rCp2rrObJwefHA=; b=AsvrqPfzEe1wCS85LpVmbz/8xgPUpE0Da4ZetKYQsBBm/66Ltm0u06YkNb28Jb0Nut BsaFsM7B4lTc2C0LAgZ0mflp/3qYvoTZItUEgxyVF+dh5bne8IMthPo8AIsFF//oPqxI bsfLYUMqYzPiULelf8HtIkcYa5kXD2S9imF2w6NR4lZeJn4BK8rTrqouDiezixdZL4Gg Z3FWesb+CGTw70tbTkGa3ik+QFdLBZDgQnVTr3FegAkF4UOi+F7H9vu6HDugqMjHVMRd pqilCYKtu+9oOxH3Iu3bQK5G/lYS6cnh9sNLyFdqKdvC36aGENLQk+j0wyFcjvXsz/TF otqg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=L4mHixGH; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i13si2370440oth.175.2020.01.08.12.53.54; Wed, 08 Jan 2020 12:54:06 -0800 (PST) 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=@gmail.com header.s=20161025 header.b=L4mHixGH; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726990AbgAHUxo (ORCPT + 99 others); Wed, 8 Jan 2020 15:53:44 -0500 Received: from mail-oi1-f174.google.com ([209.85.167.174]:39008 "EHLO mail-oi1-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726155AbgAHUxo (ORCPT ); Wed, 8 Jan 2020 15:53:44 -0500 Received: by mail-oi1-f174.google.com with SMTP id a67so3940290oib.6 for ; Wed, 08 Jan 2020 12:53:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=7Z1gHOeWqaHhh5ruaHpP7OWGZVt4+rCp2rrObJwefHA=; b=L4mHixGHnFyEJD/3I8xR8wBaMHO/ltLfFdZP6kgdw7+vcP+TD5mZmUH3gJ3/DF+0l7 +ES/+pda/DTWHZ+Qq5PQYquliWQT9GUCUw6E3XO6rKORmyDLNzSot4SeRrqFVeBwLfC/ S6lP5Am7yeus690CcgdJkqshc7Pryv5y4WeVo+ByCzQe6H3MslIEPRRzpyOty8pzKxEY L0qzcdxYEXkza5LF+ppkKpapMrFDoBP1EwJE0k2YVDNSu9LGHOn/daaH7N0mszf7X90h Wb4pnQTryAv5X4JdP+/kDDGApoZ+cVfRaCmqVVc1cEuxspzaCSn1c7I5VI6O2Yjgp/MY ndfA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=7Z1gHOeWqaHhh5ruaHpP7OWGZVt4+rCp2rrObJwefHA=; b=NrfL2MV7HbTfUrKvT3K8glX1md0L1khmsFwhzONkkFKSL5CKhvaH0xuTE6YJxljoH4 UsbimQ/v86dR7JrhCTes+fs6jTUHlO9Er8xwQUNLNCFrr6/G+J4mbOW3xi/GI7BMUROE BHmCfVqfjxssfXqlAMIk+6ILggWa0V7YXrvUErY7YXIzak6ieYcksNOPmLuOr+D2/ka7 a7XbMOF6aD5UQf9U4nCmoOP664m7thsv7N5q07M3W2jh3/SPdjBmoBFFT314fPnkl9/z BlKIX7Tk+sSzxMRyxWOv+qZPo+oI+Mn99Qvy3siMJewxcqGANw0S9WaIzyp0u2j+Cz/T B4Cw== X-Gm-Message-State: APjAAAXOIerNIIqzu05L4XB47zsV74iuo6brsVgM0/Y1A5CXKA0qpF5N Ndm1hBeMN1RWHTRsYwC1ckAaO1l4Ov/jJXOnjZBa8sRE X-Received: by 2002:aca:b1d5:: with SMTP id a204mr424693oif.82.1578516823674; Wed, 08 Jan 2020 12:53:43 -0800 (PST) MIME-Version: 1.0 References: <85C0B54E4752CA4F873E7C78CF0B26F5020662DB2C@LNDWSMBX02.ad.mpc.local> In-Reply-To: From: Luiz Augusto von Dentz Date: Wed, 8 Jan 2020 12:53:31 -0800 Message-ID: Subject: Re: Limiting what devices can pair over Bluetooth? To: James Pearson Cc: "linux-bluetooth@vger.kernel.org" Content-Type: text/plain; charset="UTF-8" Sender: linux-bluetooth-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org Hi James, On Wed, Jan 8, 2020 at 12:15 PM James Pearson wrote: > > Luiz Augusto von Dentz wrote: > > Hi James, > > > > On Wed, Jan 8, 2020 at 3:47 AM James Pearson > > wrote: > >> > >> We don't normally enable Bluetooth on Linux (CentOS 7) installs for > >> security reasons, but we have a case where we would like to use a > >> Wacom tablet over Bluetooth > >> > >> I would like to be able to configure things so Bluetooth can _only_ > >> be used to pair with Wacom tablets (or just HID devices?) > >> > >> As I never used Bluetooth in anger before, I'm struggling to find > >> out where to start looking - does anyone know how to do this - or > >> any pointers for where I should start looking? > > > > Are you asking this from the system or user perspective, from the > > system we don't have a configuration where you can restrict the > > types of devices that the user can pair, on the other hand there is > > nothing stopping the user interface (gnome, kde, etc) to implement > > such policy on their bluetooth settings, though be aware targeting a > > subset of HID devices may not be possible. > > Ideally I would want to limit this at the system level - although I can > not find anything user interface-wise that mentions limiting access > either (although I might be looking in the wrong places?) > > My aim is to prevent Bluetooth being used (in any way) to transfer > files/data on/off the workstation > > I've found that if I blacklist the bnep, cmtp and rfcomm kernel modules > (just leaving the bluetooth and hidp kernel modules enabled) then the > Wacom tablet still works over Bluetooth bnep is for tethering, depending on the system that might be useful, and if you block RFCOMM you no only block usage of file transfer but also HFP, but perhaps you don't care about those so that would be fine to disable. Btw, for getting file sharing you would just need to disable obexd though it doesn't seems it is a user service which you can disable with systemctl. > Would this be sufficient to prevent any kind of file transfer over > Bluetooth ? > > Thanks > > James Pearson -- Luiz Augusto von Dentz