This hotfix addresses the PDB security issue that is described in CVE-2018-1037, in which a PDB file may contain uninitialized heap content when it is modified by a process that updates an existing PDB file, such as Mspdbsrv.exe.
Use PDBCopy tool to scan and update existing PDB files
The PDBCopy tool that is contained in this hotfix scans PDB files for the security issue that is described in CVE-2018-1037. It can also report the affected memory block and update any PDB file to remove improperly disclosed memory within the PDB file.
This tool is provided as an alternative to regenerating PDB files that have a hotfixed version of Visual Studio. It does not change the internal timestamps in the PDB files. This tool works for PDBs that are generated by using any version of Visual Studio.
Usage: PDBCOPY.exe <target.pdb> <backup.pdb> -CVE-2018-1037 {[verbose|autofix]}
Arguments
- target.pdb: The file name of the PDB file to update.
- backup.pdb: The name to use for a backup copy of the PDB file.
- -CVE-2018-1037: This switch causes the tool to report on whether the PDB file is affected by the issue, and optional arguments can report the affected memory block and update the existing PDB file in place to remove the disclosed memory. This switch is exclusive from other PDBCopy switches and takes two optional arguments:
- verbose: Dumps the memory block from the original PDB file that is removed by the switch.
- autofix: Updates and zero-fills the affected memory block in the PDB file.
Remarks
PDBCopy.exe updates target.pdb in-place. The tool requires a valid file name for a backup PDB. The backup PDB is created only when the target.pdb file requires updating. Please thoroughly test the fixed PDB before you delete the backup PDB.
Examples
-
pdbcopy.exe target.pdb backup.pdb -CVE-2018-1037
Reports whether target.pdb is affected by CVE 2018-1037.
-
pdbcopy.exe target.pdb backup.pdb -CVE-2018-1037 verbose
Reports whether target.pdb is affected by CVE 2018-1037 and, if so, displays the uninitialized memory that is written in target.pdb.
-
pdbcopy.exe target.pdb backup.pdb -CVE-2018-1037 autofix
Reports whether target.pdb is affected by CVE 2018-1037 and, if so, zero fills the uninitialized memory that is written in target.pdb.
-
pdbcopy.exe target.pdb backup.pdb -CVE-2018-1037 verbose autofix
Reports whether target.pdb is affected by CVE 2018-1037 and, if so, displays the uninitialized memory that is written in target.pdb and zero fills the uninitialized memory that is written in target.pdb.
-
pdbcopy.exe target.pdb backup.pdb -CVE-2018-1037 autofix verbose
Reports whether target.pdb is affected by CVE 2018-1037 and, if so, displays the uninitialized memory that is written in target.pdb and zero fills the uninitialized memory that is written in target.pdb.