lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240104174112.GJ31813@kernel.org>
Date: Thu, 4 Jan 2024 17:41:12 +0000
From: Simon Horman <horms@...nel.org>
To: Jonas Dreßler <verdre@...d.nl>
Cc: Marcel Holtmann <marcel@...tmann.org>,
	Johan Hedberg <johan.hedberg@...il.com>,
	Luiz Augusto von Dentz <luiz.dentz@...il.com>,
	linux-bluetooth@...r.kernel.org, linux-kernel@...r.kernel.org,
	netdev@...r.kernel.org
Subject: Re: [PATCH] Bluetooth: hci_sync: Check the correct flag before
 starting a scan

On Tue, Jan 02, 2024 at 07:08:08PM +0100, Jonas Dreßler wrote:
> There's a very confusing mistake in the code starting a HCI inquiry: We're
> calling hci_dev_test_flag() to test for HCI_INQUIRY, but hci_dev_test_flag()
> checks hdev->dev_flags instead of hdev->flags. HCI_INQUIRY is a bit that's
> set on hdev->flags, not on hdev->dev_flags though.
> 
> HCI_INQUIRY equals the integer 7, and in hdev->dev_flags, 7 means
> HCI_BONDABLE, so we were actually checking for HCI_BONDABLE here.
> 
> The mistake is only present in the synchronous code for starting an inquiry,
> not in the async one. Also devices are typically bondable while doing an
> inquiry, so that might be the reason why nobody noticed it so far.
> 
> Signed-off-by: Jonas Dreßler <verdre@...d.nl>

FWIIW, I agree with this analysis and the proposed fix looks
correct to me.

Reviewed-by: Simon Horman <horms@...nel.org>

I do wonder if it is appropriate to treat this as a bug fix -
is there a use-visible problem? If so, the following seems appropriate to
me.

Fixes: abfeea476c68 ("Bluetooth: hci_sync: Convert MGMT_OP_START_DISCOVERY")

...

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ