Linux kernel -stable discussions
 help / color / mirror / Atom feed
From: Sasha Levin <sashal@kernel.org>
To: stable@vger.kernel.org
Cc: Sasha Levin <sashal@kernel.org>
Subject: Re: [PATCH 6.1] Bluetooth: hci_sync: Fix UAF on hci_abort_conn_sync
Date: Tue, 12 Aug 2025 00:12:22 -0400	[thread overview]
Message-ID: <1754966493-e7374263@stable.kernel.org> (raw)
In-Reply-To: <20250812013457.425332-1-sumanth.gavini@yahoo.com>

[ Sasha's backport helper bot ]

Hi,

✅ All tests passed successfully. No issues detected.
No action required from the submitter.

The upstream commit SHA1 provided is correct: 5af1f84ed13a416297ab9ced7537f4d5ae7f329a

WARNING: Author mismatch between patch and upstream commit:
Backport author: Sumanth Gavini <sumanth.gavini@yahoo.com>
Commit author: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

Status in newer kernel trees:
6.15.y | Present (exact SHA1)
6.12.y | Present (exact SHA1)
6.6.y | Present (exact SHA1)

Note: The patch differs from the upstream commit:
---
1:  5af1f84ed13a ! 1:  347ef4c82277 Bluetooth: hci_sync: Fix UAF on hci_abort_conn_sync
    @@
      ## Metadata ##
    -Author: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
    +Author: Sumanth Gavini <sumanth.gavini@yahoo.com>
     
      ## Commit message ##
         Bluetooth: hci_sync: Fix UAF on hci_abort_conn_sync
     
    +    commit 5af1f84ed13a416297ab9ced7537f4d5ae7f329a upstream.
    +
         Connections may be cleanup while waiting for the commands to complete so
         this attempts to check if the connection handle remains valid in case of
         errors that would lead to call hci_conn_failed:
    @@ Commit message
          hci_abort_conn_sync+0x237/0x360
     
         Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
    +    Signed-off-by: Sumanth Gavini <sumanth.gavini@yahoo.com>
     
      ## net/bluetooth/hci_sync.c ##
     @@ net/bluetooth/hci_sync.c: static int hci_reject_conn_sync(struct hci_dev *hdev, struct hci_conn *conn,
    @@ net/bluetooth/hci_sync.c: static int hci_reject_conn_sync(struct hci_dev *hdev,
     +		err = hci_disconnect_sync(hdev, conn, reason);
     +		break;
      	case BT_CONNECT:
    - 		err = hci_connect_cancel_sync(hdev, conn, reason);
    + 		err = hci_connect_cancel_sync(hdev, conn);
     -		/* Cleanup hci_conn object if it cannot be cancelled as it
    --		 * likelly means the controller and host stack are out of sync
    --		 * or in case of LE it was still scanning so it can be cleanup
    --		 * safely.
    +-		 * likelly means the controller and host stack are out of sync.
     -		 */
     -		if (err) {
     -			hci_dev_lock(hdev);
    @@ net/bluetooth/hci_sync.c: static int hci_reject_conn_sync(struct hci_dev *hdev,
     -		return hci_reject_conn_sync(hdev, conn, reason);
     +		err = hci_reject_conn_sync(hdev, conn, reason);
     +		break;
    - 	case BT_OPEN:
    - 	case BT_BOUND:
    - 		hci_dev_lock(hdev);
    -@@ net/bluetooth/hci_sync.c: int hci_abort_conn_sync(struct hci_dev *hdev, struct hci_conn *conn, u8 reason)
    - 		return 0;
      	default:
      		conn->state = BT_CLOSED;
     -		break;

---

Results of testing on various branches:

| Branch                    | Patch Apply | Build Test |
|---------------------------|-------------|------------|
| origin/linux-6.1.y        | Success     | Success    |

      reply	other threads:[~2025-08-12 10:52 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20250812013457.425332-1-sumanth.gavini.ref@yahoo.com>
2025-08-12  1:34 ` [PATCH 6.1] Bluetooth: hci_sync: Fix UAF on hci_abort_conn_sync Sumanth Gavini
2025-08-12  4:12   ` Sasha Levin [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1754966493-e7374263@stable.kernel.org \
    --to=sashal@kernel.org \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox