Message ID | 92465892-aad4-428d-bcfe-03584d302bb5@paragon-software.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-42331-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2087:b0:106:209c:c626 with SMTP id gs7csp422500dyb; Mon, 29 Jan 2024 00:09:39 -0800 (PST) X-Google-Smtp-Source: AGHT+IE+4XMmdgMsJgDWIGYu4hrRXIwsEzbvxkkn5uPH/uBTMMtpNiBogE4LdwCrmsgYeyeIstdL X-Received: by 2002:a05:6358:708:b0:178:63a6:3c96 with SMTP id e8-20020a056358070800b0017863a63c96mr4289574rwj.57.1706515779170; Mon, 29 Jan 2024 00:09:39 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706515779; cv=pass; d=google.com; s=arc-20160816; b=tKM5/Yzc8io8Odn6QWIyZEJlQpZ7lruLf5UrvLSgrerJ/+ylaPaDigeddtGtVIYFbD c8au+j6Qr8YOH24rvwxaExurv+RnmJqTTtXwY8R7WdmfZyxWWFFdKG/01kKSjZQ7aETU +lodrcdhTIQ5ydWKzaNZAHwEeobI2inafQXkPfh3v6P2SThSwBW0I9bIV2Kuho1k7JNT nd1bSm27yq600MJKpIUCcFlAsCWBmPxq0JGyKTvu33Su9WizC541/vucDcQxNnSzf+VR UHlcEBGxwbSKHXCFmNpySFmV4L1YNwSr4wFRC0jj6Lh0aXrUTl9hmG6LCc1jeux0Jny+ zxLw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:references:cc:to:from :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature :dkim-signature; bh=mHtFVlGdQT3NlQXqvNi7PsHSg3EPQVtrgac40SxL8CQ=; fh=P7I85FIabZcM8ojWdeG8ABpTZepe/Xtte9jKWDfUHBM=; b=mxj+EE/VeJcjYV/XM20V8c+HbnbDrAOhAFSJNxDBBcdZeouYOx6EMA3C0XdQZc8Eh3 Af6fTaFjchioSgxFZ7H3Wdx6H2OKcOZG+7mtJFkFR+aHyqD3XcExpY7Mqr1CBzRr/SfT cM1NNxEBf/yaW4lCJN+lGa2KaBuwB+Xvz6OerEJzZd6/uH5L+OCcr5iJZbXw/3iYlezH tqRH2dIqxGmk6Q8eQJNAr/TvXr3ykjwQxTBiOicFRrCacsn8oz08eZtZ+OpTvYjUM4hr V9kxF1/Cy6iK3NVTDBljBQAESuSbyUDg9ZCQOmC383G6IdZYy1GYPrESZZVM20Fi1kqp f9Dw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@paragon-software.com header.s=mail header.b="ReYwIs/7"; dkim=pass header.i=@paragon-software.com header.s=mail header.b=MhXoP1eQ; arc=pass (i=1 spf=pass spfdomain=paragon-software.com dkim=pass dkdomain=paragon-software.com dkim=pass dkdomain=paragon-software.com dmarc=pass fromdomain=paragon-software.com); spf=pass (google.com: domain of linux-kernel+bounces-42331-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-42331-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=paragon-software.com Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id lp17-20020a056a003d5100b006dddd64f90dsi5340281pfb.118.2024.01.29.00.09.39 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Jan 2024 00:09:39 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-42331-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@paragon-software.com header.s=mail header.b="ReYwIs/7"; dkim=pass header.i=@paragon-software.com header.s=mail header.b=MhXoP1eQ; arc=pass (i=1 spf=pass spfdomain=paragon-software.com dkim=pass dkdomain=paragon-software.com dkim=pass dkdomain=paragon-software.com dmarc=pass fromdomain=paragon-software.com); spf=pass (google.com: domain of linux-kernel+bounces-42331-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-42331-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=paragon-software.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id E80FD2812F7 for <ouuuleilei@gmail.com>; Mon, 29 Jan 2024 08:09:38 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2E36053E09; Mon, 29 Jan 2024 08:09:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=paragon-software.com header.i=@paragon-software.com header.b="ReYwIs/7"; dkim=pass (1024-bit key) header.d=paragon-software.com header.i=@paragon-software.com header.b="MhXoP1eQ" Received: from relayaws-01.paragon-software.com (relayaws-01.paragon-software.com [35.157.23.187]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 39D04537E7; Mon, 29 Jan 2024 08:09:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=35.157.23.187 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706515760; cv=none; b=E1sGzERwFJc+acXqYIc6VQ12xN6eV/3hYYA4p5sQWF1xvDRK4neih1GgMnY84skxYGhytmsj928p5tJOKjogyc+J5U6UN5g58d0vZMNbo7gjrj26g/r0RJVjbSFfwWX+T+v6DTi0UWoBHKyWNkGZYICDuCa6Gflf7n1q9ktPyrE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706515760; c=relaxed/simple; bh=sOrdau0GamvWHIukB319bDFasFZTPBKgNYMEGNGazj4=; h=Message-ID:Date:MIME-Version:Subject:From:To:CC:References: In-Reply-To:Content-Type; b=fcgK/1ndvyyVbdmLFGWRIH7Fy7pmO2F0RW8eS98Oy7busKeCxvWw8hLKiepiOpL9geGUQPya6OIOnLzgX/qJKepBnM3fSCpWWh98d1MovJisgCfsA5i1ozzwqLx4A7efJsjnIb+Zy7D8VPbwNBH3THnkG31DsLNPaGaLhrYZBSA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=paragon-software.com; spf=pass smtp.mailfrom=paragon-software.com; dkim=pass (1024-bit key) header.d=paragon-software.com header.i=@paragon-software.com header.b=ReYwIs/7; dkim=pass (1024-bit key) header.d=paragon-software.com header.i=@paragon-software.com header.b=MhXoP1eQ; arc=none smtp.client-ip=35.157.23.187 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=paragon-software.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=paragon-software.com Received: from relayfre-01.paragon-software.com (unknown [172.30.72.12]) by relayaws-01.paragon-software.com (Postfix) with ESMTPS id EFEEE211A; Mon, 29 Jan 2024 08:02:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paragon-software.com; s=mail; t=1706515347; bh=mHtFVlGdQT3NlQXqvNi7PsHSg3EPQVtrgac40SxL8CQ=; h=Date:Subject:From:To:CC:References:In-Reply-To; b=ReYwIs/7rsKMUum49OlcvYARoFaXe8NkykGh9OVAemrQwbi1mKrgu9eLlYI5ynnqs ADKYd/FZwEBD6raZyW9RCavC8V9eDb7jr4YB6q37r8zJEg/78OYmLEuTCkss5FlZH1 XMUspqloSkpfcXH0CC/qOtVXS+SKaH2UAOC9RgUg= 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 4C34A1D33; Mon, 29 Jan 2024 08:09:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paragon-software.com; s=mail; t=1706515757; bh=mHtFVlGdQT3NlQXqvNi7PsHSg3EPQVtrgac40SxL8CQ=; h=Date:Subject:From:To:CC:References:In-Reply-To; b=MhXoP1eQRy++X4M6HQL73o3RLT82XyIrdJeQ8fVC5j+Ce3OH+MAe3ZdHQrBcdyxuM /bqq3icfy7ZxMVfHvo/ykZZQG1DG6sXyH2Pk0WsWmcZZCsG5PPT3g6BQCwJh/k8p4S 5V5lFs8i+0SfLwsVl3O73qpzFJtkhGPtpzqp6Avo= Received: from [192.168.211.199] (192.168.211.199) 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.2375.7; Mon, 29 Jan 2024 11:09:16 +0300 Message-ID: <92465892-aad4-428d-bcfe-03584d302bb5@paragon-software.com> Date: Mon, 29 Jan 2024 11:09:16 +0300 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: [PATCH 4/5] fs/ntfs3: Fixed overflow check in mi_enum_attr() Content-Language: en-US From: Konstantin Komarov <almaz.alexandrovich@paragon-software.com> To: <ntfs3@lists.linux.dev> CC: <linux-kernel@vger.kernel.org>, <linux-fsdevel@vger.kernel.org> References: <dedce962-d48d-41d6-bbbf-e95c66daba80@paragon-software.com> In-Reply-To: <dedce962-d48d-41d6-bbbf-e95c66daba80@paragon-software.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-ClientProxiedBy: vobn-exch-01.paragon-software.com (172.30.72.13) To vdlg-exch-02.paragon-software.com (172.30.1.105) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789411490069126745 X-GMAIL-MSGID: 1789411490069126745 |
Series |
fs/ntfs3: Bugfix
|
|
Commit Message
Konstantin Komarov
Jan. 29, 2024, 8:09 a.m. UTC
Reported-by: Robert Morris <rtm@csail.mit.edu>
Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
---
fs/ntfs3/record.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
t32 = sizeof(short) * attr->name_len;
diff --git a/fs/ntfs3/record.c b/fs/ntfs3/record.c index 7b6423584eae..6aa3a9d44df1 100644 --- a/fs/ntfs3/record.c +++ b/fs/ntfs3/record.c @@ -279,7 +279,7 @@ struct ATTRIB *mi_enum_attr(struct mft_inode *mi, struct ATTRIB *attr) if (t16 > asize) return NULL; - if (t16 + le32_to_cpu(attr->res.data_size) > asize) + if (le32_to_cpu(attr->res.data_size) > asize - t16) return NULL;