From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-lf1-f53.google.com (mail-lf1-f53.google.com [209.85.167.53]) by mx.groups.io with SMTP id smtpd.web11.5559.1670602275517869580 for ; Fri, 09 Dec 2022 08:11:15 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20210112 header.b=J3VNA2X3; spf=pass (domain: gmail.com, ip: 209.85.167.53, mailfrom: savvamtr@gmail.com) Received: by mail-lf1-f53.google.com with SMTP id c1so7767151lfi.7 for ; Fri, 09 Dec 2022 08:11:15 -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=y49PJIJJBG7bOryyGJ+TQjy3tCpAXzpL0k2hP401IMw=; b=J3VNA2X3CagL0lgjp5zW2x1+rdEgWx54AJKvviRO4Pikc28mUfWxcLyuASw8Q/mf6c siNg+OquBm/SnrYBRwi8FQ6PrFx2X9R27XDNVDl36nTVVv8SElJDtOJJI8a/w4rFS6mg RpPUcTgSS4qSoA+N5io3yqzAO0jdrDQeayOdmbDgtvhpIHFuk8ZpstKgKRTW/0TAHIsh GE3tqRypxTlhdIwbgqKy4M0VjKu0+B5DP/KDO76Gi6q+FvmspY9alxVMtUFx+naDO0Uq B8/0BB0unRSAUvjJgjyEon7Tt0MLI+o8Qi2fNy/oHlUO4tnG69hDJKjC54hE851L/sG8 ZWIg== 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=y49PJIJJBG7bOryyGJ+TQjy3tCpAXzpL0k2hP401IMw=; b=VwybjUzRmQxI+2nZ86agARF4ypMQ2/LhqckiTeFGabYNcdHhS6kciFLr11OMbonf37 qf5O/2bu1IHfc1PbWhY/lxDx9ZQtufCEECucn0lnhXAcsnrNz/nDO8bpGMpgIbNjm+ht eiWGVbCMQQAEnFZYgmy/8hvafRrjFplyIbr+ngW4NCA2lew0OazyOBuIzqPyOBCMWDji F8xf/3kMMXw8NJf8PP6DGbNGCZUM3spWlQBnAnjKqrhib8xyKWjvSaBQGh+s9Pt+jEs8 SHpncvFwVBBM78vjA1cN9RWLLF3a6pzXwA4uU9Sx17T6r2Mcp6Rgu9S3S3rUn7sKP1EH vmIw== X-Gm-Message-State: ANoB5pkE+z/oBqQ+if7r6/ZJAeJDB4KN/iOubrlDkanYWWCZDKXMRqIw UNXPtOkbNuU7Rb3poywDLIvPERcxvSL8KkLhk78= X-Google-Smtp-Source: AA0mqf4cJamU5FXdZJrMU69SEUXNdCacO5LGb0pd57jT02F0yyTY3jbOiHhejWsoff0V2vkAFNaxLg== X-Received: by 2002:a05:6512:742:b0:4b5:3e6e:385d with SMTP id c2-20020a056512074200b004b53e6e385dmr1657900lfs.3.1670602273266; Fri, 09 Dec 2022 08:11:13 -0800 (PST) Return-Path: Received: from localhost.localdomain ([109.194.121.139]) by smtp.gmail.com with ESMTPSA id v5-20020a05651203a500b00492c663bba2sm318430lfp.124.2022.12.09.08.11.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Dec 2022 08:11:12 -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 v1 00/12] Ext4Pkg: Code correctness and security improvements Date: Fri, 9 Dec 2022 22:10:52 +0600 Message-Id: <20221209161104.70220-1-savvamtr@gmail.com> X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Hi all, 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: Move EXT4_NAME_MAX definition to Ext4Disk.h Ext4Pkg: Fix global buffer overflow in Ext4ReadDir Ext4Pkg: Fix incorrect checksum metadata feature check Ext4Pkg: Fix division by zero by adding check for s_inodes_per_group Ext4Pkg: Add comparison between Position and FileSize in Ext4SetPosition Ext4Pkg: Add inode number validity check Ext4Pkg: Fix shift out of bounds in Ext4OpenSuperblock Ext4Pkg: Correct integer overflow check on multiplication 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 Features/Ext4Pkg/Ext4Pkg.dsc | 2 +- Features/Ext4Pkg/Ext4Dxe/Ext4Disk.h | 17 +++++- Features/Ext4Pkg/Ext4Dxe/Ext4Dxe.h | 59 ++++++++++++++++---- Features/Ext4Pkg/Ext4Dxe/BlockGroup.c | 5 ++ Features/Ext4Pkg/Ext4Dxe/Directory.c | 51 ++++++++++------- Features/Ext4Pkg/Ext4Dxe/DiskUtil.c | 8 +-- Features/Ext4Pkg/Ext4Dxe/File.c | 44 ++++++++++----- Features/Ext4Pkg/Ext4Dxe/Inode.c | 2 +- Features/Ext4Pkg/Ext4Dxe/Superblock.c | 16 ++++-- 9 files changed, 147 insertions(+), 57 deletions(-) -- 2.38.1