lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <6c965dbc-9f01-414a-b218-2fa88155eb52@oracle.com>
Date: Tue, 18 Feb 2025 21:31:11 +0530
From: Harshit Mogalapalli <harshit.m.mogalapalli@...cle.com>
To: Sven Peter <sven@...npeter.dev>, Alyssa Rosenzweig
 <alyssa@...enzweig.io>,
        Janne Grunau <j@...nau.net>, Asahi Lina <lina@...hilina.net>,
        Jens Axboe <axboe@...nel.dk>, asahi@...ts.linux.dev,
        linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Cc: dan.carpenter@...aro.org, kernel-janitors@...r.kernel.org,
        Dan Carpenter <error27@...il.com>
Subject: Re: [PATCH] soc: apple: rtkit: Fix use-after-free in
 apple_rtkit_crashlog_rx()

Hi,

On 18/02/25 21:04, Sven Peter wrote:
> 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?
> 

I made the patch based on linux-next, linux-next has the patch merged.

Thanks,
Harshit
> 
> [1] https://lore.kernel.org/asahi/20250202-rtkit-crashdump-v1-1-9d38615b4e12@asahilina.net/
> 
> 
> Best,
> 
> 
> Sven


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ