Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp787380pxb; Wed, 29 Sep 2021 09:38:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz0ksXvqsgpuL3oD2GXusYOrNX5ryudXFj26GSQ3cUejNDIs0OLxpcfX2BGLn0fbqaVmI49 X-Received: by 2002:a63:f241:: with SMTP id d1mr789408pgk.74.1632933486828; Wed, 29 Sep 2021 09:38:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632933486; cv=none; d=google.com; s=arc-20160816; b=t2JkOgHQBL6P99I0VeG3WwuZz/QC9s0zTyEwTdJGdDJnifXae9Q+v+0R298I35n1Hm 5KvT/vzMWuOGc9kqGvm8/ohpCufwFVrUfeX3uT6oK0OneC7jo/fMqhOc1mogDdTAaNQL UvRm+uClvp63IhGjYajj0rTrrxVIZRjY+pA9OypFMjcnPSpnh46b3/vxFW+c7erRTtZo 4YgJD0A8cw/xgTfswbw6v5AQ+Pbh9rTSByBR0xZtFuIg1Wpfgr/77rsj3mxazg74YBcv kUeUwfZLNM99LAgW89OTQAZnXdIm1MSzhU6f/ObDdG4YSurhUkqJUTIQ9+AuNyMrpKPG 4w8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:subject:from:cc:to :content-language:user-agent:mime-version:date:message-id :dkim-signature; bh=y6nA3GWCbrV+AJ5phsLcgeh14RzUjW20Sad0AwORUTc=; b=icNf78nX+Dipt78ZMiGCiilw46YrkIKUWmuVdIuvnEwWnCOco2etkh4gOFeFL0OTl/ DyTyXuewT8Bevk3iih0HSqhtbasDodNPXl17lLx1qlg4uBSVgEeoRUlDaBv6lgRggC2b PK+kgF27AKv5AVhchIDfEAK123iwkGgp6e7pSo1+UTg5YxXdOFMpd4xjVVNWSzytobZs xUCQ5jhGiRjZK34vJi/5sp0/tI4wNTjGKdZp6qk1V6hU/oVl9k2g98Hu1LF8PxbFmNsG 9G5qRClJ9O9nfWpVaNjMcEnSp2c9iX+zcNRoYJu7PBtV4Cw9FW725THaUCYVaoTAba9E m2qw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@paragon-software.com header.s=mail header.b=AhpB6B8J; 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; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=paragon-software.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s81si290766pfs.376.2021.09.29.09.37.52; Wed, 29 Sep 2021 09:38:06 -0700 (PDT) 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; dkim=pass header.i=@paragon-software.com header.s=mail header.b=AhpB6B8J; 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; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=paragon-software.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345819AbhI2Qh2 (ORCPT + 99 others); Wed, 29 Sep 2021 12:37:28 -0400 Received: from relayfre-01.paragon-software.com ([176.12.100.13]:54750 "EHLO relayfre-01.paragon-software.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345687AbhI2Qh1 (ORCPT ); Wed, 29 Sep 2021 12:37:27 -0400 Received: from dlg2.mail.paragon-software.com (vdlg-exch-02.paragon-software.com [172.30.1.105]) by relayfre-01.paragon-software.com (Postfix) with ESMTPS id 23B81439; Wed, 29 Sep 2021 19:35:44 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paragon-software.com; s=mail; t=1632933344; bh=y6nA3GWCbrV+AJ5phsLcgeh14RzUjW20Sad0AwORUTc=; h=Date:To:CC:From:Subject; b=AhpB6B8J+eGE7340jiIeikVoLgAhUZHszkpgntE5jvth6TstCAoV49vo/JF6Us/IT XHmxgFNEk2Ax83dJUYKbieev6CZfa+PRsNLYLihWMdgJjwFcgrA2fWZ/bWTPEiSfNd uqv7RQZHWB8zs5yc4U9gYa7rpn912PhpBktrqzAA= Received: from [192.168.211.131] (192.168.211.131) by vdlg-exch-02.paragon-software.com (172.30.1.105) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.2; Wed, 29 Sep 2021 19:35:43 +0300 Message-ID: <227c13e3-5a22-0cba-41eb-fcaf41940711@paragon-software.com> Date: Wed, 29 Sep 2021 19:35:43 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.1.1 Content-Language: en-US To: CC: , From: Konstantin Komarov Subject: [PATCH] fs/ntfs3: Check for NULL if ATTR_EA_INFO is incorrect Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Originating-IP: [192.168.211.131] X-ClientProxiedBy: vobn-exch-01.paragon-software.com (172.30.72.13) To vdlg-exch-02.paragon-software.com (172.30.1.105) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This can be reason for reported panic. Fixes: 4342306f0f0d ("fs/ntfs3: Add file operations and implementation") Signed-off-by: Konstantin Komarov --- fs/ntfs3/frecord.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/fs/ntfs3/frecord.c b/fs/ntfs3/frecord.c index 9a53f809576d..007602badd90 100644 --- a/fs/ntfs3/frecord.c +++ b/fs/ntfs3/frecord.c @@ -3080,7 +3080,9 @@ static bool ni_update_parent(struct ntfs_inode *ni, struct NTFS_DUP_INFO *dup, const struct EA_INFO *info; info = resident_data_ex(attr, sizeof(struct EA_INFO)); - dup->ea_size = info->size_pack; + /* If ATTR_EA_INFO exists 'info' can't be NULL. */ + if (info) + dup->ea_size = info->size_pack; } } -- 2.33.0