Re: [LTP] [PATCH v3] fsconfig03: New test CVE-2022-0185

Wei Gao via ltp
2023-02-16T12:55:18Z

On Thu, Feb 16, 2023 at 12:09:20PM +0000, Richard Palethorpe wrote:
> Hello,
>
> >> We need to close and reopen the FD inside run() otherwise the test fails
> >> on BTRFS with -i2 because we have already filled the buffer.
> > Thanks for your feedback, i have some quesiton on this comments:
> > The error will happen when buffer is full filled on btrfs(means buffer len > pagesize), this is normal
> > and current logic verfiy this logic for btrfs.
>
> I'm not sure you understand what "-i2" means. The run() function can be
> called multiple times in a loop. If you do ./fsconfig03 -i2 then you
> will see the test fails.

Yes, i do not understand "-i2" before but i know this now : )
I will update and will send new patch soon!

>
> That's because it executes run() twice and the second time
> TST_EXP_PASS_SILENT fails.
>
> > Are you mean we need create another fd and continue do fsconfig on new fd once first fsconfig fails happen ? Correct
> > me if i have misunderstanding.
>
> This would also work.
>
>
> --
> Thank you,
> Richard.