audk/MdeModulePkg/Universal
Paulo Alcantara 11b4463e09 MdeModulePkg/UdfDxe: Fix NULL pointer dereference
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=704

For root directory, the FID (File Identifier Descriptor) pointer is
accessible through PRIVATE_UDF_FILE_DATA.Root, whereas non-root
directory and regular files, their FIDs are accessible through
PRIVATE_UDF_FILE_DATA.File.

In UdfSetPosition(), the FID was retrieved through
PRIVATE_UDF_FILE_DATA.File, hence when calling it with a root directory,
PRIVATE_UDF_FILE_DATA.File.FileIdentifierDescriptor would be NULL and
then dereferenced.

This patch fixes the NULL pointer dereference by calling _FILE() to
transparently return the correct UDF_FILE_INFO * which points to a valid
FID descriptor of a specific file.

Cc: Star Zeng <star.zeng@intel.com>
Cc: Eric Dong <eric.dong@intel.com>
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Cc: Steven Shi <steven.shi@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Reported-by: Steven Shi <steven.shi@intel.com>
Signed-off-by: Paulo Alcantara <pcacjr@zytor.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
2017-09-15 09:38:05 +08:00
..
Acpi MdeModulePkg FirmwarePerfPei: Remove SEC performance data getting code 2017-08-01 17:49:22 +08:00
BdsDxe MdeModulePkg/BdsDxe: Report Status Code when booting from BootOrder list 2017-06-27 10:25:05 +08:00
BootManagerPolicyDxe MdeModulePkg: Convert all .uni files to utf-8 2015-12-15 04:56:23 +00:00
CapsulePei MdeModulePkg: Error Level is not used correctly 2017-04-12 08:56:12 +08:00
CapsuleRuntimeDxe MdeModulePkg: Error Level is not used correctly 2017-04-12 08:56:12 +08:00
Console MdeModulePkg: Update comments in SimpleTextInEx according to UEFI 2.7 2017-06-20 09:29:42 +08:00
DebugPortDxe MdeModulePkg: Refine type cast for pointer subtraction 2017-03-06 14:14:09 +08:00
DebugSupportDxe MdeModulePkg/DebugSupportDxe: Fix XCODE5 build failure 2017-05-24 16:44:21 -07:00
DevicePathDxe MdeModulePkg: Convert all .uni files to utf-8 2015-12-15 04:56:23 +00:00
Disk MdeModulePkg/UdfDxe: Fix NULL pointer dereference 2017-09-15 09:38:05 +08:00
DisplayEngineDxe MdeModulePkg/DisplayEngine: Add implementation of HiiPopup protocol 2017-08-23 10:37:14 +08:00
DriverHealthManagerDxe MdeModulePkg: Convert all .uni files to utf-8 2015-12-15 04:56:23 +00:00
DriverSampleDxe MdeModulePkg/DriverSample: Add sample case for popup protocol 2017-08-23 10:37:14 +08:00
EbcDxe MdeModulePkg: Refine casting expression result to bigger size 2017-03-06 14:33:20 +08:00
EsrtDxe MdeModulePkg/Esrt: Add ESRT_FW_TYPE_SYSTEMFIRMWARE check. 2016-11-08 22:37:03 +08:00
FaultTolerantWriteDxe MdeModulePkg: Refine casting expression result to bigger size 2017-03-06 14:33:20 +08:00
FaultTolerantWritePei MdeModulePkg: Convert all .uni files to utf-8 2015-12-15 04:56:23 +00:00
FileExplorerDxe MdeModulePkg FileExplorerDxe: Change file format which has mixed file format. 2015-12-16 03:22:39 +00:00
FvSimpleFileSystemDxe MdeModulePkg/FvSimpleFileSystem: fix assertions when FV is empty 2016-08-03 09:48:18 +08:00
HiiDatabaseDxe MdeModulePkg/HiiDB: Avoid incorrect results of multiplication 2017-04-18 15:56:22 +08:00
HiiResourcesSampleDxe MdeModulePkg: Convert all .uni files to utf-8 2015-12-15 04:56:23 +00:00
LegacyRegion2Dxe MdeModulePkg: Convert all .uni files to utf-8 2015-12-15 04:56:23 +00:00
LoadFileOnFv2 MdeModulePkg LoadFileOnFv2: Correct the parameter name in function comment 2016-10-25 11:53:59 +08:00
LockBox/SmmLockBox MdeModulePkg: Error Level is not used correctly 2017-04-12 08:56:12 +08:00
MemoryTest MdeModulePkg/Universal: Fix typos in comments 2016-10-27 09:11:19 +08:00
Metronome MdeModulePkg: Convert all .uni files to utf-8 2015-12-15 04:56:23 +00:00
MonotonicCounterRuntimeDxe MdeModulePkg: Minor comments update to GetNextHighMonotonicCount() 2016-01-29 09:26:49 +00:00
Network MdeModulePkg: Fix GCC build error. 2017-09-06 18:07:40 +08:00
PCD MdeModulePkg PCD: Fix TmpTokenSpaceBufferCount not assigned correctly 2017-05-19 11:32:11 +08:00
PcatSingleSegmentPciCfg2Pei MdeModulePkg: Convert all .uni files to utf-8 2015-12-15 04:56:23 +00:00
PlatformDriOverrideDxe MdeModulePkg: Error Level is not used correctly 2017-04-12 08:56:12 +08:00
PrintDxe MdeModulePkg/PrintDxe: Handle the deprecation of [A|U]ValueToString 2017-03-02 09:59:06 +08:00
PropertiesTableAttributesDxe MdeModulePkg: Convert all .uni files to utf-8 2015-12-15 04:56:23 +00:00
RegularExpressionDxe MdeModulePkg: Delete useless case code 2017-08-16 16:55:22 +08:00
ReportStatusCodeRouter MdeModulePkg: Convert all .uni files to utf-8 2015-12-15 04:56:23 +00:00
ResetSystemRuntimeDxe MdeModulePkg ResetSystem: Update the comments of ResetSystem() 2017-07-03 17:53:12 +08:00
SectionExtractionDxe MdeModulePkg: Convert all .uni files to utf-8 2015-12-15 04:56:23 +00:00
SectionExtractionPei MdeModulePkg: Convert all .uni files to utf-8 2015-12-15 04:56:23 +00:00
SecurityStubDxe MdeModulePkg/SecurityStubDxe: Report failure if image is load earlier 2016-11-10 15:58:00 +08:00
SerialDxe MdeModulePkg SerialDxe: Process timeout consistently in SerialRead 2017-08-08 14:16:28 +08:00
SetupBrowserDxe MdeModulePkg/SetupBrowser: Record the reset status in all SendForm 2017-07-27 10:47:11 +08:00
SmbiosDxe MdeModulePkg: Refine casting expression result to bigger size 2017-03-06 14:33:20 +08:00
SmbiosMeasurementDxe MdeModulePkg SmbiosMeasurementDxe: Add NominalSpeed in Type 27 to black list 2016-09-02 10:16:39 +08:00
SmmCommunicationBufferDxe MdeModulePkg: Add new driver to publish EDKII_PI_SMM_COMMUNICATION_REGION_TABLE. 2016-04-29 12:49:09 +08:00
StatusCodeHandler MdeModulePkg/MemoryStatusCode: Expose the DXE memory status code table. 2016-06-29 09:46:51 +08:00
TimestampDxe MdeModulePkg: Convert all .uni files to utf-8 2015-12-15 04:56:23 +00:00
Variable MdeModulePkg: Variable: Fix typo in variable measure 2017-08-09 22:42:29 +08:00
WatchdogTimerDxe MdeModulePkg/Universal: Fix typos in comments 2016-10-27 09:11:19 +08:00