From: Marcus Meissner <meissner@suse.de>
To: whitehat002 whitehat002 <hackyzh002@gmail.com>,
security@kernel.org, linux-mmc@vger.kernel.org,
ulf.hansson@linaro.org, xiyuyang19@fudan.edu.cn,
tony@atomide.com, yang.lee@linux.alibaba.com,
colin.king@intel.com, xiongx18@fudan.edu.cn
Cc: security@suse.com
Subject: Re: UAF in moxart_remove
Date: Tue, 11 Jan 2022 09:35:11 +0100 [thread overview]
Message-ID: <20220111083511.GA12379@suse.de> (raw)
In-Reply-To: <CAF6NKdZ6FOhJAXkFMgcr-+UcnfxoDc_p69nFxABHu+7b=FW36A@mail.gmail.com>
Hi whitehat002,
SUSE currently does not build the moxart driver, let me defer you to
security@kernel.org and the MMC maintainers.
i also opened a bug in our bugzilla just for tracking
https://bugzilla.suse.com/show_bug.cgi?id=1194516
Ciao, Marcus
On Tue, Jan 11, 2022 at 02:30:32PM +0800, whitehat002 whitehat002 wrote:
> Hello suse security team,
>
> There is a UAF in drivers/mmc/host/moxart-mmc.c
> This is similar with
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=42933c8aa14be1caa9eda41f65cde8a3a95d3e39
>
>
>
> static int moxart_remove(struct platform_device *pdev)
> {
> struct mmc_host *mmc = dev_get_drvdata(&pdev->dev);
> struct moxart_host *host = mmc_priv(mmc);
>
> dev_set_drvdata(&pdev->dev, NULL);
>
> if (!IS_ERR_OR_NULL(host->dma_chan_tx))
> dma_release_channel(host->dma_chan_tx);
> if (!IS_ERR_OR_NULL(host->dma_chan_rx))
> dma_release_channel(host->dma_chan_rx);
> mmc_remove_host(mmc);
> mmc_free_host(mmc); //[0] free
>
> writel(0, host->base + REG_INTERRUPT_MASK); //[1] host is private data from
> mmc_host UAF
> writel(0, host->base + REG_POWER_CONTROL);
> writel(readl(host->base + REG_CLOCK_CONTROL) | CLK_OFF,
> host->base + REG_CLOCK_CONTROL);
>
> return 0;
> }
>
>
>
> static inline void *mmc_priv(struct mmc_host *host)
> {
> return (void *)host->private;
> }
>
>
> Credit information
> Zhihua Yao of KunLun Lab
next parent reply other threads:[~2022-01-11 8:35 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CAF6NKdZ6FOhJAXkFMgcr-+UcnfxoDc_p69nFxABHu+7b=FW36A@mail.gmail.com>
2022-01-11 8:35 ` Marcus Meissner [this message]
2022-01-11 12:10 ` UAF in moxart_remove Greg KH
2022-01-11 12:35 ` Greg KH
2022-01-14 8:02 ` Greg KH
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=20220111083511.GA12379@suse.de \
--to=meissner@suse.de \
--cc=colin.king@intel.com \
--cc=hackyzh002@gmail.com \
--cc=linux-mmc@vger.kernel.org \
--cc=security@kernel.org \
--cc=security@suse.com \
--cc=tony@atomide.com \
--cc=ulf.hansson@linaro.org \
--cc=xiongx18@fudan.edu.cn \
--cc=xiyuyang19@fudan.edu.cn \
--cc=yang.lee@linux.alibaba.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