From nobody Mon Nov 29 17:56:51 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id D7FFD18B987B; Mon, 29 Nov 2021 17:56:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4J2tMl46LZz4fLh; Mon, 29 Nov 2021 17:56:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6E05426BE9; Mon, 29 Nov 2021 17:56:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1ATHupZj040841; Mon, 29 Nov 2021 17:56:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1ATHupaV040840; Mon, 29 Nov 2021 17:56:51 GMT (envelope-from git) Date: Mon, 29 Nov 2021 17:56:51 GMT Message-Id: <202111291756.1ATHupaV040840@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Neel Chauhan Subject: git: 5c50e93e6ce4 - stable/13 - ext2fs: check for eh_depth in ext4_ext_check_header() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: nc X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 5c50e93e6ce43e8558e043de0745bad889c3a77f Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638208611; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=u+nuTnlVzRxKj368N1s+ThPT3VKouCtEmZyKhok4m64=; b=cL+7eUqsixTo9S0PaltAeS8YHjM3MM2KPejAXDLdNm7rmVEYfHmfhWjK4zjFLNk5XrEoYk Xfd2UwhCqAXv338IQVfaQpFtMx1IXeR2onBrvFe3bIErBy7gumeHoJ01Htd3+NIRn/b6lg J/IBCzJ+if4dbJ/O7vBT19k0Rkgye7B7Ot42yj5yBb/87yikIAEb/3jEMzRLdTwz94t9z0 Tbed3yIzNm1xeNR0Rp2e11ZWeprfIotFjoqA9L+GH3ht5nQRGSeaXk0Dnn+gB3C8DzqTkj W9UvGGfnwFDkQw5+im2zQ10gqYPw3Gptf77LHsCLpzhKg9htWZzqwf5mqoM39w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638208611; a=rsa-sha256; cv=none; b=diyDJ1AeBtwwa+Mb8NZzno67VD3Waesrhw4RD/ifiOP6Ni2PBj2i5T2WrChpnVK02Y3DCK 5d97sXNQ4nXgnDut0maRhuGOvf9jCOJWL8q2+matHXmvWgtBu1uAQbjVOqzO3gWruphceI gS7VHvZFYufhqr5EJW2s+l1VOf3j2OxexsyKm9ys1bzv8rAsu6yjplJpXNBXqGxOhOSwy9 NNE9YbGcw63zPceJUNKX9Ovqm3BQnGAW5aeNGvnxmAwsQ/V+itaSLHxmxP9+yfDTwTPBLW U0tkzYxIjSXCZKc2Vzm80LO2LuKDZa8BpedUOHxwPlYGC2CeFl5qUgcD4/RbNg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by nc (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=5c50e93e6ce43e8558e043de0745bad889c3a77f commit 5c50e93e6ce43e8558e043de0745bad889c3a77f Author: Neel Chauhan AuthorDate: 2021-11-17 00:25:04 +0000 Commit: Neel Chauhan CommitDate: 2021-11-29 17:56:42 +0000 ext2fs: check for eh_depth in ext4_ext_check_header() PR: 259112 Reported by: Robert Morris Reviewed by: fsu (src) Differential Revision: https://reviews.freebsd.org/D33030 (cherry picked from commit be60d8f276fa20fc11ad814e54c9c2540f79c7da) --- sys/fs/ext2fs/ext2_extents.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/fs/ext2fs/ext2_extents.c b/sys/fs/ext2fs/ext2_extents.c index 1a5dca66dd76..b33ff9fa8a1a 100644 --- a/sys/fs/ext2fs/ext2_extents.c +++ b/sys/fs/ext2fs/ext2_extents.c @@ -251,6 +251,10 @@ ext4_ext_check_header(struct inode *ip, struct ext4_extent_header *eh) error_msg = "header: invalid eh_entries"; goto corrupted; } + if (eh->eh_depth > 5) { + error_msg = "header: invalid eh_depth"; + goto corrupted; + } return (0);