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>] [day] [month] [year] [list]
Message-ID: <20251106114328.3d7631f2@canb.auug.org.au>
Date: Thu, 6 Nov 2025 11:43:28 +1100
From: Stephen Rothwell <sfr@...b.auug.org.au>
To: Marcel Holtmann <marcel@...tmann.org>, Johan Hedberg
 <johan.hedberg@...il.com>, David Miller <davem@...emloft.net>, Jakub
 Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>
Cc: Kees Cook <kees@...nel.org>, Luiz Augusto von Dentz
 <luiz.von.dentz@...el.com>, Networking <netdev@...r.kernel.org>, Linux
 Kernel Mailing List <linux-kernel@...r.kernel.org>, Linux Next Mailing List
 <linux-next@...r.kernel.org>
Subject: linux-next: manual merge of the bluetooth tree with the net-next
 tree

Hi all,

Today's linux-next merge of the bluetooth tree got a conflict in:

  net/bluetooth/iso.c

between commit:

  0e50474fa514 ("net: Convert proto_ops bind() callbacks to use sockaddr_unsized")

from the net-next tree and commit:

  8cd02d23dd8d ("Bluetooth: ISO: Add support to bind to trigger PAST")

from the bluetooth tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc net/bluetooth/iso.c
index 243505b89733,74ec7d125c88..000000000000
--- a/net/bluetooth/iso.c
+++ b/net/bluetooth/iso.c
@@@ -1022,7 -1034,78 +1034,78 @@@ done
  	return err;
  }
  
+ static struct hci_dev *iso_conn_get_hdev(struct iso_conn *conn)
+ {
+ 	struct hci_dev *hdev = NULL;
+ 
+ 	iso_conn_lock(conn);
+ 	if (conn->hcon)
+ 		hdev = hci_dev_hold(conn->hcon->hdev);
+ 	iso_conn_unlock(conn);
+ 
+ 	return hdev;
+ }
+ 
+ /* Must be called on the locked socket. */
+ static int iso_sock_rebind_bc(struct sock *sk, struct sockaddr_iso *sa,
+ 			      int addr_len)
+ {
+ 	struct hci_dev *hdev;
+ 	struct hci_conn *bis;
+ 	int err;
+ 
+ 	if (sk->sk_type != SOCK_SEQPACKET || !iso_pi(sk)->conn)
+ 		return -EINVAL;
+ 
+ 	/* Check if it is really a Broadcast address being requested */
+ 	if (addr_len != sizeof(*sa) + sizeof(*sa->iso_bc))
+ 		return -EINVAL;
+ 
+ 	/* Check if the address hasn't changed then perhaps only the number of
+ 	 * bis has changed.
+ 	 */
+ 	if (!bacmp(&iso_pi(sk)->dst, &sa->iso_bc->bc_bdaddr) ||
+ 	    !bacmp(&sa->iso_bc->bc_bdaddr, BDADDR_ANY))
+ 		return iso_sock_rebind_bis(sk, sa, addr_len);
+ 
+ 	/* Check if the address type is of LE type */
+ 	if (!bdaddr_type_is_le(sa->iso_bc->bc_bdaddr_type))
+ 		return -EINVAL;
+ 
+ 	hdev = iso_conn_get_hdev(iso_pi(sk)->conn);
+ 	if (!hdev)
+ 		return -EINVAL;
+ 
+ 	bis = iso_pi(sk)->conn->hcon;
+ 
+ 	/* Release the socket before lookups since that requires hci_dev_lock
+ 	 * which shall not be acquired while holding sock_lock for proper
+ 	 * ordering.
+ 	 */
+ 	release_sock(sk);
+ 	hci_dev_lock(bis->hdev);
+ 	lock_sock(sk);
+ 
+ 	if (!iso_pi(sk)->conn || iso_pi(sk)->conn->hcon != bis) {
+ 		/* raced with iso_conn_del() or iso_disconn_sock() */
+ 		err = -ENOTCONN;
+ 		goto unlock;
+ 	}
+ 
+ 	BT_DBG("sk %p %pMR type %u", sk, &sa->iso_bc->bc_bdaddr,
+ 	       sa->iso_bc->bc_bdaddr_type);
+ 
+ 	err = hci_past_bis(bis, &sa->iso_bc->bc_bdaddr,
+ 			   le_addr_type(sa->iso_bc->bc_bdaddr_type));
+ 
+ unlock:
+ 	hci_dev_unlock(hdev);
+ 	hci_dev_put(hdev);
+ 
+ 	return err;
+ }
+ 
 -static int iso_sock_bind(struct socket *sock, struct sockaddr *addr,
 +static int iso_sock_bind(struct socket *sock, struct sockaddr_unsized *addr,
  			 int addr_len)
  {
  	struct sockaddr_iso *sa = (struct sockaddr_iso *)addr;

Content of type "application/pgp-signature" skipped

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ