From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-ej1-f46.google.com (mail-ej1-f46.google.com [209.85.218.46]) by mx.groups.io with SMTP id smtpd.web10.11486.1675333298547339476 for ; Thu, 02 Feb 2023 02:21:38 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20210112 header.b=qak8jBjb; spf=pass (domain: gmail.com, ip: 209.85.218.46, mailfrom: savvamtr@gmail.com) Received: by mail-ej1-f46.google.com with SMTP id me3so4537189ejb.7 for ; Thu, 02 Feb 2023 02:21:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=0Ql4IQAb+hgWRth4upczBdSa9rMidZEgvZuGwaWiFiM=; b=qak8jBjbYkq44ifTju5vDfgd0qXyZTGhOv+TvIaNxv9+cNaaoe/256k5NN4SDr03pc C8baKr5r7mLIcB2h8FaGBbFwYUVWTpepFniHlD3/8DxKyfs3nody9UNIYJU8SbBRGgYn Hp50RFpZBq4YunI5m+WqFxKxkLP7ixchqhZ9B3+KSHLyDhAH1y+6wwc3qEbleXf8mky7 /HE304EDsGHl+G+NQE6o6vtV1DbwM1TYKI85zFEkDRDk9SH3ksANnJpKzfGdKZjHrMFT WJLEeFarMafLVhSzL+yk2btpesNldfndqy/l23nNo+8X6ydaWMAod9zOEal/rvKOqZPl lCvg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=0Ql4IQAb+hgWRth4upczBdSa9rMidZEgvZuGwaWiFiM=; b=cLI7Wsb4cELIK0N/dZuiY53WC4sNzHd8/Ea62N4T4K/xTvWfgxThVHF+3fCwZ7fY9Z a0UVqpPvkt3LmznZdRnstzw2iAsBCd31V/4BYMNVLVsGoFaWqKgIkqCQ0jqiQvtevmTc aUD8ZDvNkd7hfccn49SlArV06r3SoV4NtCcSFJRxahlX4AGUfgp8bynDGOKBAtUM2DKV tZFjDHdm4LWr4BOE110InaP0Iac0+or+Q7AkvOc/UTV9NRcjr01QmnuDfgsNzoPLDZlu Of2clVT47DLzqWIaVuw0kW7uL4kVbjP+vigedt9Jp/aWEDbKRhzw17DqVx4rCTjrLKBQ wYMw== X-Gm-Message-State: AO0yUKXuXppZ/P/edMwoT1WgtpNXJ9yAqt5E6yVU4wEPcx1L8hE5Dh0a xbuj/bMIlsynnIFryTWcwp6SqFJrO3lRNw== X-Google-Smtp-Source: AK7set9NXj36HFupSPVev7UeMuy9gF8rcuApLSqZSFhj4k60CmPE2xltAWEru0AO5iMgigRC4Hij3A== X-Received: by 2002:a17:907:2bc2:b0:866:6b08:946b with SMTP id gv2-20020a1709072bc200b008666b08946bmr5427880ejc.39.1675333296828; Thu, 02 Feb 2023 02:21:36 -0800 (PST) Return-Path: Received: from localhost.localdomain ([176.62.67.29]) by smtp.gmail.com with ESMTPSA id ci22-20020a170906c35600b0087bcda2b07bsm10013121ejb.202.2023.02.02.02.21.35 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 02 Feb 2023 02:21:36 -0800 (PST) From: "Savva Mitrofanov" To: devel@edk2.groups.io Cc: =?UTF-8?q?Marvin=20H=C3=A4user?= , Pedro Falcato , Vitaly Cheptsov Subject: [edk2-platforms][PATCH v4 00/12] Ext4Pkg: Code correctness and security improvements Date: Thu, 2 Feb 2023 16:21:21 +0600 Message-Id: <20230202102133.51606-1-savvamtr@gmail.com> X-Mailer: git-send-email 2.39.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Hi all, In v4 I rebased patches according upstream. Also in this revision I corrected all remarks and comments from v3. This patchset fixes several code problems found by fuzzing Ext4Dxe like buffer and integer overflows, memory leaks, logic bugs and so on. REF: https://github.com/savvamitrofanov/edk2-platforms/tree/master Cc: Marvin Häuser Cc: Pedro Falcato Cc: Vitaly Cheptsov Savva Mitrofanov (12): Ext4Pkg: Fix memory leak in Ext4RetrieveDirent Ext4Pkg: Fix incorrect checksum metadata feature check Ext4Pkg: Fix division by zero by adding check for s_inodes_per_group Ext4Pkg: Add inode number validity check Ext4Pkg: Fix shift out of bounds in Ext4OpenSuperblock Ext4Pkg: Corrects integer overflow check logic in DiskUtil Ext4Pkg: Check that source file is directory in Ext4OpenInternal Ext4Pkg: Check VolumeName allocation correctness in Ext4GetVolumeName Ext4Pkg: Add missing exit Status in Ext4OpenDirent Ext4Pkg: Fixes build on MSVC Ext4Pkg: Filter out directory entry names containing \0 as invalid Ext4Pkg: Corrects memory leak in Ext4ReadSlowSymlink Features/Ext4Pkg/Ext4Pkg.dsc | 2 +- Features/Ext4Pkg/Ext4Dxe/Ext4Disk.h | 13 +++++- Features/Ext4Pkg/Ext4Dxe/Ext4Dxe.h | 26 ++++++++++++ Features/Ext4Pkg/Ext4Dxe/BlockGroup.c | 5 +++ Features/Ext4Pkg/Ext4Dxe/Directory.c | 42 ++++++++++++-------- Features/Ext4Pkg/Ext4Dxe/DiskUtil.c | 18 +++++++-- Features/Ext4Pkg/Ext4Dxe/Extents.c | 15 +++++-- Features/Ext4Pkg/Ext4Dxe/File.c | 23 ++++++++--- Features/Ext4Pkg/Ext4Dxe/Inode.c | 6 +-- Features/Ext4Pkg/Ext4Dxe/Superblock.c | 16 ++++++-- Features/Ext4Pkg/Ext4Dxe/Symlink.c | 13 +++--- 11 files changed, 134 insertions(+), 45 deletions(-) -- 2.39.1