From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-lf1-f45.google.com (mail-lf1-f45.google.com [209.85.167.45]) by mx.groups.io with SMTP id smtpd.web10.98476.1674811789308068301 for ; Fri, 27 Jan 2023 01:29:49 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20210112 header.b=kRfkVGdj; spf=pass (domain: gmail.com, ip: 209.85.167.45, mailfrom: savvamtr@gmail.com) Received: by mail-lf1-f45.google.com with SMTP id b3so7264186lfv.2 for ; Fri, 27 Jan 2023 01:29:49 -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=C62GBa9whleeg01UALDDRhIAoxTCP8ibXqNeI9UvPHg=; b=kRfkVGdj2qdtQiDoTX1OLwHdCzGic5peQFMu6O/cGcrcytwDXmq0SKrwwPyFQ90X3S nK93+cShIfuHJ+U3Sqda6nWX0IncIqLmAZUrbVmn6ow1b90lOn859ZHG7sb0Igudw6tT cQ15s0lFZOb6ck+F4ZMLWvFytGQy7jZjRsX8HmP1aXle8xyW42ywkj6NELAn5ESBtZV9 JKxqeCOGfMSrjdsVuhmkdW8uQ72dHNN2tbufzcekQwdJthTjxmjnxJXdprb+dglGD5fb mHRC+2DuEcrTE6Km4DIJEX14nQYULJQTcn070fqnjAP0RbW4d0I7LftG673xw7/jGTRC O+1g== 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=C62GBa9whleeg01UALDDRhIAoxTCP8ibXqNeI9UvPHg=; b=NybGb9YgxUpR5vqwksfq4UgIbJSBLEOc4788ARpb7c90BbL6jGMG1QssaBOwVYHC0I y1Z29CZs5i4jJohLvNsltOC6rWzp/MCsdl2kYXlksbzALmTky3S83fRa2Hdqhlbx8gBc pz6vEQExgfVhbhk7Ll0Asck8uh9HGQuRBxHY8lH7SiloE+rUZoNVSeOAsywwt+9JHXq2 kAhbqGTcHzhoL6JObQfpdpiRRlHuicH3XlZfqYoyAwC06GThGVOTsyqaHRmDT5LdJyyq QmsJiJRfL+tDRGoZGbTx6DfQKQNcG0izpUf7MpgULz7WHhUwVp84BtybjPZDKVKHpGCm 7dJg== X-Gm-Message-State: AFqh2kphH+6z+MXqif02jnCbx1O0Aa6gzCQEF7oradl+IZns9F+nz/aO 8T/6PJw/drQ2XZRggPfht8gQgZl4DknXwP4R X-Google-Smtp-Source: AMrXdXvYs4UjQvRb424sX8p2/GZN3ktFX14f4euP7o+SGmdNjfELMaw3gqWgc1WDM2eiv9q2Z6Pu7g== X-Received: by 2002:a05:6512:401b:b0:4d5:a68d:bce8 with SMTP id br27-20020a056512401b00b004d5a68dbce8mr9851136lfb.31.1674811787387; Fri, 27 Jan 2023 01:29:47 -0800 (PST) Return-Path: Received: from localhost.localdomain ([176.62.67.29]) by smtp.gmail.com with ESMTPSA id t11-20020a056512068b00b004cc8196a308sm229071lfe.98.2023.01.27.01.29.46 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 27 Jan 2023 01:29:47 -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 v3 00/11] Ext4Pkg: Code correctness and security improvements Date: Fri, 27 Jan 2023 15:29:34 +0600 Message-Id: <20230127092945.94389-1-savvamtr@gmail.com> X-Mailer: git-send-email 2.39.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Hi all, In v3 I rebased patches according upstream and removed already applied patches. Also in this revision I corrected 'Fixes' tag formatting, added corrections to Ext4GetUcs2DirentName to filter out directory entry names containing \0 as invalid and added a fix for building using MSVC. 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 (11): 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 Features/Ext4Pkg/Ext4Pkg.dsc | 2 +- Features/Ext4Pkg/Ext4Dxe/Ext4Disk.h | 13 ++++- Features/Ext4Pkg/Ext4Dxe/Ext4Dxe.h | 39 +++++++++++++++ Features/Ext4Pkg/Ext4Dxe/BlockGroup.c | 5 ++ Features/Ext4Pkg/Ext4Dxe/Directory.c | 52 ++++++++++++++------ Features/Ext4Pkg/Ext4Dxe/DiskUtil.c | 8 +-- Features/Ext4Pkg/Ext4Dxe/File.c | 23 ++++++--- Features/Ext4Pkg/Ext4Dxe/Inode.c | 6 +-- Features/Ext4Pkg/Ext4Dxe/Superblock.c | 16 ++++-- Features/Ext4Pkg/Ext4Dxe/Symlink.c | 12 ++--- 10 files changed, 134 insertions(+), 42 deletions(-) -- 2.39.0