From: Chen Ridong <chenridong@huaweicloud.com>
To: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>,
ysato@users.sourceforge.jp, dalias@libc.org,
gregkh@linuxfoundation.org, ricardo@marliere.net,
damm@opensource.se, lethal@linux-sh.org
Cc: linux-sh@vger.kernel.org, wangweiyang2@huawei.com
Subject: Re: [PATCH] sh: intc: Fix possible UAF in register_intc_controller
Date: Thu, 7 Nov 2024 15:57:39 +0800 [thread overview]
Message-ID: <48f866a1-0412-4a41-b880-e7282265336f@huaweicloud.com> (raw)
In-Reply-To: <cf281c9e0d04483d7cafd89aeb25b55878e81385.camel@physik.fu-berlin.de>
On 2024/11/7 15:35, John Paul Adrian Glaubitz wrote:
> Hi Chen,
>
> On Thu, 2024-11-07 at 08:57 +0800, Chen Ridong wrote:
>>
>> On 2024/10/30 14:08, Chen Ridong wrote:
>>> From: Chen Ridong <chenridong@huawei.com>
>>>
>>> When it goes to error, the 'd' is freed, but 'd->list' was not deleted
>>> from 'intc_list', which may lead to a UAF.
>>>
>>> Fixes: 01e9651a21bc ("sh: add INTC out of memory error handling")
>>> Signed-off-by: Chen Ridong <chenridong@huawei.com>
>>> ---
>>> drivers/sh/intc/core.c | 1 +
>>> 1 file changed, 1 insertion(+)
>>>
>>> diff --git a/drivers/sh/intc/core.c b/drivers/sh/intc/core.c
>>> index 74350b5871dc..a30d205e7a43 100644
>>> --- a/drivers/sh/intc/core.c
>>> +++ b/drivers/sh/intc/core.c
>>> @@ -387,6 +387,7 @@ int __init register_intc_controller(struct intc_desc *desc)
>>>
>>> kfree(d->window);
>>> err1:
>>> + list_del(&d->list);
>>> kfree(d);
>>> err0:
>>> pr_err("unable to allocate INTC memory\n");
>>
>> Friendly ping
>
> I have seen your patch. I will try to review it on the weekend. I have been very busy
> with lots of other work, unfortunately. I usually have one day where I do all the review
> and merge the patches for SH.
>
> Adrian
>
Thank you.
Best regards,
Ridong
next prev parent reply other threads:[~2024-11-07 7:57 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-30 6:08 [PATCH] sh: intc: Fix possible UAF in register_intc_controller Chen Ridong
2024-11-07 0:57 ` Chen Ridong
2024-11-07 7:35 ` John Paul Adrian Glaubitz
2024-11-07 7:57 ` Chen Ridong [this message]
2024-11-13 6:21 ` Chen Ridong
2024-11-13 8:35 ` John Paul Adrian Glaubitz
2024-11-14 3:02 ` Chen Ridong
2024-11-13 8:26 ` Geert Uytterhoeven
2024-11-25 1:21 ` Chen Ridong
2024-11-25 7:13 ` John Paul Adrian Glaubitz
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=48f866a1-0412-4a41-b880-e7282265336f@huaweicloud.com \
--to=chenridong@huaweicloud.com \
--cc=dalias@libc.org \
--cc=damm@opensource.se \
--cc=glaubitz@physik.fu-berlin.de \
--cc=gregkh@linuxfoundation.org \
--cc=lethal@linux-sh.org \
--cc=linux-sh@vger.kernel.org \
--cc=ricardo@marliere.net \
--cc=wangweiyang2@huawei.com \
--cc=ysato@users.sourceforge.jp \
/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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).