From: Alexandre Mergnat <amergnat@baylibre.com>
To: Zheng Hacker <hackerzheng666@gmail.com>
Cc: Zheng Wang <zyytlz.wz@163.com>,
Kyrie.Wu@mediatek.com, bin.liu@mediatek.com, mchehab@kernel.org,
matthias.bgg@gmail.com, angelogioacchino.delregno@collabora.com,
linux-media@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-mediatek@lists.infradead.org, Irui.Wang@mediatek.com,
security@kernel.org, 1395428693sheep@gmail.com,
alex000young@gmail.com
Subject: Re: [RESEND PATCH v2] media: mtk-jpeg: Fix use after free bug due to uncanceled work
Date: Wed, 19 Jul 2023 12:17:55 +0200 [thread overview]
Message-ID: <55c336a4-b268-d2d3-47f3-213300e4e623@baylibre.com> (raw)
In-Reply-To: <CAJedcCyKv-hdDhWcogDZrC-kY6qtO-H1fDYqjTXMJvCR19MxYg@mail.gmail.com>
On 18/07/2023 05:07, Zheng Hacker wrote:
> Friendly ping
>
> Zheng Hacker <hackerzheng666@gmail.com> 于2023年7月16日周日 00:08写道:
>>
>> Hi,
>>
>> This issue has not been resolved for a long time. Is there anyone who can help?
>>
>> Best regards,
>> Zheng
>>
>> Alexandre Mergnat <amergnat@baylibre.com> 于2023年7月7日周五 22:11写道:
>>>
>>>
>>>
>>> On 07/07/2023 11:24, Zheng Wang wrote:
>>>> In mtk_jpeg_probe, &jpeg->job_timeout_work is bound with
>>>> mtk_jpeg_job_timeout_work. Then mtk_jpeg_dec_device_run
>>>> and mtk_jpeg_enc_device_run may be called to start the
>>>> work.
>>>> If we remove the module which will call mtk_jpeg_remove
>>>> to make cleanup, there may be a unfinished work. The
>>>> possible sequence is as follows, which will cause a
>>>> typical UAF bug.
>>>>
>>>> Fix it by canceling the work before cleanup in the mtk_jpeg_remove
>>>>
>>>> CPU0 CPU1
>>>>
>>>> |mtk_jpeg_job_timeout_work
>>>> mtk_jpeg_remove |
>>>> v4l2_m2m_release |
>>>> kfree(m2m_dev); |
>>>> |
>>>> | v4l2_m2m_get_curr_priv
>>>> | m2m_dev->curr_ctx //use
>>>
>>> Reviewed-by: Alexandre Mergnat <amergnat@baylibre.com>
>>>
>>> --
>>> Regards,
>>> Alexandre
Hi Zheng,
If you asking me to merge patch, sorry but I can't, I'm just a reviewer.
I invite you to ping the maintainers directly:
Bin Liu <bin.liu@mediatek.com> (supporter:MEDIATEK JPEG DRIVER)
Mauro Carvalho Chehab <mchehab@kernel.org> (maintainer:MEDIA INPUT
INFRASTRUCTURE (V4L/DVB))
Matthias Brugger <matthias.bgg@gmail.com> (maintainer:ARM/Mediatek SoC
support)
Otherwise, I misunderstood what you asking me. If so, can you rephrase
your question please?
--
Regards,
Alexandre
next prev parent reply other threads:[~2023-07-19 10:18 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-07 9:24 [RESEND PATCH v2] media: mtk-jpeg: Fix use after free bug due to uncanceled work Zheng Wang
2023-07-07 14:11 ` Alexandre Mergnat
2023-07-15 16:08 ` Zheng Hacker
2023-07-18 3:07 ` Zheng Hacker
2023-07-19 10:17 ` Alexandre Mergnat [this message]
2023-07-20 3:17 ` Zheng Hacker
2023-07-20 3:40 ` Chen-Yu Tsai
2023-07-20 7:45 ` AngeloGioacchino Del Regno
2023-07-25 2:39 ` Zheng Hacker
2023-08-22 18:51 ` Dmitry Osipenko
2023-08-24 8:20 ` Zheng Hacker
2023-08-28 2:04 ` Dmitry Osipenko
2023-08-31 8:18 ` Zheng Hacker
2023-09-05 4:24 ` Zheng Hacker
2023-09-12 9:29 ` Zheng Hacker
2023-09-19 18:24 ` Dmitry Osipenko
2023-09-19 18:25 ` Dmitry Osipenko
2023-10-08 9:13 ` Zheng Hacker
2023-10-19 19:56 ` Dmitry Osipenko
2023-10-20 2:51 ` Zheng Hacker
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=55c336a4-b268-d2d3-47f3-213300e4e623@baylibre.com \
--to=amergnat@baylibre.com \
--cc=1395428693sheep@gmail.com \
--cc=Irui.Wang@mediatek.com \
--cc=Kyrie.Wu@mediatek.com \
--cc=alex000young@gmail.com \
--cc=angelogioacchino.delregno@collabora.com \
--cc=bin.liu@mediatek.com \
--cc=hackerzheng666@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=matthias.bgg@gmail.com \
--cc=mchehab@kernel.org \
--cc=security@kernel.org \
--cc=zyytlz.wz@163.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