From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796379563; b=tsJRYktN3E14cX26/RjSmrRAEq9q1SROTAZHeksSfyfXRwVvBPmLN29c/wr5lzsF6x0P VY7gHH9XF1f8entGRf/JHmV10c0rfJETRCaQlpuXz1aNQ1NtbVVY11vN+wuhdEQAx1FV9 FAAxDsfe2Lz/ULKLKaAkaflrtTH0clyL9g22KnB7Nru1SpiAEDvEmac0anwsrnMYnbtSj 7wZqqK2cGOBjxmmqEBPAfF7fwC7Jp92HlMgca6j1eidif/lISulWmcZzplCAAMDRgV/5G 1xeRSqfJj0tuvN58Z5GPC+Og9lar0OhAR/YDxMuSCj8R4w58IOLvJOFZQNw+cuiF4ew== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796379563; h=Received:DKIM-Signature:From:To:Cc:Subject:Date:Message-ID:X-Mailer: In-Reply-To:References:User-Agent:X-stable:X-Patchwork-Hint: MIME-Version:Content-Transfer-Encoding; bh=TjXeD0lBHqmraw5QqSwFOtY4a4Mj7WhCjSR412zGwG4=; b=jQXSn16pnXpgxR0egkpwy3ugENLPU2ZI/zdEHqRZjYss3By9eAPg+zemKUX/A3RsN3FH CqaIxt72Vik6a1z/6LEQTxtSdom/tpo+mgA19g2mrwGbSuJwzBB9rPZX6ukJ/XuRM32i0 wVwIt8sATLzbNEVPQ+BLaqRnqCt0gjgK0/mXSY8UPnF6U6hJTJYbQfMEkirIG/oU/7z92 1vdRrz7ko2OMCnbq3uGLK8ykNOjptMlEdDRC/IHguUgChxSZUCw3SoSSHti+WYyGty3NO FEswIjpEoJsO3pTNHn6/WjmoBlvC6xYUokU0jOkWpqYyfYjWCOzD2tqzSePPBiNiMTg== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=bXPmdgMN; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 47631606A322; Fri, 4 Dec 2026 10:19:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=bXPmdgMN Received: by smtp.kernel.org (Postfix) with ESMTPSA id B22DD1F000C2; Fri, 4 Dec 2026 10:19:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1796379563; bh=TjXeD0lBHqmraw5QqSwFOtY4a4Mj7WhCjSR412zGwG4=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=bXPmdgMN1eAAGydAFT9Uc2T0pSokYXF3J63oH2GuiMs2uxrALcVWU0tW8W3WLfb0e 9CY3mY/RK6G+LN6VCEcSUBPPmYfS1iwT69pYXOebN+GKhGBsD9+pCrXD/PDCVdaeSz E7k6EUAGPSiEbJ7fnROA7vXoVE7hAzqJZ/IC+1uQ= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Jan Kara , Sasha Levin Subject: [PATCH 6.1 0016/1059] udf: validate VAT inode size for old VAT format Date: Fri, 4 Dec 2026 18:52:27 +0900 Message-ID: <20261204100644.446825670@linuxfoundation.org> X-Mailer: git-send-email 2.56.1 In-Reply-To: <20261204100643.980430235@linuxfoundation.org> References: <20261204100643.980430235@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore X-Mailing-List: patches@lists.linux.dev List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.1-stable review patch. If anyone has any objections, please let me know. ------------------ From: Jan Kara [ Upstream commit 5163e6ee1ea744d412fe516235bfd9cab15141dc ] Validate VAT inode is large enough to contain at least the header for pre-2.00 UDF media format. Signed-off-by: Jan Kara Signed-off-by: Sasha Levin --- fs/udf/super.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/fs/udf/super.c b/fs/udf/super.c index f924a814874b3..7dfa6f97e146d 100644 --- a/fs/udf/super.c +++ b/fs/udf/super.c @@ -1216,6 +1216,11 @@ static int udf_load_vat(struct super_block *sb, int p_index, int type1_index) if (map->s_partition_type == UDF_VIRTUAL_MAP15) { map->s_type_specific.s_virtual.s_start_offset = 0; + if (sbi->s_vat_inode->i_size < 36) { + udf_err(sb, "Too short VAT inode size %lld\n", + sbi->s_vat_inode->i_size); + return -EFSCORRUPTED; + } map->s_type_specific.s_virtual.s_num_entries = (sbi->s_vat_inode->i_size - 36) >> 2; } else if (map->s_partition_type == UDF_VIRTUAL_MAP20) { -- 2.53.0