Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash when parsing Windows ISOs when using the _x86 version of Rufus #2272

Closed
Tarq2 opened this issue Jul 1, 2023 · 23 comments
Closed

Crash when parsing Windows ISOs when using the _x86 version of Rufus #2272

Tarq2 opened this issue Jul 1, 2023 · 23 comments
Assignees
Milestone

Comments

@Tarq2
Copy link

Tarq2 commented Jul 1, 2023

When trying to burn, the program disappears and does not complete the process rufus-4.1_x86

@pbatard
Copy link
Owner

pbatard commented Jul 1, 2023

Install DebugView as was requested from the log that you decided to ignore and provide a log.

Yes, even if the application disappears or crashes, you will get a log from DebugView.

Unless you do provide a log withing 24 hours, I will simply close this issue as I don't have ANY details that allow me to even remotely start to help you.

@Tarq2
Copy link
Author

Tarq2 commented Jul 1, 2023

00000001	0.00000000	[6040] *** Rufus init *** 	
00000002	0.02006160	[6040] Binary executable is signed by 'Akeo Consulting' 	
00000003	0.02014110	[6040] Will use settings from registry 	
00000004	0.02033490	[6040] found locale 'en-US' 	
00000005	0.33745679	[6040] loc file not found in current directory - embedded one will be used 	
00000006	0.33948159	[6040] localization: extracted data to 'C:\Users\General\AppData\Local\Temp\Ruf3697.tmp' 	
00000007	0.35104409	[6040] localization: found locale 'en-US' 	
00000008	0.35222089	[6040] localization: found locale 'ar-SA' 	
00000009	0.35339370	[6040] localization: found locale 'bg-BG' 	
00000010	0.35461751	[6040] localization: found locale 'zh-CN' 	
00000011	0.35570291	[6040] localization: found locale 'zh-TW' 	
00000012	0.35678339	[6040] localization: found locale 'hr-HR' 	
00000013	0.35798761	[6040] localization: found locale 'cs-CZ' 	
00000014	0.35913670	[6040] localization: found locale 'da-DK' 	
00000015	0.36023301	[6040] localization: found locale 'nl-NL' 	
00000016	0.36133221	[6040] localization: found locale 'fi-FI' 	
00000017	0.36245680	[6040] localization: found locale 'fr-FR' 	
00000018	0.36358190	[6040] localization: found locale 'de-DE' 	
00000019	0.36466241	[6040] localization: found locale 'el-GR' 	
00000020	0.36589929	[6040] localization: found locale 'he-IL' 	
00000021	0.36705661	[6040] localization: found locale 'hu-HU' 	
00000022	0.36818099	[6040] localization: found locale 'id-ID' 	
00000023	0.36923391	[6040] localization: found locale 'it-IT' 	
00000024	0.37033239	[6040] localization: found locale 'ja-JP' 	
00000025	0.37149790	[6040] localization: found locale 'ko-KR' 	
00000026	0.37262800	[6040] localization: found locale 'lv-LV' 	
00000027	0.37373009	[6040] localization: found locale 'lt-LT' 	
00000028	0.39987439	[6040] localization: found locale 'ms-MY' 	
00000029	0.39996830	[6040] localization: found locale 'nb-NO' 	
00000030	0.40205511	[6040] localization: found locale 'fa-IR' 	
00000031	0.40323520	[6040] localization: found locale 'pl-PL' 	
00000032	0.40327829	[6040] localization: found locale 'pt-BR' 	
00000033	0.40539289	[6040] localization: found locale 'pt-PT' 	
00000034	0.40545440	[6040] localization: found locale 'ro-RO' 	
00000035	0.40649971	[6040] localization: found locale 'ru-RU' 	
00000036	0.40764371	[6040] localization: found locale 'sr-RS' 	
00000037	0.40869939	[6040] localization: found locale 'sk-SK' 	
00000038	0.40975010	[6040] localization: found locale 'sl-SI' 	
00000039	0.41079640	[6040] localization: found locale 'es-ES' 	
00000040	0.41182500	[6040] localization: found locale 'sv-SE' 	
00000041	0.41299921	[6040] localization: found locale 'th-TH' 	
00000042	0.41419080	[6040] localization: found locale 'tr-TR' 	
00000043	0.41522670	[6040] localization: found locale 'uk-UA' 	
00000044	0.41636759	[6040] localization: found locale 'vi-VN' 	
00000045	0.41779360	[6040] Note: UAC is active 	
00000046	0.45325300	[6040] localization: initializing default message table 	
00000047	0.68173772	[6040] Rufus x86 v4.1.2045 	
00000048	0.72253829	[6040] Windows version: Windows 10 Pro x86 (Build 19045.3086) 	
00000049	0.72313499	[6040] Syslinux versions: 4.07/2013-07-25, 6.04/pre1 	
00000050	0.72369617	[6040] Grub versions: 0.4.6a, 2.06 	
00000051	0.72423279	[6040] System locale ID: 0x0409 (en-US) 	
00000052	0.72475863	[6040] Will use default UI locale 0x0409 	
00000053	0.72475863	[6040] SetLGP: Successfully set NoDriveTypeAutorun policy to 0x0000009E 	
00000054	0.72475863	[6040] Localization set to 'en-US' 	
00000055	1.02710807	[6040] Found USB 2.0 device 'Generic- Multi-Card USB Device' (0BDA:0158) 	
00000056	1.03991055	[6040] Device eliminated because it appears to contain no media 	
00000057	1.04124045	[6040] Found USB 2.0 device 'KIOXIA TransMemory USB Device' (30DE:6544) 	
00000058	1.09633529	[6040] 1 device found 	
00000059	1.11416924	[6040] Disk type: Removable, Disk size: 16 GB, Sector size: 512 bytes 	
00000060	1.11530888	[6040] Cylinders: 1884, Tracks per cylinder: 255, Sectors per track: 63 	
00000061	1.11643004	[6040] Partition type: MBR, NB Partitions: 2 	
00000062	1.11751521	[6040] Disk ID: 0x417C1816 	
00000063	1.12753975	[6040] Drive has an unknown Master Boot Record 	
00000064	1.12844372	[6040] Partition 1: 	
00000065	1.13003170	[6040]   Type: NTFS (0x07) 	
00000066	1.13003170	[6040]   Detected File System: NTFS 	
00000067	1.13003170	[6040]   Size: 14.4 GB (15465971712 bytes) 	
00000068	1.13003170	[6040]   Start Sector: 2048, Boot: Yes 	
00000069	1.13183665	[6040] Partition 2: 	
00000070	1.13307619	[6040]   Type: EFI System Partition (0xef) 	
00000071	1.13307619	[6040]   Detected File System: FAT16 	
00000072	1.13307619	[6040]   Size: 32 MB (33554432 bytes) 	
00000073	1.13307619	[6040]   Start Sector: 30209024, Boot: No 	
00000074	16.95539474	[6040] Scanning image... 	
00000075	16.96941185	[6040] ISO analysis: 	
00000076	17.05558014	[6040]   Image is a UDF image 	
00000077	17.55404854	[6040] Disk image analysis: 	
00000078	17.56792259	[6040]   Image does not have a Boot Marker 	

@pbatard
Copy link
Owner

pbatard commented Jul 1, 2023

I need to know the ISO you used, and where exactly you downloaded it. It appears that the application crashes when parsing the ISO, which means that, unless I can get access to that specific ISO, I'm not going to be able to do much...

@Tarq2
Copy link
Author

Tarq2 commented Jul 1, 2023

I need to know the ISO you used, and where exactly you downloaded it. It appears that the application crashes when parsing the ISO, which means that, unless I can get access to that specific ISO, I'm not going to be able to do much...

I downloaded ios via rufus

@pbatard
Copy link
Owner

pbatard commented Jul 1, 2023

I downloaded ios via rufus

It still doesn't tell me what ISO it was. The ISO has a name, architecture, language, etc. What are they?
And do you actually observe a crash with an error, or does the application just go away.

Please bear in mind that I am not in front of your computer, I don't have access to your data and I can't read your mind, so you have to provide enough details for us to try to help you, as I still don't have enough data to do anything about your issue here.

@JonnyTech

This comment was marked as off-topic.

@pbatard
Copy link
Owner

pbatard commented Jul 1, 2023

No, I am asking about the version of Windows you downloaded through Rufus. Windows version: Windows 10 Pro x86 (Build 19045.3086) is the version of Windows you are running on.

When you downloaded the ISO from Rufus, as you state you did, you selected:

  • A version of Windows (Windows 11, Windows 10, Windows 8)
  • A release of Windows (most likely 22H2)
  • A language
  • An architecture

And then after the download completed, you ended up with a .iso file in the folder where you chose to download it, and that .iso file has a name, such as Win11_22H2_EnglishInternational_x64v1.iso.

I need to know all of these details.

@Tarq2
Copy link
Author

Tarq2 commented Jul 1, 2023

And do you actually observe a crash with an error, or does the application just go away.

I did not notice an error that occurs, that the application disappears at the beginning of burning

@Tarq2
Copy link
Author

Tarq2 commented Jul 1, 2023

It still doesn't tell me what ISO it was. The ISO has a name, architecture, language, etc. What are they?

Win10_22H2_Arabic_x32v1

@pbatard
Copy link
Owner

pbatard commented Jul 1, 2023

I did not notice an error that occurs, that the application disappears at the beginning of burning

So you can press START after you selected the ISO?

In that case the log you provided with DebugView is incomplete because there should be additional lines after:

00000078	17.56792259	[6040]   Image does not have a Boot Marker 	

So, can you press START after you select the ISO, and do you get any additional lines in DebugView after Image does not have a Boot Marker?

@JonnyTech

This comment was marked as off-topic.

@Tarq2
Copy link
Author

Tarq2 commented Jul 1, 2023

So you can press START after you selected the ISO?

no

@pbatard
Copy link
Owner

pbatard commented Jul 1, 2023

@JonnyTech, I missed that you weren't OP when replying, which didn't really help with trying to get the data needed. Windows 10, which is what OP uses, does have 32-bit versions. It's only Windows 11 that dropped x86_32 support.

@Tarq2
Copy link
Author

Tarq2 commented Jul 1, 2023

So, can you press START after you select the ISO, and do you get any additional lines in DebugView after Image does not have a Boot Marker?
DESKTOP-4N1770N.LOG

I tried again and this reading of the problem and error

@pbatard
Copy link
Owner

pbatard commented Jul 1, 2023

@Tarq2, thanks, I can finally replicate your issue!

It only seems to happen when using the _x86 version of Rufus (64-bit is fine), and I can also see it when scanning other Windows ISOs besides Win10_22H2_Arabic_x32v1.iso.

This also appears to be an issue that's restricted to the MinGW built version and not the MSVC built version, because as far as I can see, the MSVC built x86 version does not crash (because if it did, I would have seen reports from Windows Store users, who use an MSVC build).

@Tarq2, can you please try installing the official Rufus App from https://apps.microsoft.com/store/detail/rufus/9PC3H3V7Q9CH and see if that works better for you?

Now that I finally have enough data, I will of course try to figure out why the x86 MinGW crashes while parsing these Windows ISOs...

@pbatard pbatard changed the title Problem when booting the program Crash when parsing Windows ISOs when using the _x86 version of Rufus Jul 1, 2023
@pbatard pbatard self-assigned this Jul 1, 2023
@pbatard pbatard added this to the 4.2 milestone Jul 1, 2023
@pbatard
Copy link
Owner

pbatard commented Jul 1, 2023

The issue appears to have to do with the delay loading of the virtdisk library which we enforce to prevent hijacking of the application through DLL side loading (See #1877).

From what I can tell, for MinGW32 only (i.e. MinGW64 does not have this issue) we run into the same problem as the one I described here, with the MinGW delay loading code producing a literal "That's it, I'm outta here" from the runtime when it encounters an issue.

More specifically, after a Windows ISO is scanned, we try to detect the Windows build from that ISO by mounting, using the Windows virtdisk APIs so we can poke at the relevant files. And it looks like the delay load call to OpenVirtualDisk() from MountISO() crashes the whole app when it's the x86 MinGW32 compiled version.

And, no, this is not an overall issue with delay loading for MinGW32, as we have other delay loaded calls in the application, and especially one that validates the ISO download script before we launch it, and those ones do not produce a crash.

<Sigh> I guess it's back to direct hooking into DLL API calls, like I had to do for wininet, since neither Microsoft nor MinGW are of any actual help when it comes to preventing side-loading vulnerabilities...

@JonnyTech
Copy link

@pbatard just out of curiosity, is it only foreign language ISO's or Windows hosts? I contacted the others that I mentioned earlier and they claim to have no issue with English ISO's and English 32 bit Windows. Yet they still won't provide a log!

@pineapple63
Copy link

@JonnyTech i cant say if english US ISOs are affected (as I don’t want to download ISOs that aren’t of any use to me), but i tested an English International 32 bit ISO on one of my systems, and it caused Rufus to crash (when using the 32 bit version of Rufus)

@pbatard
Copy link
Owner

pbatard commented Jul 1, 2023

It's all the recent Windows ISOs that I've tested, English, other languages, x86/x64, whatever, which makes sense since it's a crash as soon as a specific function call is invoked, and that function call will be invoked for any modern Windows ISO.

Please be very mindful that:

  • This will not happen with any x64 version of Rufus
  • This will not happen with the x86 version from the Store either, since that one was compiled with MSCV and delay loading in MSVC uses a different method.

Currently, the only release where you will see the crash is the rufus-4.1_x86.exe version from https://rufus.ie, since this issue was introduced in the second commit [0df68b6] we added after the 4.0 release, where we switched to delay loading the virtdisk library.

@Tarq2
Copy link
Author

Tarq2 commented Jul 2, 2023

I downloaded ios X64, unlike I previously installed ios X86, and it booted successfully. Please wait for the installation to complete and then come back and report that the issue has been resolved

@pbatard pbatard closed this as completed in f9370e0 Jul 2, 2023
@Tarq2
Copy link
Author

Tarq2 commented Jul 6, 2023

The problem exists

@Tarq2
Copy link
Author

Tarq2 commented Jul 6, 2023

What is the version of Rufus that fits my system?

@github-actions
Copy link

github-actions bot commented Oct 5, 2023

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue if you think you have a related problem or query.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 5, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants