Received: by 2002:a05:7412:d1aa:b0:fc:a2b0:25d7 with SMTP id ba42csp242862rdb; Mon, 29 Jan 2024 00:09:31 -0800 (PST) X-Google-Smtp-Source: AGHT+IEw9aNgLiffefeQtdWVWbxY2C6GQM8Rj3T08PT9Ysb3IhlPJRDTtyqQckjnyqyc7vrDCgrH X-Received: by 2002:a17:906:2b47:b0:a35:7b14:dc50 with SMTP id b7-20020a1709062b4700b00a357b14dc50mr2414428ejg.17.1706515771663; Mon, 29 Jan 2024 00:09:31 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706515771; cv=pass; d=google.com; s=arc-20160816; b=wLamyodNk2gCSmgio1Pv0v7nFxUdKZPEQ0DzlBG/sil9zUfquF8N/DKZmdSzx3LUid D+Q2u1eKpSN08zX+9F1LJIYmRUaHEWopeQ9fSV1d/zJ3p+rVJiGk1t686e6RqfnPAiaI HGKbPTRGU0+LpsbIeyO3nynWCVSkrJqCZDyog7ocLfBuNrWGAUU4xvap1c7kQx/HkYEE 6yIDanHP51MAEO5A3nSWAHaIBLnEwJC5x+IZWL27HAcwAH84DIHdCJ2Pvw3jy7o2R84d 78VSykHp8C0I3XTVQrtktRrCLkf759vWyeM7q6lpgit3W5p9qGP2ckVPHKRaT3WjRyQq hiVg== 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-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-42331-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=paragon-software.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id mc15-20020a170906eb4f00b00a35cb30b546si502183ejb.936.2024.01.29.00.09.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Jan 2024 00:09:31 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-42331-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; 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-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-42331-linux.lists.archive=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 am.mirrors.kernel.org (Postfix) with ESMTPS id 697DE1F21EBE for ; Mon, 29 Jan 2024 08:09:31 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5B587537E8; Mon, 29 Jan 2024 08:09:21 +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: List-Subscribe: List-Unsubscribe: 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 To: CC: , References: In-Reply-To: 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) Reported-by: Robert Morris Signed-off-by: Konstantin Komarov ---  fs/ntfs3/record.c | 2 +-  1 file changed, 1 insertion(+), 1 deletion(-) 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;          t32 = sizeof(short) * attr->name_len; -- 2.34.1