[PATCH] soc: apple: rtkit: Fix use-after-free in apple_rtkit_crashlog_rx()

Sven Peter sven at svenpeter.dev
Tue Feb 18 09:05:27 PST 2025


On Wed, 12 Feb 2025 00:58:53 -0800, 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.
> 
> [...]

Applied, thanks!

[1/1] soc: apple: rtkit: Fix use-after-free in apple_rtkit_crashlog_rx()
      commit: 00834971f0d9e38beae37e92055b1432782827d0

Best regards,
-- 
Sven Peter <sven at svenpeter.dev>



More information about the linux-arm-kernel mailing list