Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 801f13bd authored by Marcel Holtmann's avatar Marcel Holtmann Committed by Johan Hedberg
Browse files

Bluetooth: Restrict access to management interface



The management interface on the HCI control channel should be restricted
to applications with CAP_NET_ADMIN permission.

Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
Signed-off-by: default avatarJohan Hedberg <johan.hedberg@intel.com>
parent cd82e61c
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -656,6 +656,11 @@ static int hci_sock_bind(struct socket *sock, struct sockaddr *addr, int addr_le
			goto done;
		}

		if (!capable(CAP_NET_ADMIN)) {
			err = -EPERM;
			goto done;
		}

		set_bit(HCI_PI_MGMT_INIT, &hci_pi(sk)->flags);
		break;