From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-lj1-f176.google.com (mail-lj1-f176.google.com [209.85.208.176]) by mx.groups.io with SMTP id smtpd.web08.50363.1658295382256901632 for ; Tue, 19 Jul 2022 22:36:22 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20210112 header.b=Uq39cA/6; spf=pass (domain: gmail.com, ip: 209.85.208.176, mailfrom: savvamtr@gmail.com) Received: by mail-lj1-f176.google.com with SMTP id m9so17224755ljp.9 for ; Tue, 19 Jul 2022 22:36:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=w5n3UDFtE6tO7TqBqFcaKw1BmZrMnLjcdoQmp7O7et4=; b=Uq39cA/6oGo7nl8PeVdBXn4Uqsbnwfa+7lHft8W8zhaKCng7q4mO5N+D0VIBQL+CLX jrxqbWLeDJRYARrtqDy/ik4NJ12pTJUb4f8oWc5zigONRZ6FFu6HVqfRt+N7m/9K9FuR cJBrPiIReKbECw1y7gmQuuTXRdZOg6lk4vHW1rOfLbp7umPVG1nOjnMcjm2Qm53d0KVf lHkdxRmVxQMC9/ElTj06RHb8vfWbCFS/Ry923slxupzNLHC9X3U2U1wVLNvke9ATT/RC GCUlMca7xqqz04bCgVQ5ymGMdMLt0urziPnwNg708Eb/MYZz/d4WTtB1JN8Zpc19Hv1C 1mTw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=w5n3UDFtE6tO7TqBqFcaKw1BmZrMnLjcdoQmp7O7et4=; b=QQhdaGiQMziVnD4MXlzDLyK4loQQ5FV00uSusFYdbGFB5y97WlpPhqXmh++dmHxi// PyEmpjzUC0xmK0IG6rpLw8y0XgvnPVOOFCCIo3SD0Oetcaa4cilA8BRzNqGoisq1lH9a UuSgGg4GNlnO2+mF12nnyhKBwcLlgsCxoAznW1ENhGvr9Tjc2xFQsHdzlUJ+TIwUdB2F YUXHXMorSx4NMhjK6tB2ITjph+CktLTOb0opjYfb68bcwmwaXrAnnBaCURu2uK5nZGqg G1LWeO8eYK9PykcAsThnLDVN933tlKfSEo8op6ujxcoL9z+as2vp2qMfuJdLAPzwx7MH VIXw== X-Gm-Message-State: AJIora8IwDqGUEU6NdMtSpXGr2/oYPwH0hcsZsWizji9flxDW67KecNi S73nVG2va6hPLkRQG+2JUn4BK7OK3QumR1CmpsQ= X-Google-Smtp-Source: AGRyM1sKEvP5tLL6QGy4dVghzfiR5dy+v1yQ+CCTrXNCvg6H2dB8Rtf55Rx8ntnd88i2WDyQwxZ9YA== X-Received: by 2002:a2e:a814:0:b0:25d:915d:35be with SMTP id l20-20020a2ea814000000b0025d915d35bemr15027246ljq.256.1658295380269; Tue, 19 Jul 2022 22:36:20 -0700 (PDT) Return-Path: Received: from localhost.localdomain ([207.180.219.167]) by smtp.gmail.com with ESMTPSA id 13-20020a05651c128d00b0025d39993856sm2995023ljc.127.2022.07.19.22.36.18 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 19 Jul 2022 22:36:19 -0700 (PDT) From: "Savva Mitrofanov" To: devel@edk2.groups.io Cc: =?UTF-8?q?Marvin=20H=C3=A4user?= , Pedro Falcato , Vitaly Cheptsov Subject: [edk2-platforms][PATCH v2 0/1] Ext4Pkg: Code correctness and security improvements Date: Wed, 20 Jul 2022 11:36:05 +0600 Message-Id: <20220720053606.38975-1-savvamtr@gmail.com> X-Mailer: git-send-email 2.37.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Hi all, This is second version of patch in which I squashed commits into one. Here attempts to improve security of code sections by fixing integer overflows, missing aligment checks, unsafe casts. Also I simplified some routines, fixed compiler warnings and corrected some code mistakes. REF: https://github.com/savvamitrofanov/edk2-platforms/commits/ext4pkg_security_improvements Cc: Marvin Häuser Cc: Pedro Falcato Cc: Vitaly Cheptsov Savva Mitrofanov (1): Ext4Pkg: Code correctness and security improvements Features/Ext4Pkg/Ext4Dxe/Ext4Disk.h | 3 +- Features/Ext4Pkg/Ext4Dxe/Ext4Dxe.h | 2 +- Features/Ext4Pkg/Ext4Dxe/BlockMap.c | 18 ++++++++---- Features/Ext4Pkg/Ext4Dxe/Directory.c | 29 ++------------------ Features/Ext4Pkg/Ext4Dxe/Ext4Dxe.c | 10 ++++--- Features/Ext4Pkg/Ext4Dxe/Extents.c | 5 ++-- Features/Ext4Pkg/Ext4Dxe/Inode.c | 8 +++--- Features/Ext4Pkg/Ext4Dxe/Superblock.c | 13 +++++---- 8 files changed, 38 insertions(+), 50 deletions(-) -- 2.37.0