Commit graph

2224 commits

Author SHA1 Message Date
Pete Batard
7585a35c2c
[core] improve detection for images that are too large to fit the target drives
* Rufus did not check if the size of the decompressed VHDX was larger than target. Fix that.
2025-02-21 17:53:38 +00:00
Pete Batard
9540ca359d
[misc] don't enable the commandline hogger on POSIX shells
* Assume that the presence of a "SHELL" environment variable is enough to tell if we have a POSIX shell.
2025-02-20 13:13:44 +00:00
Pete Batard
622e60659c
[dev] fix a side-loading vulnerability with cfgmgr32.dll
* Current Rufus and earlier versions (when compiled with MinGW) suffer from a side-loading vulnerability
  due to cfgmgr32.dll being attempted to be loaded from the same directory as the executable. This may
  result in someone being able to execute elevated malicious code if they already have gained user-level
  access to the platform and were able to drop an arbitrary cfgmgr32.dll in the same directory as rufus.
* While we were able to address similar vulnerabilities using delay-loading, this method does not appear
  to work for MinGW with this specific DLL, so we remove all the implicit CM_ function calls, that result
  in automated DLL loading that cannot be mitigated, to replace them with direct DLL hooks, which are
  not subject to Windows' default (vulnerable) DLL lookup behaviour. We still add the def for the delay
  loading in case we manage to find how to delay load cfgmgr32 with MinGW in the future...
* Fixes CVE-2025-26624 (https://github.com/pbatard/rufus/security/advisories/GHSA-p8p5-r296-g2jv).
* This vulnerability was discovered by @EmperialX working with @Shauryae1337 and reported by @EmperialX.
2025-02-19 11:58:10 +00:00
Rairii
50801a47ff
[misc] fall back to user/system default locale when getting error description
* Some Windows localisations do not contain English MUI files for specific error codes, so show *something* instead of an error.
* Closes #2687.
2025-02-14 01:07:43 +00:00
Pete Batard
f3c29bf537
[misc] fix and silence some Coverity warnings 2025-02-13 15:14:53 +00:00
lucamosca1
ec604f43d6
[loc] fix a typo in the Italian translation
* Closes #2675.
2025-02-10 17:47:29 +00:00
Pete Batard
d910441427
[misc] Fix issue template no longer being processed
* Since GitHub broke existing paths and did not bother to alert people.
* Closes #2672.
2025-01-25 13:06:07 +00:00
Pete Batard
1c300b428a
[uefi] update UEFI DBX to latest
* This is in light of the 2025.01.14 DBX update due to https://arstechnica.com/security/2025/01/microsoft-patches-windows-to-eliminate-secure-boot-bypass-threat/.
* Also update application copyright year and a translator's e-mail address.
2025-01-24 00:30:22 +00:00
Emmanuel Bourg
1e2f1c1aff
[loc] Improve the French translation
* Closes #2636.
2024-12-17 14:57:51 +01:00
Pete Batard
3d5ab84ec1
[iso] fix FAT filenames being truncated on image extraction
* Needed to read 12 chars instead of stopping at 11 and therefore inserting a NUL.
* Closes #2534.
* Also enable detection of bootriscv64.efi and bootloongarch64.efi bootloaders from FAT images.
2024-12-03 13:53:41 +00:00
Pete Batard
8d1ed44e1e
[cmd] fix hogger not being deleted on exit when executable is in a different directory
* Closes #2622.
2024-12-03 11:51:18 +00:00
Pete Batard
79f1209ab9
[misc] arch/cpu refactoring
* Move the cpu.c/cpu.h in more logical places and remove these sources files.
* Add detection for LoongArch64 EFI bootloaders.
* Pass the detected CPU arch when invoking Fido.
* Also fix some Bled Coverity warnings.
2024-12-02 19:04:51 +00:00
Pete Batard
8f3a9c1c7c
[cmp] update Bled to latest
* This mostly updates the ZSTD code to latest and properly removes all debug message.
* Also switch MinGW from gnu99 to gnu11.
2024-11-27 17:19:36 +00:00
Pete Batard
cef7a5cb0c
[cmp] add ztsd image compression support
* Based on the latest Bled, which adds ztsd compression support.
* Note that initial extraction of the 512 bytes MBR is very slow, because is seems
  clear that ZSTD was never designed for fast init or processing small elements of
  data, but instead for post init large volume streaming.
* Also note that this code adds 400 KB to the Rufus executable *AFTER UPX COMPRESSION*!
  Hopefully, the BusyBox folks can come up with a better and smaller way to add zstd
  support, because it's clear that the method used by the current BusyBox proposal,
  which is to leave as much of the original code untouched, isn't for the best...
* Closes #2590.
* Closes #2620.
* Closes #2621.
2024-11-22 23:25:33 +00:00
Pete Batard
fcdde3dcb8
[misc] drop ARM32 builds
* Per https://github.com/actions/runner-images/issues/10981 and plenty of other similar
  reports, GitHub Actions can no longer compile ARM32 binaries by default using the
  latest Visual Studio toolchain, due to Microsoft current Windows SDK having dropped
  the ARM32 toolchain (per https://github.com/zufuliu/notepad4/issues/839).
* Well, I have better things to do then try to maintain platforms in the process of
  being deprecated, so I'll let the people who care about Rufus on ARM32 propose a
  non-intrusive workaround that can work with current GitHub Actions.
2024-11-22 00:18:58 +00:00
Pete Batard
37e383ade6
[dev] add disk exclusion by GPT Disk GUID
* Similar to what we already do with IgnoreUSB##, except this time, users
  can add REG_SZ keys IgnoreDisk01 to IgnoreDisk08, with a string like
  "{F333EC2E-25C9-488D-A7FC-9147C2367623}" to ignore a GPT disk with this
  specific GUID.
* This may be useful for people who mount fixed virtual drives, or people
  who have enabled Hot Swap on their SATA storage, and who want to make sure
  they won't be able to inadvertently select that disk in Rufus.
* Also set rufus-next to 4.7.
2024-11-22 00:03:13 +00:00
Pete Batard
7488e4464d
Rufus 4.6 (Build 2208) 2024-10-21 15:46:25 +01:00
Justin Miller
accc7c000b
[iso] check for freeldr.sys as well for ReactOS
* Closes #2589.

Signed-off-by: Justin Miller <justin.miller@reactos.org>
2024-10-18 17:15:40 +01:00
Pete Batard
eb282642ff
[misc] fix conversion of windows error codes
* Commit f453dc272b improved on error message reporting, but went a bit
  too far in trying to let Windows facilities sort their messages out.
* Add a retry that clears the facility, so that, for one thing, we get wininet
  messages properly processed, regardless of the official facility assigned.
2024-10-14 17:39:17 +01:00
Pete Batard
4d42b7a73a
[efi] further improve revoked UEFI bootloader reporting
* Do not report SBAT revocations unless we actually have a formal Secure Boot signed bootloader.
* Also reduce verbose log pollution by libcdio.
2024-10-10 13:37:55 +01:00
Pete Batard
5439ca8a83
[md5sum] fix md5sum computation for the setup wrapper
* Also fix a couple small memory leaks and potential NULL deref.
* Also report saved path when saving to image.
2024-10-10 13:04:58 +01:00
Pete Batard
ede52c57e6
[misc] improve revoked UEFI bootloader reporting
* Also fix SBAT not being properly parsed for PE32 executables.
* Also fix signature truncation in GetIssuerCertificateInfo() and fall back to
  returning signer data if issuer is not available (which is typically the case
  for GRUB signed bootloaders).
* Also fix status messages on user cancellation/proceeding.
2024-10-09 20:18:42 +01:00
Pete Batard
6b5837dbb5
[iso] add DBX certificate revocation validation and reporting
* This is currently only used to detect the use of 'Microsoft Windows Production PCA 2011'
  signed bootloaders.
* Because the cert is still in the process of being revoked, and Windows 11 24H2 still uses
  'Microsoft Windows Production PCA 2011' signed bootloaders by default, only report this if
  running in expert mode.
* Also fix non-reachable code in wue.c.
2024-10-09 13:21:42 +01:00
Pete Batard
fd5c366938
[wue] add experimental option to replace Windows bootloaders with the 24H2 _EX versions
* This aims at creating installation media that is compatible with systems where
  'Microsoft Windows Production PCA 2011' has been revoked.
* Doesn't work, since the bootloaders being applied by the first stage installer come
  from \sources\install.wim[#]\windows\system32\Recovery\Winre.wim[#]\Windows\Boot\
  (instead of \sources\boot.wim[#]\Windows\Boot\ as one would naturally expect) and
  Microsoft botched the ones they included there by using completely vulnerable (and
  therefore revoked) ones.
  See https://github.com/pbatard/rufus/issues/2244#issuecomment-2400380839.
* Still, I sure haven't gone through this excruciating ACL bullshit for nothing, so
  you get an experimental option, behind the expert mode curtain.
2024-10-09 00:45:12 +01:00
Pete Batard
c800448c62
[wue] add setup wrapper to add bypasses for in-place upgrades of Windows 11 24H2
* Per https://forums.mydigitallife.net/threads/win-11-boot-and-upgrade-fix-kit-v5-0-released.83724/
  Windows 11 24H2 requires new registry bypasses to be applied to perform in-place upgrade on
  non officially supported platforms, and those need to be enacted before running setup.exe.
* In order to streamline this, and because those registry bypasses require elevation, we rename
  setup.exe to setup.dll and add our own setup.exe wrapper to set the registry and then call the
  original setup.exe (through setup.dll).
* See https://github.com/pbatard/rufus/issues/2568
* Also fix some MinGW build warnings.
* Also fix the annoyance of TortoiseGit/Notepad++ altering the copyright symbol of rufus.rc.
2024-10-06 13:42:07 +01:00
Pete Batard
98a42a235f
[wue] add setup wrapper project for Windows 11 24H2 in-place upgrades 2024-10-05 20:21:47 +01:00
Pete Batard
3e840a94ce
[wue] set password not to expire when creating a local account
* Looks like using the 'net user USERNAME /logonpasswordchg:yes" might have the side effect
  of setting the main user account to expire after a few months. So to alleviate that, we'll
  just set the system policy to use passwords that never expire.
* Also clean up the PE parsing code and fix 2 Coverity warnings.
* Also fix typos, misprints and ditch the UNRELIABLE timestamp.acs.microsoft.com server.
2024-10-05 11:03:42 +01:00
Pete Batard
15c28434c0
[iso] add Microsoft SVN revocation validation and reporting
* See https://github.com/pbatard/rufus/issues/2244#issuecomment-2243661539
* Note that we don't use the GUID but the resource name for bootmgr.efi, as trying to figure
  out where the heck the relevant GUID is located in the PE code is not worth the effort.
* Also add internal fallback for sbat_level.txt if the user can't access our remote version.
* Also improve PE section lookup.
2024-10-05 01:05:55 +01:00
Pete Batard
c5d61f6696
[iso] add SBAT revocation validation and reporting 2024-10-03 20:25:19 +01:00
Pete Batard
f453dc272b
[misc] fix a potential double free and avoid nonsensical error messages
* buf could be freed twice in iso.c.
* Using HRESULT_CODE(error_code) in WindowsErrorString() could lead to "Error: SUCCESS" messages.
* Closes #2524.
* Also try to address potential issues that appear to have been seen in the wild.
2024-09-30 17:38:47 +01:00
Pete Batard
248a37e308
[cmd] fix hogger invocation for PowerShell
* Closes #2556.
* Also update issue template, dependabot frequency and signing cert references.
* Also harmonize segment addressing code in mbr.S.
2024-09-14 12:21:22 +01:00
Jakub Zieciak
0ee7d7a2c0
[loc] update Polish translation 2024-08-17 16:13:30 +01:00
Maksim Bondarenkov
07d6e07694
[iso] fix MSVC-only definition
* It should be defined for MSVC only. This fixes UCRT build.
* Closes #2540.
2024-08-17 16:10:58 +01:00
Dmytro Hissa
20881ceea6
[loc] fix the translation of 'cancel' for Ukrainian 2024-07-25 13:32:11 +01:00
Pete Batard
d5302c0bad
[misc] fix Coverity warnings
* Also use a new if_not_assert() construct where possible.
2024-07-19 13:46:42 +01:00
Pete Batard
78608c35fe
[wue] fix TimeZone option not being applied to the right parent
* Closes #2519.
* Also update MinGW's base WINVER to Windows 10.
2024-07-15 17:35:08 +01:00
Mohmed abdel-fattah
9b3c11122b
[misc] reinstate delay-loading of wininet and virtdisk DLLs
* Per #2272 and #1877, MinGW has issues when delay loading libraries, but
  it is possible to apply a workaround to alleviate them, by redefining
  DECLSPEC_IMPORT before including the corresponding headers.
* This is a bit more tricky to accomplish for virtdisk, as MinGW's windows.h
  header does include virtdisk.h on its own (rather than expect a formal
  include as MSVC does), so we have to prevent the virtdisk.h inclusion
  first, by defining a macro, and then apply our workaround.
* Per ea87573f-65ea-44a2-b4bb-ca96c0a136ab%40akeo.ie/#msg58793876
  we are hoping that this should be a temporary workaround and that the root
  cause of the issue will be fixed in binutils.
* Closes #2513.
2024-07-13 17:43:40 +01:00
Pete Batard
10d33c6658
[wue] add TimeZone to regional options replication
* Closes #2499.
2024-07-08 13:56:15 +01:00
Pete Batard
83b1e73062
[dev] add exception for Samsung uSD Card devices
* Closes #2506.
2024-07-08 13:22:37 +01:00
Pete Batard
6d29120b38
[wue] add 'Local' to the list of disallowed local account names
* Closes #2493.
* Also add 'KRBTGT' as it is mentioned at https://learn.microsoft.com/en-us/windows-server/identity/ad-ds/manage/understand-default-user-accounts#default-local-accounts-in-active-directory
  along with 'Administrator' and 'Guest' and is probably disallowed too.
2024-07-08 13:13:21 +01:00
wallrik
7c6dbdc1ce
[msic] update Windows To Go docs link
* Old link is still fine, but we might as well point to the Windows 10 version.
* Closes #2511.
2024-07-08 11:01:47 +01:00
Mark Peek
6f764ab637
[dev] allow the use of FreeBSD bhyve virtual disks
* Closes #2504.
2024-07-08 10:59:48 +01:00
Pete Batard
bdff2dc45c
[core] work around Windows' moronic behaviour for mounted VHDs
* If you attempt to read past the end of a mounted VHD, not only will Windows happily
  return data that doesn't exist (instead of returning End of Disk), but it will also
  corrupt the existing data!
* So, to appease the capricious Windows gods, we now make sure that we never attempt
  to read (or write) past the boundaries of the source or target when writing images.
* This should address the last issue from #2468.
* Also set version to rufus-next and make some small improvement in winio.h.
2024-06-03 12:58:37 +01:00
Dayking Cheng
ae3c65e7f8
[loc] update Chinese Traditional translation to latest 2024-05-26 11:50:42 +01:00
Pete Batard
9551655103
Rufus 4.5 (Build 2180)
* "Yeah, well, I'm gonna go build own translations, with blackjack (Google translate), and hookers (DeepL)!"
2024-05-22 12:02:44 +01:00
Pete Batard
59fd550c46
[core] do not set the UEFI:NTFS partition to ESP type
* As usual, Microsoft products are so poorly designed that they can't deal with
  multiple instances of one thing. In this case, if the Windows installer sees
  two ESPs after you select the drive where you want to install Windows and it
  creates its own ESP there, it will fail during the "CopyinG Windows Files"
  step.
* So make sure that the UEFI:NTFS partition is *not* set to ESP type, even
  though it is really an ESP, which is something that we used to do, but that
  got reverted in 0f23c47184.
2024-05-22 09:56:38 +01:00
Hugo Carvalho
fcf5e2eede
[loc] update Portuguese (Portugal) translation to latest 2024-05-20 22:59:53 +01:00
Pete Batard
a50d390767
[ui] don't preserve the UEFI runtime validation setting between sessions
* I don't think we want to make this setting permanent for the time being as
  this may result in drawbacks like people using the UEFI Shell going through
  an unwanted MD5Sum check because they forgot to turn it off.
2024-05-20 11:08:49 +01:00
Ana Pevac
c5ade8c811
[loc] update Slovenian translation to latest 2024-05-20 10:41:46 +01:00
Костянтин Сергійович
1d4eea4926
[loc] update Ukrainian translation to latest 2024-05-16 11:11:23 +01:00