Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 88A4046D2D9; Tue, 21 Jul 2026 18:31:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784658711; cv=none; b=KRoe5XazuwsUrLd+k65Wey261evZyddGQVkYk7lDNDU+mPXBOW5n0MsRMwvnelfZhOx1vcw9JNNXQIrWkD1kQB9LJxDRLJTPw+JdClDGwbPDkNTVRz7Iv90PDkkqsd6bNOyoynvTTqx83+K2cVeSsgGku5SUhwxl9PK3OvBXIx8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784658711; c=relaxed/simple; bh=IYdP7uMLeNpfeqg+xrs7Sz9gQzmZ8mdWHXV0yqfNiOY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=bV1dI7kcF0GKd8Zk+jFdQhUojs/Gnf0FWUdHcsmjGYvaT1mVVT2Cj5owHC1MONHFbDcgANxftPwQ1/KvgNR/y1pmJlczsSG0u4zkB9DotGfZzGC0PinzQ/5hNb0UTpStnlCJ/EsfEoGdBMSrS3Q0bACdFr2jO9c8hDWUwnmweXQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=dTyKxmDK; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="dTyKxmDK" Received: by smtp.kernel.org (Postfix) with ESMTPSA id E99C71F000E9; Tue, 21 Jul 2026 18:31:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1784658710; bh=tYb3tOOoEVzlhr4wYz1bFa5+JeVRRkiqM9GZWft54do=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=dTyKxmDK6RsTDj6lP9PqKKFWum5UkQIwql6RXEAr2RzC0XXwbec2vMGn9mtogeGeJ kEjnZM1wSNITU/9vGVv2cAyod1CHITvmicFXRj1jFf59Kdw+9QjeZLTNxQxb11bncD 5k7S/NhDYPVIFTQiTpaIqINvlMxIxtHoLEbG7H0g= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, syzbot+39b2fb0f2638669008ec@syzkaller.appspotmail.com, Tristan Madani , Konstantin Komarov Subject: [PATCH 6.18 1244/1611] ntfs3: fix out-of-bounds read in decompress_lznt Date: Tue, 21 Jul 2026 17:22:40 +0200 Message-ID: <20260721152543.423918860@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260721152514.750365251@linuxfoundation.org> References: <20260721152514.750365251@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.18-stable review patch. If anyone has any objections, please let me know. ------------------ From: Tristan Madani commit 7160a57192fb16d7a6fa9b7f5c7ac341d2444a89 upstream. decompress_lznt() does not validate array index bounds before accessing the decompression table. A corrupted NTFS3 image with invalid compressed data can trigger an out-of-bounds read. Add index bounds checking to prevent the OOB access. Reported-by: syzbot+39b2fb0f2638669008ec@syzkaller.appspotmail.com Cc: stable@vger.kernel.org Signed-off-by: Tristan Madani Signed-off-by: Konstantin Komarov Signed-off-by: Greg Kroah-Hartman --- fs/ntfs3/lznt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/fs/ntfs3/lznt.c +++ b/fs/ntfs3/lznt.c @@ -240,7 +240,7 @@ static inline ssize_t decompress_chunk(u if (up - unc > LZNT_CHUNK_SIZE) return -EINVAL; /* Correct index */ - while (unc + s_max_off[index] < up) + while (index < ARRAY_SIZE(s_max_off) - 1 && unc + s_max_off[index] < up) index += 1; /* Check the current flag for zero. */