summaryrefslogtreecommitdiff
path: root/Source/Core
AgeCommit message (Collapse)Author
2026-08-10IOS/FS: Fix loading savestate when files are openJosJuice
We already had code to close open host files when reading or writing a savestate, but due to d35fe1b we also need to close open guest files when reading a savestate, otherwise DoStateRead fails to delete them. I was considering an alternative solution where instead of copying and clearing m_handles, we just set `handle.opened = false;` for each handle before reading a savestate (but not before writing a savestate). However, this wouldn't solve the problem of DoStateWriteOrMeasure's calls to OpenFile failing due to all handles being open. I'm not aware of any games that have that many handles open, though.
2026-08-10Core: log invalid ELF inputActs1631
Log each rejected ELF header, range, and symbol reference. This provides actionable diagnostics for malformed files without changing the validation behavior.
2026-08-10Core: validate standalone ELF input rangesActs1631
ElfReader trusted table offsets and counts from standalone ELF files. Malformed input could make it read and write past the loaded file buffer. Validate the ELF header, table ranges, segment data, section data, and string-table references before accessing them. Invalid files use the existing executable boot failure path.
2026-08-10NetPlay: bound LZO decompression outputActs1631
NetPlay save synchronization decoded remote LZO blocks with the unsafe decoder and no output capacity. A malicious host could overflow a client buffer with a block larger than its declared size. Use the bounds-checking decoder, validate the declared output length, and grow buffer results only after each checked block has been decoded.
2026-08-10DolReader: Fix integer wraparoundScott Mansell
A malicious dol could theoretically use integer wraparound to bypass bounds checking and cause DolReader to read past the end of m_bytes. Could result in crashes, wasting large amounts of memory, or even the disclosure of heap memory contents.
2026-08-10fixes: make dolreader validate section addresses and sizesDacoTaco
IOS and IPL reject non-32byte aligned sections
2026-08-10GCZ: use 64-bit for m_data_offsetScott Mansell
A malicious GCZ file could probably force this to be negative. Shouldn't cause any issues other than file read failures, but need to fix because it is causing errors on MSVC.
2026-08-10GCZ: validate while loadingScott Mansell
2026-08-10GCZ: Don't trust block_num eitherScott Mansell
SectorReader::ReadChunk does do some validation on it, but it only checks against the original disc size (reported by the GCZ file). It has no idea how many blocks the header claimed the disc had. A maliciously crafted GCZ file could trigger read overflows off the end of the m_block_pointers/m_hashes arrays.
2026-08-10GCZ: Don't trust GetBlockCompressedSizeScott Mansell
It comes unverified from the file, and a maliciously crafted file could trigger not one, but two buffer overflows in the heap.
2026-08-10IOS/NetIPTopDevice: Zero-initialize sockaddr structsAdmiral H. Curtiss
Fixes https://github.com/dolphin-emu/dolphin/security/advisories/GHSA-5fqv-9qrg-gm4j
2026-08-10Fix stack overflow in ZeldaHLEScott Mansell
Independently spotted by both @Dentomologist and me while reviewing PR #14805 The previous limit was correct for valid VPBs, but an invalid VPB controlled by a malicious game could contain a non-fractional value in current_pos_frac, which would allow writing an extra 15 samples (30 bytes) into the stack. With AFC encoding, this is rounded up to 16 samples, but with much less control over which bytes are written. Maybe we should be doing some validation, or bounds checking, but I'm pretty sure this issue was copied from the original ucode, and we kinda want to stay compatible. The simpler fix is to just increase the size of raw_input_samples. I've checked other code paths, and 0x514 samples seems to be the limit.
2026-08-10DSPHLE/Zelda: prevent out-of-bounds stack readTillmann Karras
Reported by @RickdeJager.
2026-08-10HW/DSPHLE/AXVoice: Prefer BitCastPtr over BitCastToArray in ApplyUpdatesForMs()Admiral H. Curtiss
2026-08-10HW/DSPHLE/AXVoice: Check array bounds in ApplyUpdatesForMs()Admiral H. Curtiss
Fixes https://github.com/dolphin-emu/dolphin/security/advisories/GHSA-4q28-hhjv-hf3f
2026-06-24Merge pull request #14687 from JoshuaVandaele/realtek-linux-listOatmealDome
RealtekFirmwareLoader: Update list from Linux source
2026-06-24TAPServerConnection: Fix builds with LLVM toolchainJoshua Vandaële
On an Alpine system using a full LLVM toolchain, building fails because `fd_set`/`timeval` are undefined.
2026-06-23ICCardReader: Fix macro collisionJoshua Vandaële
On Alpine Linux, Dolphin fails to build due to PAGE_SIZE being already defined somewhere in the system includes.
2026-06-23Add missing includesJoshua Vandaële
2026-06-23fmt: Allow building with version >=12.2.0Joshua Vandaële
This change was causing some issues: > Made FMT_STRING a no-op when FMT_USE_CONSTEVAL is enabled, since the consteval format-string constructor already provides compile-time validation (#4611, #4612). Thanks @friedkeenan.
2026-06-22VolumeVerifier: Remove SystemNotAvailableJosJuice
We had some code in VolumeVerifier to catch the error message that Redump.org used to show when trying to access the Wii datfile without logging in. This restriction was removed from Redump.org around the start of 2022, and the code has been unnecessary ever since.
2026-06-22Don't send Dolphin version in user agent to RedumpJosJuice
When we added the RetroAchievements integration, we had a discussion about whether sending version information in the user agent was fine from a privacy standpoint. We reached the conclusion that it was okay, but it was conditional on the website having a privacy policy. Neither incarnation of Redump has that, and Redump also never asked us to send version information like RetroAchievements did, so let's use a user agent that just says "Dolphin" when connecting to Redump.
2026-06-22Use redump.info instead of redump.orgJosJuice
All the staff of Redump (except the absentee sysadmin) have decided to start a new version of the website at redump.info. It has every disc from the old site, it has HTTPS, it isn't buckling under the load of AI scrapers, and moving forward, all adding and verifying of discs is going to be happening on the new website only. Let's move over. I've taken the unusual step of updating the translation files manually. This is because we're very close to a release and because the change is simple enough that I feel confident about making the change to languages I don't speak. (I double checked that the Korean translation doesn't ever follow "Redump.org" by a particle that has a different form depending on whether there's a final consonant.)
2026-06-21Merge pull request #14692 from JosJuice/netplay-memory-safetyJosJuice
NetPlay: Fix memory safety issues
2026-06-21Merge pull request #14691 from JosJuice/bba-memory-safetyJosJuice
EXI/BBA: Fix tx_fifo memory safety issues
2026-06-21Merge pull request #14668 from JosJuice/state-nand-path-traversalJosJuice
IOS/FS: Rewrite NAND savestating
2026-06-20NetPlay: Fix chunked data buffer overflowJosJuice
Reported by MrSynAckster.
2026-06-20NetPlay: Fix Wii save banner buffer overflowJosJuice
Reported by MrSynAckster.
2026-06-20EXI/BBA: Add null check in CEXIETHERNET::DirectFIFOWriteJosJuice
Just in case. DMAWrite calls DirectFIFOWrite with the result of a GetPointerForRange call without first checking if it's null.
2026-06-20EXI/BBA: Fix tx_fifo memory safety issuesJosJuice
Reported by MrSynAckster.
2026-06-19State: Fix Use After Move In LoadAsFromCoreAmon Neander
This use-after-move error inhibits the use of savestates during the Dolphin TAS Movie creation process.
2026-06-17Merge pull request #14685 from JosJuice/netplayclient-pad-indexDentomologist
NetPlayClient: Check for invalid pad indices
2026-06-15RealtekFirmwareLoader: Update list from Linux sourceJoshua Vandaële
2026-06-14NetPlayClient: Check for invalid pad indicesJosJuice
Like 29e577d but for the client instead of the server.
2026-06-14Merge pull request #14677 from ↵JosJuice
doldol22312/netplay-validate-controller-packet-indices NetPlayServer: Fix remote crash via invalid pad index
2026-06-13DolphinTool: fix crash when listing partition without filesystemTillmann Karras
We were also passing the wrong partition name.
2026-06-11NetPlay: Stop game when mapped Wii Remote disconnectsagalq13
2026-06-11NetPlay: Validate controller packet indicesagalq13
2026-06-10IOS/FS: Rewrite NAND savestatingJosJuice
This makes us savestate the NAND using the same APIs the guest uses instead of directly touching the host files. This solves several problems: * If the user loaded a malicious savestate, it could use path traversal to overwrite arbitrary files on the host file system. (Reported by MrSynAckster.) * Metadata (UID, GID, attribute, modes) wasn't being savestated. * NAND redirects weren't handled, except for NAND redirects at the root of where the savestate was being done. (This only possibly matters if TASing a Riivolution patch. The root of the savestate is at /tmp when not TASing, and the only case where we do a NAND redirect is inside /title if requested by a Riivolution patch.)
2026-06-04NANDImporter: Abort extraction if a NAND FST entry is visited more than onceAdmiral H. Curtiss
2026-06-04Merge pull request #14667 from JosJuice/nand-import-path-traversalAdmiral H. Curtiss
Prevent path traversal in NANDImporter::ProcessEntry
2026-05-31JitArm64: Fix twxJosJuice
The conditions were in reverse order (maybe someone was reading the PowerPC manual and forgot about IBM's bit numbering), and additionally the two conditions for unsigned comparison were wrong. Fixes https://bugs.dolphin-emu.org/issues/14054.
2026-05-30Prevent path traversal in NANDImporter::ProcessEntryJosJuice
Reported by MrSynAckster. A specifically crafted NAND dump could use path traversal to overwrite files on the host file system. This is also an accuracy fix for importing NAND dumps that contain file names that Dolphin is supposed to escape. Some games' save files are affected.
2026-05-30Rework NANDImporter::GetPath slash handlingJosJuice
GetPath has two special cases where it doesn't add a slash. The first is for the root entry's special name "/". The next commit will be neater if we can skip calling GetPath for the root entry, because '/' is one of the characters that Common::EscapeFileName replaces with an escape sequence. Let's check for entry number 0 instead. The second is for parent paths that already end in a slash. There's no actual need to check for this - double slashes are harmless, and for comparison, NANDImporter::ExtractCertificates already appends slashes without checking if there already is one. Let's remove this check.
2026-05-29Fix uninitialized variable warning in ZeldaAudioRenderer::ApplyReverbJosJuice
If CopyFromEmuSwapped considers the address to be invalid, nothing will be written to the passed-in pointer.
2026-05-25Merge pull request #14607 from elyashue/internal-resolution-displayDentomologist
VideoCommon: Added option for showcasing internal resolution
2026-05-24Reimplement custom cropping by adjusting the source aspect ratioAdmiral H. Curtiss
2026-05-24Revert the Presenter logic changes from #14506Admiral H. Curtiss
2026-05-23Merge pull request #14506 from adamscott/crop-that-screenAdmiral H. Curtiss
Add screen crop feature
2026-05-23Address minor nits in new cropping logicAdmiral H. Curtiss