From: Yunseong Kim <yskelg@gmail.com>
To: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
Cc: Marcel Holtmann <marcel@holtmann.org>,
Johan Hedberg <johan.hedberg@gmail.com>,
Austin Kim <austindh.kim@gmail.com>,
Yeoreum Yun <ppbuk5246@gmail.com>,
MichelleJin <shjy180909@gmail.com>,
linux-bluetooth@vger.kernel.org, linux-kernel@vger.kernel.org,
Levi Yun <yeoreum.yun@arm.com>
Subject: Re: [PATCH] hci: fix double free in hci_req_sync
Date: Tue, 2 Jul 2024 05:14:19 +0900 [thread overview]
Message-ID: <e1ea75d7-b59e-41e7-9a3b-bd63615a9d0c@gmail.com> (raw)
In-Reply-To: <CABBYNZLL0uYpgqSpQ+75mkZ194UTx+ojv-WreBKX52+EyQJ+Hw@mail.gmail.com>
Hi Luiz,
On 7/2/24 5:06 오전, Luiz Augusto von Dentz wrote:
> Hi,
>
> On Mon, Jul 1, 2024 at 3:45 PM Yunseong Kim <yskelg@gmail.com> wrote:
>>
>> The approach taken to address the 'CVE-2024-35978' introduced another
>> double-free vulnerability. commit 45d355a926ab
>> ("Bluetooth: Fix memory leak in hci_req_sync_complete()")
>>
>> 'hdev->req_skb' double free scenario:
>>
>> cpu1 cpu2
>> ==== ====
>> sock_ioctl
>> sock_do_ioctl
>> hci_sock_ioctl
>> hci_dev_cmd
>> hci_req_sync
>
> hci_req_sync is no longer called from hci_dev_cmd:
>
> https://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next.git/commit/?id=6851d11d389ceb00c1220b267b9a04f54dbc4573
>
> And I'm in process of removing hci_request.c completely.
>
>> __hci_req_sync hci_rx_work
>> kfree_skb(hdev->req_skb) hci_event_packet
>> (sleep) hci_req_sync_complete
>> \__ Longer times, kfree_skb(hdev->req_skb)
>> reproduce well hdev->req_skb = NULL
>>
Thank you so much your hard work.
I saw the patch email at the link below.
Link:
https://lore.kernel.org/all/a9609dd3d0cb3b8c3fd387efe8a81eddc821be0f.camel@iki.fi/T/
Does the patch you mentioned apply to backports as well?
Warm regards,
Yunseong Kim
next prev parent reply other threads:[~2024-07-01 20:14 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-01 19:45 [PATCH] hci: fix double free in hci_req_sync Yunseong Kim
2024-07-01 20:06 ` Luiz Augusto von Dentz
2024-07-01 20:14 ` Yunseong Kim [this message]
2024-07-02 19:40 ` Markus Elfring
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=e1ea75d7-b59e-41e7-9a3b-bd63615a9d0c@gmail.com \
--to=yskelg@gmail.com \
--cc=austindh.kim@gmail.com \
--cc=johan.hedberg@gmail.com \
--cc=linux-bluetooth@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luiz.dentz@gmail.com \
--cc=marcel@holtmann.org \
--cc=ppbuk5246@gmail.com \
--cc=shjy180909@gmail.com \
--cc=yeoreum.yun@arm.com \
/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