Re: [PATCH 2/2] padata: fix UAF in padata_reorder
From: Daniel Jordan
Date: Tue Dec 10 2024 - 14:16:57 EST
On Tue, Dec 10, 2024 at 05:38:51PM +0800, Chen Ridong wrote:
> On 2024/12/6 11:48, chenridong wrote:
> > On 2024/12/6 7:01, Daniel Jordan wrote:
> >> On Sat, Nov 23, 2024 at 08:05:09AM +0000, Chen Ridong wrote:
> > IIUC, patches 3-5 from this series aim to fix two issue.
> > 1. Avoid UAF for pd(the patch 3).
> > 2. Avoid UAF for ps(the patch 4-5).
> > What my patch 2 intends to fix is the issue 1.
...
> Hi, Daniel, I am trying to produce the issue 2. However,I failed.
Thanks for trying!
> I added 'mdelay' as helper.
>
> static void padata_reorder(struct parallel_data *pd)
> {
> + mdelay(10);
> struct padata_instance *pinst = pd->ps->pinst;
> int cb_cpu;
> struct padata_priv *padata;
>
> I believe this can increase the probability of issue 2. But after
> testing with pcrypt_aead01, issue 2 cannot be reproduced.
> And I don't know whether it exists now.
Yeah, no reports of issue 2 that I've seen.