[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <A4498E63-33DC-4DAA-837D-D97B8F29F70C@tuxera.com>
Date: Mon, 22 Feb 2021 14:18:50 +0000
From: Anton Altaparmakov <anton@...era.com>
To: Andrew Morton <akpm@...ux-foundation.org>
CC: "linux-ntfs-dev@...ts.sourceforge.net"
<linux-ntfs-dev@...ts.sourceforge.net>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>,
Rustam Kovhaev <rkovhaev@...il.com>
Subject: Re: [PATCH] ntfs: check for valid standard information attribute
Hi Andrew,
Sorry for the delay in replying.
> On 19 Feb 2021, at 18:49, Andrew Morton <akpm@...ux-foundation.org> wrote:
>
> On Fri, 19 Feb 2021 01:54:30 +0000 Anton Altaparmakov <anton@...era.com> wrote:
>
>> Hi Andrew,
>>
>> Can you please push this one upstream? Thanks a lot in advance!
>
> The changelog is a bit brief...
Yes you are right it is a bit brief. I guess I thought the syzkaller link was sufficient... Rustam would you like to resubmit with an improved/extended description?
>>> On 17 Feb 2021, at 15:59, Rustam Kovhaev <rkovhaev@...il.com> wrote:
>>>
>>> we should check for valid STANDARD_INFORMATION attribute offset and
>>> length before trying to access it
>
> It's a kernel a crash and I assume it results from mounting a corrupted
> filesystem?
>
> I think it's worth a cc:stable, yes?
The problem is an invalid memory access due to corrupt on-disk metadata.
The issue with NTFS is that it is effectively a relational database so it is full of "struct X, field A" contains offset to "struct Y" so you get: "&struct Y = &struct X + X->A" and if the value of A is corrupt on-disk then your Y pointer is now pointing to random memory.
The patch fixes one such place by validating that Y pointer is within bounds of the structure/buffer it is in.
So I guess this could be worth a cc:stable? I guess we can add it and Greg / others can decide whether to put it into stable or not... Rustam when resubmitting with better description, please also add the "Cc: stable@...r.kernel.org" line together with the "Signed-off-by", etc lines (note no need to actually put this in CC: field of the email iteslf).
Best regards,
Anton
--
Anton Altaparmakov <anton at tuxera.com> (replace at with @)
Lead in File System Development, Tuxera Inc., http://www.tuxera.com/
Linux NTFS maintainer
Powered by blists - more mailing lists