mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Lee Jones <lee@kernel.org>
Cc: Marcel Holtmann <marcel@holtmann.org>,
	Luiz Augusto von Dentz <luiz.dentz@gmail.com>,
	Brian Gix <brian.gix@intel.com>,
	linux-bluetooth@vger.kernel.org, linux-kernel@vger.kernel.org,
	stable@vger.kernel.org
Subject: Re: [PATCH v2 1/1] Bluetooth: mgmt: Dequeue pending mesh_send_sync entries on cancel
Date: Tue, 1 Sep 2026 19:00:47 +0200	[thread overview]
Message-ID: <2026090140-fiber-risk-346e@gregkh> (raw)
In-Reply-To: <20260901154427.3991920-1-lee@kernel.org>

On Tue, Sep 01, 2026 at 03:44:26PM +0000, Lee Jones wrote:
> In send_cancel(), pending mesh_tx objects are removed from the
> hdev->mesh_pending list and freed via mesh_send_complete(). However, if
> a mesh transmission was already queued onto hdev->cmd_sync_work_list
> via mesh_next(), the queued entry retains a raw pointer to mesh_tx.
> 
> When hci_cmd_sync_work later processes the entry, it attempts to
> execute mesh_send_sync and its destroy callback mesh_send_start_complete
> using the already freed mesh_tx pointer, leading to a use-after-free.
> 
> Fix this by invoking hci_cmd_sync_dequeue() for mesh_send_sync on the
> target mesh_tx before completing it. If the entry is found and dequeued,
> its destroy callback will complete and free the object; otherwise,
> mesh_send_complete() is called directly.
> 
> Fixes: b338d91703fa ("Bluetooth: Implement support for Mesh")
> Signed-off-by: Lee Jones <lee@kernel.org>
> ---
> 
> v1 => v2: Email address switch - no functional change
> 
>  net/bluetooth/mgmt.c | 14 ++++++++++----
>  1 file changed, 10 insertions(+), 4 deletions(-)
> 

<formletter>

This is not the correct way to submit patches for inclusion in the
stable kernel tree.  Please read:
    https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html
for how to do this properly.

</formletter>

      reply	other threads:[~2026-09-01 17:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-01 15:44 Lee Jones
2026-09-01 17:00 ` Greg KH [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=2026090140-fiber-risk-346e@gregkh \
    --to=gregkh@linuxfoundation.org \
    --cc=brian.gix@intel.com \
    --cc=lee@kernel.org \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luiz.dentz@gmail.com \
    --cc=marcel@holtmann.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

all inboxes | Powered by JetHome®