Re: [PATCH v4 1/6] mm/zswap: change dstmem size to one page

From: Nhat Pham
Date: Wed Dec 27 2023 - 18:22:03 EST


On Wed, Dec 27, 2023 at 12:58 PM Andrew Morton
<akpm@xxxxxxxxxxxxxxxxxxxx> wrote:
>
> On Wed, 27 Dec 2023 14:11:06 +0800 Chengming Zhou <zhouchengming@xxxxxxxxxxxxx> wrote:
>
> > > i remember there was an over-compression case, that means the compressed
> > > data can be bigger than the source data. the similar thing is also done in zram
> > > drivers/block/zram/zcomp.c
> >
> > Right, there is a buffer overflow report[1] that I just +to you.
>
> What does "[1]" refer to? Is there a bug report about this series?

I think Chengming was referring to this:

https://lore.kernel.org/lkml/0000000000000b05cd060d6b5511@xxxxxxxxxx/

Syzkaller/syzbot found an edge case where the page's "compressed" form
was larger than one page, which tripped up the compression code (since
we reduced the compression buffer size to 1 page here).