From: "Sven Peter" <sven@svenpeter.dev>
To: "Harshit Mogalapalli" <harshit.m.mogalapalli@oracle.com>,
"Alyssa Rosenzweig" <alyssa@rosenzweig.io>,
"Janne Grunau" <j@jannau.net>, "Asahi Lina" <lina@asahilina.net>,
"Jens Axboe" <axboe@kernel.dk>,
asahi@lists.linux.dev, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Cc: dan.carpenter@linaro.org, kernel-janitors@vger.kernel.org,
"Dan Carpenter" <error27@gmail.com>
Subject: Re: [PATCH] soc: apple: rtkit: Fix use-after-free in apple_rtkit_crashlog_rx()
Date: Tue, 18 Feb 2025 16:34:17 +0100 [thread overview]
Message-ID: <0e609fea-48b0-4b39-aae4-90395a782ed8@app.fastmail.com> (raw)
In-Reply-To: <20250212085853.1357906-1-harshit.m.mogalapalli@oracle.com>
Hi,
On Wed, Feb 12, 2025, at 09:58, Harshit Mogalapalli wrote:
> This code calls kfree(bfr); and then passes "bfr" to rtk->ops->crashed()
> which is a use after free. The ->crashed function pointer is implemented
> by apple_nvme_rtkit_crashed() and it doesn't use the "bfr" pointer so
> this doesn't cause a problem. But it still looks sketchy as can be.
>
> Fix this by moving kfree() after the last usage of bfr.
>
> Fixes: c559645f343a ("soc: apple: rtkit: Pass the crashlog to the
> crashed() callback")
This commit isn't upstream yet afaict, did you mean to post a review comment
to [1] instead?
[1] https://lore.kernel.org/asahi/20250202-rtkit-crashdump-v1-1-9d38615b4e12@asahilina.net/
Best,
Sven
next prev parent reply other threads:[~2025-02-18 15:34 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-12 8:58 Harshit Mogalapalli
2025-02-12 10:00 ` Eric Curtin
2025-02-18 15:34 ` Sven Peter [this message]
2025-02-18 16:01 ` Harshit Mogalapalli
2025-02-18 17:02 ` Sven Peter
2025-02-18 17:05 ` Sven Peter
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=0e609fea-48b0-4b39-aae4-90395a782ed8@app.fastmail.com \
--to=sven@svenpeter.dev \
--cc=alyssa@rosenzweig.io \
--cc=asahi@lists.linux.dev \
--cc=axboe@kernel.dk \
--cc=dan.carpenter@linaro.org \
--cc=error27@gmail.com \
--cc=harshit.m.mogalapalli@oracle.com \
--cc=j@jannau.net \
--cc=kernel-janitors@vger.kernel.org \
--cc=lina@asahilina.net \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@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®