Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1605733pxb; Mon, 22 Feb 2021 06:29:34 -0800 (PST) X-Google-Smtp-Source: ABdhPJyc/S2MLf2kbZgyWEneC6IIpdJliP1XXYpQAgk5UQQfOIVu4igMTGXa6NWSiPBoC7Gjv/5N X-Received: by 2002:aa7:d796:: with SMTP id s22mr23126259edq.198.1614004174186; Mon, 22 Feb 2021 06:29:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614004174; cv=none; d=google.com; s=arc-20160816; b=DrgIQ6B/Ig6b6JdnCnmXKebMQbIB/QZAN/F9Z2r+IuryNZWUP5aQEgiJ8XyBKdfU9j OnZEjDgKFh+hDVPCYlcshqAnnRK95mQzM1JMt1NzBVkgL42j1DnO6/xJ93TANM9iCbSR oRRUUDMNlBPY4XnhrPGKSVCRKItFXr/A6noGxJplEldhiA2aBZqToRs7Ku1tCaWIrmbf lgqYI7AoVJwn7qjuBN3ofomFsbtoal3KpJlMfvtmNojbwiknTm1S8tq3PuHFh+/cIRUL EA8DUGlfEb1QypR+d77pkxik+C4Mzmi8NgeJgOnjzD+wxhBdYhDN4h8rXZOe2XYovo/5 hz9g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :content-id:content-language:accept-language:in-reply-to:references :message-id:date:thread-index:thread-topic:subject:cc:to:from; bh=Rp/D3gnxLT1BQkKxPlDxWukd+KeB0cX+xV8iCl0epsM=; b=x+VJJGa/8afvp1Z6Coar+kRxnxZS2m/RB2iF6JvslbR4wg8zYGTL5PQlPyDserko42 BvfYaYxzHdI78Ji6K0qC0gido4OBfy+JX70LRM2aFPVjGXbKHB2o4tidHwLfhWxm+ZKF AC+NvQDUHuAQdhXwKAslQeRzrBB90hp1RPh063bwHPRrpa5BMjqsAxVHdZk+E7b1CetJ Jmvpr+Pxxg6vGVLym6MVBVxKco2csi0ZlKTVRNYRv0eW2XjHvQnomWF0ugpcXuKoUpR2 3jYXfKSjAcDPW9357voJuV0HzLn1mBv111OILSY/MeXGBBTw6fvlA8t1fSh3KtsNXkZ4 Mg8A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id eb8si14571107edb.6.2021.02.22.06.29.10; Mon, 22 Feb 2021 06:29:34 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232245AbhBVO1q convert rfc822-to-8bit (ORCPT + 99 others); Mon, 22 Feb 2021 09:27:46 -0500 Received: from mgw-02.mpynet.fi ([82.197.21.91]:36122 "EHLO mgw-02.mpynet.fi" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231601AbhBVOUC (ORCPT ); Mon, 22 Feb 2021 09:20:02 -0500 Received: from pps.filterd (mgw-02.mpynet.fi [127.0.0.1]) by mgw-02.mpynet.fi (8.16.0.42/8.16.0.42) with SMTP id 11MEH0wD032555; Mon, 22 Feb 2021 16:18:51 +0200 Received: from ex13.tuxera.com (ex13.tuxera.com [178.16.184.72]) by mgw-02.mpynet.fi with ESMTP id 36tq071dhd-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Mon, 22 Feb 2021 16:18:51 +0200 Received: from tuxera-exch.ad.tuxera.com (10.20.48.11) by tuxera-exch.ad.tuxera.com (10.20.48.11) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Mon, 22 Feb 2021 16:18:50 +0200 Received: from tuxera-exch.ad.tuxera.com ([fe80::552a:f9f0:68c3:d789]) by tuxera-exch.ad.tuxera.com ([fe80::552a:f9f0:68c3:d789%12]) with mapi id 15.00.1497.010; Mon, 22 Feb 2021 16:18:50 +0200 From: Anton Altaparmakov To: Andrew Morton CC: "linux-ntfs-dev@lists.sourceforge.net" , "linux-kernel@vger.kernel.org" , "gregkh@linuxfoundation.org" , Rustam Kovhaev Subject: Re: [PATCH] ntfs: check for valid standard information attribute Thread-Topic: [PATCH] ntfs: check for valid standard information attribute Thread-Index: AQHXBUX43Bx0ygm+wEC4t5YdRoTv2qpemD8AgAEbtgCABGs/AA== Date: Mon, 22 Feb 2021 14:18:50 +0000 Message-ID: References: <20210217155930.1506815-1-rkovhaev@gmail.com> <42B686E5-92C1-4AD3-8CF4-E9AB39CBDB7B@tuxera.com> <20210219104956.09e869c36f065a78d1901725@linux-foundation.org> In-Reply-To: <20210219104956.09e869c36f065a78d1901725@linux-foundation.org> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-messagesentrepresentingtype: 1 x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [109.155.251.193] Content-Type: text/plain; charset="us-ascii" Content-ID: Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.369,18.0.761 definitions=2021-02-22_02:2021-02-22,2021-02-22 signatures=0 X-Proofpoint-Spam-Details: rule=mpy_notspam policy=mpy score=0 phishscore=0 adultscore=0 suspectscore=0 spamscore=0 bulkscore=0 malwarescore=0 mlxscore=0 mlxlogscore=999 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2102220132 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Andrew, Sorry for the delay in replying. > On 19 Feb 2021, at 18:49, Andrew Morton wrote: > > On Fri, 19 Feb 2021 01:54:30 +0000 Anton Altaparmakov 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 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@vger.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 (replace at with @) Lead in File System Development, Tuxera Inc., http://www.tuxera.com/ Linux NTFS maintainer