[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240429092307.37bf51c79f70bad4922f6277@linux-foundation.org>
Date: Mon, 29 Apr 2024 09:23:07 -0700
From: Andrew Morton <akpm@...ux-foundation.org>
To: Luis Chamberlain <mcgrof@...nel.org>
Cc: ziy@...dia.com, linux-mm@...ck.org, fstests@...r.kernel.org,
linux-xfs@...r.kernel.org, linux-kernel@...r.kernel.org,
willy@...radead.org, hare@...e.de, john.g.garry@...cle.com,
p.raghav@...sung.com, da.gomez@...sung.com
Subject: Re: [PATCH 1/2] mm/huge_memory: skip invalid debugfs file entry for
folio split
On Sun, 28 Apr 2024 21:04:50 -0700 Luis Chamberlain <mcgrof@...nel.org> wrote:
> On Thu, Apr 25, 2024 at 02:01:26PM -0700, Andrew Morton wrote:
> > On Wed, 24 Apr 2024 15:54:48 -0700 Luis Chamberlain <mcgrof@...nel.org> wrote:
> >
> > > If the file entry is too long we may easily end up going out of bounds
> > > and crash after strsep() on sscanf().
> > >
> >
> > Can you explain why? I'm not seeing it.
>
> I couldn't see it either but I just looked at the crash below and
> its the only thing I could think of. So I think its when userspace
> somehow abuses MAX_INPUT_BUF_SZ a lot somehow.
This isn't a good basis for making kernel changes :(
Can you investigate a little further please? What actually is present
at *buf when your new checks succeed? Could we be seeing 0xNNN,0xNNN
and leaving new_order unaltered? Or something.
Powered by blists - more mailing lists