From nobody Mon Nov 29 17:57:19 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 3864718B9AD5; Mon, 29 Nov 2021 17:57:20 +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 4J2tNH6Zxcz4fYR; Mon, 29 Nov 2021 17:57:19 +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 C158F26D41; Mon, 29 Nov 2021 17:57:19 +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 1ATHvJgX040993; Mon, 29 Nov 2021 17:57:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1ATHvJDk040992; Mon, 29 Nov 2021 17:57:19 GMT (envelope-from git) Date: Mon, 29 Nov 2021 17:57:19 GMT Message-Id: <202111291757.1ATHvJDk040992@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: 8facf7082d49 - stable/12 - 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/12 X-Git-Reftype: branch X-Git-Commit: 8facf7082d4973aedc30cdd8e90fbd33beb17d7f Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638208640; 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=vvNofMRg5rp+EaDlaYbkRzu9W2Ikqsvut59+CWUXWe4=; b=sZtYdvYA7NcbsimtomtnqyYgbd7gxHqgKdyN8hk931PEuqmA7jjReAJUNEkU1fRU3BDyjv 6ul+8XhT6BcHjDncvqxUyHHTX9YpeVUjPbHxPl3BaiUvc/1hdhsvUDX8moggMkiZj4Q73x g+shrz6EAnQfDFMWK/6xpm5kvVPu9DXAWH7BZ+izzoPvHfGS2lOFOivQVMJWsJS43EmqGm 1OfZf99EqQTLf0XLp8xI6ARGD+bpb+3O45tPGS2CnP48gUJl6XzcmGqjVTHjiQtNCat3gM zQ1p5O5fsmA0MCmCvfkH7CUasA6VtFO2RMIniA0SrL4noo5kEdMvrHJc9mhIAQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638208640; a=rsa-sha256; cv=none; b=Mf2upW302/JFzxMghyWaSID5TbkVrObIpj8By/GFu2foGM/shXXJLlt3G7rXsaPBJ/yP+E VXb0+HWwL1MFSe35P6Vnta6xT6z9KgzQsf7JtQLweFXUi+cEoxan0gg+VQ3tPeme4Ho3yf +DalZurCBlCno7hol/XfBuwPR5g5wJVb7SEWx0/d54JmG5gi4fGceDz3LUaZFjGOAyp8jV GPaQH8BKhQzV8HSCapQR9pqlh+5KELbBO0BE5p0AxvfST6RCKpsn0wYSfnEtr4o+bQd3u1 DIaWDUlsnU2sXpcd2vTXT+dyGlxEcCnAMk5u3ZLRYIFAOKPaRVBH1i7jLIArzQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by nc (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=8facf7082d4973aedc30cdd8e90fbd33beb17d7f commit 8facf7082d4973aedc30cdd8e90fbd33beb17d7f Author: Neel Chauhan AuthorDate: 2021-11-17 00:25:04 +0000 Commit: Neel Chauhan CommitDate: 2021-11-29 17:57:12 +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 61c751e9af5e..ba95b8a6f3ae 100644 --- a/sys/fs/ext2fs/ext2_extents.c +++ b/sys/fs/ext2fs/ext2_extents.c @@ -250,6 +250,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);