<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.3dbrew.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=EvilFlight</id>
	<title>3dbrew - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://www.3dbrew.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=EvilFlight"/>
	<link rel="alternate" type="text/html" href="https://www.3dbrew.org/wiki/Special:Contributions/EvilFlight"/>
	<updated>2026-04-24T20:07:59Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.1</generator>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=3DS_System_Flaws&amp;diff=22294</id>
		<title>3DS System Flaws</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=3DS_System_Flaws&amp;diff=22294"/>
		<updated>2023-08-07T23:25:41Z</updated>

		<summary type="html">&lt;p&gt;EvilFlight: Process9 primary&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Exploits are used to execute unofficial code (homebrew) on the Nintendo 3DS. This page is a list of publicly known system flaws, for userland applications/applets flaws see [[3DS_Userland_Flaws|here]].&lt;br /&gt;
&lt;br /&gt;
=Stale / Rejected Efforts=&lt;br /&gt;
* In the early days of 3DS hacking, Neimod was working on a RAM dumping setup for a while. He has de-soldered the 3DS&#039;s RAM chip and hooked it and the RAM pinouts on the 3DS&#039;s PCB up to a custom RAM dumping setup. He &#039;&#039;has&#039;&#039; published photos showing his setup to be working quite well, with the 3DS successfully booting up, but however, his flickr stream is now private along with most of his work and this method has been unreleased. RAM dumping can be done through homebrew now, making this method obsolete regardless.&lt;br /&gt;
&lt;br /&gt;
==Tips and info==&lt;br /&gt;
The 3DS uses the XN feature of the ARM11 processor. There&#039;s no official way from applications to enable executable permission for memory containing arbitrary unsigned code(there&#039;s a [[SVC]] for this, but only [[RO_Services|RO-module]] has access to it). A usable userland exploit would still be useful: you could only do return-oriented-programming with it initially. From ROP one could then exploit system flaw(s), see below.&lt;br /&gt;
&lt;br /&gt;
SD card [[extdata]] and SD savegames can be attacked, for consoles where the console-unique [[Nand/private/movable.sed|movable.sed]] was dumped(accessing SD data is far easier by running code on the target 3DS however).&lt;br /&gt;
&lt;br /&gt;
=System flaws=&lt;br /&gt;
== Hardware ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Summary&lt;br /&gt;
!  Description&lt;br /&gt;
!  Fixed with hardware model/revision&lt;br /&gt;
!  Newest hardware model/revision this flaw was checked for&lt;br /&gt;
!  Timeframe this was discovered&lt;br /&gt;
!  Discovered by&lt;br /&gt;
|-&lt;br /&gt;
| ARM9/ARM11 bootrom vectors point at uninitialized RAM&lt;br /&gt;
| ARM9&#039;s and ARM11&#039;s exception vectors are hardcoded to point at the CPU&#039;s internal memory (0x08000000 region for ARM9, AXIWRAM for ARM11). While the bootrom does set them up to point to an endless loop at some point during boot, it does not do so immediately. As such, a carefully-timed fault injection (via hardware) to trigger an exception (such as an invalid instruction) will cause execution to fall into ARM9 RAM. &lt;br /&gt;
Since RAM isn&#039;t cleared on boot (see below), one can immediately start execution of their own code here to dump bootrom, OTP, etc.&lt;br /&gt;
The ARM9 bootrom does the following at reset:  reset vector branches to another instruction, then branches to bootrom+0x8000. Hence, there&#039;s no way to know for certain when exactly the ARM9 exception-vector data stored in memory gets initialized.&lt;br /&gt;
&lt;br /&gt;
The vulnerable timing range is about 100 CPU cycles after they start (which happens after the PLLs have stabilized after power-up). A glitch needs to be injected during one of these 100 cycles for the attack to succeed.&lt;br /&gt;
&lt;br /&gt;
It has been exploited by derrek to dump the ARM9 bootrom as of Summer 2015.&lt;br /&gt;
| None: all available 3DS models at the time of writing have the exact same ARM9/ARM11 bootrom for the unprotected areas.&lt;br /&gt;
| New3DS&lt;br /&gt;
| End of February 2014&lt;br /&gt;
| [[User:Derrek|derrek]], WulfyStylez (May 2015) independently&lt;br /&gt;
|-&lt;br /&gt;
| Missing AES key clearing&lt;br /&gt;
| The hardware AES engine does not clear keys when doing a hard reset/reboot.&lt;br /&gt;
| None&lt;br /&gt;
| New3DS&lt;br /&gt;
| August 2014&lt;br /&gt;
| Mathieulh/Others&lt;br /&gt;
|-&lt;br /&gt;
| No RAM clearing on reboots&lt;br /&gt;
| On an MCU-triggered reboot all RAM including FCRAM/ARM9 memory/AXIWRAM/VRAM keeps its contents.&lt;br /&gt;
| None&lt;br /&gt;
| New3DS&lt;br /&gt;
| March 2014&lt;br /&gt;
| [[User:Derrek|derrek]]&lt;br /&gt;
|-&lt;br /&gt;
| 32bits of actual console-unique TWLNAND keydata&lt;br /&gt;
| On retail the 8-bytes at ARM9 address [[Memory_layout|0x01FFB808]] are XORed with hard-coded data, to generate the TWL console-unique keys, including TWLNAND. On Old3DS the high u32 is always 0x0, while on New3DS that u32 is always 0x2. On top of this, the lower u32&#039;s highest bit is always ORed. only 31 bits of the TWL console-unique keydata / TWL consoleID are actually console-unique.&lt;br /&gt;
This allows one to easily bruteforce the TWL console-unique keydata with *just* data from TWLNAND. On DSi the actual console-unique data for key generation is 8-bytes(all bytes actually set).&lt;br /&gt;
| None&lt;br /&gt;
| New3DS&lt;br /&gt;
| 2012?&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| DSi / 3DS-TWL key-generator&lt;br /&gt;
| After using the key generator to generate the normal-key, you could overwrite parts of the normal-key with your own data and then recover the key-generator output by comparing the new crypto output with the original crypto output. From the normal-key outputs, you could deduce the TWL key-generator function.&lt;br /&gt;
This applies to the keyX/keyY too.&lt;br /&gt;
&lt;br /&gt;
This attack does not work for the 3DS key-generator because keyslots 0-3 are only for TWL keys.&lt;br /&gt;
| None&lt;br /&gt;
| New3DS&lt;br /&gt;
| 2011&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| 3DS key-generator&lt;br /&gt;
| The algorithm for generating the normal-keys for keyslots is cryptographically weak.  As a result, it is easily susceptible to differential cryptanalysis if the normal-key corresponding to any scrambler-generated keyslot is discovered.&lt;br /&gt;
&lt;br /&gt;
Several such pairs of matching normal-keys and KeyY values were found, leading to deducing the key-generator function.&lt;br /&gt;
| None&lt;br /&gt;
| New3DS&lt;br /&gt;
| February 2015&lt;br /&gt;
| [[User:Yellows8|Yellows8]], [[User:Plutooo|plutoo]]&lt;br /&gt;
|-&lt;br /&gt;
| RSA keyslots don&#039;t clear exponent when setting modulus&lt;br /&gt;
| The [[RSA_Registers|RSA keyslots]] are set by boot ROM to have four private RSA keys.  The exponent value in the RSA registers is write-only and not readable.&lt;br /&gt;
&lt;br /&gt;
However, when setting a keyslot&#039;s modulus, the RSA hardware leaves the exponent alone.  This allows retrieving the exponent by doing a discrete logarithm of the output.&lt;br /&gt;
&lt;br /&gt;
By setting the modulus to a prime number whose modular multiplicative order is &amp;quot;smooth&amp;quot; (that is, p-1 is divisible by only small prime numbers), discrete logarithms can be calculated quickly using the [[wikipedia:Pohlig-Hellman algorithm|Pohlig-Hellman algorithm]].  If the prime chosen is greater than the modulus, but the same bit size, the discrete logarithm is the private exponent.&lt;br /&gt;
&lt;br /&gt;
This exploit&#039;s usefulness is limited: RSA keyslot 0 is only used in current firmware for deriving the 6.x save and 7.x NCCH keys, which were already known, and the other three keyslots are entirely unused.  Additionally, with a boot ROM dump, this exploit is moot; these private keys are located in the protected ARM9 boot ROM.&lt;br /&gt;
| None&lt;br /&gt;
| New3DS&lt;br /&gt;
| March 2016&lt;br /&gt;
| [[User:Myria|Myria]]&lt;br /&gt;
|-&lt;br /&gt;
| [[CONFIG11_Registers#CFG11_GPUPROT|CFG11_GPUPROT]] allowing acccess to AXIWRAM/FCRAM-BASE-memregion&lt;br /&gt;
| [[CONFIG11_Registers#CFG11_GPUPROT|CFG11_GPUPROT]] can be configured by anything with access to it to allow the GPU to access the entire AXIWRAM+FCRAM. For example, this is an issue for any sysmodule that gets exploited and has access to this register memory-page(include one that&#039;s listed below).&lt;br /&gt;
&lt;br /&gt;
See also &amp;quot;kernelhax via gspwn&amp;quot; below.&lt;br /&gt;
| None&lt;br /&gt;
| New3DS&lt;br /&gt;
| February 7, 2017&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Boot ROM ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Summary&lt;br /&gt;
!  Description&lt;br /&gt;
!  Fixed with hardware model/revision&lt;br /&gt;
!  Newest hardware model/revision this flaw was checked for&lt;br /&gt;
!  Timeframe this was discovered&lt;br /&gt;
!  Discovered by&lt;br /&gt;
|-&lt;br /&gt;
| FIRM partitions known-plaintext&lt;br /&gt;
| The [[Flash_Filesystem|FIRM partitions]] are encrypted with AES-CTR without a MAC. Since this works by XOR&#039;ing data with a static (per-console in this case) keystream, one can deduce the keystream of a portion of each FIRM partition if they have the actual FIRM binary stored in it.&lt;br /&gt;
&lt;br /&gt;
This can be paired with many exploits. For example, it allows minor FIRM downgrades (i.e. 10.4 to 9.6 or 9.5 to 9.4, but not 9.6 to 9.5).&lt;br /&gt;
However it is most commonly used to install arbitrary FIRMs (usually boot9strap), thanks to sighax.&lt;br /&gt;
&lt;br /&gt;
This can be somewhat addressed by having a FIRM header skip over previously used section offsets, but this would just air-gap newer FIRMs without fixing the core bug. This can also only be done a limited number of times due to the size of FIRM versus the size of the partitions.&lt;br /&gt;
| None&lt;br /&gt;
| New3DS&lt;br /&gt;
| &lt;br /&gt;
| Everyone&lt;br /&gt;
|-&lt;br /&gt;
| Boot9 AES keyinit function issues&lt;br /&gt;
| [[Bootloader|Boot9]] seems to have two bugs in the AES key-init function, see [[AES_Registers#AES_key-init|here]].&lt;br /&gt;
| None&lt;br /&gt;
| BootROM issue.&lt;br /&gt;
| 2015&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| New3DS has same boot ROM as Old3DS&lt;br /&gt;
| The New3DS has the exact same boot ROM as the Old3DS.  This means, among other things, that all the same boot ROM flaws are present.  Also, this meant that it is possible to boot Old3DS firmware on New3DS (see &amp;quot;CFG9_SYSPROT9 bit1 not set by Kernel9&amp;quot;).&lt;br /&gt;
| None&lt;br /&gt;
| New3DS&lt;br /&gt;
| October 2014&lt;br /&gt;
| Everyone&lt;br /&gt;
|-&lt;br /&gt;
| sighax: Boot9 improper validation of FIRM partition RSA signatures&lt;br /&gt;
| The [[Flash_Filesystem|FIRM partitions]] are signed with RSA-2048 using SHA-256 and PKCS #1 v1.5 padding.  Boot9, however, improperly validates the padding in three ways:&lt;br /&gt;
# Boot9 permits block type 02, meant for encrypted messages, to be used for signatures.  Only 01, for signatures, should have been permitted.  As a result, when using block type 02, a signature block is not required to have a long string of FF bytes as padding, but rather any nonzero random values suffice.&lt;br /&gt;
# Boot9 does not require that the length of the padding fill out the signature block completely.  As a result, there is considerable freedom in the layout of a signature.&lt;br /&gt;
# Boot9 fails to do bounds checking in its parsing of the DER-encoded hash algorithm type and hash value; the length values given in DER are permitted to point outside the signature block.&lt;br /&gt;
Flaw 3 allows the DER encoding to be such that boot9 believes that the signature&#039;s hash value is outside the range of the block itself, somewhere on the stack.  This can be pointed at the correct hash value it computes.  Boot9 then memcmp&#039;s the calculated hash against itself, and thinks that the hash is valid.&lt;br /&gt;
&lt;br /&gt;
As a result of the above, we estimate that one in 2&amp;lt;sup&amp;gt;43&amp;lt;/sup&amp;gt; (~8.8 trillion) random fake signatures will be considered by Boot9 to be valid.  This is well within the range of brute force, particularly with an optimized GPU implementation.  An Nvidia GTX 1080 Ti would take about one week to find a match.&lt;br /&gt;
| None&lt;br /&gt;
| New3DS&lt;br /&gt;
| July 2015&lt;br /&gt;
| [[User:Derrek|derrek]]&lt;br /&gt;
|-&lt;br /&gt;
| Boot9 FIRM loading doesn&#039;t blacklist memory-mapped I/O&lt;br /&gt;
| [[Bootloader|Boot9]]&#039;s FIRM loading blacklists Boot9 data regions, but forgets to do other important regions, including Memory-mapped I/O. Combined with sighax, a malicious FIRM can be used to overwrite:&lt;br /&gt;
a) boot9 data-abort handler, coupled with a 4th section that tries to NDMA copy to NULL, causing a data abort&lt;br /&gt;
&lt;br /&gt;
b) boot9 IRQ handler (this has the disadvantage that you must restore the original handler, then call it manually when your payload runs)&lt;br /&gt;
| None&lt;br /&gt;
| New3DS&lt;br /&gt;
| 2015(?)&lt;br /&gt;
| [[User:Derrek|derrek]] (2015?), [[User:Normmatt|Normmatt]] and [[User:SciresM|SciresM]] independently (January 2017).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;superhax&amp;quot;: Boot9 FIRM loading blacklist check is flawed&lt;br /&gt;
| Boot9 only makes sure the &#039;&#039;&#039;start&#039;&#039;&#039; and &#039;&#039;&#039;end&#039;&#039;&#039; address of each section is not covered by a blacklisted region. Thus, it is possible to overwrite blacklisted regions (e.g. ARM9 Exception Vectors) by choosing a FIRM section range that encloses an entire blacklisted region. The vulnerable code looks like this: if(blRegions[i].start &amp;lt;= sectionStart &amp;amp;&amp;amp; blRegions[i].end &amp;gt; sectionStart &amp;lt;nowiki&amp;gt;||&amp;lt;/nowiki&amp;gt; blRegions[i].start &amp;lt;= sectionEnd &amp;amp;&amp;amp; blRegions[i].end &amp;gt; sectionEnd) return false; // failure&lt;br /&gt;
The boot9 vector table (0x08000000) contains 6 entries, each 8-bytes wide (0x30 bytes); Only 0x08000000 through 0x08000040 are blacklisted, and boot9 doesn&#039;t use the region after the vector table (this is convenient because we can put any payload we want after it and not worry about overwriting chunks of boot9 code)&lt;br /&gt;
&lt;br /&gt;
To exploit this, craft a FIRM section payload that&#039;s loaded a few bytes before 0x08000000, add padding to get to 0x08000000 and overwrite the vector table; You could overwrite the data-abort vector and craft a 4th FIRM section that causes a data-abort OR you can just overwrite the IRQ function pointer at 0x08000004 (make sure your payload replaces the original boot9 function pointer); you can point the rest of the vectors to infinite loops since they shouldn&#039;t be triggered.&lt;br /&gt;
| None&lt;br /&gt;
| New3DS&lt;br /&gt;
| August 2015&lt;br /&gt;
| [[User:Plutoo|plutoo]], [[User:Yellows8|yellows8]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== ARM9 software ==&lt;br /&gt;
&lt;br /&gt;
=== arm9loader ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Summary&lt;br /&gt;
!  Description&lt;br /&gt;
!  Successful exploitation result&lt;br /&gt;
!  Fixed in [[FIRM]] system version&lt;br /&gt;
!  Last [[FIRM]] system version this flaw was checked for&lt;br /&gt;
!  Timeframe this was discovered&lt;br /&gt;
!  Public disclosure timeframe&lt;br /&gt;
!  Discovered by&lt;br /&gt;
|-&lt;br /&gt;
| Generating the keysector console-unique keys with ITCM+Boot9&lt;br /&gt;
| [[Bootloader|Boot9]] decrypts the 0x100-byte [[OTP_Registers|OTP]] using AES-CBC with keydata stored in Boot9. If hash verification is successful, the plaintext of the first 0x90-bytes are copied into [[Memory_layout|ITCM]]. This is the &#039;&#039;exact&#039;&#039; &#039;&#039;same&#039;&#039; region hashed by arm9loader when generating the console-unique keys for decrypting the keysector, except arm9loader uses the raw encrypted OTP.&lt;br /&gt;
&lt;br /&gt;
Therefore, with the OTP keydata+IV from Boot9 you can: encrypt the 0x90-bytes from ITCM, then hash the output to get the console-unique keys for the system&#039;s keysector. This can even be done for Old3DS which doesn&#039;t have the arm9loader keysector officially.&lt;br /&gt;
&lt;br /&gt;
It&#039;s unknown why arm9loader only used the first 0x90-bytes of OTP. Using more data from OTP would&#039;ve prevented this. Fixing this would require doing exactly that, but that would also mean updating the NAND keysector(which is dangerous).&lt;br /&gt;
| See description.&lt;br /&gt;
| None&lt;br /&gt;
| &lt;br /&gt;
| 2015&lt;br /&gt;
| January 6, 2017&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| Rearrangable keys in the NAND keystore&lt;br /&gt;
| Due to the keystore being encrypted with AES-ECB, one can rearrange blocks and still have the NAND keystore decrypt in a deterministic way. &lt;br /&gt;
&lt;br /&gt;
Using 10.0 FIRM it is possible to rearrange keys such that ARM9 memory is executed. As such using existing ARM9 execution 10.0 FIRM can be written to NAND and a payload written to memory, with the payload to be executed post-K9L using an MCU reboot.&lt;br /&gt;
| arm9loaderhax given existing ARM9 code execution&lt;br /&gt;
| None&lt;br /&gt;
| [[11.3.0-36|11.3.0-X]]&lt;br /&gt;
| Early 2016&lt;br /&gt;
| 27 September 2016&lt;br /&gt;
| Myria, [[User:Dark samus|dark_samus]]; mathieulh (independently); [[User:Plutooo|plutoo]] (independently) + others&lt;br /&gt;
|-&lt;br /&gt;
| Uncleared OTP hash keydata in console-unique 0x11 key-generation&lt;br /&gt;
| Kernel9Loader does not clear the [[SHA_Registers#SHA_HASH|SHA_HASH register]] after use. As a result, the data stored here as K9L hands over to Kernel9 is the hash of [[OTP_Registers|OTP data]] used to seed the [[FIRM#New_3DS_FIRM|console-unique NAND keystore decryption key]] set on keyslot 0x11.&lt;br /&gt;
&lt;br /&gt;
Retrieving this keydata and the [[Flash_Filesystem#0x12C00|NAND keystore]] of the same device allows calculating the decrypted New3DS NAND keystore (non-unique, common to all New3DS units), which contains AES normal keys, also set on keyslot 0x11, which are then used to derive all current [[AES_Registers#Keyslots|New3DS-only AES keyXs]] including the newer batch introduced in [[9.6.0-24#arm9loader|9.6.0-X]]. From there, it is trivial to perform the same key derivation in order to initialize those keys on any system version, and even on Old3DS.&lt;br /&gt;
&lt;br /&gt;
This can be performed by exploiting the &amp;quot;arm9loaderhax&amp;quot; vulnerability to obtain post-K9L code execution after an MCU reboot (the bootrom section-loading fail is not relevant here, this attack was performed without OTP data by brute-forcing keys), and using this to dump the SHA_HASH register. This attack works on any FIRM version shipping a vulnerable version of K9L, whereas OTP dumping required a boot of &amp;lt;[[3.0.0-6|3.0.0-X]].&lt;br /&gt;
&lt;br /&gt;
This attack results in obtaining the entire (0x200-bytes) NAND keystore - it was confirmed at a later date that this keystore is encrypted with the same key (by comparing the decrypted data from multiple units), and therefore using another key in this store will not remedy the issue as all keys are known (i.e. later, unused keys decrypt to the same 0x200-bytes constant with the same OTP hash). Later keys could have been encrypted differently but this is not the case. As a result of this, it is not possible for Nintendo to use K9L again in its current format for its intended purpose, though this was not news from the moment people dumped a New3DS OTP.&lt;br /&gt;
| Derivation of all New3DS keys generated via the NAND keystore (0x1B &amp;quot;Secure4&amp;quot; etc.)&lt;br /&gt;
| None&lt;br /&gt;
| [[11.3.0-36|11.3.0-X]]&lt;br /&gt;
| ~April 2015, implemented in May 2015&lt;br /&gt;
| 13 January 2016&lt;br /&gt;
| [[User:WulfyStylez|WulfyStylez]], [[User:Dazzozo|Dazzozo]], [[User:Shinyquagsire23|shinyquagsire23]] (complimentary + implemented), [[User:Plutooo|plutoo]], Normmatt (discovered independently)&lt;br /&gt;
|-&lt;br /&gt;
| enhanced-arm9loaderhax&lt;br /&gt;
| See the 32c3 3ds talk.&lt;br /&gt;
Since this is a combination of a trick with the arm9-bootrom + arm9loaderhax, and since you have to manually write FIRM to the firm0/firm1 NAND partitions, this can&#039;t be completely fixed. Any system with existing ARM9 code execution and an OTP/OTP hash dump can exploit this. Additionally, by using the FIRM partition known-plaintext bug and bruteforcing the second entry in the keystore, this can currently be exploited on all New3DS systems without any other prerequisite hacks.&lt;br /&gt;
| arm9loaderhax which automatically occurs at hard-boot.&lt;br /&gt;
| See arm9loaderhax / description.&lt;br /&gt;
| See arm9loaderhax / description.&lt;br /&gt;
| Theorized around mid July, 2015. Later implemented+tested by [[User:Plutooo|plutoo]] and [[User:Derrek|derrek]].&lt;br /&gt;
| 32c3 3ds talk (December 27, 2015)&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| arm9loaderhax: Missing verification block for the 9.6 keys&lt;br /&gt;
| Starting with [[9.6.0-24|9.6.0-X]] a new set of NAND-based keys were introduced. However, no verification block was added to verify that the new key read from NAND is correct. This was technically an issue from [[9.5.0-22|9.5.0-X]] with the original sector+0 keydata, however the below is only possible with [[9.6.0-24|9.6.0-X]] since keyslots 0x15 and 0x16 are generated from different 0x11 keyXs.&lt;br /&gt;
&lt;br /&gt;
Writing an incorrect key to NAND will cause arm9loader to decrypt the ARM9 kernel as garbage and then jump to it.&lt;br /&gt;
&lt;br /&gt;
This allows an hardware-based attack where you can boot into an older exploited firmware, fill all memory with NOP sleds/jump-instructions, and then reboot into executing garbage. By automating this process with various input keydata, eventually you&#039;ll find some garbage that jumps to your code.&lt;br /&gt;
&lt;br /&gt;
This gives very early ARM9 code execution (pre-ARM9 kernel). As such, it is possible to dump RSA keyslots with this and calculate the 6.x [[Savegames#6.0.0-11_Savegame_keyY|save]], and 7.x [[NCCH]] keys. This cannot be used to recover keys initialized by arm9loader itself. This is due to it wiping the area used for its stack during NAND sector decryption and keyslot init. &lt;br /&gt;
&lt;br /&gt;
Due to FIRMs on both Old and New 3DS using the same RSA data, this can be exploited on Old3DS as well, but only if one already has the actual plaintext normalkey from New3DS NAND sector 0x96 offset-0 and has dumped the OTP area of the Old3DS.&lt;br /&gt;
| Recovery of 6.x [[Savegames#6.0.0-11_Savegame_keyY|save key]]/7.x [[NCCH]] key, access to uncleared OTP hash keydata&lt;br /&gt;
| None&lt;br /&gt;
| [[11.3.0-36|11.3.0-X]]&lt;br /&gt;
| March 2015&lt;br /&gt;
| &lt;br /&gt;
| [[User:Plutooo|plutoo]]&lt;br /&gt;
|-&lt;br /&gt;
| arm9loader runs on Old3DS&lt;br /&gt;
| Despite being written only for New3DS, all of arm9loader runs fine on Old3DS.  It&#039;s not until booting Kernel9 that a New3DS FIRM partition would crash on an Old3DS.  As a result, if a bug exists in arm9loader to get control, it can be exploited on Old3DS by writing New3DS FIRM to the FIRM partitions.  Thus, arm9loaderhax works on both Old3DS and New3DS.&lt;br /&gt;
| arm9loader bugs also compromise Old3DS&lt;br /&gt;
| None&lt;br /&gt;
| [[11.3.0-36|11.3.0-X]]&lt;br /&gt;
| Sometime in 2015&lt;br /&gt;
| &lt;br /&gt;
| [[User:Plutooo|plutoo]] presumably&lt;br /&gt;
|-&lt;br /&gt;
| Uncleared New3DS keyslot 0x11&lt;br /&gt;
| Originally the New3DS [[FIRM]] arm9bin loader only cleared keyslot 0x11 when it gets executed at firmlaunch. This was fixed with [[9.5.0-22|9.5.0-X]] by completely clearing keyslot 0x11 immediately after the loader finishes using keyslot 0x11.&lt;br /&gt;
This means that any ARM9 code that can execute before the loader clears the keyslot at firmlaunch(including firmlaunch-hax) can get access to the uncleared keyslot 0x11, which then allows one to generate all &amp;lt;=v9.5 New3DS keyXs which are generated by keyslot 0x11.&lt;br /&gt;
&lt;br /&gt;
Therefore, to completely fix this the loader would have to generate more keys using different keyslot 0x11 keydata. This was done with [[9.6.0-24|9.6.0-X]].&lt;br /&gt;
| New3DS keyXs generation&lt;br /&gt;
| Mostly fixed with [[9.5.0-22|9.5.0-X]], completely fixed with new keys with [[9.6.0-24|9.6.0-X]].&lt;br /&gt;
| &lt;br /&gt;
| February 3, 2015 (one day after [[9.5.0-22|9.5.0-X]] release)&lt;br /&gt;
| &lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Process9 ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Summary&lt;br /&gt;
!  Description&lt;br /&gt;
!  Successful exploitation result&lt;br /&gt;
!  Fixed in [[FIRM]] system version&lt;br /&gt;
!  Last [[FIRM]] system version this flaw was checked for&lt;br /&gt;
!  Timeframe this was discovered&lt;br /&gt;
!  Public disclosure timeframe&lt;br /&gt;
!  Discovered by&lt;br /&gt;
|-&lt;br /&gt;
| Leak of normal-key matching a key-scrambler key&lt;br /&gt;
| New 3DS firmware versions [[8.1.0-0 New3DS|8.1.0]] through [[9.2.0-20|9.2.0]] set the encryption key for [[Amiibo]] data using a hardcoded normal-key in Process9.  In firmware [[9.3.0-21|9.3.0]], Nintendo &amp;quot;fixed&amp;quot; this by using the key scrambler instead, by calculating the keyY value for keyslot 0x39 that results in the same normal-key, then hardcoding that keyY into Process9.&lt;br /&gt;
&lt;br /&gt;
Nintendo&#039;s fix is actually the problem: Nintendo revealed the normal-key matching an unknown keyX and a known keyY.  Combined with the key scrambler using an insecure scrambling algorithm (see &amp;quot;Hardware&amp;quot; above), the key scrambler function could be deduced.&lt;br /&gt;
| Deducing the keyX for keyslot 0x39 and the key scrambler algorithm&lt;br /&gt;
| New 3DS [[9.3.0-21|9.3.0-X]], sort of&lt;br /&gt;
| [[10.0.0-27|10.0.0-X]]&lt;br /&gt;
| Sometime in 2015 after the hardware key-generator was broken.&lt;br /&gt;
| 32c3 3ds talk (December 27, 2015)&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| Leak of normal-key matching a key-generator key&lt;br /&gt;
| During the 3DS&#039; development (June/July 2010) Nintendo added support installing encrypted content ([[CIA]]). Common-key index1 was intended to be a [[AES|hardware generated key]]. However while they added code to generate the key in hardware, they forgot to remove the normal-key for index1 (used elsewhere, likely old debug code). Nintendo later removed the normal key sometime before the first non-prototype firmware release.&lt;br /&gt;
&lt;br /&gt;
Knowing the keyY and the normal-key for common-key index1, the devkit key-generator algorithm can be deduced (see &amp;quot;Hardware&amp;quot; above). Additionally the remaining devkit common-keys can be generated once the common-key keyX is recovered.&lt;br /&gt;
&lt;br /&gt;
Note that the devkit key-generator was discovered to be the same as the retail key-generator.&lt;br /&gt;
| Deducing the keyX for keyslot 0x3D and hardware key-generator algorithm. Generate remaining devkit common-keys.&lt;br /&gt;
| pre-[[1.0.0-0|1.0.0-X]]&lt;br /&gt;
| &lt;br /&gt;
| Shortly after the key-generator was revealed to be flawed at the 32c3 3ds talk&lt;br /&gt;
| January 20, 2016&lt;br /&gt;
| [[User:Jakcron|jakcron]]&lt;br /&gt;
|-&lt;br /&gt;
| Factory firmware is vulnerable to sighax&lt;br /&gt;
| During the 3DS&#039;s development, presumably boot9 was written (including the sighax vulnerability). This vulnerability is also present in factory firmware (and earlier, including 0.11). This was fixed in version 1.0.0-0.&lt;br /&gt;
| Deducing the mechanics of the sighax vulnerability in boot9 without having a dump of protected boot9. ARM9 code execution on factory/earlier firmware.&lt;br /&gt;
| [[1.0.0-0|1.0.0-X]]&lt;br /&gt;
| [[1.0.0-0|1.0.0-X]]&lt;br /&gt;
| May 9, 2017&lt;br /&gt;
| May 19, 2017&lt;br /&gt;
| [[User:SciresM|SciresM]], [[User:Myria|Myria]]&lt;br /&gt;
|-&lt;br /&gt;
| safecerthax &lt;br /&gt;
| O3DS &amp;amp; O2DS SAFE_FIRM is still vulnerable to the PXIAM:ImportCertificates flaw fixed in [[5.0.0-11]] and to SSLoth fixed in [[11.14.0-46]]. It makes it possible to spoof the official NUS update server and remotely trigger the vulnerability in SAFE_FIRM.&lt;br /&gt;
| Remote Arm9 code execution in O3DS/O2DS SAFE_FIRM&lt;br /&gt;
| None&lt;br /&gt;
| [[11.14.0-46|11.14.0-X]]&lt;br /&gt;
| 2020&lt;br /&gt;
| December 18, 2020&lt;br /&gt;
| [[User:Nba_Yoh|MrNbaYoh]]&lt;br /&gt;
|-&lt;br /&gt;
| twlhax: Corrupted SRL header leads to memory overwrite&lt;br /&gt;
| During TWL_FIRM boot, the ARM11 process TwlBg puts launcher.srl, the DSi bootloader, into FCRAM.  TWL_FIRM Process9 then parses the [http://dsibrew.org/wiki/NDS_Format SRL header] to place launcher.srl&#039;s code where DSi mode can execute it.&lt;br /&gt;
&lt;br /&gt;
DSi-mode memory is in FCRAM, but interleaved.  Each byte of DSi-mode memory also exists at some address in 3DS FCRAM space.&lt;br /&gt;
&lt;br /&gt;
Process9 does not validate the RSA signature on launcher.srl, unlike SRLs loaded from cartridge or NAND (DSiWare).  A compromised ARM11 can, in a manner similar to firmlaunchhax, send a launcher.srl with a modified SRL header.  By setting the SRL header&#039;s ARM7/ARM9 load addresses and sizes carefully, accounting for the different memory map and for DSi mode&#039;s interleaved memory, it is possible to overwrite part of Process9&#039;s stack and take control with a ROP chain.&lt;br /&gt;
&lt;br /&gt;
Fixed in 11.8.0-X by... (fill me in)&lt;br /&gt;
| ARM9 code execution (whilst still in 3DS mode)&lt;br /&gt;
| [[11.8.0-41|11.8.0-X]]&lt;br /&gt;
| [[11.8.0-41|11.8.0-X]]&lt;br /&gt;
|&lt;br /&gt;
| August 11, 2018&lt;br /&gt;
| smea&lt;br /&gt;
|-&lt;br /&gt;
| agbhax&lt;br /&gt;
| This is the same issue as twlhax above. Legacy FIRMs share the same OS code (Arm9-side OS, Arm11 kernel), and therefore, the outdated AGB_FIRM can be tricked into executing the still vulnerable PrepareArm9ForTwl function.&lt;br /&gt;
| ARM9 code execution (whilst still in 3DS mode)&lt;br /&gt;
| None&lt;br /&gt;
| [[11.14.0-46|11.14.0-X]]&lt;br /&gt;
|&lt;br /&gt;
| December 17, 2020&lt;br /&gt;
| Everyone&lt;br /&gt;
|-&lt;br /&gt;
| safefirmhax&lt;br /&gt;
| SAFE_MODE_FIRM is almost never updated(even when NATIVE_FIRM is updated for vuln fixes), this can be noticed by &#039;&#039;just&#039;&#039; checking 3dbrew/ninupdates title-listings.&lt;br /&gt;
&lt;br /&gt;
The fix for firmlaunch-hax was only applied to NATIVE_FIRM in [[9.5.0-22|9.5.0-X]], leaving SAFE_FIRM exploitable. With ARM11-kernel execution, one can trigger FIRM-launch in to SAFE_FIRM, do Kernel9 &amp;lt;=&amp;gt; Kernel11 sync, PXI sync and then repeat the original attack on SAFE_FIRM instead.&lt;br /&gt;
| ARM9 code execution&lt;br /&gt;
| [[11.3.0-36|11.3.0-X]]&lt;br /&gt;
| &lt;br /&gt;
| 2012-2013?&lt;br /&gt;
| Wiki: January 2, 2017&lt;br /&gt;
| Everyone&lt;br /&gt;
|-&lt;br /&gt;
| safefirmhax 1.1&lt;br /&gt;
| Nintendo&#039;s original safefirmhax fix was flawed -- they added a global boolean that got set to true whenever a non-sysmodule title got launched (except for a hardcoded repair title id), and panic()&#039;d if that boolean was true to prevent launching safefirm after hax was active. However, because the boolean was initially false after firmlaunch -- With ARM11-kernel execution, one could FIRM-launch into NATIVE_FIRM, and then immediately FIRM-launch again into SAFE_FIRM early in NATIVE_FIRM boot before the boolean got set to true to repeat the safehax attack.&lt;br /&gt;
&lt;br /&gt;
This was fixed by adding additional CFG9_BOOTENV checks to firmlaunch code in 11.4.&lt;br /&gt;
| ARM9 code execution&lt;br /&gt;
| [[11.4.0-37|11.4.0-X]]&lt;br /&gt;
| &lt;br /&gt;
| safefirmhax fix&lt;br /&gt;
| Wiki: April 10, 2017&lt;br /&gt;
| Everyone&lt;br /&gt;
|-&lt;br /&gt;
| ntrcardhax&lt;br /&gt;
| When reading the banner of a NTR title, Process9 relies on a hardware register to know when the banner was fully read.&lt;br /&gt;
However that register is shared between the ARM9 and the ARM11.&lt;br /&gt;
An attacker with k11 control can so make Process9 believe the banner continues forever and so trigger a buffer overflow.&lt;br /&gt;
With a custom banner for a NTR flashcart, this leads to code execution in Process9.&lt;br /&gt;
&lt;br /&gt;
This was fixed by adding bound checks on the read data.&lt;br /&gt;
| ARM9 code execution&lt;br /&gt;
| [[10.4.0-29|10.4.0-X]]&lt;br /&gt;
| &lt;br /&gt;
| March 2015&lt;br /&gt;
| 32c3 3ds talk (December 27, 2015)&lt;br /&gt;
| [[User:Plutooo|plutoo]]&lt;br /&gt;
|-&lt;br /&gt;
| Title downgrading via [[Application_Manager_Services|AM]]([[Application_Manager_Services_PXI|PXI]])&lt;br /&gt;
| When a title is *already* installed, Process9 will compare the installed title-version with the title-version being installed. When the one being installed is older, Process9 would return an error.&lt;br /&gt;
&lt;br /&gt;
However, this can be bypassed by just deleting the title first via the service command(s) for that: with the title removed from the [[Title_Database]], Process9 can&#039;t compare the input title-version with anything. Hence, titles can be downgraded this way.&lt;br /&gt;
&lt;br /&gt;
[[11.0.0-33|11.0.0-X]] fixed this for key system titles (MSET, Home Menu, spider, ErrDisp, SKATER, NATIVE_FIRM, and every retail system module), by checking the version of the title to install against a hard-coded list of (titleID, minimumVersionRequired) pairs.&lt;br /&gt;
| Bypassing title version check at installation, which then allows downgrading any title.&lt;br /&gt;
| [[11.0.0-33|11.0.0-X]], for key system titles.&lt;br /&gt;
| NATIVE_FIRM / AM-sysmodule [[11.0.0-33|11.0.0-X]]&lt;br /&gt;
| ?&lt;br /&gt;
| &lt;br /&gt;
| ?&lt;br /&gt;
|-&lt;br /&gt;
| Anti-downgrade list did not include all system titles initially&lt;br /&gt;
| The anti-downgrade list did not include legacy FIRMs until [[11.8.0-41|11.8.0-X]]. Therefore, legacy FIRMs could still be downgraded.&lt;br /&gt;
| Downgrading legacy FIRMs; allowing to exploit bugs in older legacy FIRMs (of which at least one exists, see below).&lt;br /&gt;
| [[11.8.0-33|11.8.0]]&lt;br /&gt;
| [[11.8.0-33|11.8.0]]&lt;br /&gt;
| ?&lt;br /&gt;
| Wiki: August 5, 2018&lt;br /&gt;
| Everyone&lt;br /&gt;
|-&lt;br /&gt;
| TWL_FIRM cmd-9 unchecked offset&lt;br /&gt;
| In [[1.0.0-0|1.0.0-X]]&#039;s TWL_FIRM, cmds 8 and 9 were not stubbed (whereas in the corresponding NATIVE_FIRM, they were).&lt;br /&gt;
Command 8 does the Process9 initialisation for NTR carts if an NTR cart is inserted (NTR, not TWL, judged by chipid).&lt;br /&gt;
&lt;br /&gt;
Command 9 takes (u32 offset_read, u32 offset_write, u32 offset_read_end), and basically just copies (offset_read_end - offset_read) bytes starting at (offset_read) of [NTR cart header in arm9mem, NTR secure area in fcram, TWL secure area in fcram], to 0x18001000 + offset_write + offset_read.&lt;br /&gt;
&lt;br /&gt;
offset_write is not checked at all, thus this leads to ARM9 code execution as long as any NTR cart, including flashcarts that would normally be blocked by TWL_FIRM, is inserted.&lt;br /&gt;
&lt;br /&gt;
In [[2.0.0-2|2.0.0-X]] TWL_FIRM, those commands were stubbed out.&lt;br /&gt;
| ARM9 code execution&lt;br /&gt;
| [[2.0.0-2|2.0.0-X]]&lt;br /&gt;
| [[2.0.0-2|2.0.0-X]]&lt;br /&gt;
| January 2018&lt;br /&gt;
| Wiki: August 5, 2018&lt;br /&gt;
| [[User:Riley|Riley]]&lt;br /&gt;
|-&lt;br /&gt;
| FIRM launch doesn&#039;t check target FIRM version&lt;br /&gt;
| When executing a FIRM launch, Process9 doesn&#039;t validate that the target FIRM isn&#039;t an old version.  This allows booting an exploitable FIRM from a newer FIRM, if you can get the exploitable FIRM installed.  ([[11.0.0-33|11.0.0-X]] now prevents installing old versions of system titles, but this doesn&#039;t affect titles already installed.)&lt;br /&gt;
&lt;br /&gt;
This had a use after [[9.6.0-24|9.6.0-X]]: on a compromised 3DS running 9.2.0, you could install the 9.6.0 NATIVE_FIRM to FIRM0/FIRM1, but avoid putting it into the NATIVE_FIRM title.  This would boot the 9.2.0 system software but with the 9.6.0 Process9 and Kernel11.  With a user-mode exploit in a sufficiently-privileged application (e.g. mset), you could trigger a FIRM launch back to NATIVE_FIRM, which would load the 9.2.0 Process9 and Kernel11.&lt;br /&gt;
&lt;br /&gt;
9.6.0&#039;s keyslots 0x15 and 0x16 are unknown to 9.2.0, so 9.2.0 would not clear them.  You then could do firmlaunchhax against 9.2.0 to get ARM9 access with keyslots 0x15 and 0x16 set to their proper 9.6.0 values, allowing decrypting 9.6.0&#039;s encrypted titles.  Once the New3DS keystore was dumped, this became moot.&lt;br /&gt;
| Decrypting 9.6.0 NCCH files without dumping New3DS keystore&lt;br /&gt;
| None (but now moot)&lt;br /&gt;
| [[9.6.0-24|9.6.0-X]]&lt;br /&gt;
| March 2015&lt;br /&gt;
| August 12, 2018&lt;br /&gt;
| [[User:Yellows8|Yellows8]], [[User:Myria|Myria]]&lt;br /&gt;
|-&lt;br /&gt;
| FAT FS code null-deref&lt;br /&gt;
| When FSFile:Read is used with a file which is corrupted on a FAT filesystem(in particular SD), Process9 can crash. This particular crash is caused by a function returning NULL instead of an actual ptr due to an error. The caller of that function doesn&#039;t check for NULL which then triggers a read based at NULL.&lt;br /&gt;
&lt;br /&gt;
Sample &amp;quot;fsck.vfat -n -v -V &amp;lt;fat image backup&amp;gt;&amp;quot; output for the above crash:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;...&lt;br /&gt;
Starting check/repair pass.&lt;br /&gt;
&amp;lt;FilePath0&amp;gt; and&lt;br /&gt;
&amp;lt;FilePath1&amp;gt;&lt;br /&gt;
 share clusters.&lt;br /&gt;
 Truncating second to 3375104 bytes.&lt;br /&gt;
&amp;lt;FilePath1&amp;gt;&lt;br /&gt;
 File size is 2787392 bytes, cluster chain length is 16384 bytes.&lt;br /&gt;
 Truncating file to 16384 bytes.&lt;br /&gt;
Checking for unused clusters.&lt;br /&gt;
Reclaimed 1 unused cluster (16384 bytes).&lt;br /&gt;
Checking free cluster summary.&lt;br /&gt;
Free cluster summary wrong (1404490 vs. really 1404491)&lt;br /&gt;
 Auto-correcting.&lt;br /&gt;
Starting verification pass.&lt;br /&gt;
Checking for unused clusters.&lt;br /&gt;
Leaving filesystem unchanged.&amp;lt;/pre&amp;gt;&lt;br /&gt;
| Useless null-based-read&lt;br /&gt;
| None&lt;br /&gt;
| [[9.6.0-24|9.6.0-X]]&lt;br /&gt;
| July 8-9, 2015&lt;br /&gt;
| &lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| [[FS:EnumerateExtSaveData]] crashes process9 when trying to parse a file as an extdata directory in Data Management (MSET9)&lt;br /&gt;
| When FS_EnumerateExtData is called by [[System_Settings|MSET]] to parse 3DS extdata IDs for Data Management, a file that starts with 8 hex digits can crash process9 if placed directly inside the extdata directory. It can crash in various ways based on subtle differences in the way the user triggers the crash event.&lt;br /&gt;
&lt;br /&gt;
While mostly leading to null derefs, in one specific context, process9 jumps directly to an ID1 string being held in ARM9 memory. Surprisingly, the 3DS doesn&#039;t discern what characters are used for the ID1 directory name on the SD, only requiring exactly 32 chars. This allows the attacker to insert arm instructions into the unicode ID1 dirname and take control of the ARM9, and thus, full control of the 3DS.&lt;br /&gt;
| ARM9 code execution (primary)&lt;br /&gt;
| None&lt;br /&gt;
| [[11.17.0-50|11.17.0-X]]&lt;br /&gt;
| April 2022&lt;br /&gt;
| August 7, 2023&lt;br /&gt;
| zoogie&lt;br /&gt;
|-&lt;br /&gt;
| RSA signature padding checks&lt;br /&gt;
| The TWL_FIRM RSA sig padding check code used for all TWL RSA sig-checks has issues, see [[FIRM|here]].&lt;br /&gt;
The main 3DS RSA padding check code(non-certificate, including NATIVE_FIRM) uses the function used with the above to extract more padding + the actual hash from the additional padding. This isn&#039;t really a problem here because there&#039;s proper padding check code which is executed prior to this.&lt;br /&gt;
| &lt;br /&gt;
| None&lt;br /&gt;
| [[9.5.0-22|9.5.0-X]]&lt;br /&gt;
| March 2015&lt;br /&gt;
| &lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| [[AMPXI:ValidateDSiWareSectionMAC]] [[AES_Registers|AES]] keyslot reuse&lt;br /&gt;
| When the input DSiWare section index is higher than &amp;lt;max number of DSiWare sections supported by this FIRM&amp;gt;, Process9 uses keyid 0x40 for calculating the AESMAC, which translates to keyslot 0x40. The result is that the keyslot is left at whatever was already selected before, since the AES selectkeyslot code will immediately  return when keyslot is &amp;gt;=0x40. However, actually exploiting this is difficult: the calculated AESMAC is never returned, this command just compares the calculated AESMAC with the input AESMAC(result-code depends on whether the AESMACs match). It&#039;s unknown whether a timing attack would work with this.&lt;br /&gt;
This is basically a different form of the pxips9 keyslot vuln, except with AESMAC etc.&lt;br /&gt;
| See description.&lt;br /&gt;
| None&lt;br /&gt;
| [[11.3.0-36|11.3.0-X]]&lt;br /&gt;
| March 15, 2015&lt;br /&gt;
| December 29, 2015&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| pxips9 [[AES_Registers|AES]] keyslot reuse&lt;br /&gt;
| This requires access to the [[Process_Services|ps:ps]]/pxi:ps9 services. One way to get access to this would be snshax on system-version &amp;lt;=10.1.0-X(see 32c3 3ds talk).&lt;br /&gt;
When an invalid key-type value is passed to any of the PS commands, Process9 will try to select keyslot 0x40. That aesengine_setkeyslot() code will then immediately return due to the invalid keyslot value. Since that function doesn&#039;t return any errors, Process9 will just continue to do crypto with whatever AES keyslot was selected before the PS command was sent.&lt;br /&gt;
| Reusing the previously used keyslot, for crypto with PS.&lt;br /&gt;
| None&lt;br /&gt;
| [[11.3.0-36|11.3.0-X]]&lt;br /&gt;
| Roughly the same time(same day?) as firmlaunch-hax.&lt;br /&gt;
| December 29, 2015&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| firmlaunch-hax: FIRM header ToCToU&lt;br /&gt;
| This can&#039;t be exploited from ARM11 userland.&lt;br /&gt;
During [[FIRM]] launch, the only FIRM header the ARM9 uses at all is stored in FCRAM, this is 0x200-bytes(the actual used FIRM RSA signature is read to the Process9 stack however). The ARM9 doesn&#039;t expect &amp;quot;anything&amp;quot; besides the ARM9 to access this data.&lt;br /&gt;
With [[9.5.0-22]] the address of this FIRM header was changed from a FCRAM address, to ARM9-only address 0x01fffc00.&lt;br /&gt;
| ARM9 code execution&lt;br /&gt;
| [[9.5.0-22]]&lt;br /&gt;
| &lt;br /&gt;
| 2012, 3 days after [[User:Yellows8|Yellows8]] started Process9 code RE.&lt;br /&gt;
| &lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| Uninitialized data output for (PXI) command replies&lt;br /&gt;
| PXI commands for various services(including some [[Filesystem_services_PXI|here]] and many others) can write uninitialized data (like from ARM registers) to the command reply. This happens with stubbed commands, but this can also occur with certain commands when returning an error.&lt;br /&gt;
Certain ARM11 service commands have this same issue as well.&lt;br /&gt;
| &lt;br /&gt;
| None&lt;br /&gt;
| [[9.3.0-21|9.3.0-X]]&lt;br /&gt;
| ?&lt;br /&gt;
| &lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| [[Filesystem_services_PXI|FSPXI]] OpenArchive SD permissions&lt;br /&gt;
| Process9 does not use the exheader ARM9 access-mount permission flag for SD at all.&lt;br /&gt;
This would mean ARM11-kernelmode code / fs-module itself could directly use FSPXI to access SD card without ARM9 checking for SD access, but this is rather useless since a process is usually running with SD access(Home Menu for example) anyway.&lt;br /&gt;
| &lt;br /&gt;
| None&lt;br /&gt;
| [[9.3.0-21|9.3.0-X]]&lt;br /&gt;
| 2012&lt;br /&gt;
| &lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| [[AMPXI:ExportDSiWare]] export path&lt;br /&gt;
| Process9 allocates memory on Process9 heap for the export path then verifies that the actual allocated size matches the input size. Then Process9 copies the input path from FCRAM to this buffer, and uses it with the Process9 FS openfile code, which use paths in the form of &amp;quot;&amp;lt;mountpoint&amp;gt;:/&amp;lt;path&amp;gt;&amp;quot;.&lt;br /&gt;
Process9 does not check the contents of this path at all before passing it to the FS code, besides writing a NUL-terminator to the end of the buffer.&lt;br /&gt;
| Exporting of DSiWare to arbitrary Process9 file-paths, such as &amp;quot;nand:/&amp;lt;path&amp;gt;&amp;quot; etc. This isn&#039;t really useful since the data which gets written can&#039;t be controlled.&lt;br /&gt;
| None&lt;br /&gt;
| [[9.5.0-22]]&lt;br /&gt;
| April 2013&lt;br /&gt;
| &lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| [[DSiWare_Exports]] [[CTCert]] verification&lt;br /&gt;
| Just like DSi originally did, 3DS verifies the APCert for DSiWare on SD with the CTCert also in the DSiWare .bin. On DSi this was fixed with with system-version 1.4.2 by verifying with the actual console-unique cert instead(stored in NAND), while on 3DS it&#039;s still not fixed.&lt;br /&gt;
On 3DS this is used in conjunction with seedminer to be able to decrypt &amp;amp; modify DSiWare TAD containers and inject them with exploitable DSiWare titles such as sudoku (sudokuhax) and Flipnote JPN (ugopwn)&lt;br /&gt;
| When the movable.sed keyY for the target 3DS is known and the target 3DS CTCert private-key is unknown, importing of modified DSiWare SD .bin files.&lt;br /&gt;
| None.&lt;br /&gt;
| 11.10.0-X&lt;br /&gt;
| April 2013&lt;br /&gt;
| &lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| seedminer: movable.sed keyY vulnerable to brute-force&lt;br /&gt;
| Half of the movable.sed keyY&#039;s 128 bits are leaked through the [[Nandrw/sys/LocalFriendCodeSeed_B|LFCS]], which is available in userland and below. The LFCS itself also leaks almost half of the remaining bits by following the ratio: u32 keyY[3]=1/5(LFCS). The remaining keyY[3] uncertainty of about ±2000 can be greatly reduced by plotting expected error margins with several keyYs. This results in a final uncertainty of about 2^40, easily within practical brute force range of an average modern PC.&lt;br /&gt;
| Knowing the keyY of a given 3ds allows for modification of DSiWare export contents, and chained with several other public vulns, ultimately arm9 execution.&lt;br /&gt;
| None.&lt;br /&gt;
| 11.8.0-X&lt;br /&gt;
| December 2017&lt;br /&gt;
| January 2018&lt;br /&gt;
| zoogie&lt;br /&gt;
|-&lt;br /&gt;
| Improper validation of DSiWare title SRLs&lt;br /&gt;
| The 3DS does not verify if the actual SRL embedded in the title&#039;s directory matches the titleID in the TMD before launching it or importing it from an sd DSiWare export. &lt;br /&gt;
| This allows embedding older, exploitable DSiWare titles in completely different, unexploitable DSiWare titles. Since DSiWare has raw NAND RW, this can result in arm9 control through FIRM known-plaintext and sighax attacks.&lt;br /&gt;
| None.&lt;br /&gt;
| 11.10.0-X&lt;br /&gt;
| 2015?&lt;br /&gt;
| December 2016&lt;br /&gt;
| Everyone&lt;br /&gt;
|-&lt;br /&gt;
| DSiWare import/export functions allow TWL system titles as arguments&lt;br /&gt;
| AM ImportTwlBackup/ExportTwlBackup unnecessarily allow TWL system titles such as DS Download Play to import/export from userland and System Settings -&amp;gt; Data Management (only am:sys is needed for userland). This is difficult to abuse for dsihax injection because no TWL system title has a save file, and any import with a save included will result in FS err C8804464. However, there is at least one dsihax primary that can load a payload from a non-NAND source, and not error if it can&#039;t access its public.sav (JPN Flipnote Studio v0).&lt;br /&gt;
| When combined with other public vulns, arm9 code execution.&lt;br /&gt;
| None.&lt;br /&gt;
| 11.10.0-X&lt;br /&gt;
| May 2018&lt;br /&gt;
| Sept 2018&lt;br /&gt;
| zoogie&lt;br /&gt;
|-&lt;br /&gt;
| [[Gamecard_Services_PXI]] unchecked REG_CTRCARDCNT transfer-size&lt;br /&gt;
| The u8 REG_CTRCARDCNT transfer-size parameter for the [[Gamecard_Services_PXI]] read/write CTRCARD commands is used as an index for an array of u16 values. Before [[5.0.0-11|5.0.0-X]] this u8 value wasn&#039;t checked, thus out-of-bounds reads could be triggered(which is rather useless in this case).&lt;br /&gt;
| Out-of-bounds read for a value which gets written to a register.&lt;br /&gt;
| [[5.0.0-11|5.0.0-X]]&lt;br /&gt;
| &lt;br /&gt;
| 2013?&lt;br /&gt;
| &lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| [[PXI_Registers|PXI]] cmdbuf buffer overrun&lt;br /&gt;
| The Process9 code responsible [[PXI_Registers|PXI]] communications didn&#039;t verify the size of the incoming command before writing it to a C++ member variable. &lt;br /&gt;
| Probably ARM9 code execution&lt;br /&gt;
| [[5.0.0-11|5.0.0-11]]&lt;br /&gt;
| &lt;br /&gt;
| March 2015, original timeframe if any unknown&lt;br /&gt;
| &lt;br /&gt;
| [[User:Plutooo|plutoo]]/[[User:Yellows8|Yellows8]]/maybe others(?)&lt;br /&gt;
|-&lt;br /&gt;
| [[Application_Manager_Services_PXI|PXIAM]]:ImportCertificates (See also [[Application_Manager_Services|this]])&lt;br /&gt;
| When handling this command, Process9 allocates a 0x2800-byte heap buffer, then copies the 4 FCRAM input buffers to this heap buffer without checking the sizes at all(only the buffers with non-zero sizes are copied). Starting with [[5.0.0-11|5.0.0-X]], the total combined size of the input data must be &amp;lt;=0x2800.&lt;br /&gt;
| ARM9 code execution&lt;br /&gt;
| [[5.0.0-11|5.0.0-X]]&lt;br /&gt;
| &lt;br /&gt;
| May 2013&lt;br /&gt;
| &lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| [[Process_Services_PXI|PS RSA]] commands buffer overflows&lt;br /&gt;
| pxips9 cmd1(not accessible via ps:ps) and VerifyRsaSha256: unchecked copy to a buffer in Process9&#039;s .bss, from the input FCRAM buffer. The buffer is located before the pxi cmdhandler threads&#039; stacks. SignRsaSha256 also has a buf overflow, but this isn&#039;t exploitable.&lt;br /&gt;
The buffer for this is the buffer for the signature data. With v5.0, the signature buffer was moved to stack, with a check for the signature data size. When the signature data size is too large, Process9 uses [[SVC|svcBreak]].&lt;br /&gt;
| ARM9 code execution&lt;br /&gt;
| [[5.0.0-11|5.0.0-X]]&lt;br /&gt;
| &lt;br /&gt;
| 2012&lt;br /&gt;
| &lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| [[PXI_Registers|PXI]] pxi_id bad check&lt;br /&gt;
| The Process9 code responsible for [[PXI_Registers|PXI]] communications read pxi_id as a signed char. There were two flaws:&lt;br /&gt;
* They used it as index to a lookup-table without checking the value at all.&lt;br /&gt;
* Another function verified that pxi_id &amp;lt; 7, allowing negative values to pass the check. This would also cause an out-of-range table-lookup.&lt;br /&gt;
| Maybe ARM9 code execution&lt;br /&gt;
| [[3.0.0-5|3.0.0-5]]&lt;br /&gt;
|&lt;br /&gt;
| March 2015, originally 2012 for the first issue at least&lt;br /&gt;
| &lt;br /&gt;
| [[User:Plutooo|plutoo]], [[User:Yellows8|Yellows8]], maybe others(?)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Kernel9 ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Summary&lt;br /&gt;
!  Description&lt;br /&gt;
!  Successful exploitation result&lt;br /&gt;
!  Fixed in [[FIRM]] system version&lt;br /&gt;
!  Last [[FIRM]] system version this flaw was checked for&lt;br /&gt;
!  Timeframe this was discovered&lt;br /&gt;
!  Discovered by&lt;br /&gt;
|-&lt;br /&gt;
| [[CONFIG Registers#CFG9_SYSPROT9|CFG9_SYSPROT9]] bit1 not set by Kernel9&lt;br /&gt;
| Old versions of Kernel9 never set bit1 of [[CONFIG Registers#CFG9_SYSPROT9|CFG9_SYSPROT9]]. This leaves the [[OTP Registers|0x10012000]]-region unprotected (this region should be locked early during boot!). Since it&#039;s never locked, you can dump it once you get ARM9 code execution.&lt;br /&gt;
&lt;br /&gt;
From [[3.0.0-5|3.0.0-X]] this was fixed by setting the bit in Kernel9 after poking some registers in that region. On New3DS arm9loader sets this bit instead of Kernel9, which is exploitable through a hardware + software vulnerability (see arm9loaderhax / description).&lt;br /&gt;
&lt;br /&gt;
This flaw resurged when it gained a new practical use: retrieving the OTP data for a New3DS console in order to decrypt the key data used in arm9loader (see enhanced-arm9loaderhax / description). This was performed by downgrading to a vulnerable system version. By accounting for differences in CTR-NAND crypto (0x05 -&amp;gt; 0x04, see partition encryption types [[Flash_Filesystem#NAND_structure|here]]) and using an Old3DS [[NCSD#NCSD_header|NCSD Header]], it is possible to boot a New3DS using Old3DS firmware 1.0-2.x to retrieve the required OTP data using this flaw.&lt;br /&gt;
| Dumping the [[OTP Registers|OTP]] area.&lt;br /&gt;
Decrypting New3DS sector 0x96 keyblock.&lt;br /&gt;
| [[3.0.0-5|3.0.0-X]]&lt;br /&gt;
|&lt;br /&gt;
| February 2015&lt;br /&gt;
| [[User:Plutooo|plutoo]], Normmatt independently&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== ARM11 software ==&lt;br /&gt;
=== Kernel11 ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Summary&lt;br /&gt;
!  Description&lt;br /&gt;
!  Successful exploitation result&lt;br /&gt;
!  Fixed in [[FIRM]] system version&lt;br /&gt;
!  Last [[FIRM]] system version this flaw was checked for&lt;br /&gt;
!  Timeframe this was discovered&lt;br /&gt;
!  Discovered by&lt;br /&gt;
|-&lt;br /&gt;
| [[SVC|svcUnbindInterrupt]] double free when irqId = 15&lt;br /&gt;
| svcBindInterrupt and svcUnbindInterrupt give special treatment to irqId 15 (FIQ helper): the access control list is bypassed and the provided KInterruptEvent (event or semaphore, via handle) is stored inside a singleton static object after having its refcount increased by 1.&lt;br /&gt;
&lt;br /&gt;
svcUnbindInterrupt assumes that the user-provided handle is what is stored in the singleton and will decref the user-provided KInterruptEvent twice, causing a use-after-free if the attacker didn&#039;t actually provide an handle to the same event or semaphore.&lt;br /&gt;
&lt;br /&gt;
This was &amp;quot;fixed&amp;quot; on [[11.14.0-46|11.14.0-X]] by preventing irqId 15 to be bound on retail units altogether (in both functions).&lt;br /&gt;
| Arm11 kernel code execution&lt;br /&gt;
| [[11.14.0-46|11.14.0-X]] (only on retail units)&lt;br /&gt;
| [[11.14.0-46|11.14.0-X]]&lt;br /&gt;
| 2019&lt;br /&gt;
| [[User:TuxSH|TuxSH]], maybe others&lt;br /&gt;
|-&lt;br /&gt;
| [[SVC|svcKernelSetState]] op=3 could map the NULL page&lt;br /&gt;
| svcKernelSetState op=3 param1=1 maps the firmlaunch parameters page to the user-specified VA.&lt;br /&gt;
&lt;br /&gt;
It had previously no check, allowing the attacker to map data at VA 0.&lt;br /&gt;
&lt;br /&gt;
Starting from [[11.14.0-46|11.14.0-X]], the VA must be in the standard 0x10000000-0x14000000 address range.&lt;br /&gt;
| Mapping the NULL page (as RW) to leverage other kernel vulnerabilities&lt;br /&gt;
| [[11.14.0-46|11.14.0-X]]&lt;br /&gt;
| [[11.14.0-46|11.14.0-X]]&lt;br /&gt;
| 2019&lt;br /&gt;
| [[User:TuxSH|TuxSH]]&lt;br /&gt;
|-&lt;br /&gt;
| [[SVC|svcMapProcessMemory]] can map the NULL page&lt;br /&gt;
| svcMapProcessMemory&#039;s destination VA is unchecked.&lt;br /&gt;
&lt;br /&gt;
By passing a big enough &amp;quot;size&amp;quot; parameter, an attacker can map chunks of data at VA 0 in the destination (caller) process.&lt;br /&gt;
| Mapping the NULL page (as RW) to leverage other kernel vulnerabilities&lt;br /&gt;
| None&lt;br /&gt;
| [[11.14.0-46|11.14.0-X]]&lt;br /&gt;
| 2020&lt;br /&gt;
| [[User:TuxSH|TuxSH]]&lt;br /&gt;
|-&lt;br /&gt;
| Resource limit use-after-free&lt;br /&gt;
| When assigning a KResourceLimit to a KProcess, the reslimit&#039;s refcounter doesn&#039;t get incremented. This essentially means all KResourceLimit get freed if pm gets somehow terminated.&lt;br /&gt;
&lt;br /&gt;
It turns out it is possible to ask pm (via ns:s or pm:app) to terminate itself along all other KIPs simply by passing TID 0004000100001000.&lt;br /&gt;
&lt;br /&gt;
Calling [[SVC|svcGetResourceLimit]] afterwards triggers a use-after-free. This is rather difficult to exploit, however: there is one slot left in the reslimit slabheap. An attacker either has to map the NULL page as R(W)X (svcControlProcessMemory vuln fixed on [[11.8.0-41|11.8.0-X]]), or use one of the map-null exploits above while having access to svcCreateResourceLimit (with the only one that is easy enough to use in that context having been fixed on [[11.14.0-46|11.14.0-X]], anyway).&lt;br /&gt;
| Arm11 kernel code execution&lt;br /&gt;
| None (although near impossible to exploit on [[11.14.0-46|11.14.0-X]])&lt;br /&gt;
| [[11.14.0-46|11.14.0-X]]&lt;br /&gt;
| 2020&lt;br /&gt;
| [[User:TuxSH|TuxSH]]&lt;br /&gt;
|-&lt;br /&gt;
| [[SVC|svcSetProcessIdealProcessor]] reference count overflow and therefore use-after-free.&lt;br /&gt;
| The SVC receive two arguments: handle and idealprocessor. The handle is used to get the KProcess object and the KProcess-&amp;gt;refCnt gets incremented,later the function check if the KProcess-&amp;gt;mem_type != BASE and if yes, it checks for idealprocessor == 2 or idealprocessor != 3. The problem here is that if you pass the idealprocessor = 3 it won&#039;t meet any condition and return the error 0xD9001BEA without decrement the reference count. &lt;br /&gt;
It can be abused to overflow the KProcess reference count that will lead to an Use-after-free. &lt;br /&gt;
| Before [[11.2.0-35|11.2.0-X]]: reference count overflow and therefore use-after-free.&lt;br /&gt;
| &lt;br /&gt;
| [[11.6.0-39|11.6.0-X]]&lt;br /&gt;
| November 2, 2017&lt;br /&gt;
| [[User:st4rk|st4rk]]&lt;br /&gt;
|-&lt;br /&gt;
| [[SVC|svcGetThreadList]] process reference leak&lt;br /&gt;
| When given a valid process handle (including &amp;lt;code&amp;gt;0xFFFF8001&amp;lt;/code&amp;gt;), svcGetThreadList forgets to decrement the reference count of the underlying [[KProcess]] instance, after having finished using it.&lt;br /&gt;
| Before [[11.2.0-35|11.2.0-X]]: reference count overflow and therefore use-after-free, but this UAF was most likely not exploitable&lt;br /&gt;
| &lt;br /&gt;
| [[11.3.0-36|11.3.0-X]]&lt;br /&gt;
| April 3, 2017&lt;br /&gt;
| [[User:TuxSH|TuxSH]]&lt;br /&gt;
|-&lt;br /&gt;
| kernelhax via gspwn&lt;br /&gt;
| Originally the kernel didn&#039;t initialize [[CONFIG11_Registers#CFG11_GPUPROT|CFG11_GPUPROT]]. Since it&#039;s 0 at hard-boot, this allowed the GPU to access the entire FCRAM + AXIWRAM.&lt;br /&gt;
| Entire FCRAM+AXIWRAM R/W.&lt;br /&gt;
| [[3.0.0-5|3.0.0-X]]&lt;br /&gt;
| &lt;br /&gt;
| February 7, 2017&lt;br /&gt;
| [[User:Plutooo|plutoo]], [[User:Yellows8|Yellows8]] partly&lt;br /&gt;
|-&lt;br /&gt;
| fasthax&lt;br /&gt;
| When a KTimer is created in pulse mode, the kernel calls a virtual function to reset the timer each time it pulses. The scheduler is locked for that core to avoid race conditions, but another core can call CloseHandle on the timer and free it, leading to a UAF vtable call.&lt;br /&gt;
| See description.&lt;br /&gt;
| [[11.3.0-36|11.3.0-X]]&lt;br /&gt;
| [[11.3.0-36|11.3.0-X]]&lt;br /&gt;
| May 2016&lt;br /&gt;
| nedwill&lt;br /&gt;
|-&lt;br /&gt;
| ipctakeover&lt;br /&gt;
| When sending cmdreplies, it does not validate that the src_addr and src_size match the equivalent dst_addr and dst_size. With a modified addr/size specified in a cmdreply for an output buffer, the data-copy for the first/last pages could be used to overwrite data outside of the buffer specified by the original process.&lt;br /&gt;
&lt;br /&gt;
Used by ctr-httpwn as of v1.2, for &amp;quot;ipctakeover/bosshaxx&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
This can be used to takeover processes where the process is using your service session. Like HTTPC -&amp;gt; BOSS, for bosshaxx above. NIM takeover can be done too(actual stack buffer overflow can trigger), etc.&lt;br /&gt;
| See description.&lt;br /&gt;
| None&lt;br /&gt;
| [[11.3.0-36|11.3.0-X]]&lt;br /&gt;
| November 26, 2016&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| Using IPC input buffers as output buffers&lt;br /&gt;
| When sending cmdreplies, it does not validate that the cmdreply descriptor type matches the equivalent cmdreq descriptor type. This could be used by an exploited sysmodule to use what was intended as an input-buffer as an output-buffer, and also combine other IPC vuln(s) with this.&lt;br /&gt;
&lt;br /&gt;
Used by ctr-httpwn as of v1.2, for &amp;quot;ipctakeover/bosshaxx&amp;quot;.&lt;br /&gt;
| See description.&lt;br /&gt;
| None&lt;br /&gt;
| [[11.3.0-36|11.3.0-X]]&lt;br /&gt;
| November 2016&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
|  [[SVC]] table too small&lt;br /&gt;
|  The table of function pointers for SVC&#039;s only contains entries up to 0x7D, but the biggest allowed SVC for the table is 0x7F. Thus, executing SVC7E or SVC7F would make the SVC-handler read after the buffer, and interpret some ARM instructions as function pointers.&lt;br /&gt;
&lt;br /&gt;
However, this would require patching the kernel .text or modifying SVC-access-control. Even if you could get these to execute, they would still jump to memory that isn&#039;t mapped as executable.&lt;br /&gt;
| &lt;br /&gt;
|  None&lt;br /&gt;
| [[11.3.0-36|11.3.0-X]]&lt;br /&gt;
| 2012&lt;br /&gt;
| Everyone&lt;br /&gt;
|-&lt;br /&gt;
|  [[SVC|svcBackdoor (0x7B)]]&lt;br /&gt;
|  This backdoor allows executing SVC-mode code at the user-specified code-address. This is used by Process9, using this on the ARM11 (with NATIVE_FIRM) required patching the kernel .text or modifying SVC-access-control.&lt;br /&gt;
| See description&lt;br /&gt;
| [[11.0.0-33|11.0.0-X]] (deleted)&lt;br /&gt;
| &lt;br /&gt;
|&lt;br /&gt;
| Everyone&lt;br /&gt;
|-&lt;br /&gt;
| veryslowpidhax&lt;br /&gt;
| &#039;&#039;&#039;This is completely different from the kernelmode-code-execution vuln described in the below separate entry.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
When updating the kernel global PID counter under [[SVC|svcCreateProcess]] the kernel does not check for wraparound to 0x0(the PID for the very first process). This only matters because [[Services|SM-module]] allows processes with PID value less than &amp;lt;total ARM11 FIRM modules&amp;gt; to access &#039;&#039;all&#039;&#039; services, without checking exheader service-access-control; and because Kernel11 checks for the PID to be 1 (loader) to use the input mem-region value on ControlMemory. This alone does not affect access the [[SVC|SVCs]] access table at all.&lt;br /&gt;
&lt;br /&gt;
Inlined ldrex+strex code is used for updating the above counter. [[11.2.0-35|11.2.0-X]] had changes for similar code, but it was only for dedicated ldrex+strex functions(mainly for kernel objects) and hence this PID code was not affected.&lt;br /&gt;
&lt;br /&gt;
With launching+terminating a sysmodule repeatedly with this via ns:s, it would take weeks to finish(if not at least about a month?).&lt;br /&gt;
| Access to all [[Services_API|services]], ControlMemory on any given mem-region.&lt;br /&gt;
| None&lt;br /&gt;
| [[11.3.0-36|11.3.0-X]]&lt;br /&gt;
| 2012 maybe?&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
|  slowhax/waithax&lt;br /&gt;
|  svcWaitSynchronizationN does not decrement the references to valid handles in an array before returning an error when it encounters an invalid handle. This allows one to (slowly) overflow the reference count for a handle object to zero.&lt;br /&gt;
| ARM11 kernel-mode code execution&lt;br /&gt;
| [[11.2.0-35|11.2.0-X]]&lt;br /&gt;
| [[11.2.0-35|11.2.0-X]]&lt;br /&gt;
| 2016&lt;br /&gt;
| nedwill, [[User:Derrek|derrek]]&lt;br /&gt;
|-&lt;br /&gt;
| [[Memory_layout#ARM11_Detailed_virtual_memory_map|0xEFF00000]] / 0xDFF00000 ARM11 kernel virtual-memory&lt;br /&gt;
| The ARM11 kernel-mode 0xEFF00000/0xDFF00000 virtual-memory(size 0x100000) is mapped to phys-mem 0x1FF00000(entire DSP-mem + entire AXIWRAM), with permissions RW-. This is used during ARM11 kernel startup for loading the FIRM-modules from the FIRM section located in DSP-mem, this never seems to be used after that, however. This is never unmapped either.&lt;br /&gt;
| &lt;br /&gt;
| None&lt;br /&gt;
| [[11.3.0-36|11.3.0-X]]&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| memchunkhax2.1&lt;br /&gt;
| Nintendo&#039;s fix for memchunkhax2 in [[10.4.0-29|10.4.0-X]] did not fix the GPU case: one may cause the requisite ToCToU race using gspwn, bypassing the new validation.&lt;br /&gt;
derrek&#039;s original 32c3 presentation for memchunkhax2 commented that a GPU-based attack was possible, but would be difficult.  However, memchunkhax2.1 showed that it was possible to do fairly reliably.&lt;br /&gt;
| ARM11 kernel code execution&lt;br /&gt;
| [[11.0.0-33|11.0.0-X]], via the new [[Memory_Management#MemoryBlockHeader|memchunkhdr]] MAC which prevents modifying memchunkhdr data with DMA.&lt;br /&gt;
| [[11.0.0-33|11.0.0-X]]&lt;br /&gt;
|&lt;br /&gt;
| [[User:Derrek|derrek]], aliaspider&lt;br /&gt;
|-&lt;br /&gt;
| memchunkhax2&lt;br /&gt;
| When allocating a block of memory, the &amp;quot;next&amp;quot; pointer of the [[Memory_Management#MemoryBlockHeader|memchunkhdr]] is accessed without being checked after being mapped to userland.&lt;br /&gt;
This allows a race condition, where the process can change the next pointer just before it&#039;s accessed. By pointing the next pointer to a crafted memchunckhdr in the kernel SlabHeap, some of the SlabHeap is allocated to the calling process, allowing to change vtables of kernel objects. &lt;br /&gt;
| ARM11 kernel code execution&lt;br /&gt;
| [[10.4.0-29|10.4.0-X]] (partially, see memchunkhax2.1)&lt;br /&gt;
| [[10.4.0-29|10.4.0-X]]&lt;br /&gt;
|&lt;br /&gt;
| [[User:Derrek|derrek]]&lt;br /&gt;
|-&lt;br /&gt;
| heaphax&lt;br /&gt;
| Can change the size of free memchunk structures stored in FCRAM using DMA, which leads to the ability to allocate memory chunks over already-allocated memory. This can be used in the SYSTEM region to allocate RW memory over any part of the NS system module, which is enough to take it over.&lt;br /&gt;
| Code execution with access to all of NS&#039;s privileges. (including downgrading) Code execution within any applet.&lt;br /&gt;
| [[11.0.0-33|11.0.0-X]], via the new [[Memory_Management#MemoryBlockHeader|memchunkhdr]] MAC which prevents modifying memchunkhdr data with DMA.&lt;br /&gt;
| [[11.0.0-33|11.0.0-X]]&lt;br /&gt;
| April 2015 ?&lt;br /&gt;
| smea&lt;br /&gt;
|-&lt;br /&gt;
| snshax&lt;br /&gt;
| Can force creation of Safe NS process into gspwn-able memory, allowing for takeover.&lt;br /&gt;
| Code execution with access to all of NS&#039;s privileges. (including downgrading)&lt;br /&gt;
| [[10.1.0-27|10.1.0-X]]&lt;br /&gt;
| [[10.1.0-27|10.1.0-X]]&lt;br /&gt;
| April 2015 ?&lt;br /&gt;
| smea&lt;br /&gt;
|-&lt;br /&gt;
|  AffinityMask/processorid validation&lt;br /&gt;
|  With [[10.0.0-27|10.0.0-X]] the following functions were updated: svcGetThreadAffinityMask, svcGetProcessAffinityMask, svcSetProcessAffinityMask, and svcCreateThread. The code changes for all but svcCreateThread are identical.&lt;br /&gt;
The original code with the first 3 did the following: &lt;br /&gt;
* if(u32_processorcount &amp;gt; ~0x80000001)return 0xe0e01bfd;&lt;br /&gt;
* if(s32_processorcount &amp;gt; &amp;lt;total_cores&amp;gt;)return 0xd8e007fd;&lt;br /&gt;
The following code replaced the above:&lt;br /&gt;
* if(u32_processorcount &amp;gt;= &amp;lt;total_cores+1&amp;gt;)return 0xd8e007fd;&lt;br /&gt;
In theory the latter should catch everything that the former did, so it&#039;s unknown if this was really a security issue.&lt;br /&gt;
&lt;br /&gt;
The svcCreateThread changes with [[10.0.0-27|10.0.0-X]] definitely did fix a security issue.&lt;br /&gt;
* Original code: &amp;quot;if(s32_processorid &amp;gt; &amp;lt;total_cores&amp;gt;)return 0xd8e007fd;&amp;quot;&lt;br /&gt;
* New code: &amp;quot;if(s32_processorid &amp;gt;= &amp;lt;total_cores&amp;gt; || s32_processorid &amp;lt;= -4)return 0xd8e007fd;&amp;quot;&lt;br /&gt;
This fixed an off-by-one issue: if one would use processorid=total_cores, which isn&#039;t actually a valid value, svcCreateThread would accept that value on &amp;lt;[[10.0.0-27|10.0.0-X]]. This results in data being written out-of-bounds(baseaddr = arrayaddr + entrysize*processorid), which has the following result:&lt;br /&gt;
* Old3DS: Useless kernel-mode crash due to accessing unmapped memory.&lt;br /&gt;
* New3DS: uncontrolled data write into a kernel-mode L1 MMU-table. This isn&#039;t really useful: the data can&#039;t be controlled, and the data which gets overwritten is all-zero anyway(this isn&#039;t anywhere near MMU L1 entries for actually mapped memory).&lt;br /&gt;
The previous version also allowed large negative s32_processorid values(negative processorid values are special values not actual procids), but it appears using values like that won&#039;t actually do anything(meaning no crash) besides the thread not running / thread not running for a while(besides triggering a kernelpanic with certain s32_processorid value(s)).&lt;br /&gt;
| Nothing useful&lt;br /&gt;
|  [[10.0.0-27|10.0.0-X]]&lt;br /&gt;
| [[10.0.0-27|10.0.0-X]]&lt;br /&gt;
| svcCreateThread issue: May 31, 2015. The rest: September 8, 2015, via v9.6-&amp;gt;v10.0 ARM11-kernel code-diff.&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| memchunkhax&lt;br /&gt;
| The kernel originally did not validate the data stored in the FCRAM kernel heap [[Memchunkhdr|memchunk-headers]] for free-memory at all. Exploiting this requires raw R/W access to these memchunk-headers, like physical-memory access with gspwn.&lt;br /&gt;
&lt;br /&gt;
There are &#039;&#039;multiple&#039;&#039; ways to exploit this, but the end-result for most of these is the same: overwrite code in AXIWRAM via the 0xEFF00000/0xDFF00000 kernel virtual-memory mapping.&lt;br /&gt;
&lt;br /&gt;
This was fixed in [[9.3.0-21|9.3.0-X]] by checking that the memchunk(including size, next, and prev ptrs) is located within the currently used heap memory. The kernel may also check that the next/prev ptrs are valid compared to other memchunk-headers basically. When any of these checks fail, kernelpanic() is called.&lt;br /&gt;
| When combined with other flaws: ARM11-kernelmode code execution&lt;br /&gt;
| [[9.3.0-21|9.3.0-21]]&lt;br /&gt;
| &lt;br /&gt;
| February 2014&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| Multiple [[KLinkedListNode|KLinkedListNode]] SlabHeap use after free bugs&lt;br /&gt;
| The ARM11-kernel did access the &#039;key&#039; field of [[KLinkedListNode|KLinkedListNode]] objects, which are located on the SlabHeap, after freeing them. Thus, triggering an allocation of a new [[KLinkedListNode|KLinkedListNode]] object at the right time could result in a type-confusion. Pseudo-code:&lt;br /&gt;
SlabHeap_free(KLinkedListNode);&lt;br /&gt;
KObject *obj = KLinkedListNode-&amp;gt;key;  // the object there might have changed!&lt;br /&gt;
This bug appeared all over the place.&lt;br /&gt;
| ARM11-kernelmode code exec maybe&lt;br /&gt;
| [[8.0.0-18|8.0.0-18]]&lt;br /&gt;
| &lt;br /&gt;
| April 2015&lt;br /&gt;
| [[User:Derrek|derrek]]&lt;br /&gt;
|-&lt;br /&gt;
| PXI [[RPC_Command_Structure|Command]] input/output buffer permissions&lt;br /&gt;
| Originally the ARM11-kernel didn&#039;t check permissions for PXI input/output buffers for commands. Starting with [[6.0.0-11|6.0.0]] PXI input/output buffers must have RW permissions, otherwise kernelpanic is triggered.&lt;br /&gt;
| &lt;br /&gt;
| [[6.0.0-11|6.0.0-11]]&lt;br /&gt;
| &lt;br /&gt;
| 2012&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| [[SVC|svcStartInterProcessDma]]&lt;br /&gt;
| For svcStartInterProcessDma, the kernel code had the following flaws:&lt;br /&gt;
&lt;br /&gt;
* Originally the ARM11-kernel read the input DmaConfig structure directly in kernel-mode(ldr(b/h) instructions), without checking whether the DmaConfig address is readable under userland. This was fixed by copying that structure to the SVC-mode stack, using the ldrbt instruction.&lt;br /&gt;
&lt;br /&gt;
* Integer overflows for srcaddr+size and dstaddr+size are now checked(with [[6.0.0-11]]), which were not checked before.&lt;br /&gt;
&lt;br /&gt;
* The kernel now also checks whether the srcaddr/dstaddr (+size) is within userland memory (0x20000000), the kernel now (with [[6.0.0-11]]) returns an error when the address is beyond userland memory. Using an address &amp;gt;=0x20000000 would result in the kernel reading from the process L1 MMU table, beyond the memory allocated for that MMU table(for vaddr-&amp;gt;physaddr conversion). &lt;br /&gt;
| &lt;br /&gt;
| [[6.0.0-11]]&lt;br /&gt;
| &lt;br /&gt;
| DmaConfig issue: unknown. The rest: 2014&lt;br /&gt;
| [[User:Plutooo|plutoo]], [[User:Yellows8|Yellows8]] independently&lt;br /&gt;
|-&lt;br /&gt;
| [[SVC|svcControlMemory]] Parameter checks&lt;br /&gt;
| For svcControlMemory the parameter check had these two flaws:&lt;br /&gt;
&lt;br /&gt;
* The allowed range for addr0, addr1, size parameters depends on which MemoryOperation is being specified. The limitation for GSP heap was only checked if op=(u32)0x10003. By setting a random bit in op that has no meaning (like bit17?), op would instead be (u32)0x30003, and the range-check would be less strict and not accurate. However, the kernel doesn&#039;t actually use the input address for LINEAR memory-mapping at all besides the range-checks, so this isn&#039;t actually useful. This was fixed in the kernel by just checking for the LINEAR bit, instead of comparing the entire MemoryOperation value with 0x10003.&lt;br /&gt;
&lt;br /&gt;
* Integer overflows on (addr0+size) are now checked that previously weren&#039;t (this also applies to most other address checks elsewhere in the kernel).&lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
| [[5.0.0-11]]&lt;br /&gt;
| &lt;br /&gt;
|&lt;br /&gt;
| [[User:Plutooo|plutoo]]&lt;br /&gt;
|-&lt;br /&gt;
| [[RPC_Command_Structure|Command]] request/response buffer overflow&lt;br /&gt;
| Originally the kernel did not check the word-values from the command-header. Starting with [[5.0.0-11]], the kernel will trigger a kernelpanic() when the total word-size of the entire command(including the cmd-header) is larger than 0x40-words (0x100-bytes). This allows overwriting threadlocalstorage+0x180 in the destination thread. However, since the data written there would be translate parameters (such as header-words + buffer addresses), exploiting this would likely be very difficult, if possible at all.&lt;br /&gt;
&lt;br /&gt;
If the two words at threadlocalstorage+0x180 could be overwritten with controlled data this way, one could then use a command with a buffer-header of &amp;lt;nowiki&amp;gt;((size&amp;lt;&amp;lt;14) | 2)&amp;lt;/nowiki&amp;gt; to write arbitrary memory to any RW userland memory in the destination process.&lt;br /&gt;
| &lt;br /&gt;
| [[5.0.0-11]]&lt;br /&gt;
| &lt;br /&gt;
| v4.1 FIRM -&amp;gt; v5.0 code diff&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| [[SVC|SVC stack allocation overflows]]&lt;br /&gt;
| &lt;br /&gt;
* Syscalls that allocate a variable-length array on stack, only checked bit31 before multiplying by 4/16 (when calculating how much memory to allocate). If a large integer was passed as input to one of these syscalls, an integer overflow would occur, and too little memory would have been allocated on stack resulting in a buffer overrun. &lt;br /&gt;
* The alignment (size+7)&amp;amp;~7 calculation before allocation was not checked for integer overflow.&lt;br /&gt;
&lt;br /&gt;
This might allow for ARM11 kernel code-execution.&lt;br /&gt;
&lt;br /&gt;
(Applies to svcSetResourceLimitValues, svcGetThreadList, svcGetProcessList, svcReplyAndReceive, svcWaitSynchronizationN.)&lt;br /&gt;
| &lt;br /&gt;
| [[5.0.0-11]]&lt;br /&gt;
| &lt;br /&gt;
| v4.1 FIRM -&amp;gt; v5.0 code diff&lt;br /&gt;
| [[User:Plutooo|plutoo]], [[User:Yellows8|Yellows8]] complementary&lt;br /&gt;
|-&lt;br /&gt;
| [[SVC|svcControlMemory]] MemoryOperation MAP memory-permissions&lt;br /&gt;
| svcControlMemory with MemoryOperation=MAP allows mapping the already-mapped process virtual-mem at addr1, to addr0. The lowest address permitted for addr1 is 0x00100000. Originally the ARM11 kernel didn&#039;t check memory permissions for addr1. Therefore .text as addr1 could be mapped elsewhere as RW- memory, which allowed ARM11 userland code-execution.&lt;br /&gt;
| &lt;br /&gt;
| [[4.1.0-8]]&lt;br /&gt;
| &lt;br /&gt;
| 2012&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| [[RPC_Command_Structure|Command]] input/output buffer permissions&lt;br /&gt;
| Originally the ARM11 kernel didn&#039;t check memory permissions for the input/output buffers for commands. Starting with [[4.0.0-7]] the ARM11 kernel will trigger a kernelpanic() if the input/output buffers don&#039;t have the required memory permissions. For example, this allowed a FSUSER file-read to .text, which therefore allowed ARM11-userland code execution.&lt;br /&gt;
| &lt;br /&gt;
| [[4.0.0-7]]&lt;br /&gt;
| &lt;br /&gt;
| 2012&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| [[SVC|svcReadProcessMemory/svcWriteProcessMemory memory]] permissions&lt;br /&gt;
| Originally the kernel only checked the first page(0x1000-bytes) of the src/dst buffers, for svcReadProcessMemory and svcWriteProcessMemory. There is no known retail processes which have access to these SVCs.&lt;br /&gt;
| &lt;br /&gt;
| [[4.0.0-7]]&lt;br /&gt;
| &lt;br /&gt;
| 2012?&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== [[FIRM]] Sysmodules ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Summary&lt;br /&gt;
!  Description&lt;br /&gt;
!  Successful exploitation result&lt;br /&gt;
!  Fixed in [[FIRM]] system version&lt;br /&gt;
!  Last [[FIRM]] system version this flaw was checked for&lt;br /&gt;
!  Timeframe this was discovered&lt;br /&gt;
!  Discovered by&lt;br /&gt;
|-&lt;br /&gt;
| [[Services|&amp;quot;srv:pm&amp;quot;]] process registration&lt;br /&gt;
| Originally any process had access to the port &amp;quot;srv:pm&amp;quot;. The PID&#039;s used for the (un)registration commands are not checked either. This allowed any process to re-register itself with &amp;quot;srv:pm&amp;quot;, and therefore allowed the process to give itself access to any service, bypassing the exheader service-access-control list.&lt;br /&gt;
&lt;br /&gt;
This was fixed in [[7.0.0-13]]: starting with [[7.0.0-13]] &amp;quot;srv:pm&amp;quot; is now a service instead of a globally accessible port. Only processes with PID&#039;s less than 6 (in other words: fs, ldr, sm, pm, pxi modules) have access to it. With [[7.0.0-13]] there can only be one session for &amp;quot;srv:pm&amp;quot; open at a time(this is used by pm module), svcBreak will be executed if more sessions are opened by the processes which can access this.&lt;br /&gt;
&lt;br /&gt;
This flaw was needed for exploiting the &amp;lt;=v4.x Process9 PXI vulnerabilities from ARM11 userland ROP, since most applications don&#039;t have access to those service(s).&lt;br /&gt;
| Access to arbitrary services&lt;br /&gt;
| [[7.0.0-13]]&lt;br /&gt;
| &lt;br /&gt;
| 2012&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| FSDIR null-deref&lt;br /&gt;
| [[Filesystem_services|FS]]-module may crash in some cases when handling directory reading. The trigger seems to be due to using [[FSDir:Close]] without closing the dir-handle afterwards?(Perhaps this is caused by out-of-memory?) This seems to be useless since it&#039;s just a null-deref.&lt;br /&gt;
| &lt;br /&gt;
| None&lt;br /&gt;
| [[9.6.0-24|9.6.0-X]]&lt;br /&gt;
| May 19(?)-20, 2015&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| Useless [[SM]] off-by-one write&lt;br /&gt;
| After accepting a new session, [[SM]] writes a (handler ID (0 for srv: sessions (max. 64), 1 for the srv:pm one), pointer to session context structure in BSS) pair in a global array. However that array is only 64-entry-big instead of 65 (as it ought to be), and no bound check is done in that regard.&lt;br /&gt;
&lt;br /&gt;
Unfortunately, as of [[11.4.0-37]], the overwritten fields are totally unused after their initialization by &amp;lt;code&amp;gt;__libc_init_array&amp;lt;/code&amp;gt;.&lt;br /&gt;
| Not currently exploitable&lt;br /&gt;
| None&lt;br /&gt;
| [[11.4.0-37]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| smpwn&lt;br /&gt;
| When registering a new service (or &amp;quot;port&amp;quot;), no bound checks are done on the service table. One can simply call RegisterPort repeatedly to overflow that table: it will overflow into the command replay structure.&lt;br /&gt;
&lt;br /&gt;
Combined with a other minor bugs in the sysmodule, it is possible to take over [[SM]] with this nevertheless difficult-to-exploit vulnerability.&lt;br /&gt;
| Code execution under [[SM]], etc.&lt;br /&gt;
| [[11.16.0-48]]&lt;br /&gt;
| [[11.14.0-46]]&lt;br /&gt;
| July 2017&lt;br /&gt;
| [[User:TuxSH|TuxSH]] (independently), presumably ichfly before &lt;br /&gt;
|-&lt;br /&gt;
| PXI cmdbuf buffer overrun &lt;br /&gt;
| Like its Arm9 counterpart, before version [[5.0.0-11|5.0.0-X]], the PXI system module did not check the command sizes. This makes it possible to get ROP under the PXI sysmodule from a pwned Process9.&lt;br /&gt;
safecerthax uses it to takeover the Arm11 processor after directly getting remote code execution on the Arm9 side. Though, is useless in classic Arm11 -&amp;gt; Arm9 chains.&lt;br /&gt;
| ROP under [[PXI_Services|PXI]]&lt;br /&gt;
| probably [[5.0.0-11|5.0.0-X]]&lt;br /&gt;
| [[11.14.0-46]]&lt;br /&gt;
| &lt;br /&gt;
| Everyone&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Standalone Sysmodules ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Summary&lt;br /&gt;
!  Description&lt;br /&gt;
!  Successful exploitation result&lt;br /&gt;
!  Fixed in system-module system-version&lt;br /&gt;
!  Last system-module system-version this flaw was checked for&lt;br /&gt;
!  Timeframe this was discovered&lt;br /&gt;
!  Timeframe this was added to wiki&lt;br /&gt;
!  Discovered by&lt;br /&gt;
|-&lt;br /&gt;
| [[CSND_Services|CSND]] sysmodule crash due to out of bounds parameters.&lt;br /&gt;
| The CSND command [[CSND:PlaySoundDirectly|PlaySoundDirectly (0x00040080)]] takes a channel ID as the first parameter. Any value outside the range [0-3] makes the system module become unstable or crash due to an out of bounds memory read. &lt;br /&gt;
| Out of bounds memory read, probably not exploitable. More research needed.&lt;br /&gt;
| None&lt;br /&gt;
| [[11.14.0-46]]&lt;br /&gt;
| January 2021&lt;br /&gt;
| January 22, 2021&lt;br /&gt;
| [[User:PabloMK7|PabloMK7]]&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| SSLoth: [[SSL_Services|SSL]] sysmodule improper certificate verification&lt;br /&gt;
| Initially, the SSL sysmodule missed the R_VERIFY_RES_SIGNATURE entry in the &amp;quot;resource list&amp;quot; provided to the RSA BSAFE library. Consequently, it did not check signatures when validating certificate chains. &lt;br /&gt;
| Forge fake certificates, spoof official servers and perform MitM attacks on SSL/TLS connections.&lt;br /&gt;
| [[11.14.0-46]]&lt;br /&gt;
| [[11.14.0-46]]&lt;br /&gt;
| 2020&lt;br /&gt;
| December 18, 2020&lt;br /&gt;
| [[User:Nba_Yoh|MrNbaYoh]], shutterbug2000 (independently)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| [[CECD_Services|CECD:ndm]] SetNZoneMacFilter (cmd8) stack smashing&lt;br /&gt;
| The length of the mac filter is not checked before being copied to a fixed-size buffer on stack.&lt;br /&gt;
| ROP under [[CECD_Services|CECD]] sysmodule&lt;br /&gt;
| None&lt;br /&gt;
| [[11.13.0-45]]&lt;br /&gt;
| 2020&lt;br /&gt;
| July 20, 2020&lt;br /&gt;
| [[User:Nba_Yoh|MrNbaYoh]]&lt;br /&gt;
|-&lt;br /&gt;
| [[CECD_Services|CECD]] message box access &lt;br /&gt;
| CECD allows any process to write to any message box, thus allowing to write Streetpass data to the message box of any title.&lt;br /&gt;
| Install exploit for any title having a vulnerability in Streetpass data parsers (see CTRSDK Streetpass parser vulnerability).&lt;br /&gt;
| None&lt;br /&gt;
| None&lt;br /&gt;
| ?&lt;br /&gt;
| June 1, 2020&lt;br /&gt;
| Everyone?&lt;br /&gt;
|-&lt;br /&gt;
| [[CECD_Services|CECD]] packet type 0x32/0x34 stack-smashing&lt;br /&gt;
| When parsing Streetpass packets of type 0x32 and 0x34, CECD copies a list without checking the number of entries. The packet length is limited to 0x400 bytes, which is not enough to reach the end of the stack frame and overwrite the return address. However, the buffer located just next to the packet buffer is actually filled with data sent just before, hence actually allowing to overwrite the whole stack frame with conrolled data.&lt;br /&gt;
| RCE under [[CECD_Services|CECD]]&lt;br /&gt;
| [[11.12.0-44]]&lt;br /&gt;
| [[11.12.0-44]]&lt;br /&gt;
| Summer 2019&lt;br /&gt;
| June 1, 2020&lt;br /&gt;
| [[User:Nba_Yoh|MrNbaYoh]]&lt;br /&gt;
|-&lt;br /&gt;
| [[CECD_Services|CECD]] TMP files parser multiple vulnerabilities&lt;br /&gt;
| When parsing &amp;quot;TMP_XXX&amp;quot; files, CECD does not check the number of messages contained in the file. This allows to overflow the array of message pointers and message sizes on the stack. Pointers aren&#039;t controlled and sizes are limited (one cannot send gigabytes of data...), yet the last message size can be an arbitrary value (the current message pointer goes outside the file buffer and the parsing loop is broken). This allows to overwrite a pointer to a lock object on the stack and decrement an arbitrary value in memory. One can change the TMP file parsing mode to have CECD trying to free all the message buffers after parsing the next TMP file. The parsing mode is usually restored when parsing a new TMP file, but an invalid TMP file allows to make a function returns an error before the mode is restored , the return value is not checked and the parser consider the file valid. The message pointers and sizes arrays are not updated though, this is not a problem since the previous TMP file buffer is reused for the new TMP file in memory. Thus the message pointers actually points to controlled data. This allows to get a bunch of fake heap chunk freed, thus a bunch of unsafe unlink arbitrary writes.&lt;br /&gt;
| RCE under [[CECD_Services|CECD]]&lt;br /&gt;
| [[11.12.0-44]]&lt;br /&gt;
| [[11.12.0-44]]&lt;br /&gt;
| Summer 2019&lt;br /&gt;
| June 1, 2020&lt;br /&gt;
| [[User:Nba_Yoh|MrNbaYoh]]&lt;br /&gt;
|-&lt;br /&gt;
| [[Config_Services|CFG]]:CreateConfigInfoBlk integer underflow&lt;br /&gt;
| When creating a new block it checks the size of the block is &amp;lt;= 0x8000, but it doesn&#039;t check that the block size is less than the remaining space. This induces an integer underflow (remaining_space-block_size), the result is then used for another check (buf_start+current_offset+constant &amp;lt;= remaining_space-block_size) and then in a mempcy call (dest = buf_start+(u16)(remaining_space-block_size), size =block_size). This allow for writing past the buffer, however because of the u16 cast in the memcpy call memory has to be mapped from buf_start to buf_start+0x10000 (cannot write backward).&lt;br /&gt;
| Theoritically ROP under CFG services, but BSS section is to small (size &amp;lt;= 0x10000) so it only results in a crash.&lt;br /&gt;
| None&lt;br /&gt;
| [[11.8.0-41]]&lt;br /&gt;
| November, 2018&lt;br /&gt;
| November 24, 2018&lt;br /&gt;
| [[User:Nba_Yoh|MrNbaYoh]]&lt;br /&gt;
|-&lt;br /&gt;
| [[MP:SendDataFrame]] missing input array index validation&lt;br /&gt;
| [[MP:SendDataFrame]] doesn&#039;t validate the input index at cmdreq[1], unless the function for flag=non-zero is executed. This is used to calculate the following, without validating the index at all: someptr = stateptr + (index*0x924) + somestateoffset.&lt;br /&gt;
&lt;br /&gt;
After validating some flags from someptr, when input_flag=0 the input buffer data is copied to someptr+someotheroffset+0x14 with the u16 size loaded from someptr+someotheroffset.&lt;br /&gt;
&lt;br /&gt;
With a large input index someptr could be setup to be at a &amp;lt;target address&amp;gt;, for overwriting memory.&lt;br /&gt;
&lt;br /&gt;
This is probably difficult to exploit.&lt;br /&gt;
| &lt;br /&gt;
| None&lt;br /&gt;
| [[8.0.0-18]](MP-sysmodule v2048)&lt;br /&gt;
| January 22, 2017&lt;br /&gt;
| January 22, 2017&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| [[MP_Services|MP]] cmd1 out-of-bounds handle read&lt;br /&gt;
| MP-sysmodule handles the input parameter for cmd1 as a s32. It checks for &amp;gt;=16, but not &amp;lt;0. With &amp;lt;16 it basically does the following(array of entries 4-bytes each): *outhandle = ((Handle*)(stateptr+offsetinstate))[inputindex].&lt;br /&gt;
&lt;br /&gt;
Hence, this can be used to load any handle in MP-sysmodule memory. MP doesn&#039;t really have any service handles of interest however(can be obtained from elsewhere too).&lt;br /&gt;
| Reading any handle in MP-sysmodule memory.&lt;br /&gt;
| None&lt;br /&gt;
| [[8.0.0-18]](MP-sysmodule v2048)&lt;br /&gt;
| January 21, 2017&lt;br /&gt;
| January 22, 2017&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| AM stack/.bss infoleak via [[AM:ReadTwlBackupInfo]]([[AM:ReadTwlBackupInfoEx|Ex]])&lt;br /&gt;
| After writing the output-info structure to stack, it then copies that structure to the output buffer ptr using the size from the command. The size is not checked. This could be used to read data from the AM-service-thread stack handling the command + .bss.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;This was not tested on hardware.&#039;&#039;&#039;&lt;br /&gt;
| Stack/.bss reading&lt;br /&gt;
| None&lt;br /&gt;
| [[10.0.0-27]](AM v9217)&lt;br /&gt;
| Roughly October 17, 2016&lt;br /&gt;
| October 25, 2016&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| AM module APcert infoleak via 00000000.ctx files&lt;br /&gt;
| Just after a download title is purchased from the eShop, the .ctx is in an initialized state of all FFs past the header. During download, the FF area is filled with the console APcert. Thus, it is possible to create a xorpad from the initial state and use it to decrypt the APcert filled state.&lt;br /&gt;
| APcert contains the deviceID, which can beneficial in decrypting the movable.sed (since deviceID is mathmatically related to the LFCS).&lt;br /&gt;
| None&lt;br /&gt;
| [[11.16.0-49]]&lt;br /&gt;
| August, 2022&lt;br /&gt;
| March 17, 2023&lt;br /&gt;
| zoogie&lt;br /&gt;
|-&lt;br /&gt;
| [[MVD_Services|MVD]]: Stack buffer overflow with [[MVDSTD:SetupOutputBuffers]].&lt;br /&gt;
| The input total_entries is not validated when initially processing the input entry-list. This fixed-size input entry-list is copied to stack from the command request. The loop for processing this initializes a global table, the converted linearmem-&amp;gt;physaddrs used there are also copied to stack(0x8-bytes of physaddrs per entry).&lt;br /&gt;
&lt;br /&gt;
If total_entries is too large, MVD-sysmodule will crash due to reading unmapped memory following the stack(0x10000000). Afterwards if the out-of-bounds total_entries is smaller than that, it will crash due accessing address 0x0, hence this useless.&lt;br /&gt;
| MVD-sysmodule crash.&lt;br /&gt;
| None&lt;br /&gt;
| [[9.0.0-20]]&lt;br /&gt;
| April 22, 2016 (Tested on the 25th)&lt;br /&gt;
| April 25, 2016&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| [[NWM_Services|NWM]]: Using CTRSDK heap with UDS sharedmem from the user-process.&lt;br /&gt;
| See the HTTP-sysmodule section below.&lt;br /&gt;
&lt;br /&gt;
CTRSDK heap is used with the sharedmem from [[NWMUDS:InitializeWithVersion]]. Buffers are allocated/freed under this heap using [[NWMUDS:Bind]] and [[NWMUDS:Unbind]].&lt;br /&gt;
&lt;br /&gt;
Hence, overwriting sharedmem with gspwn then using [[NWMUDS:Unbind]] results in the usual controlled CTRSDK memchunk-header write, similar to HTTP-sysmodule.&lt;br /&gt;
&lt;br /&gt;
This could be done by creating an UDS network, without any other nodes on the network.&lt;br /&gt;
&lt;br /&gt;
Besides CTRSDK memchunk-headers, there are no addresses stored under this sharedmem.&lt;br /&gt;
| ROP under NWM-module.&lt;br /&gt;
| None (need to check, but CTRSDK heap code is vulnerable)&lt;br /&gt;
| [[9.0.0-20|9.0.0-X]]&lt;br /&gt;
| April 10, 2016&lt;br /&gt;
| April 16, 2016&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| [[DLP_Services|DLP]]: Out-of-bounds memory access during spectator [[Download_Play|data-frame]] checksum calculation&lt;br /&gt;
| DLP doesn&#039;t validate the frame_size when receiving spectator data-frames at all, unlike non-spectator data-frames. The actual spectator data-frame parsing code doesn&#039;t use that field either. However, the data-frame checksum calculation code called during checksum verification does use the frame_size for loading the size of the framebuf.&lt;br /&gt;
&lt;br /&gt;
Hence, using a large frame_size like 0xFFFF will result in the checksum calculation code reading data out-of-bounds. This isn&#039;t really useful, you could trigger a remote local-WLAN DLP-sysmodule crash while a 3DS system is scanning for DLP networks(due to accessing unmapped memory), but that&#039;s about all(trying to infoleak with this likely isn&#039;t useful either).&lt;br /&gt;
| DLP-sysmodule crash, handled by dlplay system-application by a &amp;quot;connection interrupted&amp;quot; error eventually then a fatal-error via ErrDisp.&lt;br /&gt;
| None&lt;br /&gt;
| [[10.0.0-27|10.0.0-X]]&lt;br /&gt;
| April 8, 2016 (Tested on the 10th)&lt;br /&gt;
| April 10, 2016&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| [[DLP_Services|DLP]]: Out-of-bounds output data writing during spectator sysupdate titlelist [[Download_Play|data-frame]] handling&lt;br /&gt;
| The total_entries and out_entryindex fields for the titlelist DLP spectator data-frames are not validated. This is parsed during DLP network scanning. Hence, the specified titlelist data can be written out-of-bounds using the specified out_entryindex and total_entries. A crash will occur while reading the input data-frame titlelist if total_entries is larger than 0x27A, due to accessing unmapped memory.&lt;br /&gt;
&lt;br /&gt;
There&#039;s not much non-zero data to overwrite following the output buffer(located in sharedmem), any ptrs are located in sharedmem. Overwriting certain ptr(s) are only known to cause a crash when attempting to use the DLP-client shutdown service-command.&lt;br /&gt;
&lt;br /&gt;
There&#039;s no known way to exploit the above crash, since the linked-list code involves writes zeros(with a controlled start ptr).&lt;br /&gt;
| &lt;br /&gt;
| None&lt;br /&gt;
| [[10.0.0-27|10.0.0-X]]&lt;br /&gt;
| April 8-9, 2016&lt;br /&gt;
| April 10, 2016&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| [[IR_Services|IR]]: Stack buffer overflow with custom hardware&lt;br /&gt;
| Originally IR sysmodule used the read value from the I2C-IR registers TXLVL and RXLVL without validating them at all. See [[10.6.0-31|here]] for the fix. This is the size used for reading the data-recv FIFO, etc. The output buffer for reading is located on the stack.&lt;br /&gt;
&lt;br /&gt;
This should be exploitable if one could successfully setup the custom hardware for this and if the entire intended sizes actually get read from I2C.&lt;br /&gt;
| ROP under IR sysmodule.&lt;br /&gt;
| [[10.6.0-31|10.6.0-31]]&lt;br /&gt;
| &lt;br /&gt;
| February 23, 2016 (Unknown if it was noticed before then)&lt;br /&gt;
| February 23, 2016&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| [[HTTP_Services|HTTP]]: Using CTRSDK heap with sharedmem from the user-process.&lt;br /&gt;
| The data from httpcAddPostDataAscii and other commands is stored under a CTRSDK heap. That heap is the sharedmem specified by the user-process via the HTTPC Initialize command.&lt;br /&gt;
Normally this sharedmem isn&#039;t accessible to the user-process once the sysmodule maps it, hence using it is supposed to be &amp;quot;safe&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
This isn&#039;t the case due to gspwn however. Since CTRSDK heap code is so insecure in general, one can use gspwn to locate the HTTPC sharedmem + read/write it, then trigger a mem-write under the sysmodule. This can then be used to get ROP going under HTTP-sysmodule.&lt;br /&gt;
&lt;br /&gt;
This is exploited by [https://github.com/yellows8/ctr-httpwn/ctr-httpwn ctr-httpwn].&lt;br /&gt;
| ROP under HTTP sysmdule.&lt;br /&gt;
| None&lt;br /&gt;
| [[11.13.0-45|11.13.0-X]]&lt;br /&gt;
| Late 2015&lt;br /&gt;
| March 22, 2016&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| [[NIM_Services|NIM]]: Downloading old title-versions from eShop&lt;br /&gt;
| Multiple NIM service commands(such as [[NIMS:StartDownload]]) use a title-version value specified by the user-process, NIM does not validate that this input version matches the latest version available via SOAP. Therefore, when combined with AM(PXI) [[#Process9|title-downgrading]] via deleting the target eShop title with System Settings Data Management(if the title was already installed), this allows downloading+installing any title-version from eShop &#039;&#039;if&#039;&#039; it&#039;s still available from CDN.&lt;br /&gt;
The easiest way to exploit this is to just patch the eShop system-application code using these NIM commands(ideally the code which loads the title-version).&lt;br /&gt;
&lt;br /&gt;
Originally this was tested with a debugging-system via modded-FIRM, eventually smea implemented it in HANS for the 32c3 release.&lt;br /&gt;
| Downloading old title-versions from eShop&lt;br /&gt;
| None&lt;br /&gt;
| [[10.0.0-27|10.0.0-X]]&lt;br /&gt;
| October 24, 2015 (Unknown when exactly the first eShop title downgrade was actually tested, maybe November)&lt;br /&gt;
| January 7, 2016 (Same day Ironfall v1.0 was removed from CDN via the main-CXI files)&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| [[SPI_Services|SPI]] service out-of-bounds write&lt;br /&gt;
| cmd1 has out-of-bounds write allowing overwrite of some static variables in .data.&lt;br /&gt;
| Code execution under spi sysmodule; access to [[CONFIG11_Registers|CFG11_GPUPROT]] and ultimately kernel code execution. &lt;br /&gt;
| None&lt;br /&gt;
| [[11.14.0-46]]&lt;br /&gt;
| March 2015&lt;br /&gt;
| &lt;br /&gt;
| [[User:Plutooo|plutoo]]&lt;br /&gt;
|-&lt;br /&gt;
| [[NFC_Services|NFC]] module service command buf-overflows&lt;br /&gt;
| NFC module copies data with certain commands, from command input buffers to stack without checking the size. These commands include the following, it&#039;s unknown if there&#039;s more commands with similar issues: &amp;quot;nfc:dev&amp;quot; &amp;lt;0x000C....&amp;gt; and &amp;quot;nfc:s&amp;quot; &amp;lt;0x0037....&amp;gt;.&lt;br /&gt;
Since both of these commands are stubbed in the Old3DS NFC module from the very first version(those just return an error), these issues only affect the New3DS NFC module.&lt;br /&gt;
&lt;br /&gt;
There&#039;s no known retail titles which have access to either of these services.&lt;br /&gt;
| ROP under NFC module.&lt;br /&gt;
| New3DS: None&lt;br /&gt;
| New3DS: [[9.5.0-22]]&lt;br /&gt;
| December 2014?&lt;br /&gt;
| &lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| [[News_Services|NEWSS]] service command notificationID validation failure&lt;br /&gt;
| This module does not validate the input notificationID for &amp;lt;nowiki&amp;gt;&amp;quot;news:s&amp;quot;&amp;lt;/nowiki&amp;gt; service commands. This is an out-of-bounds array index bug. For example, [[NEWSS:SetNotificationHeader]] could be used to exploit news module: this copies the input data(size is properly checked) to: out = newsdb_savedata+0x10 + (someu32array[notificationID]*0x70).&lt;br /&gt;
| ROP under news module.&lt;br /&gt;
| None&lt;br /&gt;
| [[9.7.0-25|9.7.0-X]]&lt;br /&gt;
| December 2014&lt;br /&gt;
| &lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| [[NWMUDS:DecryptBeaconData]] heap buffer overflow&lt;br /&gt;
| input_size = 0x1E * &amp;lt;value the u8 from input_[[NWM_Services|networkstruct]]+0x1D&amp;gt;. Then input_tag0 is copied to a heap buffer. When input_size is larger than 0xFA-bytes, it will then copy input_tag1 to &amp;lt;end_address_of_previous_outbuf&amp;gt;, with size=input_size-0xFA.&lt;br /&gt;
&lt;br /&gt;
This can be triggered by either using this command directly, or by boadcasting a wifi beacon which triggers it while a 3DS system running the target process is in range, when the process is scanning for hosts to connect to. Processes will only pass tag data to this command when the wlancommID and other thing(s) match the values for the process.&lt;br /&gt;
&lt;br /&gt;
There&#039;s no known way to actually exploit this for getting ROP under NWM-module, at the time of originally adding this to the wiki. This is because the data which gets copied out-of-bounds *and* actually causes crash(es), can&#039;t be controlled it seems(with just broadcasting a beacon at least). It&#039;s unknown whether this could be exploited from just using NWMUDS service-cmd(s) directly.&lt;br /&gt;
| Without any actual way to exploit this: NWM-module DoS, resulting in process termination(process crash). This breaks *everything* involving wifi comms, a reboot is required to recover from this.&lt;br /&gt;
| None&lt;br /&gt;
| [[9.0.0-20]]&lt;br /&gt;
| ~September 23, 2014(see the [[NWMUDS:DecryptBeaconData]] page history)&lt;br /&gt;
| August 3, 2015&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| [[HID_Services|HID]] module shared-mem&lt;br /&gt;
| HID module does not validate the index values in [[HID_Shared_Memory|sharedmem]](just changes index to 0 when index == maxval when updating), therefore large values will result in HID module writing HID data to arbitrary addresses.&lt;br /&gt;
| ROP under HID module, but this is *very* unlikely to be exploitable since the data written is HID data.&lt;br /&gt;
| None&lt;br /&gt;
| [[9.3.0-21]]&lt;br /&gt;
| 2014?&lt;br /&gt;
| &lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| gspwn&lt;br /&gt;
| GSP module does not validate addresses given to the GPU. This allows a user-mode application/applet to read/write to a large part of physical FCRAM using GPU DMA. From this, you can overwrite the .text segment of the application you&#039;re running under, and gain real code-execution from a ROP-chain. Normally applets&#039; .text([[Home Menu]], [[Internet Browser]], etc) is located beyond the area accessible by the GPU, except for [[RO_Services|CROs]] used by applets([[Internet Browser]] for example).&lt;br /&gt;
&lt;br /&gt;
FCRAM is gpu-accessible up to physaddr 0x26800000 on Old3DS, and 0x2D800000 on New3DS. This is BASE_memregion_start(aka SYSTEM_memregion_end)-0x400000 (0x800000 with New3DS) with the default memory-layout on Old3DS/New3DS. With [[11.3.0-36|11.3.0-X]] the cutoff now varies due to the new [[SVC]] 0x59. The New3DS &amp;quot;normal&amp;quot;(non-APPLICATION) cutoff was changed to 0x2D000000 due to the new [[SVC]] 0x59.&lt;br /&gt;
| User-mode code execution.&lt;br /&gt;
| None&lt;br /&gt;
| [[9.6.0-24|9.6.0-X]]&lt;br /&gt;
| Early 2014&lt;br /&gt;
| &lt;br /&gt;
| smea, [[User:Yellows8|Yellows8]]/others before then&lt;br /&gt;
|-&lt;br /&gt;
| rohax&lt;br /&gt;
| Using gspwn, it is possible to overwrite a loaded [[CRO0]]/[[CRR0]] after its RSA-signature has been validated. Badly validated [[CRO0]] header leads to arbitrary read/write of memory in the ro-process. This gives code-execution in the ro module, who has access to [[SVC|syscalls]] 0x70-0x72, 0x7D.&lt;br /&gt;
&lt;br /&gt;
This was fixed after [[ninjhax]] release by adding checks on [[CRO0]]-based pointers before writing to them.&lt;br /&gt;
| Memory-mapping syscalls.&lt;br /&gt;
| [[9.3.0-21]]&lt;br /&gt;
| [[9.4.0-21]]&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| smea, [[User:Plutooo|plutoo]] joint effort&lt;br /&gt;
|-&lt;br /&gt;
| Region free&lt;br /&gt;
| Only [[Home Menu]] itself checks gamecards&#039; region when launching them. Therefore, any application launch that is done directly with [[NS]] without signaling Home Menu to launch the app, will result in region checks being bypassed.&lt;br /&gt;
This essentially means launching the gamecard with the [[NS_and_APT_Services|&amp;quot;ns:s&amp;quot;]] service. The main way to exploit this is to trigger a FIRM launch with an application specified, either with a normal FIRM launch or a hardware [[NSS:RebootSystem|reboot]].&lt;br /&gt;
| Launching gamecards from any region + bypassing Home Menu gamecard-sysupdate installation&lt;br /&gt;
| None&lt;br /&gt;
| Last tested with [[10.1.0-27|10.1.0-X]].&lt;br /&gt;
| June(?) 2014&lt;br /&gt;
| &lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| [[NWM_Services|NWM]] service-cmd state null-ptr deref&lt;br /&gt;
| The NWMUDS service command code loads a ptr from .data, adds an offset to that, then passes that as the state address for the actual command-handler function. The value of the ptr loaded from .data is not checked, therefore this will cause crashes due to that being 0x0 when NWMUDS was not properly initialized.&lt;br /&gt;
It&#039;s unknown whether any NWM services besides NWMUDS have this issue.&lt;br /&gt;
| This is rather useless since it&#039;s only a crash caused by a state ptr based at 0x0.&lt;br /&gt;
| None&lt;br /&gt;
| [[9.0.0-20]]&lt;br /&gt;
| 2013?&lt;br /&gt;
| &lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== General/CTRSDK ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Summary&lt;br /&gt;
!  Description&lt;br /&gt;
!  Successful exploitation result&lt;br /&gt;
!  Fixed in version&lt;br /&gt;
!  Last version this flaw was checked for&lt;br /&gt;
!  Timeframe this was discovered&lt;br /&gt;
!  Discovered by&lt;br /&gt;
|-&lt;br /&gt;
| [[CECD_Services|CECD]] Streetpass message exheader stack-smashing&lt;br /&gt;
| When parsing streetpass messages, &amp;quot;nn::cec::CTR::Message::InputMessage&amp;quot; calls &amp;quot;nn::cec::CTR::Message::SetExHeaderWithoutCalc&amp;quot; for each exheader entry in the input message. The number of entries should not exceed 16 but remains unchecked, leading to a stack-buffer-overflow.&lt;br /&gt;
| ROP under any application parsing Streetpass messages&lt;br /&gt;
Remote code execution under [[CECD_Services|CECD]]&lt;br /&gt;
| [[11.12.0-44]]&lt;br /&gt;
| &lt;br /&gt;
| 2019&lt;br /&gt;
| [[User:Nba_Yoh|MrNbaYoh]]&lt;br /&gt;
|-&lt;br /&gt;
| [[NWM_Services|UDS]] beacon additional-data buffer overflow&lt;br /&gt;
| Originally CTRSDK did not validate the UDS additional-data size before using that size to copy the additional-data to a [[NWM_Services|networkstruct]]. This was eventually fixed.&lt;br /&gt;
This was discovered while doing code RE with an old dlp-module version. It&#039;s unknown in what specific CTRSDK version this was fixed, or even what system-version updated titles with a fixed version.&lt;br /&gt;
&lt;br /&gt;
It&#039;s unknown if there&#039;s any titles using a vulnerable CTRSDK version which are also exploitable with this(dlp module can&#039;t be exploited with this).&lt;br /&gt;
&lt;br /&gt;
The maximum number of bytes that can be written beyond the end of the outbuf is 0x37-bytes, with additionaldata_size=0xFF.&lt;br /&gt;
| Perhaps ROP, very difficult if possible with anything at all&lt;br /&gt;
| ?&lt;br /&gt;
| &lt;br /&gt;
| September(?) 2014&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| CTPK buffer overflow&lt;br /&gt;
| At offset 0x20 in CTPK is an array for each texture, each entry is 0x20-bytes. This contains a wordindex(entry+0x18) for some srcdata relative to CTPK+0, and an u8 wordsize(entry+0x14) for this data. The CTRSDK function handling this doesn&#039;t validate the size, when copying srcdata using this size to the output buffer. Applications usually have the output buffer on the stack, hence stack buffer overflow.&lt;br /&gt;
&lt;br /&gt;
While CTPK(*.ctpk) are normally only loaded from RomFS, some application(s) load from elsewhere too.&lt;br /&gt;
| ROP under the target application.&lt;br /&gt;
| None?&lt;br /&gt;
| &amp;quot;[SDK+NINTENDO:CTR_SDK-11_4_0_200_none]&amp;quot;&lt;br /&gt;
| November 14, 2016&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| Pia vulns&lt;br /&gt;
| [https://switchbrew.org/wiki/Switch_System_Flaws#Pia Originally discovered in Pia v5.x for Switch], these vulns are also present in earlier versions (v3.x/4.x/5.x, possibly earlier?) for 3DS (and Wii U too).&lt;br /&gt;
Pia encryption generally wasn&#039;t used pre-Switch (sent packets are plaintext). 3DS is affected by all Pia vulns listed above except for LAN. The functionality for ParseLeaveMeshInvitation doesn&#039;t exist in 3DS Pia v3.9.2. Wii U is affected by all listed Pia vulns except for the LAN vulns.&lt;br /&gt;
| See [https://switchbrew.org/wiki/Switch_System_Flaws#Pia here].&lt;br /&gt;
| Unfixed on 3DS/Wii U&lt;br /&gt;
| &amp;quot;[SDK+Nintendo:PIA_5_4_3]&amp;quot;&lt;br /&gt;
| See [https://switchbrew.org/wiki/Switch_System_Flaws#Pia here]; separately checked later (UpdateConnectionReport) by [[User:Riley|Riley]] on: June 14, 2023&lt;br /&gt;
| [[User:Yellows8|Yellows8]]; added to 3dbrew (UpdateConnectionReport) by [[User:Riley|Riley]] later&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>EvilFlight</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=Homebrew_Exploits&amp;diff=22225</id>
		<title>Homebrew Exploits</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=Homebrew_Exploits&amp;diff=22225"/>
		<updated>2023-05-23T08:05:42Z</updated>

		<summary type="html">&lt;p&gt;EvilFlight: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Payload==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Works on latest fw&lt;br /&gt;
!  Name&lt;br /&gt;
!  Description&lt;br /&gt;
!  Supported firmwares&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: lightgreen&amp;quot; | Yes&lt;br /&gt;
| [https://smealum.github.io/3ds/ *hax payload]&lt;br /&gt;
| Booted by all of the below non-sysmodule exploits. &#039;&#039;&#039;No longer needed as of [https://github.com/AuroraWright/Luma3DS/releases/tag/v8.0 Luma 8.0]&#039;&#039;&#039;&lt;br /&gt;
| From &#039;&#039;&#039;9.0.0-7&#039;&#039;&#039; up to &#039;&#039;&#039;11.9.0-42&#039;&#039;&#039;.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
For the rest of this page, &amp;quot;Supported firmwares&amp;quot; refers to the exploit &#039;&#039;itself&#039;&#039;, not whether *hax payload supports it.&lt;br /&gt;
&lt;br /&gt;
==Standalone Homebrew Launcher Exploits==&lt;br /&gt;
The following homebrew exploits can be executed on a previously un-exploited system. &#039;&#039;Please&#039;&#039; see the above Payload section regarding what &amp;quot;Supported firmwares&amp;quot; indicates &#039;&#039;exactly&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Works on latest fw&lt;br /&gt;
!  Name&lt;br /&gt;
!  Supported firmwares&lt;br /&gt;
!  Requirements&lt;br /&gt;
!  Author&lt;br /&gt;
!  Install&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: salmon&amp;quot; | No&lt;br /&gt;
| [[ninjhax|Ninjhax 1.1b]]&lt;br /&gt;
| From &#039;&#039;&#039;4.0.0-7&#039;&#039;&#039; up to and including &#039;&#039;&#039;9.2.0-20&#039;&#039;&#039;.&lt;br /&gt;
| A cartridge or eShop version (JPN-only) of &amp;quot;Cubic Ninja&amp;quot;.&lt;br /&gt;
| smea&lt;br /&gt;
| [http://smealum.net/ninjhax/ Install]&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: lightgreen&amp;quot; | Yes&lt;br /&gt;
| [[ninjhax|Ninjhax 2.x]]&lt;br /&gt;
| From &#039;&#039;&#039;9.0.0-7&#039;&#039;&#039; up to and including &#039;&#039;&#039;11.9.X&#039;&#039;&#039;.&lt;br /&gt;
|  A cartridge or eShop version (JPN-only, not available anymore for purchase) of &amp;quot;Cubic Ninja&amp;quot;.&lt;br /&gt;
| smea&lt;br /&gt;
| [https://smealum.github.io/ninjhax2/ Install]&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: lightgreen&amp;quot; | Yes&lt;br /&gt;
| [http://plutooo.github.io/freakyhax/ freakyhax]&lt;br /&gt;
| From &#039;&#039;&#039;9.0.0-7&#039;&#039;&#039; up to and including &#039;&#039;&#039;11.9.X&#039;&#039;&#039;.&lt;br /&gt;
|  A cartridge or eShop version (USA/EUR/JPN, not available anymore for purchase) of &amp;quot;Freakyform Deluxe&amp;quot;.&lt;br /&gt;
| plutoo&lt;br /&gt;
| [http://plutooo.github.io/freakyhax/ Install]&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: salmon&amp;quot; | No&lt;br /&gt;
| [http://plutooo.github.io/smilehax/ smilehax]&lt;br /&gt;
| From &#039;&#039;&#039;9.0.0-7&#039;&#039;&#039; up to and including &#039;&#039;&#039;11.0.0-33&#039;&#039;&#039;&lt;br /&gt;
| SmileBASIC (JPN all versions up to 3.32 excluded, USA 3.31 only)&lt;br /&gt;
| plutoo&lt;br /&gt;
| [http://plutooo.github.io/smilehax/ Install]&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: lightgreen&amp;quot; | Yes&lt;br /&gt;
| [https://github.com/zoogie/smilehax-IIe smilehax IIe]&lt;br /&gt;
| From &#039;&#039;&#039;9.0.0-7&#039;&#039;&#039; up to and including &#039;&#039;&#039;11.13.0-45&#039;&#039;&#039;&lt;br /&gt;
| SmileBASIC (JPN version 3.3.2 via app downgrade, USA/EUR 3.6.0, aka latest app version)&lt;br /&gt;
| zoogie&lt;br /&gt;
| [https://github.com/zoogie/smilehax-IIe/releases/latest Install]&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: salmon&amp;quot; | No&lt;br /&gt;
| [http://mrnbayoh.github.io/basicsploit/ BASICSploit]&lt;br /&gt;
| From &#039;&#039;&#039;9.0.0-7&#039;&#039;&#039; up to and including &#039;&#039;&#039;11.0.0-33&#039;&#039;&#039;&lt;br /&gt;
| SmileBASIC (USA all versions)&lt;br /&gt;
| MrNbaYoh&lt;br /&gt;
| [http://mrnbayoh.github.io/basicsploit/ Install]&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: lightgreen&amp;quot; | Yes&lt;br /&gt;
| [[smashbroshax|smashbroshax]] (beaconhax)&lt;br /&gt;
| (New 3DS only) From &#039;&#039;&#039;9.0.0-X&#039;&#039;&#039; up to and including &#039;&#039;&#039;11.9.0-37&#039;&#039;&#039;.&lt;br /&gt;
| Super Smash Bros 3DS (full-game) and a way to broadcast raw wifi beacons. The demo (prior to the updated November 2015 [https://github.com/yellows8/3ds_smashbroshax version]) isn&#039;t usable with the *hax payloads. Game-version v1.1.3 fixed the vuln used with this, see the repo for a workaround for that.&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
| [https://github.com/yellows8/3ds_smashbroshax Install]&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: salmon&amp;quot; | No&lt;br /&gt;
| [[browserhax]]&lt;br /&gt;
| From &#039;&#039;&#039;9.0.0-2&#039;&#039;&#039; to &#039;&#039;&#039;11.0.0-33&#039;&#039;&#039;&lt;br /&gt;
Note that the browser-version-check bypass is only usable prior to [[10.7.0-32]].&lt;br /&gt;
| A USA, EUR, JPN, or KOR system.&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
| [http://yls8.mtheall.com/3dsbrowserhax.php Install]&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: salmon&amp;quot; | No&lt;br /&gt;
| [https://github.com/svanheulen/genhax genhax]&lt;br /&gt;
| (New 3DS only) From &#039;&#039;&#039;9.9.0-X&#039;&#039;&#039; up to and including &#039;&#039;&#039;11.2.0-X&#039;&#039;&#039;.&lt;br /&gt;
| A gamecard or eShop-install of Monster Hunter X (JPN only), and the DLC encryption key (see installer instructions). &#039;&#039;&#039;Note: the secondary exploit still works, see bellow&#039;&#039;&#039;&lt;br /&gt;
| svanheulen&lt;br /&gt;
| [https://github.com/svanheulen/genhax_installer Install]&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: salmon&amp;quot; | No&lt;br /&gt;
| [https://github.com/nedwill/soundhax soundhax]&lt;br /&gt;
| From &#039;&#039;&#039;9.0.0-13&#039;&#039;&#039; up to and including &#039;&#039;&#039;11.3.0-36&#039;&#039;&#039;.&lt;br /&gt;
| A USA, EUR, JPN or KOR system.&lt;br /&gt;
| nedwill&lt;br /&gt;
| [http://soundhax.com Install]&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: lightgreen&amp;quot; | Yes&lt;br /&gt;
| [https://github.com/MrNbaYoh/doodlebomb doodlebomb]&lt;br /&gt;
| From &#039;&#039;&#039;9.0.0-X&#039;&#039;&#039;(?) up to and including &#039;&#039;&#039;11.6.0-X&#039;&#039;&#039;.&lt;br /&gt;
| An eShop-install of Swapdoodle (version 1.1.1 or lower). As of 2017-4-26, version 1.1.2 was released, blocking outdated app version from sending or receiving messages.&lt;br /&gt;
| MrNbaYoh&lt;br /&gt;
| [https://mrnbayoh.github.io/doodlebomb/ Install]&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: lightgreen&amp;quot; | Yes&lt;br /&gt;
| [https://github.com/MrNbaYoh/rpwng2 RPwnG 2]&lt;br /&gt;
| From &#039;&#039;&#039;1.1.7-X&#039;&#039;&#039;(?) up to and including &#039;&#039;&#039;11.9.0-X&#039;&#039;&#039;.&lt;br /&gt;
| A digital copy of RPG Maker Player (free) ver. 1.1.4 on EUR, ver. 1.1.2 on USA. A 3DS on firmware 11.7. &lt;br /&gt;
| MrNbaYoh&lt;br /&gt;
| [https://mrnbayoh.github.io/rpwng2/ Install]&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: darkorange&amp;quot; | Only if installed before August 28, 2017&lt;br /&gt;
| [https://twitter.com/MrNbaYoh/status/899394739543437313 RPwnG]&lt;br /&gt;
| From &#039;&#039;&#039;9.0.0-X&#039;&#039;&#039;(?) up to and including &#039;&#039;&#039;11.9.0-X&#039;&#039;&#039;.&lt;br /&gt;
| An  digital copy of RPG Maker Player (free) ver. 1.1.4 on EUR, ver. 1.1.2 on USA/JPN is required. As of August 28, 2017 the code is instantly removed after publishing.&lt;br /&gt;
| MrNbaYoh&lt;br /&gt;
| [https://mrnbayoh.github.io/rpwng/ Install]&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: salmon&amp;quot; | No&lt;br /&gt;
| [https://github.com/MrNbaYoh/notehax notehax]&lt;br /&gt;
|  From &#039;&#039;&#039;9.9.0-X&#039;&#039;&#039; up to and including &#039;&#039;&#039;11.5.0-X&#039;&#039;&#039;.&lt;br /&gt;
| A digital copy of Flipnote Studio 3D on ver 1.3.1 (JPN) and ver 1.0.0 for EUR/USA (not the latest)&lt;br /&gt;
| MrNbaYoh&lt;br /&gt;
| [https://mrnbayoh.github.io/notehax/ Install]&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: darkorange&amp;quot; | Only if you already purchased Blockfactory before it was removed from the eShop&lt;br /&gt;
| [https://github.com/Stary2001/haxfactory haxfactory]&lt;br /&gt;
| From &#039;&#039;&#039;9.0.0-X&#039;&#039;&#039;(?) up to and including &#039;&#039;&#039;11.9.0-X&#039;&#039;&#039;.&lt;br /&gt;
| A digital copy of &amp;quot;Blockfactory&amp;quot; (USA/EUR)&lt;br /&gt;
| Stary2001&lt;br /&gt;
| [https://github.com/Stary2001/haxfactory Install]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Secondary Exploits==&lt;br /&gt;
Installation of these exploits requires a previously exploited system to install. After installation, they can be used on their own. &#039;&#039;Please&#039;&#039; see the above Payload section regarding what &amp;quot;Supported firmwares&amp;quot; indicates &#039;&#039;exactly&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Works on latest fw&lt;br /&gt;
!  Name&lt;br /&gt;
!  Supported firmwares&lt;br /&gt;
!  Requirements&lt;br /&gt;
!  Author&lt;br /&gt;
!  Install&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: salmon&amp;quot; | No&lt;br /&gt;
| [[ironhax]]&lt;br /&gt;
| From &#039;&#039;&#039;9.5.0-X&#039;&#039;&#039; up to and including &#039;&#039;&#039;10.3.0-X&#039;&#039;&#039;, for &#039;&#039;&#039;X&#039;&#039;&#039; up to and including 28.&lt;br /&gt;
| A copy of &amp;quot;Ironfall: Invasion&amp;quot; downloaded from eShop before August 11th, 2015. Note the updated version that was released on October 13th, 2015 is not supported.&lt;br /&gt;
| smea&lt;br /&gt;
| [http://smealum.github.io/3ds/ Install]&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: lightgreen&amp;quot; | Yes&lt;br /&gt;
| [http://vegaroxas.github.io/ steelhax]&lt;br /&gt;
| From &#039;&#039;&#039;9.0.0-X&#039;&#039;&#039; up to and including &#039;&#039;&#039;11.9.0-X&#039;&#039;&#039;&lt;br /&gt;
| A copy of Steel Diver: Sub Wars&lt;br /&gt;
| Vegaroxas&lt;br /&gt;
| [https://github.com/VegaRoXas/vegaroxas.github.io/raw/master/files/steelhax-installer.zip Install]&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: lightgreen&amp;quot; | Yes&lt;br /&gt;
| [https://github.com/yellows8/oot3dhax oot3dhax]&lt;br /&gt;
| From &#039;&#039;&#039;9.0.0-X&#039;&#039;&#039; up to and including &#039;&#039;&#039;11.9.0-X&#039;&#039;&#039;, for &#039;&#039;&#039;X&#039;&#039;&#039; up to and including 39.&lt;br /&gt;
| A gamecard or eShop-install of Legend of Zelda: Ocarina of Time 3D. Besides using the installer app, writing raw saveimages with a save dongle for example is another option. Before compression was introduced in the 2016-7-18 release, the size of the *hax payload meant the exploit can&#039;t co-exist with regular saves on a physical version of the game.&lt;br /&gt;
| Yellows8 / smea et al.&lt;br /&gt;
| See [https://smealum.github.io/3ds/ here].&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: salmon&amp;quot; | No&lt;br /&gt;
| [[menuhax]]&lt;br /&gt;
| JPN/USA/EUR: From &#039;&#039;&#039;9.0.0-X&#039;&#039;&#039; up to and including &#039;&#039;&#039;11.2.0-X&#039;&#039;&#039;.&lt;br /&gt;
KOR: From &#039;&#039;&#039;9.6.0-X&#039;&#039;&#039; up to and including &#039;&#039;&#039;11.2.0-X&#039;&#039;&#039;.&lt;br /&gt;
| JPN/USA/EUR: Having created [[Home_Menu#Home_Menu_Theme_SD_ExtData|theme extdata]] through opening the official theme selector at least once.&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
| [https://github.com/yellows8/3ds_homemenuhax/releases Download]&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: lightgreen&amp;quot; | Yes&lt;br /&gt;
| [https://github.com/shinyquagsire23/supermysterychunkhax supermysterychunkhax]&lt;br /&gt;
| From &#039;&#039;&#039;9.9.0-X&#039;&#039;&#039; (USA/JPN) / &#039;&#039;&#039;10.2.0-X&#039;&#039;&#039; (EUR) up to &#039;&#039;&#039;11.9.0-X&#039;&#039;&#039;.&lt;br /&gt;
| A gamecard or eShop-install of Pokémon Super Mystery Dungeon.&lt;br /&gt;
| Shiny Quagsire / SALT team&lt;br /&gt;
| [https://smd.salthax.org/ Install].&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: salmon&amp;quot; | No&lt;br /&gt;
| [https://github.com/shinyquagsire23/v_hax (v*)hax]&lt;br /&gt;
| From &#039;&#039;&#039;9.0.0-X&#039;&#039;&#039; up to and including &#039;&#039;&#039;11.0.0-X&#039;&#039;&#039;, for &#039;&#039;&#039;X&#039;&#039;&#039; up to and including 33.&lt;br /&gt;
Note that &#039;&#039;&#039;9.0.0-X&#039;&#039;&#039; is only required for the Homebrew Launcher - the game itself only requires &#039;&#039;&#039;2.1.0-X&#039;&#039;&#039; for primitive userland code execution.&lt;br /&gt;
| A copy of VVVVVV downloaded after March 2012 (v1). v1.1 patches out the overflow vulnerability used by (v*)hax.&lt;br /&gt;
| Shiny Quagsire / SALT team&lt;br /&gt;
| [https://vvvvvv.salthax.org/ Install].&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: lightgreen&amp;quot; | Yes&lt;br /&gt;
| [https://github.com/Dazzozo/humblehax humblehax]&lt;br /&gt;
| From &#039;&#039;&#039;9.0.0-X&#039;&#039;&#039; (USA/EUR) up to and including &#039;&#039;&#039;11.9.0-X&#039;&#039;&#039;.&lt;br /&gt;
| An eShop-install of Citizens of Earth (either v1 or v2), featured in the Humble &amp;quot;Friends of Nintendo&amp;quot; Bundle.&lt;br /&gt;
| Dazzozo / SALT team&lt;br /&gt;
| [https://citizens.salthax.org/ Install].&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: salmon&amp;quot; | No&lt;br /&gt;
| [http://mrnbayoh.github.io/basehaxx/ basehaxx]&lt;br /&gt;
| From &#039;&#039;&#039;9.0.0-X&#039;&#039;&#039; up to and including &#039;&#039;&#039;11.1.0-X&#039;&#039;&#039;.&lt;br /&gt;
| A gamecard or eShop-install of Pokémon Omega Ruby / Alpha Sapphire v1 or v1.4 with the ability to have a secret base.&lt;br /&gt;
| MrNbaYoh&lt;br /&gt;
| [http://mrnbayoh.github.io/basehaxx/ install]&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: lightgreen&amp;quot; | Yes&lt;br /&gt;
| [https://github.com/yellows8/stickerhax stickerhax]&lt;br /&gt;
| From &#039;&#039;&#039;9.0.0-X&#039;&#039;&#039; up to and including &#039;&#039;&#039;11.6.0-X&#039;&#039;&#039;.&lt;br /&gt;
| A gamecard or eShop-install of Paper Mario: Sticker Star.&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
| [https://github.com/yellows8/stickerhax Here]&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: lightgreen&amp;quot; | Yes&lt;br /&gt;
| [https://github.com/svanheulen/genhax genhax]&lt;br /&gt;
| (New 3DS only) From &#039;&#039;&#039;9.9.0-X&#039;&#039;&#039;(JPN) or &#039;&#039;&#039;10.3.0-X&#039;&#039;&#039;(EUR/USA) up to and including &#039;&#039;&#039;11.3.0-X&#039;&#039;&#039;.&lt;br /&gt;
| A gamecard or eShop-install of Monster Hunter Generations or Monster Hunter X (without the game updates installed), and an internet connection during installation.&lt;br /&gt;
| svanheulen&lt;br /&gt;
| [https://github.com/svanheulen/genhax_installer Install]&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: lightgreen&amp;quot; | Yes&lt;br /&gt;
| [https://github.com/MrNbaYoh/painthax painthax]&lt;br /&gt;
| From &#039;&#039;&#039;9.0.0-X&#039;&#039;&#039; up to and including &#039;&#039;&#039;11.6.0-X&#039;&#039;&#039;.&lt;br /&gt;
| An eShop-install of Pixel Paint.&lt;br /&gt;
| MrNbaYoh&lt;br /&gt;
| [https://github.com/MrNbaYoh/painthax/releases/latest install]&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: salmon&amp;quot; | No&lt;br /&gt;
| [https://github.com/yellows8/ctpkpwn ctpkpwn_tfh]&lt;br /&gt;
| From &#039;&#039;&#039;9.9.0-X&#039;&#039;&#039; up to and including &#039;&#039;&#039;11.3.0-X&#039;&#039;&#039;.&lt;br /&gt;
| A gamecard or eShop-install of &amp;quot;The Legend of Zelda: Tri Force Heroes&amp;quot;, and an Internet connection during installation. Unless you have &amp;quot;CFW&amp;quot;, ctr-httpwn &amp;gt;=v1.2 with the included bosshaxx on a compatible system-version is also required. If installing via ctr-httpwn, you can&#039;t do so on &amp;gt;=v11.4. Note that the exploit itself was not fixed.&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
| [https://github.com/yellows8/ctpkpwn/releases Install]&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: salmon&amp;quot; | No&lt;br /&gt;
| [https://github.com/MrNbaYoh/doodlebomb doodlebomb]&lt;br /&gt;
| From &#039;&#039;&#039;9.0.0-X&#039;&#039;&#039;(?) up to and including &#039;&#039;&#039;11.4.0-X&#039;&#039;&#039;.&lt;br /&gt;
| An eShop-install of Swapdoodle.&lt;br /&gt;
| MrNbaYoh&lt;br /&gt;
| [https://mrnbayoh.github.io/doodlebomb/ Install]&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: darkorange&amp;quot; | Only if installed before August 28, 2017&lt;br /&gt;
| [https://github.com/ChampionLeake/RPwnG3 RPwnG3]&lt;br /&gt;
| From &#039;&#039;&#039;9.0.0-X&#039;&#039;&#039;(?) up to and including &#039;&#039;&#039;11.12.0-X&#039;&#039;&#039;.&lt;br /&gt;
| A Digital/Physical copy of &amp;quot;RPGMaker Fes Player/RPGMaker Fes&amp;quot; (USA/JPN 1.1.2 or lower ; EUR 1.1.4 or lower).&lt;br /&gt;
| [[User:ChampionLeake|ChampionLeake]]&lt;br /&gt;
| [https://github.com/ChampionLeake/RPwnG3/releases Install]&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: lightgreen&amp;quot; | Yes&lt;br /&gt;
| [https://github.com/luigoalma/nitpic3d nitpic3d]&lt;br /&gt;
| From &#039;&#039;&#039;9.6.0-X&#039;&#039;&#039;(?) up to and including &#039;&#039;&#039;11.13.0-X&#039;&#039;&#039;.&lt;br /&gt;
| A digital or physical of Picross 3D: Round 2&lt;br /&gt;
| Luigoalma and Kartik&lt;br /&gt;
| [https://github.com/luigoalma/nitpic3d Install]&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: lightgreen&amp;quot; | Yes&lt;br /&gt;
| [https://github.com/PabloMK7/kartdlphax kartdlphax]&lt;br /&gt;
| All system versions work.&lt;br /&gt;
| A digital or physical of Mario Kart 7 for the same region as both consoles&lt;br /&gt;
| PabloMK7&lt;br /&gt;
| [https://3ds.hacks.guide/installing-boot9strap-(kartdlphax) Install]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Exploits without Homebrew Launcher==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;&#039;&#039;&#039;Warning:&#039;&#039;&#039;&amp;lt;/u&amp;gt; The following exploits can run code, but are missing a 3DSX launcher. They cannot launch any homebrew in the 3DSX format, but could still prove useful by chaining to exploits with higher privileges.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Works on latest fw&lt;br /&gt;
!  Name&lt;br /&gt;
!  Supported firmwares&lt;br /&gt;
!  Requirements&lt;br /&gt;
!  Author&lt;br /&gt;
!  Install&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: lime&amp;quot; | Yes&lt;br /&gt;
| [https://safecerthax.rocks safecerthax] (Safe Mode System Updater)&lt;br /&gt;
| (Old3DS (2DS) (XL)) &#039;&#039;&#039; ALL &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
(New3DS (New2DS) (XL)) &#039;&#039;&#039;NOT SUPPORTED&#039;&#039;&#039;&lt;br /&gt;
|An O3DS or O2DS that can be booted into [[Recovery_Mode|Recovery Mode]] (hold L+R+Up+A at startup) &amp;amp; an internet connection.&lt;br /&gt;
|[[User:Nba_Yoh|MrNbaYoh]]&lt;br /&gt;
|[https://safecerthax.rocks/user-guide/ Install]&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: lime&amp;quot; | Yes (partially)&lt;br /&gt;
| [[bannerbomb3]] (System Settings)&lt;br /&gt;
| (USA / EUR / JPN) &#039;&#039;&#039;11.5.0&#039;&#039;&#039; to &#039;&#039;&#039;11.16.0&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
(KOR / TWN) &#039;&#039;&#039;(11.4.0)&#039;&#039;&#039; &#039;&#039;&#039;11.5.0&#039;&#039;&#039; to &#039;&#039;&#039;latest&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
An exploit that uses a buffer overflow in a TWL export banner&#039;s title strings to gain rop execution.&lt;br /&gt;
|A USA, EUR, JPN, KOR, or TWN system with its movable.sed keyY extracted.&lt;br /&gt;
|[[User:zoogie|zoogie]]&lt;br /&gt;
|[[bannerbomb3|Install]]&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: salmon&amp;quot; | No&lt;br /&gt;
| [[browserhax]] (Without the loader in the 3ds_browserhax_common repo)&lt;br /&gt;
| (Old3DS) From &#039;&#039;&#039;5.0.0-2&#039;&#039;&#039; to &#039;&#039;&#039;11.0.0-33&#039;&#039;&#039; (Pre-v5.0 is supported for some versions if you manually modify the source)&lt;br /&gt;
&lt;br /&gt;
(New3DS) From &#039;&#039;&#039;9.0.0-20&#039;&#039;&#039; to &#039;&#039;&#039;11.0.0-33&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Note that the browser-version-check bypass is only usable prior to [[10.7.0-32]].&lt;br /&gt;
| An USA, EUR, or JPN system.&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
| [[browserhax|Install]]&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: salmon&amp;quot; | No&lt;br /&gt;
| Ninjhax (with specialized payloads)&lt;br /&gt;
| Up to &#039;&#039;&#039;9.2.0-20&#039;&#039;&#039;?&lt;br /&gt;
| &lt;br /&gt;
| smea + independent developers&lt;br /&gt;
| N/A&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Previous Exploits==&lt;br /&gt;
&amp;lt;u&amp;gt;&#039;&#039;&#039;Warning:&#039;&#039;&#039;&amp;lt;/u&amp;gt; These exploits &#039;&#039;&#039;do not work&#039;&#039;&#039;. They are exploits which no longer function at all, regardless of software or firmware revision.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Works on latest fw&lt;br /&gt;
! Name&lt;br /&gt;
! Supported firmwares&lt;br /&gt;
! Requirements&lt;br /&gt;
! Author&lt;br /&gt;
! Install&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: salmon&amp;quot; | No&lt;br /&gt;
| [[tubehax|Tubehax]]&lt;br /&gt;
| None. &#039;&#039;&#039;Was&#039;&#039;&#039;: From &#039;&#039;&#039;9.0.0-X&#039;&#039;&#039; up to and including &#039;&#039;&#039;10.1.0-X&#039;&#039;&#039;, for &#039;&#039;&#039;X&#039;&#039;&#039; up to and including 27.&lt;br /&gt;
| The YouTube application and an Internet connection. As of October 15, 2015, this is no longer usable due to an update being released which fixes the vuln used by tubehax + app update being forced (see [[YouTube|here]]).&lt;br /&gt;
| smea&lt;br /&gt;
| [http://smealum.github.io/3ds/ Install]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Other Homebrew Loaders==&lt;br /&gt;
The [https://github.com/yellows8/hblauncher_loader hblauncher_loader] title can be used when running under modded-FIRM which allows running unsigned titles, to boot the *hax payloads.&lt;br /&gt;
&lt;br /&gt;
[https://github.com/AuroraWright/Luma3DS Luma3DS], apart from providing signature patches for the installation and use of custom titles, includes the &amp;quot;Rosalina&amp;quot; system module, which among its features allows cleanly loading 3dsx applications as a native process with full ARM11 system permissions, by replacing an installed title&#039;s ExeFS and ExHeader during load time. It is currently the only option for running 3dsx applications on 11.4+ O3DSes; additionally, the *hax 2.x payload is incompatible with Rosalina and therefore so are homebrew applications requiring its target title system.&lt;br /&gt;
&lt;br /&gt;
==Sysmodule Exploits==&lt;br /&gt;
This section is for system-module exploits, which can be run from the *hax payloads.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Works on latest fw&lt;br /&gt;
! Name&lt;br /&gt;
! Supported firmwares&lt;br /&gt;
! Requirements&lt;br /&gt;
! Author&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: salmon&amp;quot; | No, still usable pre-v11.4.&lt;br /&gt;
| [https://github.com/yellows8/ctr-httpwn/releases ctr-httpwn]&lt;br /&gt;
| From &#039;&#039;&#039;9.6.0-X&#039;&#039;&#039; up to and including &#039;&#039;&#039;11.3.0-X&#039;&#039;&#039;. This includes bosshaxx.&lt;br /&gt;
| None&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==WebKit vuln testing==&lt;br /&gt;
See [https://github.com/yellows8/3ds_browserhax_common/issues/28 here].&lt;/div&gt;</summary>
		<author><name>EvilFlight</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=Homebrew_Exploits&amp;diff=22224</id>
		<title>Homebrew Exploits</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=Homebrew_Exploits&amp;diff=22224"/>
		<updated>2023-05-23T08:01:00Z</updated>

		<summary type="html">&lt;p&gt;EvilFlight: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Payload==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Works on latest fw&lt;br /&gt;
!  Name&lt;br /&gt;
!  Description&lt;br /&gt;
!  Supported firmwares&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: lightgreen&amp;quot; | Yes&lt;br /&gt;
| [https://smealum.github.io/3ds/ *hax payload]&lt;br /&gt;
| Booted by all of the below non-sysmodule exploits. &#039;&#039;&#039;No longer needed as of [https://github.com/AuroraWright/Luma3DS/releases/tag/v8.0 Luma 8.0]&#039;&#039;&#039;&lt;br /&gt;
| From &#039;&#039;&#039;9.0.0-7&#039;&#039;&#039; up to &#039;&#039;&#039;11.9.0-42&#039;&#039;&#039;.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
For the rest of this page, &amp;quot;Supported firmwares&amp;quot; refers to the exploit &#039;&#039;itself&#039;&#039;, not whether *hax payload supports it.&lt;br /&gt;
&lt;br /&gt;
==Standalone Homebrew Launcher Exploits==&lt;br /&gt;
The following homebrew exploits can be executed on a previously un-exploited system. &#039;&#039;Please&#039;&#039; see the above Payload section regarding what &amp;quot;Supported firmwares&amp;quot; indicates &#039;&#039;exactly&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Works on latest fw&lt;br /&gt;
!  Name&lt;br /&gt;
!  Supported firmwares&lt;br /&gt;
!  Requirements&lt;br /&gt;
!  Author&lt;br /&gt;
!  Install&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: salmon&amp;quot; | No&lt;br /&gt;
| [[ninjhax|Ninjhax 1.1b]]&lt;br /&gt;
| From &#039;&#039;&#039;4.0.0-7&#039;&#039;&#039; up to and including &#039;&#039;&#039;9.2.0-20&#039;&#039;&#039;.&lt;br /&gt;
| A cartridge or eShop version (JPN-only) of &amp;quot;Cubic Ninja&amp;quot;.&lt;br /&gt;
| smea&lt;br /&gt;
| [http://smealum.net/ninjhax/ Install]&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: lightgreen&amp;quot; | Yes&lt;br /&gt;
| [[ninjhax|Ninjhax 2.x]]&lt;br /&gt;
| From &#039;&#039;&#039;9.0.0-7&#039;&#039;&#039; up to and including &#039;&#039;&#039;11.9.X&#039;&#039;&#039;.&lt;br /&gt;
|  A cartridge or eShop version (JPN-only, not available anymore for purchase) of &amp;quot;Cubic Ninja&amp;quot;.&lt;br /&gt;
| smea&lt;br /&gt;
| [https://smealum.github.io/ninjhax2/ Install]&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: lightgreen&amp;quot; | Yes&lt;br /&gt;
| [http://plutooo.github.io/freakyhax/ freakyhax]&lt;br /&gt;
| From &#039;&#039;&#039;9.0.0-7&#039;&#039;&#039; up to and including &#039;&#039;&#039;11.9.X&#039;&#039;&#039;.&lt;br /&gt;
|  A cartridge or eShop version (USA/EUR/JPN, not available anymore for purchase) of &amp;quot;Freakyform Deluxe&amp;quot;.&lt;br /&gt;
| plutoo&lt;br /&gt;
| [http://plutooo.github.io/freakyhax/ Install]&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: salmon&amp;quot; | No&lt;br /&gt;
| [http://plutooo.github.io/smilehax/ smilehax]&lt;br /&gt;
| From &#039;&#039;&#039;9.0.0-7&#039;&#039;&#039; up to and including &#039;&#039;&#039;11.0.0-33&#039;&#039;&#039;&lt;br /&gt;
| SmileBASIC (JPN all versions up to 3.32 excluded, USA 3.31 only)&lt;br /&gt;
| plutoo&lt;br /&gt;
| [http://plutooo.github.io/smilehax/ Install]&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: lightgreen&amp;quot; | Yes&lt;br /&gt;
| [https://github.com/zoogie/smilehax-IIe smilehax IIe]&lt;br /&gt;
| From &#039;&#039;&#039;9.0.0-7&#039;&#039;&#039; up to and including &#039;&#039;&#039;11.13.0-45&#039;&#039;&#039;&lt;br /&gt;
| SmileBASIC (JPN version 3.3.2 via app downgrade, USA/EUR 3.6.0, aka latest app version)&lt;br /&gt;
| zoogie&lt;br /&gt;
| [https://github.com/zoogie/smilehax-IIe/releases/latest Install]&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: salmon&amp;quot; | No&lt;br /&gt;
| [http://mrnbayoh.github.io/basicsploit/ BASICSploit]&lt;br /&gt;
| From &#039;&#039;&#039;9.0.0-7&#039;&#039;&#039; up to and including &#039;&#039;&#039;11.0.0-33&#039;&#039;&#039;&lt;br /&gt;
| SmileBASIC (USA all versions)&lt;br /&gt;
| MrNbaYoh&lt;br /&gt;
| [http://mrnbayoh.github.io/basicsploit/ Install]&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: lightgreen&amp;quot; | Yes&lt;br /&gt;
| [[smashbroshax|smashbroshax]] (beaconhax)&lt;br /&gt;
| (New 3DS only) From &#039;&#039;&#039;9.0.0-X&#039;&#039;&#039; up to and including &#039;&#039;&#039;11.9.0-37&#039;&#039;&#039;.&lt;br /&gt;
| Super Smash Bros 3DS (full-game) and a way to broadcast raw wifi beacons. The demo (prior to the updated November 2015 [https://github.com/yellows8/3ds_smashbroshax version]) isn&#039;t usable with the *hax payloads. Game-version v1.1.3 fixed the vuln used with this, see the repo for a workaround for that.&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
| [https://github.com/yellows8/3ds_smashbroshax Install]&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: salmon&amp;quot; | No&lt;br /&gt;
| [[browserhax]]&lt;br /&gt;
| From &#039;&#039;&#039;9.0.0-2&#039;&#039;&#039; to &#039;&#039;&#039;11.0.0-33&#039;&#039;&#039;&lt;br /&gt;
Note that the browser-version-check bypass is only usable prior to [[10.7.0-32]].&lt;br /&gt;
| A USA, EUR, JPN, or KOR system.&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
| [http://yls8.mtheall.com/3dsbrowserhax.php Install]&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: salmon&amp;quot; | No&lt;br /&gt;
| [https://github.com/svanheulen/genhax genhax]&lt;br /&gt;
| (New 3DS only) From &#039;&#039;&#039;9.9.0-X&#039;&#039;&#039; up to and including &#039;&#039;&#039;11.2.0-X&#039;&#039;&#039;.&lt;br /&gt;
| A gamecard or eShop-install of Monster Hunter X (JPN only), and the DLC encryption key (see installer instructions). &#039;&#039;&#039;Note: the secondary exploit still works, see bellow&#039;&#039;&#039;&lt;br /&gt;
| svanheulen&lt;br /&gt;
| [https://github.com/svanheulen/genhax_installer Install]&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: salmon&amp;quot; | No&lt;br /&gt;
| [https://github.com/nedwill/soundhax soundhax]&lt;br /&gt;
| From &#039;&#039;&#039;9.0.0-13&#039;&#039;&#039; up to and including &#039;&#039;&#039;11.3.0-36&#039;&#039;&#039;.&lt;br /&gt;
| A USA, EUR, JPN or KOR system.&lt;br /&gt;
| nedwill&lt;br /&gt;
| [http://soundhax.com Install]&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: lightgreen&amp;quot; | Yes&lt;br /&gt;
| [https://github.com/MrNbaYoh/doodlebomb doodlebomb]&lt;br /&gt;
| From &#039;&#039;&#039;9.0.0-X&#039;&#039;&#039;(?) up to and including &#039;&#039;&#039;11.6.0-X&#039;&#039;&#039;.&lt;br /&gt;
| An eShop-install of Swapdoodle (version 1.1.1 or lower). As of 2017-4-26, version 1.1.2 was released, blocking outdated app version from sending or receiving messages.&lt;br /&gt;
| MrNbaYoh&lt;br /&gt;
| [https://mrnbayoh.github.io/doodlebomb/ Install]&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: lightgreen&amp;quot; | Yes&lt;br /&gt;
| [https://github.com/MrNbaYoh/rpwng2 RPwnG 2]&lt;br /&gt;
| From &#039;&#039;&#039;1.1.7-X&#039;&#039;&#039;(?) up to and including &#039;&#039;&#039;11.9.0-X&#039;&#039;&#039;.&lt;br /&gt;
| A digital copy of RPG Maker Player (free) ver. 1.1.4 on EUR, ver. 1.1.2 on USA. A 3DS on firmware 11.7. &lt;br /&gt;
| MrNbaYoh&lt;br /&gt;
| [https://mrnbayoh.github.io/rpwng2/ Install]&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: darkorange&amp;quot; | Only if installed before August 28, 2017&lt;br /&gt;
| [https://twitter.com/MrNbaYoh/status/899394739543437313 RPwnG]&lt;br /&gt;
| From &#039;&#039;&#039;9.0.0-X&#039;&#039;&#039;(?) up to and including &#039;&#039;&#039;11.9.0-X&#039;&#039;&#039;.&lt;br /&gt;
| An  digital copy of RPG Maker Player (free) ver. 1.1.4 on EUR, ver. 1.1.2 on USA/JPN is required. As of August 28, 2017 the code is instantly removed after publishing.&lt;br /&gt;
| MrNbaYoh&lt;br /&gt;
| [https://mrnbayoh.github.io/rpwng/ Install]&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: salmon&amp;quot; | No&lt;br /&gt;
| [https://github.com/MrNbaYoh/notehax notehax]&lt;br /&gt;
|  From &#039;&#039;&#039;9.9.0-X&#039;&#039;&#039; up to and including &#039;&#039;&#039;11.5.0-X&#039;&#039;&#039;.&lt;br /&gt;
| A digital copy of Flipnote Studio 3D on ver 1.3.1 (JPN) and ver 1.0.0 for EUR/USA (not the latest)&lt;br /&gt;
| MrNbaYoh&lt;br /&gt;
| [https://mrnbayoh.github.io/notehax/ Install]&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: darkorange&amp;quot; | Only if you already purchased Blockfactory before it was removed from the eShop&lt;br /&gt;
| [https://github.com/Stary2001/haxfactory haxfactory]&lt;br /&gt;
| From &#039;&#039;&#039;9.0.0-X&#039;&#039;&#039;(?) up to and including &#039;&#039;&#039;11.9.0-X&#039;&#039;&#039;.&lt;br /&gt;
| A digital copy of &amp;quot;Blockfactory&amp;quot; (USA/EUR)&lt;br /&gt;
| Stary2001&lt;br /&gt;
| [https://github.com/Stary2001/haxfactory Install]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Secondary Exploits==&lt;br /&gt;
Installation of these exploits requires a previously exploited system to install. After installation, they can be used on their own. &#039;&#039;Please&#039;&#039; see the above Payload section regarding what &amp;quot;Supported firmwares&amp;quot; indicates &#039;&#039;exactly&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Works on latest fw&lt;br /&gt;
!  Name&lt;br /&gt;
!  Supported firmwares&lt;br /&gt;
!  Requirements&lt;br /&gt;
!  Author&lt;br /&gt;
!  Install&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: salmon&amp;quot; | No&lt;br /&gt;
| [[ironhax]]&lt;br /&gt;
| From &#039;&#039;&#039;9.5.0-X&#039;&#039;&#039; up to and including &#039;&#039;&#039;10.3.0-X&#039;&#039;&#039;, for &#039;&#039;&#039;X&#039;&#039;&#039; up to and including 28.&lt;br /&gt;
| A copy of &amp;quot;Ironfall: Invasion&amp;quot; downloaded from eShop before August 11th, 2015. Note the updated version that was released on October 13th, 2015 is not supported.&lt;br /&gt;
| smea&lt;br /&gt;
| [http://smealum.github.io/3ds/ Install]&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: lightgreen&amp;quot; | Yes&lt;br /&gt;
| [http://vegaroxas.github.io/ steelhax]&lt;br /&gt;
| From &#039;&#039;&#039;9.0.0-X&#039;&#039;&#039; up to and including &#039;&#039;&#039;11.9.0-X&#039;&#039;&#039;&lt;br /&gt;
| A copy of Steel Diver: Sub Wars&lt;br /&gt;
| Vegaroxas&lt;br /&gt;
| [https://github.com/VegaRoXas/vegaroxas.github.io/raw/master/files/steelhax-installer.zip Install]&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: lightgreen&amp;quot; | Yes&lt;br /&gt;
| [https://github.com/yellows8/oot3dhax oot3dhax]&lt;br /&gt;
| From &#039;&#039;&#039;9.0.0-X&#039;&#039;&#039; up to and including &#039;&#039;&#039;11.9.0-X&#039;&#039;&#039;, for &#039;&#039;&#039;X&#039;&#039;&#039; up to and including 39.&lt;br /&gt;
| A gamecard or eShop-install of Legend of Zelda: Ocarina of Time 3D. Besides using the installer app, writing raw saveimages with a save dongle for example is another option. Before compression was introduced in the 2016-7-18 release, the size of the *hax payload meant the exploit can&#039;t co-exist with regular saves on a physical version of the game.&lt;br /&gt;
| Yellows8 / smea et al.&lt;br /&gt;
| See [https://smealum.github.io/3ds/ here].&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: salmon&amp;quot; | No&lt;br /&gt;
| [[menuhax]]&lt;br /&gt;
| JPN/USA/EUR: From &#039;&#039;&#039;9.0.0-X&#039;&#039;&#039; up to and including &#039;&#039;&#039;11.2.0-X&#039;&#039;&#039;.&lt;br /&gt;
KOR: From &#039;&#039;&#039;9.6.0-X&#039;&#039;&#039; up to and including &#039;&#039;&#039;11.2.0-X&#039;&#039;&#039;.&lt;br /&gt;
| JPN/USA/EUR: Having created [[Home_Menu#Home_Menu_Theme_SD_ExtData|theme extdata]] through opening the official theme selector at least once.&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
| [https://github.com/yellows8/3ds_homemenuhax/releases Download]&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: lightgreen&amp;quot; | Yes&lt;br /&gt;
| [https://github.com/shinyquagsire23/supermysterychunkhax supermysterychunkhax]&lt;br /&gt;
| From &#039;&#039;&#039;9.9.0-X&#039;&#039;&#039; (USA/JPN) / &#039;&#039;&#039;10.2.0-X&#039;&#039;&#039; (EUR) up to &#039;&#039;&#039;11.9.0-X&#039;&#039;&#039;.&lt;br /&gt;
| A gamecard or eShop-install of Pokémon Super Mystery Dungeon.&lt;br /&gt;
| Shiny Quagsire / SALT team&lt;br /&gt;
| [https://smd.salthax.org/ Install].&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: salmon&amp;quot; | No&lt;br /&gt;
| [https://github.com/shinyquagsire23/v_hax (v*)hax]&lt;br /&gt;
| From &#039;&#039;&#039;9.0.0-X&#039;&#039;&#039; up to and including &#039;&#039;&#039;11.0.0-X&#039;&#039;&#039;, for &#039;&#039;&#039;X&#039;&#039;&#039; up to and including 33.&lt;br /&gt;
Note that &#039;&#039;&#039;9.0.0-X&#039;&#039;&#039; is only required for the Homebrew Launcher - the game itself only requires &#039;&#039;&#039;2.1.0-X&#039;&#039;&#039; for primitive userland code execution.&lt;br /&gt;
| A copy of VVVVVV downloaded after March 2012 (v1). v1.1 patches out the overflow vulnerability used by (v*)hax.&lt;br /&gt;
| Shiny Quagsire / SALT team&lt;br /&gt;
| [https://vvvvvv.salthax.org/ Install].&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: lightgreen&amp;quot; | Yes&lt;br /&gt;
| [https://github.com/Dazzozo/humblehax humblehax]&lt;br /&gt;
| From &#039;&#039;&#039;9.0.0-X&#039;&#039;&#039; (USA/EUR) up to and including &#039;&#039;&#039;11.9.0-X&#039;&#039;&#039;.&lt;br /&gt;
| An eShop-install of Citizens of Earth (either v1 or v2), featured in the Humble &amp;quot;Friends of Nintendo&amp;quot; Bundle.&lt;br /&gt;
| Dazzozo / SALT team&lt;br /&gt;
| [https://citizens.salthax.org/ Install].&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: salmon&amp;quot; | No&lt;br /&gt;
| [http://mrnbayoh.github.io/basehaxx/ basehaxx]&lt;br /&gt;
| From &#039;&#039;&#039;9.0.0-X&#039;&#039;&#039; up to and including &#039;&#039;&#039;11.1.0-X&#039;&#039;&#039;.&lt;br /&gt;
| A gamecard or eShop-install of Pokémon Omega Ruby / Alpha Sapphire v1 or v1.4 with the ability to have a secret base.&lt;br /&gt;
| MrNbaYoh&lt;br /&gt;
| [http://mrnbayoh.github.io/basehaxx/ install]&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: lightgreen&amp;quot; | Yes&lt;br /&gt;
| [https://github.com/yellows8/stickerhax stickerhax]&lt;br /&gt;
| From &#039;&#039;&#039;9.0.0-X&#039;&#039;&#039; up to and including &#039;&#039;&#039;11.6.0-X&#039;&#039;&#039;.&lt;br /&gt;
| A gamecard or eShop-install of Paper Mario: Sticker Star.&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
| [https://github.com/yellows8/stickerhax Here]&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: lightgreen&amp;quot; | Yes&lt;br /&gt;
| [https://github.com/svanheulen/genhax genhax]&lt;br /&gt;
| (New 3DS only) From &#039;&#039;&#039;9.9.0-X&#039;&#039;&#039;(JPN) or &#039;&#039;&#039;10.3.0-X&#039;&#039;&#039;(EUR/USA) up to and including &#039;&#039;&#039;11.3.0-X&#039;&#039;&#039;.&lt;br /&gt;
| A gamecard or eShop-install of Monster Hunter Generations or Monster Hunter X (without the game updates installed), and an internet connection during installation.&lt;br /&gt;
| svanheulen&lt;br /&gt;
| [https://github.com/svanheulen/genhax_installer Install]&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: lightgreen&amp;quot; | Yes&lt;br /&gt;
| [https://github.com/MrNbaYoh/painthax painthax]&lt;br /&gt;
| From &#039;&#039;&#039;9.0.0-X&#039;&#039;&#039; up to and including &#039;&#039;&#039;11.6.0-X&#039;&#039;&#039;.&lt;br /&gt;
| An eShop-install of Pixel Paint.&lt;br /&gt;
| MrNbaYoh&lt;br /&gt;
| [https://github.com/MrNbaYoh/painthax/releases/latest install]&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: salmon&amp;quot; | No&lt;br /&gt;
| [https://github.com/yellows8/ctpkpwn ctpkpwn_tfh]&lt;br /&gt;
| From &#039;&#039;&#039;9.9.0-X&#039;&#039;&#039; up to and including &#039;&#039;&#039;11.3.0-X&#039;&#039;&#039;.&lt;br /&gt;
| A gamecard or eShop-install of &amp;quot;The Legend of Zelda: Tri Force Heroes&amp;quot;, and an Internet connection during installation. Unless you have &amp;quot;CFW&amp;quot;, ctr-httpwn &amp;gt;=v1.2 with the included bosshaxx on a compatible system-version is also required. If installing via ctr-httpwn, you can&#039;t do so on &amp;gt;=v11.4. Note that the exploit itself was not fixed.&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
| [https://github.com/yellows8/ctpkpwn/releases Install]&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: salmon&amp;quot; | No&lt;br /&gt;
| [https://github.com/MrNbaYoh/doodlebomb doodlebomb]&lt;br /&gt;
| From &#039;&#039;&#039;9.0.0-X&#039;&#039;&#039;(?) up to and including &#039;&#039;&#039;11.4.0-X&#039;&#039;&#039;.&lt;br /&gt;
| An eShop-install of Swapdoodle.&lt;br /&gt;
| MrNbaYoh&lt;br /&gt;
| [https://mrnbayoh.github.io/doodlebomb/ Install]&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: darkorange&amp;quot; | Only if installed before August 28, 2017&lt;br /&gt;
| [https://github.com/ChampionLeake/RPwnG3 RPwnG3]&lt;br /&gt;
| From &#039;&#039;&#039;9.0.0-X&#039;&#039;&#039;(?) up to and including &#039;&#039;&#039;11.12.0-X&#039;&#039;&#039;.&lt;br /&gt;
| A Digital/Physical copy of &amp;quot;RPGMaker Fes Player/RPGMaker Fes&amp;quot; (USA/JPN 1.1.2 or lower ; EUR 1.1.4 or lower).&lt;br /&gt;
| [[User:ChampionLeake|ChampionLeake]]&lt;br /&gt;
| [https://github.com/ChampionLeake/RPwnG3/releases Install]&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: lightgreen&amp;quot; | Yes&lt;br /&gt;
| [https://github.com/luigoalma/nitpic3d nitpic3d]&lt;br /&gt;
| From &#039;&#039;&#039;9.6.0-X&#039;&#039;&#039;(?) up to and including &#039;&#039;&#039;11.13.0-X&#039;&#039;&#039;.&lt;br /&gt;
| A digital or physical of Picross 3D: Round 2&lt;br /&gt;
| Luigoalma and Kartik&lt;br /&gt;
| [https://github.com/luigoalma/nitpic3d Install]&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: lightgreen&amp;quot; | Yes&lt;br /&gt;
| [https://github.com/PabloMK7/kartdlphax kartdlphax]&lt;br /&gt;
| All system versions work.&lt;br /&gt;
| A digital or physical of Mario Kart 7 for the same region as both consoles&lt;br /&gt;
| PabloMK7&lt;br /&gt;
| [https://3ds.hacks.guide/installing-boot9strap-(kartdlphax) Install]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Exploits without Homebrew Launcher==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;&#039;&#039;&#039;Warning:&#039;&#039;&#039;&amp;lt;/u&amp;gt; The following exploits can run code, but are missing a 3DSX launcher. They cannot launch any homebrew in the 3DSX format, but could still prove useful by chaining to exploits with higher privileges.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Works on latest fw&lt;br /&gt;
!  Name&lt;br /&gt;
!  Supported firmwares&lt;br /&gt;
!  Requirements&lt;br /&gt;
!  Author&lt;br /&gt;
!  Install&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: lime&amp;quot; | Yes&lt;br /&gt;
| [https://safecerthax.rocks safecerthax] (Safe Mode System Updater)&lt;br /&gt;
| (Old3DS (2DS) (XL)) &#039;&#039;&#039; ALL &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
(New3DS (New2DS) (XL)) &#039;&#039;&#039;NOT SUPPORTED&#039;&#039;&#039;&lt;br /&gt;
|An O3DS or O2DS that can be booted into [[Recovery_Mode|Recovery Mode]] (hold L+R+Up+A at startup) &amp;amp; an internet connection.&lt;br /&gt;
|[[User:Nba_Yoh|MrNbaYoh]]&lt;br /&gt;
|[https://safecerthax.rocks/user-guide/ Install]&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: lime&amp;quot; | Yes (partially)&lt;br /&gt;
| [[bannerbomb3]] (System Settings)&lt;br /&gt;
| (USA / EUR / JPN) &#039;&#039;&#039;11.5.0&#039;&#039;&#039; to &#039;&#039;&#039;11.16.0&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
(KOR / TWN) &#039;&#039;&#039;(11.4.0)&#039;&#039;&#039; &#039;&#039;&#039;11.5.0&#039;&#039;&#039; to &#039;&#039;&#039;11.17.0&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
An exploit that uses a buffer overflow in a TWL export banner&#039;s title strings to gain rop execution.&lt;br /&gt;
|A USA, EUR, JPN, KOR, or TWN system with its movable.sed keyY extracted.&lt;br /&gt;
|[[User:zoogie|zoogie]]&lt;br /&gt;
|[[bannerbomb3|Install]]&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: salmon&amp;quot; | No&lt;br /&gt;
| [[browserhax]] (Without the loader in the 3ds_browserhax_common repo)&lt;br /&gt;
| (Old3DS) From &#039;&#039;&#039;5.0.0-2&#039;&#039;&#039; to &#039;&#039;&#039;11.0.0-33&#039;&#039;&#039; (Pre-v5.0 is supported for some versions if you manually modify the source)&lt;br /&gt;
&lt;br /&gt;
(New3DS) From &#039;&#039;&#039;9.0.0-20&#039;&#039;&#039; to &#039;&#039;&#039;11.0.0-33&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Note that the browser-version-check bypass is only usable prior to [[10.7.0-32]].&lt;br /&gt;
| An USA, EUR, or JPN system.&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
| [[browserhax|Install]]&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: salmon&amp;quot; | No&lt;br /&gt;
| Ninjhax (with specialized payloads)&lt;br /&gt;
| Up to &#039;&#039;&#039;9.2.0-20&#039;&#039;&#039;?&lt;br /&gt;
| &lt;br /&gt;
| smea + independent developers&lt;br /&gt;
| N/A&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Previous Exploits==&lt;br /&gt;
&amp;lt;u&amp;gt;&#039;&#039;&#039;Warning:&#039;&#039;&#039;&amp;lt;/u&amp;gt; These exploits &#039;&#039;&#039;do not work&#039;&#039;&#039;. They are exploits which no longer function at all, regardless of software or firmware revision.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Works on latest fw&lt;br /&gt;
! Name&lt;br /&gt;
! Supported firmwares&lt;br /&gt;
! Requirements&lt;br /&gt;
! Author&lt;br /&gt;
! Install&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: salmon&amp;quot; | No&lt;br /&gt;
| [[tubehax|Tubehax]]&lt;br /&gt;
| None. &#039;&#039;&#039;Was&#039;&#039;&#039;: From &#039;&#039;&#039;9.0.0-X&#039;&#039;&#039; up to and including &#039;&#039;&#039;10.1.0-X&#039;&#039;&#039;, for &#039;&#039;&#039;X&#039;&#039;&#039; up to and including 27.&lt;br /&gt;
| The YouTube application and an Internet connection. As of October 15, 2015, this is no longer usable due to an update being released which fixes the vuln used by tubehax + app update being forced (see [[YouTube|here]]).&lt;br /&gt;
| smea&lt;br /&gt;
| [http://smealum.github.io/3ds/ Install]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Other Homebrew Loaders==&lt;br /&gt;
The [https://github.com/yellows8/hblauncher_loader hblauncher_loader] title can be used when running under modded-FIRM which allows running unsigned titles, to boot the *hax payloads.&lt;br /&gt;
&lt;br /&gt;
[https://github.com/AuroraWright/Luma3DS Luma3DS], apart from providing signature patches for the installation and use of custom titles, includes the &amp;quot;Rosalina&amp;quot; system module, which among its features allows cleanly loading 3dsx applications as a native process with full ARM11 system permissions, by replacing an installed title&#039;s ExeFS and ExHeader during load time. It is currently the only option for running 3dsx applications on 11.4+ O3DSes; additionally, the *hax 2.x payload is incompatible with Rosalina and therefore so are homebrew applications requiring its target title system.&lt;br /&gt;
&lt;br /&gt;
==Sysmodule Exploits==&lt;br /&gt;
This section is for system-module exploits, which can be run from the *hax payloads.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Works on latest fw&lt;br /&gt;
! Name&lt;br /&gt;
! Supported firmwares&lt;br /&gt;
! Requirements&lt;br /&gt;
! Author&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: salmon&amp;quot; | No, still usable pre-v11.4.&lt;br /&gt;
| [https://github.com/yellows8/ctr-httpwn/releases ctr-httpwn]&lt;br /&gt;
| From &#039;&#039;&#039;9.6.0-X&#039;&#039;&#039; up to and including &#039;&#039;&#039;11.3.0-X&#039;&#039;&#039;. This includes bosshaxx.&lt;br /&gt;
| None&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==WebKit vuln testing==&lt;br /&gt;
See [https://github.com/yellows8/3ds_browserhax_common/issues/28 here].&lt;/div&gt;</summary>
		<author><name>EvilFlight</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=11.17.0-50&amp;diff=22223</id>
		<title>11.17.0-50</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=11.17.0-50&amp;diff=22223"/>
		<updated>2023-05-23T05:42:20Z</updated>

		<summary type="html">&lt;p&gt;EvilFlight: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The Old3DS+New3DS 11.17.0-50 system update was released on May 23, 2023 (UTC). This Old3DS update was released for the following regions: USA, EUR, and JPN. This New3DS update was released for the following regions: USA, EUR, and JPN.&lt;br /&gt;
&lt;br /&gt;
Security flaws fixed: yes.&lt;br /&gt;
&lt;br /&gt;
==Change-log==&lt;br /&gt;
[https://en-americas-support.nintendo.com/app/answers/detail/a_id/667/kw/system%20update Official] USA change-log:&lt;br /&gt;
*   	Further improvements to overall system stability and other minor adjustments have been made to enhance the user experience.&lt;br /&gt;
*     &lt;br /&gt;
&lt;br /&gt;
==System Titles==&lt;br /&gt;
The following titles were updated: [[CVer]]/[[NVer]], [[System Settings]], [[eShop]], [[Home Menu]], 0004001B00018002 (Web browser Data).&lt;br /&gt;
&lt;br /&gt;
==System Settings==&lt;br /&gt;
Mset can now display the full DSiWare export banner string length without crashing the stack. This fixes a nearly 4 year-old exploit, [https://github.com/zoogie/Bannerbomb3 Bannerbomb3].&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
System update report(s):&lt;br /&gt;
* [https://yls8.mtheall.com/ninupdates/reports.php?date=2023-05-23_00-00-33&amp;amp;sys=ctr]&lt;br /&gt;
* [https://yls8.mtheall.com/ninupdates/reports.php?date=2023-05-23_00-00-41&amp;amp;sys=ktr]&lt;/div&gt;</summary>
		<author><name>EvilFlight</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=3DS_System_Flaws&amp;diff=22194</id>
		<title>3DS System Flaws</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=3DS_System_Flaws&amp;diff=22194"/>
		<updated>2023-03-17T10:29:24Z</updated>

		<summary type="html">&lt;p&gt;EvilFlight: APcert infoleak&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Exploits are used to execute unofficial code (homebrew) on the Nintendo 3DS. This page is a list of publicly known system flaws, for userland applications/applets flaws see [[3DS_Userland_Flaws|here]].&lt;br /&gt;
&lt;br /&gt;
=Stale / Rejected Efforts=&lt;br /&gt;
* In the early days of 3DS hacking, Neimod was working on a RAM dumping setup for a while. He has de-soldered the 3DS&#039;s RAM chip and hooked it and the RAM pinouts on the 3DS&#039;s PCB up to a custom RAM dumping setup. He &#039;&#039;has&#039;&#039; published photos showing his setup to be working quite well, with the 3DS successfully booting up, but however, his flickr stream is now private along with most of his work and this method has been unreleased. RAM dumping can be done through homebrew now, making this method obsolete regardless.&lt;br /&gt;
&lt;br /&gt;
==Tips and info==&lt;br /&gt;
The 3DS uses the XN feature of the ARM11 processor. There&#039;s no official way from applications to enable executable permission for memory containing arbitrary unsigned code(there&#039;s a [[SVC]] for this, but only [[RO_Services|RO-module]] has access to it). A usable userland exploit would still be useful: you could only do return-oriented-programming with it initially. From ROP one could then exploit system flaw(s), see below.&lt;br /&gt;
&lt;br /&gt;
SD card [[extdata]] and SD savegames can be attacked, for consoles where the console-unique [[Nand/private/movable.sed|movable.sed]] was dumped(accessing SD data is far easier by running code on the target 3DS however).&lt;br /&gt;
&lt;br /&gt;
=System flaws=&lt;br /&gt;
== Hardware ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Summary&lt;br /&gt;
!  Description&lt;br /&gt;
!  Fixed with hardware model/revision&lt;br /&gt;
!  Newest hardware model/revision this flaw was checked for&lt;br /&gt;
!  Timeframe this was discovered&lt;br /&gt;
!  Discovered by&lt;br /&gt;
|-&lt;br /&gt;
| ARM9/ARM11 bootrom vectors point at uninitialized RAM&lt;br /&gt;
| ARM9&#039;s and ARM11&#039;s exception vectors are hardcoded to point at the CPU&#039;s internal memory (0x08000000 region for ARM9, AXIWRAM for ARM11). While the bootrom does set them up to point to an endless loop at some point during boot, it does not do so immediately. As such, a carefully-timed fault injection (via hardware) to trigger an exception (such as an invalid instruction) will cause execution to fall into ARM9 RAM. &lt;br /&gt;
Since RAM isn&#039;t cleared on boot (see below), one can immediately start execution of their own code here to dump bootrom, OTP, etc.&lt;br /&gt;
The ARM9 bootrom does the following at reset:  reset vector branches to another instruction, then branches to bootrom+0x8000. Hence, there&#039;s no way to know for certain when exactly the ARM9 exception-vector data stored in memory gets initialized.&lt;br /&gt;
&lt;br /&gt;
This requires *very* *precise* timing for triggering the hardware fault.&lt;br /&gt;
&lt;br /&gt;
It has been exploited by derrek to dump the ARM9 bootrom as of Summer 2015.&lt;br /&gt;
| None: all available 3DS models at the time of writing have the exact same ARM9/ARM11 bootrom for the unprotected areas.&lt;br /&gt;
| New3DS&lt;br /&gt;
| End of February 2014&lt;br /&gt;
| [[User:Derrek|derrek]], WulfyStylez (May 2015) independently&lt;br /&gt;
|-&lt;br /&gt;
| Missing AES key clearing&lt;br /&gt;
| The hardware AES engine does not clear keys when doing a hard reset/reboot.&lt;br /&gt;
| None&lt;br /&gt;
| New3DS&lt;br /&gt;
| August 2014&lt;br /&gt;
| Mathieulh/Others&lt;br /&gt;
|-&lt;br /&gt;
| No RAM clearing on reboots&lt;br /&gt;
| On an MCU-triggered reboot all RAM including FCRAM/ARM9 memory/AXIWRAM/VRAM keeps its contents.&lt;br /&gt;
| None&lt;br /&gt;
| New3DS&lt;br /&gt;
| March 2014&lt;br /&gt;
| [[User:Derrek|derrek]]&lt;br /&gt;
|-&lt;br /&gt;
| 32bits of actual console-unique TWLNAND keydata&lt;br /&gt;
| On retail the 8-bytes at ARM9 address [[Memory_layout|0x01FFB808]] are XORed with hard-coded data, to generate the TWL console-unique keys, including TWLNAND. On Old3DS the high u32 is always 0x0, while on New3DS that u32 is always 0x2. On top of this, the lower u32&#039;s highest bit is always ORed. only 31 bits of the TWL console-unique keydata / TWL consoleID are actually console-unique.&lt;br /&gt;
This allows one to easily bruteforce the TWL console-unique keydata with *just* data from TWLNAND. On DSi the actual console-unique data for key generation is 8-bytes(all bytes actually set).&lt;br /&gt;
| None&lt;br /&gt;
| New3DS&lt;br /&gt;
| 2012?&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| DSi / 3DS-TWL key-generator&lt;br /&gt;
| After using the key generator to generate the normal-key, you could overwrite parts of the normal-key with your own data and then recover the key-generator output by comparing the new crypto output with the original crypto output. From the normal-key outputs, you could deduce the TWL key-generator function.&lt;br /&gt;
This applies to the keyX/keyY too.&lt;br /&gt;
&lt;br /&gt;
This attack does not work for the 3DS key-generator because keyslots 0-3 are only for TWL keys.&lt;br /&gt;
| None&lt;br /&gt;
| New3DS&lt;br /&gt;
| 2011&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| 3DS key-generator&lt;br /&gt;
| The algorithm for generating the normal-keys for keyslots is cryptographically weak.  As a result, it is easily susceptible to differential cryptanalysis if the normal-key corresponding to any scrambler-generated keyslot is discovered.&lt;br /&gt;
&lt;br /&gt;
Several such pairs of matching normal-keys and KeyY values were found, leading to deducing the key-generator function.&lt;br /&gt;
| None&lt;br /&gt;
| New3DS&lt;br /&gt;
| February 2015&lt;br /&gt;
| [[User:Yellows8|Yellows8]], [[User:Plutooo|plutoo]]&lt;br /&gt;
|-&lt;br /&gt;
| RSA keyslots don&#039;t clear exponent when setting modulus&lt;br /&gt;
| The [[RSA_Registers|RSA keyslots]] are set by boot ROM to have four private RSA keys.  The exponent value in the RSA registers is write-only and not readable.&lt;br /&gt;
&lt;br /&gt;
However, when setting a keyslot&#039;s modulus, the RSA hardware leaves the exponent alone.  This allows retrieving the exponent by doing a discrete logarithm of the output.&lt;br /&gt;
&lt;br /&gt;
By setting the modulus to a prime number whose modular multiplicative order is &amp;quot;smooth&amp;quot; (that is, p-1 is divisible by only small prime numbers), discrete logarithms can be calculated quickly using the [[wikipedia:Pohlig-Hellman algorithm|Pohlig-Hellman algorithm]].  If the prime chosen is greater than the modulus, but the same bit size, the discrete logarithm is the private exponent.&lt;br /&gt;
&lt;br /&gt;
This exploit&#039;s usefulness is limited: RSA keyslot 0 is only used in current firmware for deriving the 6.x save and 7.x NCCH keys, which were already known, and the other three keyslots are entirely unused.  Additionally, with a boot ROM dump, this exploit is moot; these private keys are located in the protected ARM9 boot ROM.&lt;br /&gt;
| None&lt;br /&gt;
| New3DS&lt;br /&gt;
| March 2016&lt;br /&gt;
| [[User:Myria|Myria]]&lt;br /&gt;
|-&lt;br /&gt;
| [[CONFIG11_Registers#CFG11_GPUPROT|CFG11_GPUPROT]] allowing acccess to AXIWRAM/FCRAM-BASE-memregion&lt;br /&gt;
| [[CONFIG11_Registers#CFG11_GPUPROT|CFG11_GPUPROT]] can be configured by anything with access to it to allow the GPU to access the entire AXIWRAM+FCRAM. For example, this is an issue for any sysmodule that gets exploited and has access to this register memory-page(include one that&#039;s listed below).&lt;br /&gt;
&lt;br /&gt;
See also &amp;quot;kernelhax via gspwn&amp;quot; below.&lt;br /&gt;
| None&lt;br /&gt;
| New3DS&lt;br /&gt;
| February 7, 2017&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Boot ROM ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Summary&lt;br /&gt;
!  Description&lt;br /&gt;
!  Fixed with hardware model/revision&lt;br /&gt;
!  Newest hardware model/revision this flaw was checked for&lt;br /&gt;
!  Timeframe this was discovered&lt;br /&gt;
!  Discovered by&lt;br /&gt;
|-&lt;br /&gt;
| FIRM partitions known-plaintext&lt;br /&gt;
| The [[Flash_Filesystem|FIRM partitions]] are encrypted with AES-CTR without a MAC. Since this works by XOR&#039;ing data with a static (per-console in this case) keystream, one can deduce the keystream of a portion of each FIRM partition if they have the actual FIRM binary stored in it.&lt;br /&gt;
&lt;br /&gt;
This can be paired with many exploits. For example, it allows minor FIRM downgrades (i.e. 10.4 to 9.6 or 9.5 to 9.4, but not 9.6 to 9.5).&lt;br /&gt;
However it is most commonly used to install arbitrary FIRMs (usually boot9strap), thanks to sighax.&lt;br /&gt;
&lt;br /&gt;
This can be somewhat addressed by having a FIRM header skip over previously used section offsets, but this would just air-gap newer FIRMs without fixing the core bug. This can also only be done a limited number of times due to the size of FIRM versus the size of the partitions.&lt;br /&gt;
| None&lt;br /&gt;
| New3DS&lt;br /&gt;
| &lt;br /&gt;
| Everyone&lt;br /&gt;
|-&lt;br /&gt;
| Boot9 AES keyinit function issues&lt;br /&gt;
| [[Bootloader|Boot9]] seems to have two bugs in the AES key-init function, see [[AES_Registers#AES_key-init|here]].&lt;br /&gt;
| None&lt;br /&gt;
| BootROM issue.&lt;br /&gt;
| 2015&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| New3DS has same boot ROM as Old3DS&lt;br /&gt;
| The New3DS has the exact same boot ROM as the Old3DS.  This means, among other things, that all the same boot ROM flaws are present.  Also, this meant that it is possible to boot Old3DS firmware on New3DS (see &amp;quot;CFG9_SYSPROT9 bit1 not set by Kernel9&amp;quot;).&lt;br /&gt;
| None&lt;br /&gt;
| New3DS&lt;br /&gt;
| October 2014&lt;br /&gt;
| Everyone&lt;br /&gt;
|-&lt;br /&gt;
| sighax: Boot9 improper validation of FIRM partition RSA signatures&lt;br /&gt;
| The [[Flash_Filesystem|FIRM partitions]] are signed with RSA-2048 using SHA-256 and PKCS #1 v1.5 padding.  Boot9, however, improperly validates the padding in three ways:&lt;br /&gt;
# Boot9 permits block type 02, meant for encrypted messages, to be used for signatures.  Only 01, for signatures, should have been permitted.  As a result, when using block type 02, a signature block is not required to have a long string of FF bytes as padding, but rather any nonzero random values suffice.&lt;br /&gt;
# Boot9 does not require that the length of the padding fill out the signature block completely.  As a result, there is considerable freedom in the layout of a signature.&lt;br /&gt;
# Boot9 fails to do bounds checking in its parsing of the DER-encoded hash algorithm type and hash value; the length values given in DER are permitted to point outside the signature block.&lt;br /&gt;
Flaw 3 allows the DER encoding to be such that boot9 believes that the signature&#039;s hash value is outside the range of the block itself, somewhere on the stack.  This can be pointed at the correct hash value it computes.  Boot9 then memcmp&#039;s the calculated hash against itself, and thinks that the hash is valid.&lt;br /&gt;
&lt;br /&gt;
As a result of the above, we estimate that one in 2&amp;lt;sup&amp;gt;43&amp;lt;/sup&amp;gt; (~8.8 trillion) random fake signatures will be considered by Boot9 to be valid.  This is well within the range of brute force, particularly with an optimized GPU implementation.  An Nvidia GTX 1080 Ti would take about one week to find a match.&lt;br /&gt;
| None&lt;br /&gt;
| New3DS&lt;br /&gt;
| July 2015&lt;br /&gt;
| [[User:Derrek|derrek]]&lt;br /&gt;
|-&lt;br /&gt;
| Boot9 FIRM loading doesn&#039;t blacklist memory-mapped I/O&lt;br /&gt;
| [[Bootloader|Boot9]]&#039;s FIRM loading blacklists Boot9 data regions, but forgets to do other important regions, including Memory-mapped I/O. Combined with sighax, a malicious FIRM can be used to overwrite:&lt;br /&gt;
a) boot9 data-abort handler, coupled with a 4th section that tries to NDMA copy to NULL, causing a data abort&lt;br /&gt;
&lt;br /&gt;
b) boot9 IRQ handler (this has the disadvantage that you must restore the original handler, then call it manually when your payload runs)&lt;br /&gt;
| None&lt;br /&gt;
| New3DS&lt;br /&gt;
| 2015(?)&lt;br /&gt;
| [[User:Derrek|derrek]] (2015?), [[User:Normmatt|Normmatt]] and [[User:SciresM|SciresM]] independently (January 2017).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;superhax&amp;quot;: Boot9 FIRM loading blacklist check is flawed&lt;br /&gt;
| Boot9 only makes sure the &#039;&#039;&#039;start&#039;&#039;&#039; and &#039;&#039;&#039;end&#039;&#039;&#039; address of each section is not covered by a blacklisted region. Thus, it is possible to overwrite blacklisted regions (e.g. ARM9 Exception Vectors) by choosing a FIRM section range that encloses an entire blacklisted region. The vulnerable code looks like this: if(blRegions[i].start &amp;lt;= sectionStart &amp;amp;&amp;amp; blRegions[i].end &amp;gt; sectionStart &amp;lt;nowiki&amp;gt;||&amp;lt;/nowiki&amp;gt; blRegions[i].start &amp;lt;= sectionEnd &amp;amp;&amp;amp; blRegions[i].end &amp;gt; sectionEnd) return false; // failure&lt;br /&gt;
The boot9 vector table (0x08000000) contains 6 entries, each 8-bytes wide (0x30 bytes); Only 0x08000000 through 0x08000040 are blacklisted, and boot9 doesn&#039;t use the region after the vector table (this is convenient because we can put any payload we want after it and not worry about overwriting chunks of boot9 code)&lt;br /&gt;
&lt;br /&gt;
To exploit this, craft a FIRM section payload that&#039;s loaded a few bytes before 0x08000000, add padding to get to 0x08000000 and overwrite the vector table; You could overwrite the data-abort vector and craft a 4th FIRM section that causes a data-abort OR you can just overwrite the IRQ function pointer at 0x08000004 (make sure your payload replaces the original boot9 function pointer); you can point the rest of the vectors to infinite loops since they shouldn&#039;t be triggered.&lt;br /&gt;
| None&lt;br /&gt;
| New3DS&lt;br /&gt;
| August 2015&lt;br /&gt;
| [[User:Plutoo|plutoo]], [[User:Yellows8|yellows8]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== ARM9 software ==&lt;br /&gt;
&lt;br /&gt;
=== arm9loader ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Summary&lt;br /&gt;
!  Description&lt;br /&gt;
!  Successful exploitation result&lt;br /&gt;
!  Fixed in [[FIRM]] system version&lt;br /&gt;
!  Last [[FIRM]] system version this flaw was checked for&lt;br /&gt;
!  Timeframe this was discovered&lt;br /&gt;
!  Public disclosure timeframe&lt;br /&gt;
!  Discovered by&lt;br /&gt;
|-&lt;br /&gt;
| Generating the keysector console-unique keys with ITCM+Boot9&lt;br /&gt;
| [[Bootloader|Boot9]] decrypts the 0x100-byte [[OTP_Registers|OTP]] using AES-CBC with keydata stored in Boot9. If hash verification is successful, the plaintext of the first 0x90-bytes are copied into [[Memory_layout|ITCM]]. This is the &#039;&#039;exact&#039;&#039; &#039;&#039;same&#039;&#039; region hashed by arm9loader when generating the console-unique keys for decrypting the keysector, except arm9loader uses the raw encrypted OTP.&lt;br /&gt;
&lt;br /&gt;
Therefore, with the OTP keydata+IV from Boot9 you can: encrypt the 0x90-bytes from ITCM, then hash the output to get the console-unique keys for the system&#039;s keysector. This can even be done for Old3DS which doesn&#039;t have the arm9loader keysector officially.&lt;br /&gt;
&lt;br /&gt;
It&#039;s unknown why arm9loader only used the first 0x90-bytes of OTP. Using more data from OTP would&#039;ve prevented this. Fixing this would require doing exactly that, but that would also mean updating the NAND keysector(which is dangerous).&lt;br /&gt;
| See description.&lt;br /&gt;
| None&lt;br /&gt;
| &lt;br /&gt;
| 2015&lt;br /&gt;
| January 6, 2017&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| Rearrangable keys in the NAND keystore&lt;br /&gt;
| Due to the keystore being encrypted with AES-ECB, one can rearrange blocks and still have the NAND keystore decrypt in a deterministic way. &lt;br /&gt;
&lt;br /&gt;
Using 10.0 FIRM it is possible to rearrange keys such that ARM9 memory is executed. As such using existing ARM9 execution 10.0 FIRM can be written to NAND and a payload written to memory, with the payload to be executed post-K9L using an MCU reboot.&lt;br /&gt;
| arm9loaderhax given existing ARM9 code execution&lt;br /&gt;
| None&lt;br /&gt;
| [[11.3.0-36|11.3.0-X]]&lt;br /&gt;
| Early 2016&lt;br /&gt;
| 27 September 2016&lt;br /&gt;
| Myria, [[User:Dark samus|dark_samus]]; mathieulh (independently); [[User:Plutooo|plutoo]] (independently) + others&lt;br /&gt;
|-&lt;br /&gt;
| Uncleared OTP hash keydata in console-unique 0x11 key-generation&lt;br /&gt;
| Kernel9Loader does not clear the [[SHA_Registers#SHA_HASH|SHA_HASH register]] after use. As a result, the data stored here as K9L hands over to Kernel9 is the hash of [[OTP_Registers|OTP data]] used to seed the [[FIRM#New_3DS_FIRM|console-unique NAND keystore decryption key]] set on keyslot 0x11.&lt;br /&gt;
&lt;br /&gt;
Retrieving this keydata and the [[Flash_Filesystem#0x12C00|NAND keystore]] of the same device allows calculating the decrypted New3DS NAND keystore (non-unique, common to all New3DS units), which contains AES normal keys, also set on keyslot 0x11, which are then used to derive all current [[AES_Registers#Keyslots|New3DS-only AES keyXs]] including the newer batch introduced in [[9.6.0-24#arm9loader|9.6.0-X]]. From there, it is trivial to perform the same key derivation in order to initialize those keys on any system version, and even on Old3DS.&lt;br /&gt;
&lt;br /&gt;
This can be performed by exploiting the &amp;quot;arm9loaderhax&amp;quot; vulnerability to obtain post-K9L code execution after an MCU reboot (the bootrom section-loading fail is not relevant here, this attack was performed without OTP data by brute-forcing keys), and using this to dump the SHA_HASH register. This attack works on any FIRM version shipping a vulnerable version of K9L, whereas OTP dumping required a boot of &amp;lt;[[3.0.0-6|3.0.0-X]].&lt;br /&gt;
&lt;br /&gt;
This attack results in obtaining the entire (0x200-bytes) NAND keystore - it was confirmed at a later date that this keystore is encrypted with the same key (by comparing the decrypted data from multiple units), and therefore using another key in this store will not remedy the issue as all keys are known (i.e. later, unused keys decrypt to the same 0x200-bytes constant with the same OTP hash). Later keys could have been encrypted differently but this is not the case. As a result of this, it is not possible for Nintendo to use K9L again in its current format for its intended purpose, though this was not news from the moment people dumped a New3DS OTP.&lt;br /&gt;
| Derivation of all New3DS keys generated via the NAND keystore (0x1B &amp;quot;Secure4&amp;quot; etc.)&lt;br /&gt;
| None&lt;br /&gt;
| [[11.3.0-36|11.3.0-X]]&lt;br /&gt;
| ~April 2015, implemented in May 2015&lt;br /&gt;
| 13 January 2016&lt;br /&gt;
| [[User:WulfyStylez|WulfyStylez]], [[User:Dazzozo|Dazzozo]], [[User:Shinyquagsire23|shinyquagsire23]] (complimentary + implemented), [[User:Plutooo|plutoo]], Normmatt (discovered independently)&lt;br /&gt;
|-&lt;br /&gt;
| enhanced-arm9loaderhax&lt;br /&gt;
| See the 32c3 3ds talk.&lt;br /&gt;
Since this is a combination of a trick with the arm9-bootrom + arm9loaderhax, and since you have to manually write FIRM to the firm0/firm1 NAND partitions, this can&#039;t be completely fixed. Any system with existing ARM9 code execution and an OTP/OTP hash dump can exploit this. Additionally, by using the FIRM partition known-plaintext bug and bruteforcing the second entry in the keystore, this can currently be exploited on all New3DS systems without any other prerequisite hacks.&lt;br /&gt;
| arm9loaderhax which automatically occurs at hard-boot.&lt;br /&gt;
| See arm9loaderhax / description.&lt;br /&gt;
| See arm9loaderhax / description.&lt;br /&gt;
| Theorized around mid July, 2015. Later implemented+tested by [[User:Plutooo|plutoo]] and [[User:Derrek|derrek]].&lt;br /&gt;
| 32c3 3ds talk (December 27, 2015)&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| arm9loaderhax: Missing verification block for the 9.6 keys&lt;br /&gt;
| Starting with [[9.6.0-24|9.6.0-X]] a new set of NAND-based keys were introduced. However, no verification block was added to verify that the new key read from NAND is correct. This was technically an issue from [[9.5.0-22|9.5.0-X]] with the original sector+0 keydata, however the below is only possible with [[9.6.0-24|9.6.0-X]] since keyslots 0x15 and 0x16 are generated from different 0x11 keyXs.&lt;br /&gt;
&lt;br /&gt;
Writing an incorrect key to NAND will cause arm9loader to decrypt the ARM9 kernel as garbage and then jump to it.&lt;br /&gt;
&lt;br /&gt;
This allows an hardware-based attack where you can boot into an older exploited firmware, fill all memory with NOP sleds/jump-instructions, and then reboot into executing garbage. By automating this process with various input keydata, eventually you&#039;ll find some garbage that jumps to your code.&lt;br /&gt;
&lt;br /&gt;
This gives very early ARM9 code execution (pre-ARM9 kernel). As such, it is possible to dump RSA keyslots with this and calculate the 6.x [[Savegames#6.0.0-11_Savegame_keyY|save]], and 7.x [[NCCH]] keys. This cannot be used to recover keys initialized by arm9loader itself. This is due to it wiping the area used for its stack during NAND sector decryption and keyslot init. &lt;br /&gt;
&lt;br /&gt;
Due to FIRMs on both Old and New 3DS using the same RSA data, this can be exploited on Old3DS as well, but only if one already has the actual plaintext normalkey from New3DS NAND sector 0x96 offset-0 and has dumped the OTP area of the Old3DS.&lt;br /&gt;
| Recovery of 6.x [[Savegames#6.0.0-11_Savegame_keyY|save key]]/7.x [[NCCH]] key, access to uncleared OTP hash keydata&lt;br /&gt;
| None&lt;br /&gt;
| [[11.3.0-36|11.3.0-X]]&lt;br /&gt;
| March 2015&lt;br /&gt;
| &lt;br /&gt;
| [[User:Plutooo|plutoo]]&lt;br /&gt;
|-&lt;br /&gt;
| arm9loader runs on Old3DS&lt;br /&gt;
| Despite being written only for New3DS, all of arm9loader runs fine on Old3DS.  It&#039;s not until booting Kernel9 that a New3DS FIRM partition would crash on an Old3DS.  As a result, if a bug exists in arm9loader to get control, it can be exploited on Old3DS by writing New3DS FIRM to the FIRM partitions.  Thus, arm9loaderhax works on both Old3DS and New3DS.&lt;br /&gt;
| arm9loader bugs also compromise Old3DS&lt;br /&gt;
| None&lt;br /&gt;
| [[11.3.0-36|11.3.0-X]]&lt;br /&gt;
| Sometime in 2015&lt;br /&gt;
| &lt;br /&gt;
| [[User:Plutooo|plutoo]] presumably&lt;br /&gt;
|-&lt;br /&gt;
| Uncleared New3DS keyslot 0x11&lt;br /&gt;
| Originally the New3DS [[FIRM]] arm9bin loader only cleared keyslot 0x11 when it gets executed at firmlaunch. This was fixed with [[9.5.0-22|9.5.0-X]] by completely clearing keyslot 0x11 immediately after the loader finishes using keyslot 0x11.&lt;br /&gt;
This means that any ARM9 code that can execute before the loader clears the keyslot at firmlaunch(including firmlaunch-hax) can get access to the uncleared keyslot 0x11, which then allows one to generate all &amp;lt;=v9.5 New3DS keyXs which are generated by keyslot 0x11.&lt;br /&gt;
&lt;br /&gt;
Therefore, to completely fix this the loader would have to generate more keys using different keyslot 0x11 keydata. This was done with [[9.6.0-24|9.6.0-X]].&lt;br /&gt;
| New3DS keyXs generation&lt;br /&gt;
| Mostly fixed with [[9.5.0-22|9.5.0-X]], completely fixed with new keys with [[9.6.0-24|9.6.0-X]].&lt;br /&gt;
| &lt;br /&gt;
| February 3, 2015 (one day after [[9.5.0-22|9.5.0-X]] release)&lt;br /&gt;
| &lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Process9 ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Summary&lt;br /&gt;
!  Description&lt;br /&gt;
!  Successful exploitation result&lt;br /&gt;
!  Fixed in [[FIRM]] system version&lt;br /&gt;
!  Last [[FIRM]] system version this flaw was checked for&lt;br /&gt;
!  Timeframe this was discovered&lt;br /&gt;
!  Public disclosure timeframe&lt;br /&gt;
!  Discovered by&lt;br /&gt;
|-&lt;br /&gt;
| Leak of normal-key matching a key-scrambler key&lt;br /&gt;
| New 3DS firmware versions [[8.1.0-0 New3DS|8.1.0]] through [[9.2.0-20|9.2.0]] set the encryption key for [[Amiibo]] data using a hardcoded normal-key in Process9.  In firmware [[9.3.0-21|9.3.0]], Nintendo &amp;quot;fixed&amp;quot; this by using the key scrambler instead, by calculating the keyY value for keyslot 0x39 that results in the same normal-key, then hardcoding that keyY into Process9.&lt;br /&gt;
&lt;br /&gt;
Nintendo&#039;s fix is actually the problem: Nintendo revealed the normal-key matching an unknown keyX and a known keyY.  Combined with the key scrambler using an insecure scrambling algorithm (see &amp;quot;Hardware&amp;quot; above), the key scrambler function could be deduced.&lt;br /&gt;
| Deducing the keyX for keyslot 0x39 and the key scrambler algorithm&lt;br /&gt;
| New 3DS [[9.3.0-21|9.3.0-X]], sort of&lt;br /&gt;
| [[10.0.0-27|10.0.0-X]]&lt;br /&gt;
| Sometime in 2015 after the hardware key-generator was broken.&lt;br /&gt;
| 32c3 3ds talk (December 27, 2015)&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| Leak of normal-key matching a key-generator key&lt;br /&gt;
| During the 3DS&#039; development (June/July 2010) Nintendo added support installing encrypted content ([[CIA]]). Common-key index1 was intended to be a [[AES|hardware generated key]]. However while they added code to generate the key in hardware, they forgot to remove the normal-key for index1 (used elsewhere, likely old debug code). Nintendo later removed the normal key sometime before the first non-prototype firmware release.&lt;br /&gt;
&lt;br /&gt;
Knowing the keyY and the normal-key for common-key index1, the devkit key-generator algorithm can be deduced (see &amp;quot;Hardware&amp;quot; above). Additionally the remaining devkit common-keys can be generated once the common-key keyX is recovered.&lt;br /&gt;
&lt;br /&gt;
Note that the devkit key-generator was discovered to be the same as the retail key-generator.&lt;br /&gt;
| Deducing the keyX for keyslot 0x3D and hardware key-generator algorithm. Generate remaining devkit common-keys.&lt;br /&gt;
| pre-[[1.0.0-0|1.0.0-X]]&lt;br /&gt;
| &lt;br /&gt;
| Shortly after the key-generator was revealed to be flawed at the 32c3 3ds talk&lt;br /&gt;
| January 20, 2016&lt;br /&gt;
| [[User:Jakcron|jakcron]]&lt;br /&gt;
|-&lt;br /&gt;
| Factory firmware is vulnerable to sighax&lt;br /&gt;
| During the 3DS&#039;s development, presumably boot9 was written (including the sighax vulnerability). This vulnerability is also present in factory firmware (and earlier, including 0.11). This was fixed in version 1.0.0-0.&lt;br /&gt;
| Deducing the mechanics of the sighax vulnerability in boot9 without having a dump of protected boot9. ARM9 code execution on factory/earlier firmware.&lt;br /&gt;
| [[1.0.0-0|1.0.0-X]]&lt;br /&gt;
| [[1.0.0-0|1.0.0-X]]&lt;br /&gt;
| May 9, 2017&lt;br /&gt;
| May 19, 2017&lt;br /&gt;
| [[User:SciresM|SciresM]], [[User:Myria|Myria]]&lt;br /&gt;
|-&lt;br /&gt;
| safecerthax &lt;br /&gt;
| O3DS &amp;amp; O2DS SAFE_FIRM is still vulnerable to the PXIAM:ImportCertificates flaw fixed in [[5.0.0-11]] and to SSLoth fixed in [[11.14.0-46]]. It makes it possible to spoof the official NUS update server and remotely trigger the vulnerability in SAFE_FIRM.&lt;br /&gt;
| Remote Arm9 code execution in O3DS/O2DS SAFE_FIRM&lt;br /&gt;
| None&lt;br /&gt;
| [[11.14.0-46|11.14.0-X]]&lt;br /&gt;
| 2020&lt;br /&gt;
| December 18, 2020&lt;br /&gt;
| [[User:Nba_Yoh|MrNbaYoh]]&lt;br /&gt;
|-&lt;br /&gt;
| twlhax: Corrupted SRL header leads to memory overwrite&lt;br /&gt;
| During TWL_FIRM boot, the ARM11 process TwlBg puts launcher.srl, the DSi bootloader, into FCRAM.  TWL_FIRM Process9 then parses the [http://dsibrew.org/wiki/NDS_Format SRL header] to place launcher.srl&#039;s code where DSi mode can execute it.&lt;br /&gt;
&lt;br /&gt;
DSi-mode memory is in FCRAM, but interleaved.  Each byte of DSi-mode memory also exists at some address in 3DS FCRAM space.&lt;br /&gt;
&lt;br /&gt;
Process9 does not validate the RSA signature on launcher.srl, unlike SRLs loaded from cartridge or NAND (DSiWare).  A compromised ARM11 can, in a manner similar to firmlaunchhax, send a launcher.srl with a modified SRL header.  By setting the SRL header&#039;s ARM7/ARM9 load addresses and sizes carefully, accounting for the different memory map and for DSi mode&#039;s interleaved memory, it is possible to overwrite part of Process9&#039;s stack and take control with a ROP chain.&lt;br /&gt;
&lt;br /&gt;
Fixed in 11.8.0-X by... (fill me in)&lt;br /&gt;
| ARM9 code execution (whilst still in 3DS mode)&lt;br /&gt;
| [[11.8.0-41|11.8.0-X]]&lt;br /&gt;
| [[11.8.0-41|11.8.0-X]]&lt;br /&gt;
|&lt;br /&gt;
| August 11, 2018&lt;br /&gt;
| smea&lt;br /&gt;
|-&lt;br /&gt;
| agbhax&lt;br /&gt;
| This is the same issue as twlhax above. Legacy FIRMs share the same OS code (Arm9-side OS, Arm11 kernel), and therefore, the outdated AGB_FIRM can be tricked into executing the still vulnerable PrepareArm9ForTwl function.&lt;br /&gt;
| ARM9 code execution (whilst still in 3DS mode)&lt;br /&gt;
| None&lt;br /&gt;
| [[11.14.0-46|11.14.0-X]]&lt;br /&gt;
|&lt;br /&gt;
| December 17, 2020&lt;br /&gt;
| Everyone&lt;br /&gt;
|-&lt;br /&gt;
| safefirmhax&lt;br /&gt;
| SAFE_MODE_FIRM is almost never updated(even when NATIVE_FIRM is updated for vuln fixes), this can be noticed by &#039;&#039;just&#039;&#039; checking 3dbrew/ninupdates title-listings.&lt;br /&gt;
&lt;br /&gt;
The fix for firmlaunch-hax was only applied to NATIVE_FIRM in [[9.5.0-22|9.5.0-X]], leaving SAFE_FIRM exploitable. With ARM11-kernel execution, one can trigger FIRM-launch in to SAFE_FIRM, do Kernel9 &amp;lt;=&amp;gt; Kernel11 sync, PXI sync and then repeat the original attack on SAFE_FIRM instead.&lt;br /&gt;
| ARM9 code execution&lt;br /&gt;
| [[11.3.0-36|11.3.0-X]]&lt;br /&gt;
| &lt;br /&gt;
| 2012-2013?&lt;br /&gt;
| Wiki: January 2, 2017&lt;br /&gt;
| Everyone&lt;br /&gt;
|-&lt;br /&gt;
| safefirmhax 1.1&lt;br /&gt;
| Nintendo&#039;s original safefirmhax fix was flawed -- they added a global boolean that got set to true whenever a non-sysmodule title got launched (except for a hardcoded repair title id), and panic()&#039;d if that boolean was true to prevent launching safefirm after hax was active. However, because the boolean was initially false after firmlaunch -- With ARM11-kernel execution, one could FIRM-launch into NATIVE_FIRM, and then immediately FIRM-launch again into SAFE_FIRM early in NATIVE_FIRM boot before the boolean got set to true to repeat the safehax attack.&lt;br /&gt;
&lt;br /&gt;
This was fixed by adding additional CFG9_BOOTENV checks to firmlaunch code in 11.4.&lt;br /&gt;
| ARM9 code execution&lt;br /&gt;
| [[11.4.0-37|11.4.0-X]]&lt;br /&gt;
| &lt;br /&gt;
| safefirmhax fix&lt;br /&gt;
| Wiki: April 10, 2017&lt;br /&gt;
| Everyone&lt;br /&gt;
|-&lt;br /&gt;
| ntrcardhax&lt;br /&gt;
| When reading the banner of a NTR title, Process9 relies on a hardware register to know when the banner was fully read.&lt;br /&gt;
However that register is shared between the ARM9 and the ARM11.&lt;br /&gt;
An attacker with k11 control can so make Process9 believe the banner continues forever and so trigger a buffer overflow.&lt;br /&gt;
With a custom banner for a NTR flashcart, this leads to code execution in Process9.&lt;br /&gt;
&lt;br /&gt;
This was fixed by adding bound checks on the read data.&lt;br /&gt;
| ARM9 code execution&lt;br /&gt;
| [[10.4.0-29|10.4.0-X]]&lt;br /&gt;
| &lt;br /&gt;
| March 2015&lt;br /&gt;
| 32c3 3ds talk (December 27, 2015)&lt;br /&gt;
| [[User:Plutooo|plutoo]]&lt;br /&gt;
|-&lt;br /&gt;
| Title downgrading via [[Application_Manager_Services|AM]]([[Application_Manager_Services_PXI|PXI]])&lt;br /&gt;
| When a title is *already* installed, Process9 will compare the installed title-version with the title-version being installed. When the one being installed is older, Process9 would return an error.&lt;br /&gt;
&lt;br /&gt;
However, this can be bypassed by just deleting the title first via the service command(s) for that: with the title removed from the [[Title_Database]], Process9 can&#039;t compare the input title-version with anything. Hence, titles can be downgraded this way.&lt;br /&gt;
&lt;br /&gt;
[[11.0.0-33|11.0.0-X]] fixed this for key system titles (MSET, Home Menu, spider, ErrDisp, SKATER, NATIVE_FIRM, and every retail system module), by checking the version of the title to install against a hard-coded list of (titleID, minimumVersionRequired) pairs.&lt;br /&gt;
| Bypassing title version check at installation, which then allows downgrading any title.&lt;br /&gt;
| [[11.0.0-33|11.0.0-X]], for key system titles.&lt;br /&gt;
| NATIVE_FIRM / AM-sysmodule [[11.0.0-33|11.0.0-X]]&lt;br /&gt;
| ?&lt;br /&gt;
| &lt;br /&gt;
| ?&lt;br /&gt;
|-&lt;br /&gt;
| Anti-downgrade list did not include all system titles initially&lt;br /&gt;
| The anti-downgrade list did not include legacy FIRMs until [[11.8.0-41|11.8.0-X]]. Therefore, legacy FIRMs could still be downgraded.&lt;br /&gt;
| Downgrading legacy FIRMs; allowing to exploit bugs in older legacy FIRMs (of which at least one exists, see below).&lt;br /&gt;
| [[11.8.0-33|11.8.0]]&lt;br /&gt;
| [[11.8.0-33|11.8.0]]&lt;br /&gt;
| ?&lt;br /&gt;
| Wiki: August 5, 2018&lt;br /&gt;
| Everyone&lt;br /&gt;
|-&lt;br /&gt;
| TWL_FIRM cmd-9 unchecked offset&lt;br /&gt;
| In [[1.0.0-0|1.0.0-X]]&#039;s TWL_FIRM, cmds 8 and 9 were not stubbed (whereas in the corresponding NATIVE_FIRM, they were).&lt;br /&gt;
Command 8 does the Process9 initialisation for NTR carts if an NTR cart is inserted (NTR, not TWL, judged by chipid).&lt;br /&gt;
&lt;br /&gt;
Command 9 takes (u32 offset_read, u32 offset_write, u32 offset_read_end), and basically just copies (offset_read_end - offset_read) bytes starting at (offset_read) of [NTR cart header in arm9mem, NTR secure area in fcram, TWL secure area in fcram], to 0x18001000 + offset_write + offset_read.&lt;br /&gt;
&lt;br /&gt;
offset_write is not checked at all, thus this leads to ARM9 code execution as long as any NTR cart, including flashcarts that would normally be blocked by TWL_FIRM, is inserted.&lt;br /&gt;
&lt;br /&gt;
In [[2.0.0-2|2.0.0-X]] TWL_FIRM, those commands were stubbed out.&lt;br /&gt;
| ARM9 code execution&lt;br /&gt;
| [[2.0.0-2|2.0.0-X]]&lt;br /&gt;
| [[2.0.0-2|2.0.0-X]]&lt;br /&gt;
| January 2018&lt;br /&gt;
| Wiki: August 5, 2018&lt;br /&gt;
| [[User:Riley|Riley]]&lt;br /&gt;
|-&lt;br /&gt;
| FIRM launch doesn&#039;t check target FIRM version&lt;br /&gt;
| When executing a FIRM launch, Process9 doesn&#039;t validate that the target FIRM isn&#039;t an old version.  This allows booting an exploitable FIRM from a newer FIRM, if you can get the exploitable FIRM installed.  ([[11.0.0-33|11.0.0-X]] now prevents installing old versions of system titles, but this doesn&#039;t affect titles already installed.)&lt;br /&gt;
&lt;br /&gt;
This had a use after [[9.6.0-24|9.6.0-X]]: on a compromised 3DS running 9.2.0, you could install the 9.6.0 NATIVE_FIRM to FIRM0/FIRM1, but avoid putting it into the NATIVE_FIRM title.  This would boot the 9.2.0 system software but with the 9.6.0 Process9 and Kernel11.  With a user-mode exploit in a sufficiently-privileged application (e.g. mset), you could trigger a FIRM launch back to NATIVE_FIRM, which would load the 9.2.0 Process9 and Kernel11.&lt;br /&gt;
&lt;br /&gt;
9.6.0&#039;s keyslots 0x15 and 0x16 are unknown to 9.2.0, so 9.2.0 would not clear them.  You then could do firmlaunchhax against 9.2.0 to get ARM9 access with keyslots 0x15 and 0x16 set to their proper 9.6.0 values, allowing decrypting 9.6.0&#039;s encrypted titles.  Once the New3DS keystore was dumped, this became moot.&lt;br /&gt;
| Decrypting 9.6.0 NCCH files without dumping New3DS keystore&lt;br /&gt;
| None (but now moot)&lt;br /&gt;
| [[9.6.0-24|9.6.0-X]]&lt;br /&gt;
| March 2015&lt;br /&gt;
| August 12, 2018&lt;br /&gt;
| [[User:Yellows8|Yellows8]], [[User:Myria|Myria]]&lt;br /&gt;
|-&lt;br /&gt;
| FAT FS code null-deref&lt;br /&gt;
| When FSFile:Read is used with a file which is corrupted on a FAT filesystem(in particular SD), Process9 can crash. This particular crash is caused by a function returning NULL instead of an actual ptr due to an error. The caller of that function doesn&#039;t check for NULL which then triggers a read based at NULL.&lt;br /&gt;
&lt;br /&gt;
Sample &amp;quot;fsck.vfat -n -v -V &amp;lt;fat image backup&amp;gt;&amp;quot; output for the above crash:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;...&lt;br /&gt;
Starting check/repair pass.&lt;br /&gt;
&amp;lt;FilePath0&amp;gt; and&lt;br /&gt;
&amp;lt;FilePath1&amp;gt;&lt;br /&gt;
 share clusters.&lt;br /&gt;
 Truncating second to 3375104 bytes.&lt;br /&gt;
&amp;lt;FilePath1&amp;gt;&lt;br /&gt;
 File size is 2787392 bytes, cluster chain length is 16384 bytes.&lt;br /&gt;
 Truncating file to 16384 bytes.&lt;br /&gt;
Checking for unused clusters.&lt;br /&gt;
Reclaimed 1 unused cluster (16384 bytes).&lt;br /&gt;
Checking free cluster summary.&lt;br /&gt;
Free cluster summary wrong (1404490 vs. really 1404491)&lt;br /&gt;
 Auto-correcting.&lt;br /&gt;
Starting verification pass.&lt;br /&gt;
Checking for unused clusters.&lt;br /&gt;
Leaving filesystem unchanged.&amp;lt;/pre&amp;gt;&lt;br /&gt;
| Useless null-based-read&lt;br /&gt;
| None&lt;br /&gt;
| [[9.6.0-24|9.6.0-X]]&lt;br /&gt;
| July 8-9, 2015&lt;br /&gt;
| &lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| RSA signature padding checks&lt;br /&gt;
| The TWL_FIRM RSA sig padding check code used for all TWL RSA sig-checks has issues, see [[FIRM|here]].&lt;br /&gt;
The main 3DS RSA padding check code(non-certificate, including NATIVE_FIRM) uses the function used with the above to extract more padding + the actual hash from the additional padding. This isn&#039;t really a problem here because there&#039;s proper padding check code which is executed prior to this.&lt;br /&gt;
| &lt;br /&gt;
| None&lt;br /&gt;
| [[9.5.0-22|9.5.0-X]]&lt;br /&gt;
| March 2015&lt;br /&gt;
| &lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| [[AMPXI:ValidateDSiWareSectionMAC]] [[AES_Registers|AES]] keyslot reuse&lt;br /&gt;
| When the input DSiWare section index is higher than &amp;lt;max number of DSiWare sections supported by this FIRM&amp;gt;, Process9 uses keyid 0x40 for calculating the AESMAC, which translates to keyslot 0x40. The result is that the keyslot is left at whatever was already selected before, since the AES selectkeyslot code will immediately  return when keyslot is &amp;gt;=0x40. However, actually exploiting this is difficult: the calculated AESMAC is never returned, this command just compares the calculated AESMAC with the input AESMAC(result-code depends on whether the AESMACs match). It&#039;s unknown whether a timing attack would work with this.&lt;br /&gt;
This is basically a different form of the pxips9 keyslot vuln, except with AESMAC etc.&lt;br /&gt;
| See description.&lt;br /&gt;
| None&lt;br /&gt;
| [[11.3.0-36|11.3.0-X]]&lt;br /&gt;
| March 15, 2015&lt;br /&gt;
| December 29, 2015&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| pxips9 [[AES_Registers|AES]] keyslot reuse&lt;br /&gt;
| This requires access to the [[Process_Services|ps:ps]]/pxi:ps9 services. One way to get access to this would be snshax on system-version &amp;lt;=10.1.0-X(see 32c3 3ds talk).&lt;br /&gt;
When an invalid key-type value is passed to any of the PS commands, Process9 will try to select keyslot 0x40. That aesengine_setkeyslot() code will then immediately return due to the invalid keyslot value. Since that function doesn&#039;t return any errors, Process9 will just continue to do crypto with whatever AES keyslot was selected before the PS command was sent.&lt;br /&gt;
| Reusing the previously used keyslot, for crypto with PS.&lt;br /&gt;
| None&lt;br /&gt;
| [[11.3.0-36|11.3.0-X]]&lt;br /&gt;
| Roughly the same time(same day?) as firmlaunch-hax.&lt;br /&gt;
| December 29, 2015&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| firmlaunch-hax: FIRM header ToCToU&lt;br /&gt;
| This can&#039;t be exploited from ARM11 userland.&lt;br /&gt;
During [[FIRM]] launch, the only FIRM header the ARM9 uses at all is stored in FCRAM, this is 0x200-bytes(the actual used FIRM RSA signature is read to the Process9 stack however). The ARM9 doesn&#039;t expect &amp;quot;anything&amp;quot; besides the ARM9 to access this data.&lt;br /&gt;
With [[9.5.0-22]] the address of this FIRM header was changed from a FCRAM address, to ARM9-only address 0x01fffc00.&lt;br /&gt;
| ARM9 code execution&lt;br /&gt;
| [[9.5.0-22]]&lt;br /&gt;
| &lt;br /&gt;
| 2012, 3 days after [[User:Yellows8|Yellows8]] started Process9 code RE.&lt;br /&gt;
| &lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| Uninitialized data output for (PXI) command replies&lt;br /&gt;
| PXI commands for various services(including some [[Filesystem_services_PXI|here]] and many others) can write uninitialized data (like from ARM registers) to the command reply. This happens with stubbed commands, but this can also occur with certain commands when returning an error.&lt;br /&gt;
Certain ARM11 service commands have this same issue as well.&lt;br /&gt;
| &lt;br /&gt;
| None&lt;br /&gt;
| [[9.3.0-21|9.3.0-X]]&lt;br /&gt;
| ?&lt;br /&gt;
| &lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| [[Filesystem_services_PXI|FSPXI]] OpenArchive SD permissions&lt;br /&gt;
| Process9 does not use the exheader ARM9 access-mount permission flag for SD at all.&lt;br /&gt;
This would mean ARM11-kernelmode code / fs-module itself could directly use FSPXI to access SD card without ARM9 checking for SD access, but this is rather useless since a process is usually running with SD access(Home Menu for example) anyway.&lt;br /&gt;
| &lt;br /&gt;
| None&lt;br /&gt;
| [[9.3.0-21|9.3.0-X]]&lt;br /&gt;
| 2012&lt;br /&gt;
| &lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| [[AMPXI:ExportDSiWare]] export path&lt;br /&gt;
| Process9 allocates memory on Process9 heap for the export path then verifies that the actual allocated size matches the input size. Then Process9 copies the input path from FCRAM to this buffer, and uses it with the Process9 FS openfile code, which use paths in the form of &amp;quot;&amp;lt;mountpoint&amp;gt;:/&amp;lt;path&amp;gt;&amp;quot;.&lt;br /&gt;
Process9 does not check the contents of this path at all before passing it to the FS code, besides writing a NUL-terminator to the end of the buffer.&lt;br /&gt;
| Exporting of DSiWare to arbitrary Process9 file-paths, such as &amp;quot;nand:/&amp;lt;path&amp;gt;&amp;quot; etc. This isn&#039;t really useful since the data which gets written can&#039;t be controlled.&lt;br /&gt;
| None&lt;br /&gt;
| [[9.5.0-22]]&lt;br /&gt;
| April 2013&lt;br /&gt;
| &lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| [[DSiWare_Exports]] [[CTCert]] verification&lt;br /&gt;
| Just like DSi originally did, 3DS verifies the APCert for DSiWare on SD with the CTCert also in the DSiWare .bin. On DSi this was fixed with with system-version 1.4.2 by verifying with the actual console-unique cert instead(stored in NAND), while on 3DS it&#039;s still not fixed.&lt;br /&gt;
On 3DS this is used in conjunction with seedminer to be able to decrypt &amp;amp; modify DSiWare TAD containers and inject them with exploitable DSiWare titles such as sudoku (sudokuhax) and Flipnote JPN (ugopwn)&lt;br /&gt;
| When the movable.sed keyY for the target 3DS is known and the target 3DS CTCert private-key is unknown, importing of modified DSiWare SD .bin files.&lt;br /&gt;
| None.&lt;br /&gt;
| 11.10.0-X&lt;br /&gt;
| April 2013&lt;br /&gt;
| &lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| seedminer: movable.sed keyY vulnerable to brute-force&lt;br /&gt;
| Half of the movable.sed keyY&#039;s 128 bits are leaked through the [[Nandrw/sys/LocalFriendCodeSeed_B|LFCS]], which is available in userland and below. The LFCS itself also leaks almost half of the remaining bits by following the ratio: u32 keyY[3]=1/5(LFCS). The remaining keyY[3] uncertainty of about ±2000 can be greatly reduced by plotting expected error margins with several keyYs. This results in a final uncertainty of about 2^40, easily within practical brute force range of an average modern PC.&lt;br /&gt;
| Knowing the keyY of a given 3ds allows for modification of DSiWare export contents, and chained with several other public vulns, ultimately arm9 execution.&lt;br /&gt;
| None.&lt;br /&gt;
| 11.8.0-X&lt;br /&gt;
| December 2017&lt;br /&gt;
| January 2018&lt;br /&gt;
| zoogie&lt;br /&gt;
|-&lt;br /&gt;
| Improper validation of DSiWare title SRLs&lt;br /&gt;
| The 3DS does not verify if the actual SRL embedded in the title&#039;s directory matches the titleID in the TMD before launching it or importing it from an sd DSiWare export. &lt;br /&gt;
| This allows embedding older, exploitable DSiWare titles in completely different, unexploitable DSiWare titles. Since DSiWare has raw NAND RW, this can result in arm9 control through FIRM known-plaintext and sighax attacks.&lt;br /&gt;
| None.&lt;br /&gt;
| 11.10.0-X&lt;br /&gt;
| 2015?&lt;br /&gt;
| December 2016&lt;br /&gt;
| Everyone&lt;br /&gt;
|-&lt;br /&gt;
| DSiWare import/export functions allow TWL system titles as arguments&lt;br /&gt;
| AM ImportTwlBackup/ExportTwlBackup unnecessarily allow TWL system titles such as DS Download Play to import/export from userland and System Settings -&amp;gt; Data Management (only am:sys is needed for userland). This is difficult to abuse for dsihax injection because no TWL system title has a save file, and any import with a save included will result in FS err C8804464. However, there is at least one dsihax primary that can load a payload from a non-NAND source, and not error if it can&#039;t access its public.sav (JPN Flipnote Studio v0).&lt;br /&gt;
| When combined with other public vulns, arm9 code execution.&lt;br /&gt;
| None.&lt;br /&gt;
| 11.10.0-X&lt;br /&gt;
| May 2018&lt;br /&gt;
| Sept 2018&lt;br /&gt;
| zoogie&lt;br /&gt;
|-&lt;br /&gt;
| [[Gamecard_Services_PXI]] unchecked REG_CTRCARDCNT transfer-size&lt;br /&gt;
| The u8 REG_CTRCARDCNT transfer-size parameter for the [[Gamecard_Services_PXI]] read/write CTRCARD commands is used as an index for an array of u16 values. Before [[5.0.0-11|5.0.0-X]] this u8 value wasn&#039;t checked, thus out-of-bounds reads could be triggered(which is rather useless in this case).&lt;br /&gt;
| Out-of-bounds read for a value which gets written to a register.&lt;br /&gt;
| [[5.0.0-11|5.0.0-X]]&lt;br /&gt;
| &lt;br /&gt;
| 2013?&lt;br /&gt;
| &lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| [[PXI_Registers|PXI]] cmdbuf buffer overrun&lt;br /&gt;
| The Process9 code responsible [[PXI_Registers|PXI]] communications didn&#039;t verify the size of the incoming command before writing it to a C++ member variable. &lt;br /&gt;
| Probably ARM9 code execution&lt;br /&gt;
| [[5.0.0-11|5.0.0-11]]&lt;br /&gt;
| &lt;br /&gt;
| March 2015, original timeframe if any unknown&lt;br /&gt;
| &lt;br /&gt;
| [[User:Plutooo|plutoo]]/[[User:Yellows8|Yellows8]]/maybe others(?)&lt;br /&gt;
|-&lt;br /&gt;
| [[Application_Manager_Services_PXI|PXIAM]]:ImportCertificates (See also [[Application_Manager_Services|this]])&lt;br /&gt;
| When handling this command, Process9 allocates a 0x2800-byte heap buffer, then copies the 4 FCRAM input buffers to this heap buffer without checking the sizes at all(only the buffers with non-zero sizes are copied). Starting with [[5.0.0-11|5.0.0-X]], the total combined size of the input data must be &amp;lt;=0x2800.&lt;br /&gt;
| ARM9 code execution&lt;br /&gt;
| [[5.0.0-11|5.0.0-X]]&lt;br /&gt;
| &lt;br /&gt;
| May 2013&lt;br /&gt;
| &lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| [[Process_Services_PXI|PS RSA]] commands buffer overflows&lt;br /&gt;
| pxips9 cmd1(not accessible via ps:ps) and VerifyRsaSha256: unchecked copy to a buffer in Process9&#039;s .bss, from the input FCRAM buffer. The buffer is located before the pxi cmdhandler threads&#039; stacks. SignRsaSha256 also has a buf overflow, but this isn&#039;t exploitable.&lt;br /&gt;
The buffer for this is the buffer for the signature data. With v5.0, the signature buffer was moved to stack, with a check for the signature data size. When the signature data size is too large, Process9 uses [[SVC|svcBreak]].&lt;br /&gt;
| ARM9 code execution&lt;br /&gt;
| [[5.0.0-11|5.0.0-X]]&lt;br /&gt;
| &lt;br /&gt;
| 2012&lt;br /&gt;
| &lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| [[PXI_Registers|PXI]] pxi_id bad check&lt;br /&gt;
| The Process9 code responsible for [[PXI_Registers|PXI]] communications read pxi_id as a signed char. There were two flaws:&lt;br /&gt;
* They used it as index to a lookup-table without checking the value at all.&lt;br /&gt;
* Another function verified that pxi_id &amp;lt; 7, allowing negative values to pass the check. This would also cause an out-of-range table-lookup.&lt;br /&gt;
| Maybe ARM9 code execution&lt;br /&gt;
| [[3.0.0-5|3.0.0-5]]&lt;br /&gt;
|&lt;br /&gt;
| March 2015, originally 2012 for the first issue at least&lt;br /&gt;
| &lt;br /&gt;
| [[User:Plutooo|plutoo]], [[User:Yellows8|Yellows8]], maybe others(?)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Kernel9 ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Summary&lt;br /&gt;
!  Description&lt;br /&gt;
!  Successful exploitation result&lt;br /&gt;
!  Fixed in [[FIRM]] system version&lt;br /&gt;
!  Last [[FIRM]] system version this flaw was checked for&lt;br /&gt;
!  Timeframe this was discovered&lt;br /&gt;
!  Discovered by&lt;br /&gt;
|-&lt;br /&gt;
| [[CONFIG Registers#CFG9_SYSPROT9|CFG9_SYSPROT9]] bit1 not set by Kernel9&lt;br /&gt;
| Old versions of Kernel9 never set bit1 of [[CONFIG Registers#CFG9_SYSPROT9|CFG9_SYSPROT9]]. This leaves the [[OTP Registers|0x10012000]]-region unprotected (this region should be locked early during boot!). Since it&#039;s never locked, you can dump it once you get ARM9 code execution.&lt;br /&gt;
&lt;br /&gt;
From [[3.0.0-5|3.0.0-X]] this was fixed by setting the bit in Kernel9 after poking some registers in that region. On New3DS arm9loader sets this bit instead of Kernel9, which is exploitable through a hardware + software vulnerability (see arm9loaderhax / description).&lt;br /&gt;
&lt;br /&gt;
This flaw resurged when it gained a new practical use: retrieving the OTP data for a New3DS console in order to decrypt the key data used in arm9loader (see enhanced-arm9loaderhax / description). This was performed by downgrading to a vulnerable system version. By accounting for differences in CTR-NAND crypto (0x05 -&amp;gt; 0x04, see partition encryption types [[Flash_Filesystem#NAND_structure|here]]) and using an Old3DS [[NCSD#NCSD_header|NCSD Header]], it is possible to boot a New3DS using Old3DS firmware 1.0-2.x to retrieve the required OTP data using this flaw.&lt;br /&gt;
| Dumping the [[OTP Registers|OTP]] area.&lt;br /&gt;
Decrypting New3DS sector 0x96 keyblock.&lt;br /&gt;
| [[3.0.0-5|3.0.0-X]]&lt;br /&gt;
|&lt;br /&gt;
| February 2015&lt;br /&gt;
| [[User:Plutooo|plutoo]], Normmatt independently&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== ARM11 software ==&lt;br /&gt;
=== Kernel11 ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Summary&lt;br /&gt;
!  Description&lt;br /&gt;
!  Successful exploitation result&lt;br /&gt;
!  Fixed in [[FIRM]] system version&lt;br /&gt;
!  Last [[FIRM]] system version this flaw was checked for&lt;br /&gt;
!  Timeframe this was discovered&lt;br /&gt;
!  Discovered by&lt;br /&gt;
|-&lt;br /&gt;
| [[SVC|svcUnbindInterrupt]] double free when irqId = 15&lt;br /&gt;
| svcBindInterrupt and svcUnbindInterrupt give special treatment to irqId 15 (FIQ helper): the access control list is bypassed and the provided KInterruptEvent (event or semaphore, via handle) is stored inside a singleton static object after having its refcount increased by 1.&lt;br /&gt;
&lt;br /&gt;
svcUnbindInterrupt assumes that the user-provided handle is what is stored in the singleton and will decref the user-provided KInterruptEvent twice, causing a use-after-free if the attacker didn&#039;t actually provide an handle to the same event or semaphore.&lt;br /&gt;
&lt;br /&gt;
This was &amp;quot;fixed&amp;quot; on [[11.14.0-46|11.14.0-X]] by preventing irqId 15 to be bound on retail units altogether (in both functions).&lt;br /&gt;
| Arm11 kernel code execution&lt;br /&gt;
| [[11.14.0-46|11.14.0-X]] (only on retail units)&lt;br /&gt;
| [[11.14.0-46|11.14.0-X]]&lt;br /&gt;
| 2019&lt;br /&gt;
| [[User:TuxSH|TuxSH]], maybe others&lt;br /&gt;
|-&lt;br /&gt;
| [[SVC|svcKernelSetState]] op=3 could map the NULL page&lt;br /&gt;
| svcKernelSetState op=3 param1=1 maps the firmlaunch parameters page to the user-specified VA.&lt;br /&gt;
&lt;br /&gt;
It had previously no check, allowing the attacker to map data at VA 0.&lt;br /&gt;
&lt;br /&gt;
Starting from [[11.14.0-46|11.14.0-X]], the VA must be in the standard 0x10000000-0x14000000 address range.&lt;br /&gt;
| Mapping the NULL page (as RW) to leverage other kernel vulnerabilities&lt;br /&gt;
| [[11.14.0-46|11.14.0-X]]&lt;br /&gt;
| [[11.14.0-46|11.14.0-X]]&lt;br /&gt;
| 2019&lt;br /&gt;
| [[User:TuxSH|TuxSH]]&lt;br /&gt;
|-&lt;br /&gt;
| [[SVC|svcMapProcessMemory]] can map the NULL page&lt;br /&gt;
| svcMapProcessMemory&#039;s destination VA is unchecked.&lt;br /&gt;
&lt;br /&gt;
By passing a big enough &amp;quot;size&amp;quot; parameter, an attacker can map chunks of data at VA 0 in the destination (caller) process.&lt;br /&gt;
| Mapping the NULL page (as RW) to leverage other kernel vulnerabilities&lt;br /&gt;
| None&lt;br /&gt;
| [[11.14.0-46|11.14.0-X]]&lt;br /&gt;
| 2020&lt;br /&gt;
| [[User:TuxSH|TuxSH]]&lt;br /&gt;
|-&lt;br /&gt;
| Resource limit use-after-free&lt;br /&gt;
| When assigning a KResourceLimit to a KProcess, the reslimit&#039;s refcounter doesn&#039;t get incremented. This essentially means all KResourceLimit get freed if pm gets somehow terminated.&lt;br /&gt;
&lt;br /&gt;
It turns out it is possible to ask pm (via ns:s or pm:app) to terminate itself along all other KIPs simply by passing TID 0004000100001000.&lt;br /&gt;
&lt;br /&gt;
Calling [[SVC|svcGetResourceLimit]] afterwards triggers a use-after-free. This is rather difficult to exploit, however: there is one slot left in the reslimit slabheap. An attacker either has to map the NULL page as R(W)X (svcControlProcessMemory vuln fixed on [[11.8.0-41|11.8.0-X]]), or use one of the map-null exploits above while having access to svcCreateResourceLimit (with the only one that is easy enough to use in that context having been fixed on [[11.14.0-46|11.14.0-X]], anyway).&lt;br /&gt;
| Arm11 kernel code execution&lt;br /&gt;
| None (although near impossible to exploit on [[11.14.0-46|11.14.0-X]])&lt;br /&gt;
| [[11.14.0-46|11.14.0-X]]&lt;br /&gt;
| 2020&lt;br /&gt;
| [[User:TuxSH|TuxSH]]&lt;br /&gt;
|-&lt;br /&gt;
| [[SVC|svcSetProcessIdealProcessor]] reference count overflow and therefore use-after-free.&lt;br /&gt;
| The SVC receive two arguments: handle and idealprocessor. The handle is used to get the KProcess object and the KProcess-&amp;gt;refCnt gets incremented,later the function check if the KProcess-&amp;gt;mem_type != BASE and if yes, it checks for idealprocessor == 2 or idealprocessor != 3. The problem here is that if you pass the idealprocessor = 3 it won&#039;t meet any condition and return the error 0xD9001BEA without decrement the reference count. &lt;br /&gt;
It can be abused to overflow the KProcess reference count that will lead to an Use-after-free. &lt;br /&gt;
| Before [[11.2.0-35|11.2.0-X]]: reference count overflow and therefore use-after-free.&lt;br /&gt;
| &lt;br /&gt;
| [[11.6.0-39|11.6.0-X]]&lt;br /&gt;
| November 2, 2017&lt;br /&gt;
| [[User:st4rk|st4rk]]&lt;br /&gt;
|-&lt;br /&gt;
| [[SVC|svcGetThreadList]] process reference leak&lt;br /&gt;
| When given a valid process handle (including &amp;lt;code&amp;gt;0xFFFF8001&amp;lt;/code&amp;gt;), svcGetThreadList forgets to decrement the reference count of the underlying [[KProcess]] instance, after having finished using it.&lt;br /&gt;
| Before [[11.2.0-35|11.2.0-X]]: reference count overflow and therefore use-after-free, but this UAF was most likely not exploitable&lt;br /&gt;
| &lt;br /&gt;
| [[11.3.0-36|11.3.0-X]]&lt;br /&gt;
| April 3, 2017&lt;br /&gt;
| [[User:TuxSH|TuxSH]]&lt;br /&gt;
|-&lt;br /&gt;
| kernelhax via gspwn&lt;br /&gt;
| Originally the kernel didn&#039;t initialize [[CONFIG11_Registers#CFG11_GPUPROT|CFG11_GPUPROT]]. Since it&#039;s 0 at hard-boot, this allowed the GPU to access the entire FCRAM + AXIWRAM.&lt;br /&gt;
| Entire FCRAM+AXIWRAM R/W.&lt;br /&gt;
| [[3.0.0-5|3.0.0-X]]&lt;br /&gt;
| &lt;br /&gt;
| February 7, 2017&lt;br /&gt;
| [[User:Plutooo|plutoo]], [[User:Yellows8|Yellows8]] partly&lt;br /&gt;
|-&lt;br /&gt;
| fasthax&lt;br /&gt;
| When a KTimer is created in pulse mode, the kernel calls a virtual function to reset the timer each time it pulses. The scheduler is locked for that core to avoid race conditions, but another core can call CloseHandle on the timer and free it, leading to a UAF vtable call.&lt;br /&gt;
| See description.&lt;br /&gt;
| [[11.3.0-36|11.3.0-X]]&lt;br /&gt;
| [[11.3.0-36|11.3.0-X]]&lt;br /&gt;
| May 2016&lt;br /&gt;
| nedwill&lt;br /&gt;
|-&lt;br /&gt;
| ipctakeover&lt;br /&gt;
| When sending cmdreplies, it does not validate that the src_addr and src_size match the equivalent dst_addr and dst_size. With a modified addr/size specified in a cmdreply for an output buffer, the data-copy for the first/last pages could be used to overwrite data outside of the buffer specified by the original process.&lt;br /&gt;
&lt;br /&gt;
Used by ctr-httpwn as of v1.2, for &amp;quot;ipctakeover/bosshaxx&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
This can be used to takeover processes where the process is using your service session. Like HTTPC -&amp;gt; BOSS, for bosshaxx above. NIM takeover can be done too(actual stack buffer overflow can trigger), etc.&lt;br /&gt;
| See description.&lt;br /&gt;
| None&lt;br /&gt;
| [[11.3.0-36|11.3.0-X]]&lt;br /&gt;
| November 26, 2016&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| Using IPC input buffers as output buffers&lt;br /&gt;
| When sending cmdreplies, it does not validate that the cmdreply descriptor type matches the equivalent cmdreq descriptor type. This could be used by an exploited sysmodule to use what was intended as an input-buffer as an output-buffer, and also combine other IPC vuln(s) with this.&lt;br /&gt;
&lt;br /&gt;
Used by ctr-httpwn as of v1.2, for &amp;quot;ipctakeover/bosshaxx&amp;quot;.&lt;br /&gt;
| See description.&lt;br /&gt;
| None&lt;br /&gt;
| [[11.3.0-36|11.3.0-X]]&lt;br /&gt;
| November 2016&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
|  [[SVC]] table too small&lt;br /&gt;
|  The table of function pointers for SVC&#039;s only contains entries up to 0x7D, but the biggest allowed SVC for the table is 0x7F. Thus, executing SVC7E or SVC7F would make the SVC-handler read after the buffer, and interpret some ARM instructions as function pointers.&lt;br /&gt;
&lt;br /&gt;
However, this would require patching the kernel .text or modifying SVC-access-control. Even if you could get these to execute, they would still jump to memory that isn&#039;t mapped as executable.&lt;br /&gt;
| &lt;br /&gt;
|  None&lt;br /&gt;
| [[11.3.0-36|11.3.0-X]]&lt;br /&gt;
| 2012&lt;br /&gt;
| Everyone&lt;br /&gt;
|-&lt;br /&gt;
|  [[SVC|svcBackdoor (0x7B)]]&lt;br /&gt;
|  This backdoor allows executing SVC-mode code at the user-specified code-address. This is used by Process9, using this on the ARM11 (with NATIVE_FIRM) required patching the kernel .text or modifying SVC-access-control.&lt;br /&gt;
| See description&lt;br /&gt;
| [[11.0.0-33|11.0.0-X]] (deleted)&lt;br /&gt;
| &lt;br /&gt;
|&lt;br /&gt;
| Everyone&lt;br /&gt;
|-&lt;br /&gt;
| veryslowpidhax&lt;br /&gt;
| &#039;&#039;&#039;This is completely different from the kernelmode-code-execution vuln described in the below separate entry.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
When updating the kernel global PID counter under [[SVC|svcCreateProcess]] the kernel does not check for wraparound to 0x0(the PID for the very first process). This only matters because [[Services|SM-module]] allows processes with PID value less than &amp;lt;total ARM11 FIRM modules&amp;gt; to access &#039;&#039;all&#039;&#039; services, without checking exheader service-access-control; and because Kernel11 checks for the PID to be 1 (loader) to use the input mem-region value on ControlMemory. This alone does not affect access the [[SVC|SVCs]] access table at all.&lt;br /&gt;
&lt;br /&gt;
Inlined ldrex+strex code is used for updating the above counter. [[11.2.0-35|11.2.0-X]] had changes for similar code, but it was only for dedicated ldrex+strex functions(mainly for kernel objects) and hence this PID code was not affected.&lt;br /&gt;
&lt;br /&gt;
With launching+terminating a sysmodule repeatedly with this via ns:s, it would take weeks to finish(if not at least about a month?).&lt;br /&gt;
| Access to all [[Services_API|services]], ControlMemory on any given mem-region.&lt;br /&gt;
| None&lt;br /&gt;
| [[11.3.0-36|11.3.0-X]]&lt;br /&gt;
| 2012 maybe?&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
|  slowhax/waithax&lt;br /&gt;
|  svcWaitSynchronizationN does not decrement the references to valid handles in an array before returning an error when it encounters an invalid handle. This allows one to (slowly) overflow the reference count for a handle object to zero.&lt;br /&gt;
| ARM11 kernel-mode code execution&lt;br /&gt;
| [[11.2.0-35|11.2.0-X]]&lt;br /&gt;
| [[11.2.0-35|11.2.0-X]]&lt;br /&gt;
| 2016&lt;br /&gt;
| nedwill, [[User:Derrek|derrek]]&lt;br /&gt;
|-&lt;br /&gt;
| [[Memory_layout#ARM11_Detailed_virtual_memory_map|0xEFF00000]] / 0xDFF00000 ARM11 kernel virtual-memory&lt;br /&gt;
| The ARM11 kernel-mode 0xEFF00000/0xDFF00000 virtual-memory(size 0x100000) is mapped to phys-mem 0x1FF00000(entire DSP-mem + entire AXIWRAM), with permissions RW-. This is used during ARM11 kernel startup for loading the FIRM-modules from the FIRM section located in DSP-mem, this never seems to be used after that, however. This is never unmapped either.&lt;br /&gt;
| &lt;br /&gt;
| None&lt;br /&gt;
| [[11.3.0-36|11.3.0-X]]&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| memchunkhax2.1&lt;br /&gt;
| Nintendo&#039;s fix for memchunkhax2 in [[10.4.0-29|10.4.0-X]] did not fix the GPU case: one may cause the requisite ToCToU race using gspwn, bypassing the new validation.&lt;br /&gt;
derrek&#039;s original 32c3 presentation for memchunkhax2 commented that a GPU-based attack was possible, but would be difficult.  However, memchunkhax2.1 showed that it was possible to do fairly reliably.&lt;br /&gt;
| ARM11 kernel code execution&lt;br /&gt;
| [[11.0.0-33|11.0.0-X]], via the new [[Memory_Management#MemoryBlockHeader|memchunkhdr]] MAC which prevents modifying memchunkhdr data with DMA.&lt;br /&gt;
| [[11.0.0-33|11.0.0-X]]&lt;br /&gt;
|&lt;br /&gt;
| [[User:Derrek|derrek]], aliaspider&lt;br /&gt;
|-&lt;br /&gt;
| memchunkhax2&lt;br /&gt;
| When allocating a block of memory, the &amp;quot;next&amp;quot; pointer of the [[Memory_Management#MemoryBlockHeader|memchunkhdr]] is accessed without being checked after being mapped to userland.&lt;br /&gt;
This allows a race condition, where the process can change the next pointer just before it&#039;s accessed. By pointing the next pointer to a crafted memchunckhdr in the kernel SlabHeap, some of the SlabHeap is allocated to the calling process, allowing to change vtables of kernel objects. &lt;br /&gt;
| ARM11 kernel code execution&lt;br /&gt;
| [[10.4.0-29|10.4.0-X]] (partially, see memchunkhax2.1)&lt;br /&gt;
| [[10.4.0-29|10.4.0-X]]&lt;br /&gt;
|&lt;br /&gt;
| [[User:Derrek|derrek]]&lt;br /&gt;
|-&lt;br /&gt;
| heaphax&lt;br /&gt;
| Can change the size of free memchunk structures stored in FCRAM using DMA, which leads to the ability to allocate memory chunks over already-allocated memory. This can be used in the SYSTEM region to allocate RW memory over any part of the NS system module, which is enough to take it over.&lt;br /&gt;
| Code execution with access to all of NS&#039;s privileges. (including downgrading) Code execution within any applet.&lt;br /&gt;
| [[11.0.0-33|11.0.0-X]], via the new [[Memory_Management#MemoryBlockHeader|memchunkhdr]] MAC which prevents modifying memchunkhdr data with DMA.&lt;br /&gt;
| [[11.0.0-33|11.0.0-X]]&lt;br /&gt;
| April 2015 ?&lt;br /&gt;
| smea&lt;br /&gt;
|-&lt;br /&gt;
| snshax&lt;br /&gt;
| Can force creation of Safe NS process into gspwn-able memory, allowing for takeover.&lt;br /&gt;
| Code execution with access to all of NS&#039;s privileges. (including downgrading)&lt;br /&gt;
| [[10.1.0-27|10.1.0-X]]&lt;br /&gt;
| [[10.1.0-27|10.1.0-X]]&lt;br /&gt;
| April 2015 ?&lt;br /&gt;
| smea&lt;br /&gt;
|-&lt;br /&gt;
|  AffinityMask/processorid validation&lt;br /&gt;
|  With [[10.0.0-27|10.0.0-X]] the following functions were updated: svcGetThreadAffinityMask, svcGetProcessAffinityMask, svcSetProcessAffinityMask, and svcCreateThread. The code changes for all but svcCreateThread are identical.&lt;br /&gt;
The original code with the first 3 did the following: &lt;br /&gt;
* if(u32_processorcount &amp;gt; ~0x80000001)return 0xe0e01bfd;&lt;br /&gt;
* if(s32_processorcount &amp;gt; &amp;lt;total_cores&amp;gt;)return 0xd8e007fd;&lt;br /&gt;
The following code replaced the above:&lt;br /&gt;
* if(u32_processorcount &amp;gt;= &amp;lt;total_cores+1&amp;gt;)return 0xd8e007fd;&lt;br /&gt;
In theory the latter should catch everything that the former did, so it&#039;s unknown if this was really a security issue.&lt;br /&gt;
&lt;br /&gt;
The svcCreateThread changes with [[10.0.0-27|10.0.0-X]] definitely did fix a security issue.&lt;br /&gt;
* Original code: &amp;quot;if(s32_processorid &amp;gt; &amp;lt;total_cores&amp;gt;)return 0xd8e007fd;&amp;quot;&lt;br /&gt;
* New code: &amp;quot;if(s32_processorid &amp;gt;= &amp;lt;total_cores&amp;gt; || s32_processorid &amp;lt;= -4)return 0xd8e007fd;&amp;quot;&lt;br /&gt;
This fixed an off-by-one issue: if one would use processorid=total_cores, which isn&#039;t actually a valid value, svcCreateThread would accept that value on &amp;lt;[[10.0.0-27|10.0.0-X]]. This results in data being written out-of-bounds(baseaddr = arrayaddr + entrysize*processorid), which has the following result:&lt;br /&gt;
* Old3DS: Useless kernel-mode crash due to accessing unmapped memory.&lt;br /&gt;
* New3DS: uncontrolled data write into a kernel-mode L1 MMU-table. This isn&#039;t really useful: the data can&#039;t be controlled, and the data which gets overwritten is all-zero anyway(this isn&#039;t anywhere near MMU L1 entries for actually mapped memory).&lt;br /&gt;
The previous version also allowed large negative s32_processorid values(negative processorid values are special values not actual procids), but it appears using values like that won&#039;t actually do anything(meaning no crash) besides the thread not running / thread not running for a while(besides triggering a kernelpanic with certain s32_processorid value(s)).&lt;br /&gt;
| Nothing useful&lt;br /&gt;
|  [[10.0.0-27|10.0.0-X]]&lt;br /&gt;
| [[10.0.0-27|10.0.0-X]]&lt;br /&gt;
| svcCreateThread issue: May 31, 2015. The rest: September 8, 2015, via v9.6-&amp;gt;v10.0 ARM11-kernel code-diff.&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| memchunkhax&lt;br /&gt;
| The kernel originally did not validate the data stored in the FCRAM kernel heap [[Memchunkhdr|memchunk-headers]] for free-memory at all. Exploiting this requires raw R/W access to these memchunk-headers, like physical-memory access with gspwn.&lt;br /&gt;
&lt;br /&gt;
There are &#039;&#039;multiple&#039;&#039; ways to exploit this, but the end-result for most of these is the same: overwrite code in AXIWRAM via the 0xEFF00000/0xDFF00000 kernel virtual-memory mapping.&lt;br /&gt;
&lt;br /&gt;
This was fixed in [[9.3.0-21|9.3.0-X]] by checking that the memchunk(including size, next, and prev ptrs) is located within the currently used heap memory. The kernel may also check that the next/prev ptrs are valid compared to other memchunk-headers basically. When any of these checks fail, kernelpanic() is called.&lt;br /&gt;
| When combined with other flaws: ARM11-kernelmode code execution&lt;br /&gt;
| [[9.3.0-21|9.3.0-21]]&lt;br /&gt;
| &lt;br /&gt;
| February 2014&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| Multiple [[KLinkedListNode|KLinkedListNode]] SlabHeap use after free bugs&lt;br /&gt;
| The ARM11-kernel did access the &#039;key&#039; field of [[KLinkedListNode|KLinkedListNode]] objects, which are located on the SlabHeap, after freeing them. Thus, triggering an allocation of a new [[KLinkedListNode|KLinkedListNode]] object at the right time could result in a type-confusion. Pseudo-code:&lt;br /&gt;
SlabHeap_free(KLinkedListNode);&lt;br /&gt;
KObject *obj = KLinkedListNode-&amp;gt;key;  // the object there might have changed!&lt;br /&gt;
This bug appeared all over the place.&lt;br /&gt;
| ARM11-kernelmode code exec maybe&lt;br /&gt;
| [[8.0.0-18|8.0.0-18]]&lt;br /&gt;
| &lt;br /&gt;
| April 2015&lt;br /&gt;
| [[User:Derrek|derrek]]&lt;br /&gt;
|-&lt;br /&gt;
| PXI [[RPC_Command_Structure|Command]] input/output buffer permissions&lt;br /&gt;
| Originally the ARM11-kernel didn&#039;t check permissions for PXI input/output buffers for commands. Starting with [[6.0.0-11|6.0.0]] PXI input/output buffers must have RW permissions, otherwise kernelpanic is triggered.&lt;br /&gt;
| &lt;br /&gt;
| [[6.0.0-11|6.0.0-11]]&lt;br /&gt;
| &lt;br /&gt;
| 2012&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| [[SVC|svcStartInterProcessDma]]&lt;br /&gt;
| For svcStartInterProcessDma, the kernel code had the following flaws:&lt;br /&gt;
&lt;br /&gt;
* Originally the ARM11-kernel read the input DmaConfig structure directly in kernel-mode(ldr(b/h) instructions), without checking whether the DmaConfig address is readable under userland. This was fixed by copying that structure to the SVC-mode stack, using the ldrbt instruction.&lt;br /&gt;
&lt;br /&gt;
* Integer overflows for srcaddr+size and dstaddr+size are now checked(with [[6.0.0-11]]), which were not checked before.&lt;br /&gt;
&lt;br /&gt;
* The kernel now also checks whether the srcaddr/dstaddr (+size) is within userland memory (0x20000000), the kernel now (with [[6.0.0-11]]) returns an error when the address is beyond userland memory. Using an address &amp;gt;=0x20000000 would result in the kernel reading from the process L1 MMU table, beyond the memory allocated for that MMU table(for vaddr-&amp;gt;physaddr conversion). &lt;br /&gt;
| &lt;br /&gt;
| [[6.0.0-11]]&lt;br /&gt;
| &lt;br /&gt;
| DmaConfig issue: unknown. The rest: 2014&lt;br /&gt;
| [[User:Plutooo|plutoo]], [[User:Yellows8|Yellows8]] independently&lt;br /&gt;
|-&lt;br /&gt;
| [[SVC|svcControlMemory]] Parameter checks&lt;br /&gt;
| For svcControlMemory the parameter check had these two flaws:&lt;br /&gt;
&lt;br /&gt;
* The allowed range for addr0, addr1, size parameters depends on which MemoryOperation is being specified. The limitation for GSP heap was only checked if op=(u32)0x10003. By setting a random bit in op that has no meaning (like bit17?), op would instead be (u32)0x30003, and the range-check would be less strict and not accurate. However, the kernel doesn&#039;t actually use the input address for LINEAR memory-mapping at all besides the range-checks, so this isn&#039;t actually useful. This was fixed in the kernel by just checking for the LINEAR bit, instead of comparing the entire MemoryOperation value with 0x10003.&lt;br /&gt;
&lt;br /&gt;
* Integer overflows on (addr0+size) are now checked that previously weren&#039;t (this also applies to most other address checks elsewhere in the kernel).&lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
| [[5.0.0-11]]&lt;br /&gt;
| &lt;br /&gt;
|&lt;br /&gt;
| [[User:Plutooo|plutoo]]&lt;br /&gt;
|-&lt;br /&gt;
| [[RPC_Command_Structure|Command]] request/response buffer overflow&lt;br /&gt;
| Originally the kernel did not check the word-values from the command-header. Starting with [[5.0.0-11]], the kernel will trigger a kernelpanic() when the total word-size of the entire command(including the cmd-header) is larger than 0x40-words (0x100-bytes). This allows overwriting threadlocalstorage+0x180 in the destination thread. However, since the data written there would be translate parameters (such as header-words + buffer addresses), exploiting this would likely be very difficult, if possible at all.&lt;br /&gt;
&lt;br /&gt;
If the two words at threadlocalstorage+0x180 could be overwritten with controlled data this way, one could then use a command with a buffer-header of &amp;lt;nowiki&amp;gt;((size&amp;lt;&amp;lt;14) | 2)&amp;lt;/nowiki&amp;gt; to write arbitrary memory to any RW userland memory in the destination process.&lt;br /&gt;
| &lt;br /&gt;
| [[5.0.0-11]]&lt;br /&gt;
| &lt;br /&gt;
| v4.1 FIRM -&amp;gt; v5.0 code diff&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| [[SVC|SVC stack allocation overflows]]&lt;br /&gt;
| &lt;br /&gt;
* Syscalls that allocate a variable-length array on stack, only checked bit31 before multiplying by 4/16 (when calculating how much memory to allocate). If a large integer was passed as input to one of these syscalls, an integer overflow would occur, and too little memory would have been allocated on stack resulting in a buffer overrun. &lt;br /&gt;
* The alignment (size+7)&amp;amp;~7 calculation before allocation was not checked for integer overflow.&lt;br /&gt;
&lt;br /&gt;
This might allow for ARM11 kernel code-execution.&lt;br /&gt;
&lt;br /&gt;
(Applies to svcSetResourceLimitValues, svcGetThreadList, svcGetProcessList, svcReplyAndReceive, svcWaitSynchronizationN.)&lt;br /&gt;
| &lt;br /&gt;
| [[5.0.0-11]]&lt;br /&gt;
| &lt;br /&gt;
| v4.1 FIRM -&amp;gt; v5.0 code diff&lt;br /&gt;
| [[User:Plutooo|plutoo]], [[User:Yellows8|Yellows8]] complementary&lt;br /&gt;
|-&lt;br /&gt;
| [[SVC|svcControlMemory]] MemoryOperation MAP memory-permissions&lt;br /&gt;
| svcControlMemory with MemoryOperation=MAP allows mapping the already-mapped process virtual-mem at addr1, to addr0. The lowest address permitted for addr1 is 0x00100000. Originally the ARM11 kernel didn&#039;t check memory permissions for addr1. Therefore .text as addr1 could be mapped elsewhere as RW- memory, which allowed ARM11 userland code-execution.&lt;br /&gt;
| &lt;br /&gt;
| [[4.1.0-8]]&lt;br /&gt;
| &lt;br /&gt;
| 2012&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| [[RPC_Command_Structure|Command]] input/output buffer permissions&lt;br /&gt;
| Originally the ARM11 kernel didn&#039;t check memory permissions for the input/output buffers for commands. Starting with [[4.0.0-7]] the ARM11 kernel will trigger a kernelpanic() if the input/output buffers don&#039;t have the required memory permissions. For example, this allowed a FSUSER file-read to .text, which therefore allowed ARM11-userland code execution.&lt;br /&gt;
| &lt;br /&gt;
| [[4.0.0-7]]&lt;br /&gt;
| &lt;br /&gt;
| 2012&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| [[SVC|svcReadProcessMemory/svcWriteProcessMemory memory]] permissions&lt;br /&gt;
| Originally the kernel only checked the first page(0x1000-bytes) of the src/dst buffers, for svcReadProcessMemory and svcWriteProcessMemory. There is no known retail processes which have access to these SVCs.&lt;br /&gt;
| &lt;br /&gt;
| [[4.0.0-7]]&lt;br /&gt;
| &lt;br /&gt;
| 2012?&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== [[FIRM]] Sysmodules ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Summary&lt;br /&gt;
!  Description&lt;br /&gt;
!  Successful exploitation result&lt;br /&gt;
!  Fixed in [[FIRM]] system version&lt;br /&gt;
!  Last [[FIRM]] system version this flaw was checked for&lt;br /&gt;
!  Timeframe this was discovered&lt;br /&gt;
!  Discovered by&lt;br /&gt;
|-&lt;br /&gt;
| [[Services|&amp;quot;srv:pm&amp;quot;]] process registration&lt;br /&gt;
| Originally any process had access to the port &amp;quot;srv:pm&amp;quot;. The PID&#039;s used for the (un)registration commands are not checked either. This allowed any process to re-register itself with &amp;quot;srv:pm&amp;quot;, and therefore allowed the process to give itself access to any service, bypassing the exheader service-access-control list.&lt;br /&gt;
&lt;br /&gt;
This was fixed in [[7.0.0-13]]: starting with [[7.0.0-13]] &amp;quot;srv:pm&amp;quot; is now a service instead of a globally accessible port. Only processes with PID&#039;s less than 6 (in other words: fs, ldr, sm, pm, pxi modules) have access to it. With [[7.0.0-13]] there can only be one session for &amp;quot;srv:pm&amp;quot; open at a time(this is used by pm module), svcBreak will be executed if more sessions are opened by the processes which can access this.&lt;br /&gt;
&lt;br /&gt;
This flaw was needed for exploiting the &amp;lt;=v4.x Process9 PXI vulnerabilities from ARM11 userland ROP, since most applications don&#039;t have access to those service(s).&lt;br /&gt;
| Access to arbitrary services&lt;br /&gt;
| [[7.0.0-13]]&lt;br /&gt;
| &lt;br /&gt;
| 2012&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| FSDIR null-deref&lt;br /&gt;
| [[Filesystem_services|FS]]-module may crash in some cases when handling directory reading. The trigger seems to be due to using [[FSDir:Close]] without closing the dir-handle afterwards?(Perhaps this is caused by out-of-memory?) This seems to be useless since it&#039;s just a null-deref.&lt;br /&gt;
| &lt;br /&gt;
| None&lt;br /&gt;
| [[9.6.0-24|9.6.0-X]]&lt;br /&gt;
| May 19(?)-20, 2015&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| Useless [[SM]] off-by-one write&lt;br /&gt;
| After accepting a new session, [[SM]] writes a (handler ID (0 for srv: sessions (max. 64), 1 for the srv:pm one), pointer to session context structure in BSS) pair in a global array. However that array is only 64-entry-big instead of 65 (as it ought to be), and no bound check is done in that regard.&lt;br /&gt;
&lt;br /&gt;
Unfortunately, as of [[11.4.0-37]], the overwritten fields are totally unused after their initialization by &amp;lt;code&amp;gt;__libc_init_array&amp;lt;/code&amp;gt;.&lt;br /&gt;
| Not currently exploitable&lt;br /&gt;
| None&lt;br /&gt;
| [[11.4.0-37]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| smpwn&lt;br /&gt;
| When registering a new service (or &amp;quot;port&amp;quot;), no bound checks are done on the service table. One can simply call RegisterPort repeatedly to overflow that table: it will overflow into the command replay structure.&lt;br /&gt;
&lt;br /&gt;
Combined with a other minor bugs in the sysmodule, it is possible to take over [[SM]] with this nevertheless difficult-to-exploit vulnerability.&lt;br /&gt;
| Code execution under [[SM]], etc.&lt;br /&gt;
| [[11.16.0-48]]&lt;br /&gt;
| [[11.14.0-46]]&lt;br /&gt;
| July 2017&lt;br /&gt;
| [[User:TuxSH|TuxSH]] (independently), presumably ichfly before &lt;br /&gt;
|-&lt;br /&gt;
| PXI cmdbuf buffer overrun &lt;br /&gt;
| Like its Arm9 counterpart, before version [[5.0.0-11|5.0.0-X]], the PXI system module did not check the command sizes. This makes it possible to get ROP under the PXI sysmodule from a pwned Process9.&lt;br /&gt;
safecerthax uses it to takeover the Arm11 processor after directly getting remote code execution on the Arm9 side. Though, is useless in classic Arm11 -&amp;gt; Arm9 chains.&lt;br /&gt;
| ROP under [[PXI_Services|PXI]]&lt;br /&gt;
| probably [[5.0.0-11|5.0.0-X]]&lt;br /&gt;
| [[11.14.0-46]]&lt;br /&gt;
| &lt;br /&gt;
| Everyone&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Standalone Sysmodules ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Summary&lt;br /&gt;
!  Description&lt;br /&gt;
!  Successful exploitation result&lt;br /&gt;
!  Fixed in system-module system-version&lt;br /&gt;
!  Last system-module system-version this flaw was checked for&lt;br /&gt;
!  Timeframe this was discovered&lt;br /&gt;
!  Timeframe this was added to wiki&lt;br /&gt;
!  Discovered by&lt;br /&gt;
|-&lt;br /&gt;
| [[CSND_Services|CSND]] sysmodule crash due to out of bounds parameters.&lt;br /&gt;
| The CSND command [[CSND:PlaySoundDirectly|PlaySoundDirectly (0x00040080)]] takes a channel ID as the first parameter. Any value outside the range [0-3] makes the system module become unstable or crash due to an out of bounds memory read. &lt;br /&gt;
| Out of bounds memory read, probably not exploitable. More research needed.&lt;br /&gt;
| None&lt;br /&gt;
| [[11.14.0-46]]&lt;br /&gt;
| January 2021&lt;br /&gt;
| January 22, 2021&lt;br /&gt;
| [[User:PabloMK7|PabloMK7]]&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| SSLoth: [[SSL_Services|SSL]] sysmodule improper certificate verification&lt;br /&gt;
| Initially, the SSL sysmodule missed the R_VERIFY_RES_SIGNATURE entry in the &amp;quot;resource list&amp;quot; provided to the RSA BSAFE library. Consequently, it did not check signatures when validating certificate chains. &lt;br /&gt;
| Forge fake certificates, spoof official servers and perform MitM attacks on SSL/TLS connections.&lt;br /&gt;
| [[11.14.0-46]]&lt;br /&gt;
| [[11.14.0-46]]&lt;br /&gt;
| 2020&lt;br /&gt;
| December 18, 2020&lt;br /&gt;
| [[User:Nba_Yoh|MrNbaYoh]], shutterbug2000 (independently)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| [[CECD_Services|CECD:ndm]] SetNZoneMacFilter (cmd8) stack smashing&lt;br /&gt;
| The length of the mac filter is not checked before being copied to a fixed-size buffer on stack.&lt;br /&gt;
| ROP under [[CECD_Services|CECD]] sysmodule&lt;br /&gt;
| None&lt;br /&gt;
| [[11.13.0-45]]&lt;br /&gt;
| 2020&lt;br /&gt;
| July 20, 2020&lt;br /&gt;
| [[User:Nba_Yoh|MrNbaYoh]]&lt;br /&gt;
|-&lt;br /&gt;
| [[CECD_Services|CECD]] message box access &lt;br /&gt;
| CECD allows any process to write to any message box, thus allowing to write Streetpass data to the message box of any title.&lt;br /&gt;
| Install exploit for any title having a vulnerability in Streetpass data parsers (see CTRSDK Streetpass parser vulnerability).&lt;br /&gt;
| None&lt;br /&gt;
| None&lt;br /&gt;
| ?&lt;br /&gt;
| June 1, 2020&lt;br /&gt;
| Everyone?&lt;br /&gt;
|-&lt;br /&gt;
| [[CECD_Services|CECD]] packet type 0x32/0x34 stack-smashing&lt;br /&gt;
| When parsing Streetpass packets of type 0x32 and 0x34, CECD copies a list without checking the number of entries. The packet length is limited to 0x400 bytes, which is not enough to reach the end of the stack frame and overwrite the return address. However, the buffer located just next to the packet buffer is actually filled with data sent just before, hence actually allowing to overwrite the whole stack frame with conrolled data.&lt;br /&gt;
| RCE under [[CECD_Services|CECD]]&lt;br /&gt;
| [[11.12.0-44]]&lt;br /&gt;
| [[11.12.0-44]]&lt;br /&gt;
| Summer 2019&lt;br /&gt;
| June 1, 2020&lt;br /&gt;
| [[User:Nba_Yoh|MrNbaYoh]]&lt;br /&gt;
|-&lt;br /&gt;
| [[CECD_Services|CECD]] TMP files parser multiple vulnerabilities&lt;br /&gt;
| When parsing &amp;quot;TMP_XXX&amp;quot; files, CECD does not check the number of messages contained in the file. This allows to overflow the array of message pointers and message sizes on the stack. Pointers aren&#039;t controlled and sizes are limited (one cannot send gigabytes of data...), yet the last message size can be an arbitrary value (the current message pointer goes outside the file buffer and the parsing loop is broken). This allows to overwrite a pointer to a lock object on the stack and decrement an arbitrary value in memory. One can change the TMP file parsing mode to have CECD trying to free all the message buffers after parsing the next TMP file. The parsing mode is usually restored when parsing a new TMP file, but an invalid TMP file allows to make a function returns an error before the mode is restored , the return value is not checked and the parser consider the file valid. The message pointers and sizes arrays are not updated though, this is not a problem since the previous TMP file buffer is reused for the new TMP file in memory. Thus the message pointers actually points to controlled data. This allows to get a bunch of fake heap chunk freed, thus a bunch of unsafe unlink arbitrary writes.&lt;br /&gt;
| RCE under [[CECD_Services|CECD]]&lt;br /&gt;
| [[11.12.0-44]]&lt;br /&gt;
| [[11.12.0-44]]&lt;br /&gt;
| Summer 2019&lt;br /&gt;
| June 1, 2020&lt;br /&gt;
| [[User:Nba_Yoh|MrNbaYoh]]&lt;br /&gt;
|-&lt;br /&gt;
| [[Config_Services|CFG]]:CreateConfigInfoBlk integer underflow&lt;br /&gt;
| When creating a new block it checks the size of the block is &amp;lt;= 0x8000, but it doesn&#039;t check that the block size is less than the remaining space. This induces an integer underflow (remaining_space-block_size), the result is then used for another check (buf_start+current_offset+constant &amp;lt;= remaining_space-block_size) and then in a mempcy call (dest = buf_start+(u16)(remaining_space-block_size), size =block_size). This allow for writing past the buffer, however because of the u16 cast in the memcpy call memory has to be mapped from buf_start to buf_start+0x10000 (cannot write backward).&lt;br /&gt;
| Theoritically ROP under CFG services, but BSS section is to small (size &amp;lt;= 0x10000) so it only results in a crash.&lt;br /&gt;
| None&lt;br /&gt;
| [[11.8.0-41]]&lt;br /&gt;
| November, 2018&lt;br /&gt;
| November 24, 2018&lt;br /&gt;
| [[User:Nba_Yoh|MrNbaYoh]]&lt;br /&gt;
|-&lt;br /&gt;
| [[MP:SendDataFrame]] missing input array index validation&lt;br /&gt;
| [[MP:SendDataFrame]] doesn&#039;t validate the input index at cmdreq[1], unless the function for flag=non-zero is executed. This is used to calculate the following, without validating the index at all: someptr = stateptr + (index*0x924) + somestateoffset.&lt;br /&gt;
&lt;br /&gt;
After validating some flags from someptr, when input_flag=0 the input buffer data is copied to someptr+someotheroffset+0x14 with the u16 size loaded from someptr+someotheroffset.&lt;br /&gt;
&lt;br /&gt;
With a large input index someptr could be setup to be at a &amp;lt;target address&amp;gt;, for overwriting memory.&lt;br /&gt;
&lt;br /&gt;
This is probably difficult to exploit.&lt;br /&gt;
| &lt;br /&gt;
| None&lt;br /&gt;
| [[8.0.0-18]](MP-sysmodule v2048)&lt;br /&gt;
| January 22, 2017&lt;br /&gt;
| January 22, 2017&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| [[MP_Services|MP]] cmd1 out-of-bounds handle read&lt;br /&gt;
| MP-sysmodule handles the input parameter for cmd1 as a s32. It checks for &amp;gt;=16, but not &amp;lt;0. With &amp;lt;16 it basically does the following(array of entries 4-bytes each): *outhandle = ((Handle*)(stateptr+offsetinstate))[inputindex].&lt;br /&gt;
&lt;br /&gt;
Hence, this can be used to load any handle in MP-sysmodule memory. MP doesn&#039;t really have any service handles of interest however(can be obtained from elsewhere too).&lt;br /&gt;
| Reading any handle in MP-sysmodule memory.&lt;br /&gt;
| None&lt;br /&gt;
| [[8.0.0-18]](MP-sysmodule v2048)&lt;br /&gt;
| January 21, 2017&lt;br /&gt;
| January 22, 2017&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| AM stack/.bss infoleak via [[AM:ReadTwlBackupInfo]]([[AM:ReadTwlBackupInfoEx|Ex]])&lt;br /&gt;
| After writing the output-info structure to stack, it then copies that structure to the output buffer ptr using the size from the command. The size is not checked. This could be used to read data from the AM-service-thread stack handling the command + .bss.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;This was not tested on hardware.&#039;&#039;&#039;&lt;br /&gt;
| Stack/.bss reading&lt;br /&gt;
| None&lt;br /&gt;
| [[10.0.0-27]](AM v9217)&lt;br /&gt;
| Roughly October 17, 2016&lt;br /&gt;
| October 25, 2016&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| AM module APcert infoleak via 00000000.ctx files&lt;br /&gt;
| Just after a download title is purchased from the eShop, the .ctx is in an initialized state of all FFs past the header. During download, the FF area is filled with the console APcert. Thus, it is possible to create a xorpad from the initial state and use it to decrypt the APcert filled state.&lt;br /&gt;
| APcert contains the deviceID, which can beneficial in decrypting the movable.sed (since deviceID is mathmatically related to the LFCS).&lt;br /&gt;
| None&lt;br /&gt;
| [[11.16.0-49]]&lt;br /&gt;
| August, 2022&lt;br /&gt;
| March 17, 2023&lt;br /&gt;
| zoogie&lt;br /&gt;
|-&lt;br /&gt;
| [[MVD_Services|MVD]]: Stack buffer overflow with [[MVDSTD:SetupOutputBuffers]].&lt;br /&gt;
| The input total_entries is not validated when initially processing the input entry-list. This fixed-size input entry-list is copied to stack from the command request. The loop for processing this initializes a global table, the converted linearmem-&amp;gt;physaddrs used there are also copied to stack(0x8-bytes of physaddrs per entry).&lt;br /&gt;
&lt;br /&gt;
If total_entries is too large, MVD-sysmodule will crash due to reading unmapped memory following the stack(0x10000000). Afterwards if the out-of-bounds total_entries is smaller than that, it will crash due accessing address 0x0, hence this useless.&lt;br /&gt;
| MVD-sysmodule crash.&lt;br /&gt;
| None&lt;br /&gt;
| [[9.0.0-20]]&lt;br /&gt;
| April 22, 2016 (Tested on the 25th)&lt;br /&gt;
| April 25, 2016&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| [[NWM_Services|NWM]]: Using CTRSDK heap with UDS sharedmem from the user-process.&lt;br /&gt;
| See the HTTP-sysmodule section below.&lt;br /&gt;
&lt;br /&gt;
CTRSDK heap is used with the sharedmem from [[NWMUDS:InitializeWithVersion]]. Buffers are allocated/freed under this heap using [[NWMUDS:Bind]] and [[NWMUDS:Unbind]].&lt;br /&gt;
&lt;br /&gt;
Hence, overwriting sharedmem with gspwn then using [[NWMUDS:Unbind]] results in the usual controlled CTRSDK memchunk-header write, similar to HTTP-sysmodule.&lt;br /&gt;
&lt;br /&gt;
This could be done by creating an UDS network, without any other nodes on the network.&lt;br /&gt;
&lt;br /&gt;
Besides CTRSDK memchunk-headers, there are no addresses stored under this sharedmem.&lt;br /&gt;
| ROP under NWM-module.&lt;br /&gt;
| None (need to check, but CTRSDK heap code is vulnerable)&lt;br /&gt;
| [[9.0.0-20|9.0.0-X]]&lt;br /&gt;
| April 10, 2016&lt;br /&gt;
| April 16, 2016&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| [[DLP_Services|DLP]]: Out-of-bounds memory access during spectator [[Download_Play|data-frame]] checksum calculation&lt;br /&gt;
| DLP doesn&#039;t validate the frame_size when receiving spectator data-frames at all, unlike non-spectator data-frames. The actual spectator data-frame parsing code doesn&#039;t use that field either. However, the data-frame checksum calculation code called during checksum verification does use the frame_size for loading the size of the framebuf.&lt;br /&gt;
&lt;br /&gt;
Hence, using a large frame_size like 0xFFFF will result in the checksum calculation code reading data out-of-bounds. This isn&#039;t really useful, you could trigger a remote local-WLAN DLP-sysmodule crash while a 3DS system is scanning for DLP networks(due to accessing unmapped memory), but that&#039;s about all(trying to infoleak with this likely isn&#039;t useful either).&lt;br /&gt;
| DLP-sysmodule crash, handled by dlplay system-application by a &amp;quot;connection interrupted&amp;quot; error eventually then a fatal-error via ErrDisp.&lt;br /&gt;
| None&lt;br /&gt;
| [[10.0.0-27|10.0.0-X]]&lt;br /&gt;
| April 8, 2016 (Tested on the 10th)&lt;br /&gt;
| April 10, 2016&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| [[DLP_Services|DLP]]: Out-of-bounds output data writing during spectator sysupdate titlelist [[Download_Play|data-frame]] handling&lt;br /&gt;
| The total_entries and out_entryindex fields for the titlelist DLP spectator data-frames are not validated. This is parsed during DLP network scanning. Hence, the specified titlelist data can be written out-of-bounds using the specified out_entryindex and total_entries. A crash will occur while reading the input data-frame titlelist if total_entries is larger than 0x27A, due to accessing unmapped memory.&lt;br /&gt;
&lt;br /&gt;
There&#039;s not much non-zero data to overwrite following the output buffer(located in sharedmem), any ptrs are located in sharedmem. Overwriting certain ptr(s) are only known to cause a crash when attempting to use the DLP-client shutdown service-command.&lt;br /&gt;
&lt;br /&gt;
There&#039;s no known way to exploit the above crash, since the linked-list code involves writes zeros(with a controlled start ptr).&lt;br /&gt;
| &lt;br /&gt;
| None&lt;br /&gt;
| [[10.0.0-27|10.0.0-X]]&lt;br /&gt;
| April 8-9, 2016&lt;br /&gt;
| April 10, 2016&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| [[IR_Services|IR]]: Stack buffer overflow with custom hardware&lt;br /&gt;
| Originally IR sysmodule used the read value from the I2C-IR registers TXLVL and RXLVL without validating them at all. See [[10.6.0-31|here]] for the fix. This is the size used for reading the data-recv FIFO, etc. The output buffer for reading is located on the stack.&lt;br /&gt;
&lt;br /&gt;
This should be exploitable if one could successfully setup the custom hardware for this and if the entire intended sizes actually get read from I2C.&lt;br /&gt;
| ROP under IR sysmodule.&lt;br /&gt;
| [[10.6.0-31|10.6.0-31]]&lt;br /&gt;
| &lt;br /&gt;
| February 23, 2016 (Unknown if it was noticed before then)&lt;br /&gt;
| February 23, 2016&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| [[HTTP_Services|HTTP]]: Using CTRSDK heap with sharedmem from the user-process.&lt;br /&gt;
| The data from httpcAddPostDataAscii and other commands is stored under a CTRSDK heap. That heap is the sharedmem specified by the user-process via the HTTPC Initialize command.&lt;br /&gt;
Normally this sharedmem isn&#039;t accessible to the user-process once the sysmodule maps it, hence using it is supposed to be &amp;quot;safe&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
This isn&#039;t the case due to gspwn however. Since CTRSDK heap code is so insecure in general, one can use gspwn to locate the HTTPC sharedmem + read/write it, then trigger a mem-write under the sysmodule. This can then be used to get ROP going under HTTP-sysmodule.&lt;br /&gt;
&lt;br /&gt;
This is exploited by [https://github.com/yellows8/ctr-httpwn/ctr-httpwn ctr-httpwn].&lt;br /&gt;
| ROP under HTTP sysmdule.&lt;br /&gt;
| None&lt;br /&gt;
| [[11.13.0-45|11.13.0-X]]&lt;br /&gt;
| Late 2015&lt;br /&gt;
| March 22, 2016&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| [[NIM_Services|NIM]]: Downloading old title-versions from eShop&lt;br /&gt;
| Multiple NIM service commands(such as [[NIMS:StartDownload]]) use a title-version value specified by the user-process, NIM does not validate that this input version matches the latest version available via SOAP. Therefore, when combined with AM(PXI) [[#Process9|title-downgrading]] via deleting the target eShop title with System Settings Data Management(if the title was already installed), this allows downloading+installing any title-version from eShop &#039;&#039;if&#039;&#039; it&#039;s still available from CDN.&lt;br /&gt;
The easiest way to exploit this is to just patch the eShop system-application code using these NIM commands(ideally the code which loads the title-version).&lt;br /&gt;
&lt;br /&gt;
Originally this was tested with a debugging-system via modded-FIRM, eventually smea implemented it in HANS for the 32c3 release.&lt;br /&gt;
| Downloading old title-versions from eShop&lt;br /&gt;
| None&lt;br /&gt;
| [[10.0.0-27|10.0.0-X]]&lt;br /&gt;
| October 24, 2015 (Unknown when exactly the first eShop title downgrade was actually tested, maybe November)&lt;br /&gt;
| January 7, 2016 (Same day Ironfall v1.0 was removed from CDN via the main-CXI files)&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| [[SPI_Services|SPI]] service out-of-bounds write&lt;br /&gt;
| cmd1 has out-of-bounds write allowing overwrite of some static variables in .data.&lt;br /&gt;
| Code execution under spi sysmodule; access to [[CONFIG11_Registers|CFG11_GPUPROT]] and ultimately kernel code execution. &lt;br /&gt;
| None&lt;br /&gt;
| [[11.14.0-46]]&lt;br /&gt;
| March 2015&lt;br /&gt;
| &lt;br /&gt;
| [[User:Plutooo|plutoo]]&lt;br /&gt;
|-&lt;br /&gt;
| [[NFC_Services|NFC]] module service command buf-overflows&lt;br /&gt;
| NFC module copies data with certain commands, from command input buffers to stack without checking the size. These commands include the following, it&#039;s unknown if there&#039;s more commands with similar issues: &amp;quot;nfc:dev&amp;quot; &amp;lt;0x000C....&amp;gt; and &amp;quot;nfc:s&amp;quot; &amp;lt;0x0037....&amp;gt;.&lt;br /&gt;
Since both of these commands are stubbed in the Old3DS NFC module from the very first version(those just return an error), these issues only affect the New3DS NFC module.&lt;br /&gt;
&lt;br /&gt;
There&#039;s no known retail titles which have access to either of these services.&lt;br /&gt;
| ROP under NFC module.&lt;br /&gt;
| New3DS: None&lt;br /&gt;
| New3DS: [[9.5.0-22]]&lt;br /&gt;
| December 2014?&lt;br /&gt;
| &lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| [[News_Services|NEWSS]] service command notificationID validation failure&lt;br /&gt;
| This module does not validate the input notificationID for &amp;lt;nowiki&amp;gt;&amp;quot;news:s&amp;quot;&amp;lt;/nowiki&amp;gt; service commands. This is an out-of-bounds array index bug. For example, [[NEWSS:SetNotificationHeader]] could be used to exploit news module: this copies the input data(size is properly checked) to: out = newsdb_savedata+0x10 + (someu32array[notificationID]*0x70).&lt;br /&gt;
| ROP under news module.&lt;br /&gt;
| None&lt;br /&gt;
| [[9.7.0-25|9.7.0-X]]&lt;br /&gt;
| December 2014&lt;br /&gt;
| &lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| [[NWMUDS:DecryptBeaconData]] heap buffer overflow&lt;br /&gt;
| input_size = 0x1E * &amp;lt;value the u8 from input_[[NWM_Services|networkstruct]]+0x1D&amp;gt;. Then input_tag0 is copied to a heap buffer. When input_size is larger than 0xFA-bytes, it will then copy input_tag1 to &amp;lt;end_address_of_previous_outbuf&amp;gt;, with size=input_size-0xFA.&lt;br /&gt;
&lt;br /&gt;
This can be triggered by either using this command directly, or by boadcasting a wifi beacon which triggers it while a 3DS system running the target process is in range, when the process is scanning for hosts to connect to. Processes will only pass tag data to this command when the wlancommID and other thing(s) match the values for the process.&lt;br /&gt;
&lt;br /&gt;
There&#039;s no known way to actually exploit this for getting ROP under NWM-module, at the time of originally adding this to the wiki. This is because the data which gets copied out-of-bounds *and* actually causes crash(es), can&#039;t be controlled it seems(with just broadcasting a beacon at least). It&#039;s unknown whether this could be exploited from just using NWMUDS service-cmd(s) directly.&lt;br /&gt;
| Without any actual way to exploit this: NWM-module DoS, resulting in process termination(process crash). This breaks *everything* involving wifi comms, a reboot is required to recover from this.&lt;br /&gt;
| None&lt;br /&gt;
| [[9.0.0-20]]&lt;br /&gt;
| ~September 23, 2014(see the [[NWMUDS:DecryptBeaconData]] page history)&lt;br /&gt;
| August 3, 2015&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| [[HID_Services|HID]] module shared-mem&lt;br /&gt;
| HID module does not validate the index values in [[HID_Shared_Memory|sharedmem]](just changes index to 0 when index == maxval when updating), therefore large values will result in HID module writing HID data to arbitrary addresses.&lt;br /&gt;
| ROP under HID module, but this is *very* unlikely to be exploitable since the data written is HID data.&lt;br /&gt;
| None&lt;br /&gt;
| [[9.3.0-21]]&lt;br /&gt;
| 2014?&lt;br /&gt;
| &lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| gspwn&lt;br /&gt;
| GSP module does not validate addresses given to the GPU. This allows a user-mode application/applet to read/write to a large part of physical FCRAM using GPU DMA. From this, you can overwrite the .text segment of the application you&#039;re running under, and gain real code-execution from a ROP-chain. Normally applets&#039; .text([[Home Menu]], [[Internet Browser]], etc) is located beyond the area accessible by the GPU, except for [[RO_Services|CROs]] used by applets([[Internet Browser]] for example).&lt;br /&gt;
&lt;br /&gt;
FCRAM is gpu-accessible up to physaddr 0x26800000 on Old3DS, and 0x2D800000 on New3DS. This is BASE_memregion_start(aka SYSTEM_memregion_end)-0x400000 (0x800000 with New3DS) with the default memory-layout on Old3DS/New3DS. With [[11.3.0-36|11.3.0-X]] the cutoff now varies due to the new [[SVC]] 0x59. The New3DS &amp;quot;normal&amp;quot;(non-APPLICATION) cutoff was changed to 0x2D000000 due to the new [[SVC]] 0x59.&lt;br /&gt;
| User-mode code execution.&lt;br /&gt;
| None&lt;br /&gt;
| [[9.6.0-24|9.6.0-X]]&lt;br /&gt;
| Early 2014&lt;br /&gt;
| &lt;br /&gt;
| smea, [[User:Yellows8|Yellows8]]/others before then&lt;br /&gt;
|-&lt;br /&gt;
| rohax&lt;br /&gt;
| Using gspwn, it is possible to overwrite a loaded [[CRO0]]/[[CRR0]] after its RSA-signature has been validated. Badly validated [[CRO0]] header leads to arbitrary read/write of memory in the ro-process. This gives code-execution in the ro module, who has access to [[SVC|syscalls]] 0x70-0x72, 0x7D.&lt;br /&gt;
&lt;br /&gt;
This was fixed after [[ninjhax]] release by adding checks on [[CRO0]]-based pointers before writing to them.&lt;br /&gt;
| Memory-mapping syscalls.&lt;br /&gt;
| [[9.3.0-21]]&lt;br /&gt;
| [[9.4.0-21]]&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| smea, [[User:Plutooo|plutoo]] joint effort&lt;br /&gt;
|-&lt;br /&gt;
| Region free&lt;br /&gt;
| Only [[Home Menu]] itself checks gamecards&#039; region when launching them. Therefore, any application launch that is done directly with [[NS]] without signaling Home Menu to launch the app, will result in region checks being bypassed.&lt;br /&gt;
This essentially means launching the gamecard with the [[NS_and_APT_Services|&amp;quot;ns:s&amp;quot;]] service. The main way to exploit this is to trigger a FIRM launch with an application specified, either with a normal FIRM launch or a hardware [[NSS:RebootSystem|reboot]].&lt;br /&gt;
| Launching gamecards from any region + bypassing Home Menu gamecard-sysupdate installation&lt;br /&gt;
| None&lt;br /&gt;
| Last tested with [[10.1.0-27|10.1.0-X]].&lt;br /&gt;
| June(?) 2014&lt;br /&gt;
| &lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| [[NWM_Services|NWM]] service-cmd state null-ptr deref&lt;br /&gt;
| The NWMUDS service command code loads a ptr from .data, adds an offset to that, then passes that as the state address for the actual command-handler function. The value of the ptr loaded from .data is not checked, therefore this will cause crashes due to that being 0x0 when NWMUDS was not properly initialized.&lt;br /&gt;
It&#039;s unknown whether any NWM services besides NWMUDS have this issue.&lt;br /&gt;
| This is rather useless since it&#039;s only a crash caused by a state ptr based at 0x0.&lt;br /&gt;
| None&lt;br /&gt;
| [[9.0.0-20]]&lt;br /&gt;
| 2013?&lt;br /&gt;
| &lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== General/CTRSDK ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Summary&lt;br /&gt;
!  Description&lt;br /&gt;
!  Successful exploitation result&lt;br /&gt;
!  Fixed in version&lt;br /&gt;
!  Last version this flaw was checked for&lt;br /&gt;
!  Timeframe this was discovered&lt;br /&gt;
!  Discovered by&lt;br /&gt;
|-&lt;br /&gt;
| [[CECD_Services|CECD]] Streetpass message exheader stack-smashing&lt;br /&gt;
| When parsing streetpass messages, &amp;quot;nn::cec::CTR::Message::InputMessage&amp;quot; calls &amp;quot;nn::cec::CTR::Message::SetExHeaderWithoutCalc&amp;quot; for each exheader entry in the input message. The number of entries should not exceed 16 but remains unchecked, leading to a stack-buffer-overflow.&lt;br /&gt;
| ROP under any application parsing Streetpass messages&lt;br /&gt;
Remote code execution under [[CECD_Services|CECD]]&lt;br /&gt;
| [[11.12.0-44]]&lt;br /&gt;
| &lt;br /&gt;
| 2019&lt;br /&gt;
| [[User:Nba_Yoh|MrNbaYoh]]&lt;br /&gt;
|-&lt;br /&gt;
| [[NWM_Services|UDS]] beacon additional-data buffer overflow&lt;br /&gt;
| Originally CTRSDK did not validate the UDS additional-data size before using that size to copy the additional-data to a [[NWM_Services|networkstruct]]. This was eventually fixed.&lt;br /&gt;
This was discovered while doing code RE with an old dlp-module version. It&#039;s unknown in what specific CTRSDK version this was fixed, or even what system-version updated titles with a fixed version.&lt;br /&gt;
&lt;br /&gt;
It&#039;s unknown if there&#039;s any titles using a vulnerable CTRSDK version which are also exploitable with this(dlp module can&#039;t be exploited with this).&lt;br /&gt;
&lt;br /&gt;
The maximum number of bytes that can be written beyond the end of the outbuf is 0x37-bytes, with additionaldata_size=0xFF.&lt;br /&gt;
| Perhaps ROP, very difficult if possible with anything at all&lt;br /&gt;
| ?&lt;br /&gt;
| &lt;br /&gt;
| September(?) 2014&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| CTPK buffer overflow&lt;br /&gt;
| At offset 0x20 in CTPK is an array for each texture, each entry is 0x20-bytes. This contains a wordindex(entry+0x18) for some srcdata relative to CTPK+0, and an u8 wordsize(entry+0x14) for this data. The CTRSDK function handling this doesn&#039;t validate the size, when copying srcdata using this size to the output buffer. Applications usually have the output buffer on the stack, hence stack buffer overflow.&lt;br /&gt;
&lt;br /&gt;
While CTPK(*.ctpk) are normally only loaded from RomFS, some application(s) load from elsewhere too.&lt;br /&gt;
| ROP under the target application.&lt;br /&gt;
| None?&lt;br /&gt;
| &amp;quot;[SDK+NINTENDO:CTR_SDK-11_4_0_200_none]&amp;quot;&lt;br /&gt;
| November 14, 2016&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>EvilFlight</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=PTM:GetBatteryLevel&amp;diff=22065</id>
		<title>PTM:GetBatteryLevel</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=PTM:GetBatteryLevel&amp;diff=22065"/>
		<updated>2023-01-26T05:34:37Z</updated>

		<summary type="html">&lt;p&gt;EvilFlight: Clarify battery state output and behavior&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Request=&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Index Word&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| Header code [0x00070000]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=Response=&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Index Word&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| Header code&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| Result code&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| u8 output&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=Output Values=&lt;br /&gt;
&lt;br /&gt;
These values are only reliable when [[PTM:GetAdapterState|no external power is connected]].&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Value&lt;br /&gt;
!  State of charge&lt;br /&gt;
|-&lt;br /&gt;
| 5&lt;br /&gt;
| 100~61% (4 blue bars)&lt;br /&gt;
|-&lt;br /&gt;
| 4&lt;br /&gt;
| 60~31% (3 blue bars)&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| 30~11% (2 blue bars)&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| 10~6% (1 red bar)&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| 5~1% (1 red bar &amp;amp; [[PTMSYSM:SetBatteryEmptyLEDPattern|notification LED]] both blink)&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| 0% (system shutdown)&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>EvilFlight</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=System_Settings&amp;diff=22049</id>
		<title>System Settings</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=System_Settings&amp;diff=22049"/>
		<updated>2023-01-18T03:00:02Z</updated>

		<summary type="html">&lt;p&gt;EvilFlight: System Settings svcBreak&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;System Settings&#039;&#039;&#039; allows you to manage various settings, use [[System Transfer]], and use Data Management.&lt;br /&gt;
&lt;br /&gt;
All applications(CTR/TWL) launched by System Settings are launched via [[NS|APT:PrepareToDoApplicationJump/APT:DoApplicationJump]], such as DS INTERNET and [[System Transfer]].&lt;br /&gt;
&lt;br /&gt;
== Accessible services ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Service&lt;br /&gt;
!  Last seen on version&lt;br /&gt;
|-&lt;br /&gt;
| [[Filesystem_services#Filesystem_service_.22fs:USER.22|fs:USER]]&lt;br /&gt;
| [[9.0.0-20|v8202]]&lt;br /&gt;
|-&lt;br /&gt;
| [[GSP_Services|gsp:Gpu]]&lt;br /&gt;
| [[9.0.0-20|v8202]]&lt;br /&gt;
|-&lt;br /&gt;
| [[NDM_Services|ndm:u]]&lt;br /&gt;
| [[9.0.0-20|v8202]]&lt;br /&gt;
|-&lt;br /&gt;
| [[NS#.22APT:A.22_Service|APT:A]]&lt;br /&gt;
| [[9.0.0-20|v8202]]&lt;br /&gt;
|-&lt;br /&gt;
| [[AC_Services|ac:i]]&lt;br /&gt;
| [[9.0.0-20|v8202]]&lt;br /&gt;
|-&lt;br /&gt;
| [[ACT_Services|act:a]]&lt;br /&gt;
| [[9.0.0-20|v8202]]&lt;br /&gt;
|-&lt;br /&gt;
| [[Application_Manager_Services#Application_Manager_services|am:sys]]&lt;br /&gt;
| [[9.0.0-20|v8202]]&lt;br /&gt;
|-&lt;br /&gt;
| [[BOSS_Services|boss:P]]&lt;br /&gt;
| [[9.0.0-20|v8202]]&lt;br /&gt;
|-&lt;br /&gt;
| [[Camera_Services#cam:s_.28PORT_CAL.29|cam:s]]&lt;br /&gt;
| [[9.0.0-20|v8202]]&lt;br /&gt;
|-&lt;br /&gt;
| [[CECD_Services|cecd:s]]&lt;br /&gt;
| [[9.0.0-20|v8202]]&lt;br /&gt;
|-&lt;br /&gt;
| [[Config_Services#Config_NVRAM_service_.22cfg:nor.22|cfg:nor]]&lt;br /&gt;
| [[9.0.0-20|v8202]]&lt;br /&gt;
|-&lt;br /&gt;
| [[DSP_Services|dsp::DSP]]&lt;br /&gt;
| [[9.0.0-20|v8202]]&lt;br /&gt;
|-&lt;br /&gt;
| [[Friend_Services|frd:a]]&lt;br /&gt;
| [[9.0.0-20|v8202]]&lt;br /&gt;
|-&lt;br /&gt;
| [[GSP_Services|gsp::Lcd]]&lt;br /&gt;
| [[9.0.0-20|v8202]]&lt;br /&gt;
|-&lt;br /&gt;
| [[HTTP_Services|http:C]]&lt;br /&gt;
| [[9.0.0-20|v8202]]&lt;br /&gt;
|-&lt;br /&gt;
| [[MIC_Services|mic:u]]&lt;br /&gt;
| [[9.0.0-20|v8202]]&lt;br /&gt;
|-&lt;br /&gt;
| [[News_Services#News_service_.22news:s.22|news:s]]&lt;br /&gt;
| [[9.0.0-20|v8202]]&lt;br /&gt;
|-&lt;br /&gt;
| [[NIM_Services#NIM_user_service_.22nim:u.22|nim:u]]&lt;br /&gt;
| [[9.0.0-20|v8202]]&lt;br /&gt;
|-&lt;br /&gt;
| [[NS#NS_Service_.22ns:s.22|ns:s]]&lt;br /&gt;
| [[9.0.0-20|v8202]]&lt;br /&gt;
|-&lt;br /&gt;
| [[NWM_Services#NWM_service_.22nwm::EXT.22|nwm::EXT]]&lt;br /&gt;
| [[9.0.0-20|v8202]]&lt;br /&gt;
|-&lt;br /&gt;
| [[NWM_Services#NWM_infrastructure_service_.22nwm::INF.22|nwm::INF]]&lt;br /&gt;
| [[9.0.0-20|v8202]]&lt;br /&gt;
|-&lt;br /&gt;
| [[NWM_Services#NWM_socket_service_.22nwm::SOC.22|nwm::SOC]]&lt;br /&gt;
| [[9.0.0-20|v8202]]&lt;br /&gt;
|-&lt;br /&gt;
| [[PTM_Services#GetSystemTime_PTM_Service_.22ptm:gets.22|ptm:gets]]&lt;br /&gt;
| [[9.0.0-20|v8202]]&lt;br /&gt;
|-&lt;br /&gt;
| [[PTM_Services#SysMenu_PTM_Service_.22ptm:sysm.22|ptm:sysm]]&lt;br /&gt;
| [[9.0.0-20|v8202]]&lt;br /&gt;
|-&lt;br /&gt;
| [[Socket_Services#Socket_privileged_service_.22soc:P.22|soc:P]]&lt;br /&gt;
| [[9.0.0-20|v8202]]&lt;br /&gt;
|-&lt;br /&gt;
| [[Socket_Services#Socket_user_service_.22soc:U.22|soc:U]]&lt;br /&gt;
| [[9.0.0-20|v8202]]&lt;br /&gt;
|-&lt;br /&gt;
| [[SSL_Services|ssl:C]]&lt;br /&gt;
| [[9.0.0-20|v8202]]&lt;br /&gt;
|-&lt;br /&gt;
| [[Camera_Services#y2r:u|y2r:u]]&lt;br /&gt;
| [[9.0.0-20|v8202]]&lt;br /&gt;
|-&lt;br /&gt;
| [[QTM_Services#QTM_system_service_.22qtm:s.22|qtm:s]]&lt;br /&gt;
| [[9.0.0-20|v8202]]&lt;br /&gt;
|-&lt;br /&gt;
| [[Config_Services#Config_service_.22cfg:i.22|cfg:i]]&lt;br /&gt;
| [[9.0.0-20|v8202]]&lt;br /&gt;
|-&lt;br /&gt;
| [[HID_Services#HID_service_.22hid:SPVR.22|hid:SPVR]]&lt;br /&gt;
| [[9.0.0-20|v8202]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Data Management ==&lt;br /&gt;
&lt;br /&gt;
=== 3DS ===&lt;br /&gt;
&lt;br /&gt;
Here you can manage 3DS extra data, and 3DSWare/&amp;quot;Software&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
When managing 3DS Software installed to the SD Card, the [[Title Database|title.db]] is read by the core receiving [[Application Manager Services PXI|AM]] commands. From the title.db file, AM gets a list of installed titles, title sizes and the name of the &amp;quot;.cmd&amp;quot; file for each title, which is used to check the authenticity of the title data(product code, title version, and if an electronic manaual is used, is also kept for each title, in the title.db, but won&#039;t be used by the Data Management Utility). For each title listed, it checks if the title is authentic(via the .cmd file). If the title passes authentication, Data Management decrypts/reads the ICN data from the executable NCCH([[CXI]]) and displays it along with the archived title size. If a title doesn&#039;t pass authentication, a placeholder icon(light grey with a &#039;?&#039; in the center), name (&#039;????????&#039;) and a size of zero are used. Deleting titles removes the title data from the title.db and import.db, and deletes the directory of the content.&lt;br /&gt;
&lt;br /&gt;
Additionally, if a CTR-NAND or TWL-NAND installed title passes authentication, but has a fake-signed ticket, System Settings will call &amp;quot;[[SVC|svcBreak]]&amp;quot; upon entering Data Management -&amp;gt; 3DS | DSiWare. Barring patched RSA sig checks, this will prevent a user from viewing the 3DS and/or DSiWare Data Management menu depending on which NAND(s) the offending title(s) is installed. This phenomenon has been known to lock users out of executing widely used exploits like [https://github.com/zoogie/Bannerbomb3 Bannerbomb3], which need access to Data Management to trigger.&lt;br /&gt;
&lt;br /&gt;
=== DSiWare ===&lt;br /&gt;
&lt;br /&gt;
See [[DSiWare Exports]].&lt;br /&gt;
&lt;br /&gt;
== System Format ==&lt;br /&gt;
Most of the System Format is done with [[FS:InitializeCtrFileSystem]]. This command updates the high u64 of the keyY stored in [[Nand/private/movable.sed|movable.sed]]. Since this keyY was updated, the data stored on [[SD_Filesystem|SD]] card(sdmc/Nintendo 3DS/&amp;lt;ID0&amp;gt;/&amp;lt;ID1&amp;gt;) and the data under [[Flash_Filesystem|nand/data/&amp;lt;ID0&amp;gt;]] is rendered useless, since that data used the old keyY. Since that data is no longer usable, the system then deletes the two above SD/NAND directories.&lt;br /&gt;
&lt;br /&gt;
When you first enter the System Format menu, it will check if a NNID is linked. If there&#039;s a linked-NNID, it will then display: &amp;quot;Are you ready to connect to the Internet to check whether data can be formatted&amp;quot;? Continuing will only result in connecting to wifi for checking in with Nintendo&#039;s servers, which may fail if the console is banned. Once that&#039;s done it will continue with the usual system-format messages; proceeding will result in the NNID cookie, potentially still present on NAND backups or multiboot scenarios, being invalidated until the next sign-in (at which point even old sessions will be valid again).&lt;br /&gt;
&lt;br /&gt;
== System Updater ==&lt;br /&gt;
The system updater title is identical to the regular system settings, except only system update is accessible with this. On dev units, this title can only be launched under certain conditions.&lt;br /&gt;
&lt;br /&gt;
On retail units, this title is accessible in scenarios where you have to update via the Internet to use certain 3DS software other than the home menu. i.e. using the eShop, on a system version less than the current one. When one selects &amp;quot;Cancel&amp;quot; from here on retail, the system will shutdown. [[NS]] launches SAFE_MODE_FIRM for running this title, when the [[Configuration_Memory|UPDATEFLAG]] is set during system boot.&lt;br /&gt;
&lt;br /&gt;
==Exiting System Settings==&lt;br /&gt;
Upon exit, the system reboots instead of simply returning to home menu.&lt;br /&gt;
&lt;br /&gt;
== Parental Controls Reset ==&lt;br /&gt;
The following refers to the functionality which generates the Parental Controls &amp;quot;Master Key&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  System version, for the mset title&lt;br /&gt;
!  Parental controls reset functionality version&lt;br /&gt;
!  Inquiry number length&lt;br /&gt;
!  Notes&lt;br /&gt;
|-&lt;br /&gt;
| [[1.0.0-0|1.0.0-X]] - [[6.3.0-12|6.3.0-X]]&lt;br /&gt;
| v0&lt;br /&gt;
| 8&lt;br /&gt;
| Mostly inherited from the Wii/DSi algorithm which used CRC-32 (0xEDB88320) with custom XOR-out (0xAAAA). 0x14C1 was added to produce the final result.&lt;br /&gt;
&lt;br /&gt;
For the 3DS algorithm, only constants were changed: the polynomial was changed to 0xEDBA6320 and the addition constant became 0x1657.&lt;br /&gt;
&lt;br /&gt;
The input to either function is an ASCII string of the format &amp;quot;%02u%02u%04u&amp;quot; where the parameters are month, day, and low 4 digits of the inquiry number. The low 5 decimal digits from the output u32 are then used for the master key.&lt;br /&gt;
&lt;br /&gt;
Because of the date being used in the algorithm, this results in the master key only being valid on a particular day, though this is trivially defeated by setting the system time to the correct date that the key was generated on.&lt;br /&gt;
&lt;br /&gt;
This had a minor refactor in [[6.0.0-11|6.0.0-X]] but is functionally identical.&lt;br /&gt;
|-&lt;br /&gt;
| [[7.0.0-13|7.0.0-X]] - [[7.1.0-16|7.1.0-X]]&lt;br /&gt;
| v1&lt;br /&gt;
| 10&lt;br /&gt;
| Introduced a new scheme using HMAC-SHA-256. The HMAC key is loaded from mset .rodata, and differs between regions.&lt;br /&gt;
&lt;br /&gt;
The inquiry number was bumped from 8 digits to 10 digits, but the same function is used to generate the digits as in v0 (derived from MAC address).&lt;br /&gt;
&lt;br /&gt;
All digits of the inquiry number are now actually used in the master key derivation function, as the string format is now &amp;quot;%02u%02u%010u&amp;quot; (month, day, inquiry number). This buffer is hashed (as above), and a little-endian word is read from the start of the output hash. The low 5 decimal digits of this word are used as the master key.&lt;br /&gt;
|-&lt;br /&gt;
| [[7.2.0-17|7.2.0-X]] - current&lt;br /&gt;
| v2&lt;br /&gt;
| 10&lt;br /&gt;
| Extension of v1 featuring a number of changes which serve to obscure the HMAC key used.&lt;br /&gt;
&lt;br /&gt;
The HMAC key is now stored in a separate file stored in the CVer RomFS, called [[CVer#masterkey.bin|masterkey.bin]]. This is used to update the key independently of the mset title. In order to make this possible, a scheme was devised to encode the required key within the inquiry number - the first digit denotes region, and the next two digits represent the key version. These values match up with values stored in the masterkey.bin header. For compatibility with v1 (as inquiry number length did not change), the version values begin at 10 - when parsing an inquiry number, a &amp;quot;version&amp;quot; of less than 10 should be handled as algorithm v1.&lt;br /&gt;
&lt;br /&gt;
The HMAC key is now also encrypted in masterkey.bin. This uses AES-128-CTR using a (normal) key in mset .rodata (which differs between regions), with the initial counter value also stored in masterkey.bin.&lt;br /&gt;
&lt;br /&gt;
At some point, Nintendo chose to &amp;quot;abandon&amp;quot; the original JPN region ID (0), and moved to region ID 9 instead (which usually doesn&#039;t exist). It is unknown why they made this change, as the AES key used for both of these IDs is the same.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== ExtData ==&lt;br /&gt;
The ExtData [[Extdata#Filesystem|File System]] for System Settings is as follows:&lt;br /&gt;
&lt;br /&gt;
 root&lt;br /&gt;
 ├── icon&lt;br /&gt;
 ├── boss&lt;br /&gt;
 └── user&lt;br /&gt;
     ├── Backup.dat&lt;br /&gt;
     └── MsetExt.dat&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  File&lt;br /&gt;
!  Details&lt;br /&gt;
!  Size&lt;br /&gt;
!  FW Introduced&lt;br /&gt;
!  Plaintext&lt;br /&gt;
|-&lt;br /&gt;
|  icon&lt;br /&gt;
|  Stubbed. Always image 00000002.&lt;br /&gt;
|  0x4 Bytes&lt;br /&gt;
|  n/a&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|  MsetExt.dat&lt;br /&gt;
|  [[DSiWare Exports]] Management&lt;br /&gt;
|  0x960 Bytes&lt;br /&gt;
|  [[2.0.0-2]]&lt;br /&gt;
|  [https://dl.dropboxusercontent.com/u/60710927/CTR/Sample/SystemSettingsExtdata/MsetExt.dat Download]&lt;br /&gt;
|-&lt;br /&gt;
|  Backup.dat&lt;br /&gt;
|  [[SD Savedata Backups]] Management&lt;br /&gt;
|  0xf5a0 Bytes&lt;br /&gt;
|  [[6.0.0-11]]&lt;br /&gt;
|  [https://dl.dropboxusercontent.com/u/60710927/CTR/Sample/SystemSettingsExtdata/Backup.dat Download]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== MsetExt.dat ===&lt;br /&gt;
This keeps a record for the DSiWare Exports for a maximum of 300 exports. Each record is in the format:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  OFFSET&lt;br /&gt;
!  SIZE&lt;br /&gt;
!  DESCRIPTION&lt;br /&gt;
|-&lt;br /&gt;
|  0&lt;br /&gt;
|  4&lt;br /&gt;
|  Game Code in Little Endian &lt;br /&gt;
|-&lt;br /&gt;
|  0x4&lt;br /&gt;
|  4&lt;br /&gt;
|  Reserved&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
All unused entries are filled with &amp;quot;0xff&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== Backup.dat ===&lt;br /&gt;
This keeps a record for the 30 save data backup slots for [[SD Savedata Backups]]. Each entry corresponds to an individual backup slot.&lt;br /&gt;
&lt;br /&gt;
Entry:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  OFFSET&lt;br /&gt;
!  SIZE&lt;br /&gt;
!  DESCRIPTION&lt;br /&gt;
|-&lt;br /&gt;
|  0x000&lt;br /&gt;
|  8&lt;br /&gt;
|  Reserved&lt;br /&gt;
|-&lt;br /&gt;
|  0x8&lt;br /&gt;
|  0x800 (0x80*16)&lt;br /&gt;
|  16 UTF-16 Title Strings&lt;br /&gt;
|-&lt;br /&gt;
|  0x808&lt;br /&gt;
|  8&lt;br /&gt;
|  Title ID&lt;br /&gt;
|-&lt;br /&gt;
|  0x810&lt;br /&gt;
|  8&lt;br /&gt;
|  Unknown&lt;br /&gt;
|-&lt;br /&gt;
|  0x818&lt;br /&gt;
|  8&lt;br /&gt;
|  Total Save Data Size&lt;br /&gt;
|-&lt;br /&gt;
|  0x820&lt;br /&gt;
|  0x10&lt;br /&gt;
|  Reserved&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Launch parameters ==&lt;br /&gt;
System Settings can start at specific menus when certain parameters are given.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt; - returns to settings menu instead of rebooting&lt;br /&gt;
&lt;br /&gt;
{|  class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Value&lt;br /&gt;
! Action&lt;br /&gt;
|-&lt;br /&gt;
| 0x01&lt;br /&gt;
| Initial setup (system not actually formatted, music plays earlier)&lt;br /&gt;
|-&lt;br /&gt;
| 0x10&lt;br /&gt;
| Internet Settings -&amp;gt; Connection Settings&lt;br /&gt;
|-&lt;br /&gt;
| 0x11&lt;br /&gt;
| Internet Settings -&amp;gt; Other Information&lt;br /&gt;
|-&lt;br /&gt;
| 0x6e&lt;br /&gt;
| Internet Settings -&amp;gt; Connection Settings&lt;br /&gt;
|-&lt;br /&gt;
| 0x6f&lt;br /&gt;
| Parental Controls&lt;br /&gt;
|-&lt;br /&gt;
| 0x70&lt;br /&gt;
| Parental Controls birthday entry&lt;br /&gt;
|-&lt;br /&gt;
| 0x71&lt;br /&gt;
| Data Management&lt;br /&gt;
|-&lt;br /&gt;
| 0x72&lt;br /&gt;
| 3DS Software Management&lt;br /&gt;
|-&lt;br /&gt;
| 0x73&lt;br /&gt;
| 3DS Extra Data Management&lt;br /&gt;
|-&lt;br /&gt;
| 0x74&lt;br /&gt;
| DSiWare Management&lt;br /&gt;
|-&lt;br /&gt;
| 0x75&lt;br /&gt;
| StreetPass Management&lt;br /&gt;
|-&lt;br /&gt;
| 0x76&lt;br /&gt;
| Internet Settings*&lt;br /&gt;
|-&lt;br /&gt;
| 0x77&lt;br /&gt;
| Other Settings, second-to-last page*&lt;br /&gt;
|-&lt;br /&gt;
| 0x78&lt;br /&gt;
| Touch Screen calibration&lt;br /&gt;
|-&lt;br /&gt;
| 0x79&lt;br /&gt;
| Circle Pad calibration&lt;br /&gt;
|-&lt;br /&gt;
| 0x7a&lt;br /&gt;
| System Update&lt;br /&gt;
|-&lt;br /&gt;
| 0x7b&lt;br /&gt;
| System Update&lt;br /&gt;
|-&lt;br /&gt;
| 0x7c&lt;br /&gt;
| Format System Memory*&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>EvilFlight</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=User:Toirrsam&amp;diff=22003</id>
		<title>User:Toirrsam</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=User:Toirrsam&amp;diff=22003"/>
		<updated>2022-12-15T09:47:58Z</updated>

		<summary type="html">&lt;p&gt;EvilFlight: spam&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>EvilFlight</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=User:Rakackper&amp;diff=22002</id>
		<title>User:Rakackper</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=User:Rakackper&amp;diff=22002"/>
		<updated>2022-12-15T09:47:34Z</updated>

		<summary type="html">&lt;p&gt;EvilFlight: spam&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>EvilFlight</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=User:Serperbel&amp;diff=22001</id>
		<title>User:Serperbel</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=User:Serperbel&amp;diff=22001"/>
		<updated>2022-12-15T09:47:02Z</updated>

		<summary type="html">&lt;p&gt;EvilFlight: spam&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>EvilFlight</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=Nintendo_3DS_Camera&amp;diff=21997</id>
		<title>Nintendo 3DS Camera</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=Nintendo_3DS_Camera&amp;diff=21997"/>
		<updated>2022-11-19T22:50:39Z</updated>

		<summary type="html">&lt;p&gt;EvilFlight: Clarify Unique ID&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overview ==&lt;br /&gt;
[[File:Nintendo 3DS Camera scnshot.png|thumb|right|Nintendo 3DS Camera Screenshot (pre 4.0-7)]]&lt;br /&gt;
This application allows the user to take/view photos and, since the 4.0.0-7 update, videos up to 10 minutes.&lt;br /&gt;
&lt;br /&gt;
The resolution of the top-screen on the 3DS is 400x240.&lt;br /&gt;
&lt;br /&gt;
== How to convert and split video.ext into 10 minute pieces ==&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
ffmpeg -i video.ext -ss 0 -t 600 -y -r 24 -vsync 1 -vcodec mjpeg -qscale 1 -acodec adpcm_ima_wav -async 1 -ac 2 /DCIM/xxxNINxxx/HNI_%04d.AVI&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== How to convert 2D Video for 3DS ==&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
ffmpeg -i video.ext -r 24 -vsync 1 -vcodec mjpeg -qscale 1 -acodec adpcm_ima_wav -async 1 -ac 2 -vf scale=min(400\\,240*a):-1,pad=400:240:abs(ow-iw)/2:abs(oh-ih)/2 /DCIM/xxxNINxxx/HNI_nnnn.AVI&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== How to convert 3D Video for 3DS ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
ffmpeg -y -i &amp;quot;video.mp4&amp;quot; -s 960x240 -aspect 2:1 -r 20 -vcodec mjpeg -qscale 1 -vf crop=480:240:0:0 -acodec libmp3lame -ar 41000 -ab 96k -ac 2 &amp;quot;left.avi&amp;quot;&lt;br /&gt;
ffmpeg -y -i &amp;quot;video.mp4&amp;quot; -s 960x240 -aspect 2:1 -r 20 -vcodec mjpeg -qscale 1 -vf crop=480:240:480:0 -an &amp;quot;right.avi&amp;quot;&lt;br /&gt;
&lt;br /&gt;
ffmpeg -y -i &amp;quot;left.avi&amp;quot; -i &amp;quot;right.avi&amp;quot; -vcodec copy -acodec adpcm_ima_wav -ac 2 -vcodec copy -map 0:0 -map 0:1 -map 1:0 &amp;quot;VID_0001.AVI&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
First two lines generate left and right files video, the last line generate the 3D video for the 3DS&lt;br /&gt;
&lt;br /&gt;
Put the file in DCIM\xxxNINxx&lt;br /&gt;
== Image Requirements ==&lt;br /&gt;
&lt;br /&gt;
The photo gallery implements various restrictions on its images:&lt;br /&gt;
&lt;br /&gt;
* A 4:3 image must have an image resolution of at least 160x120 to appear in the photo gallery. (Minimum image resolutions for other aspect ratios are currently unknown, as are maximum image resolutions for any aspect ratio.)&lt;br /&gt;
* Additionally, certain features are only available for valid Nintendo 3DS photographs:&lt;br /&gt;
** The left-eye image&#039;s Exif metadata must specify a camera make of &amp;lt;code&amp;gt;Nintendo&amp;lt;/code&amp;gt;, a camera model of &amp;lt;code&amp;gt;Nintendo 3DS&amp;lt;/code&amp;gt;, and a software name of &amp;lt;code&amp;gt;00204&amp;lt;/code&amp;gt;.&lt;br /&gt;
** The zoom feature is only available when viewing any image with an aspect ratio which is no more horizontally dominant than 4:3. For example, a 480x480 image will be zoomable due to its aspect ratio, but a 480x288 image will not be zoomable because its 5:3 aspect ratio makes the image too wide relative to its height. All zoomable images are initially zoomed in when viewed in the photo gallery.&lt;br /&gt;
** Each 3D image features a faded black border and can be manipulated with the 3D Focus slider, but only if the image is at least 480 pixels wide and contains a valid 3DS Camera maker note in the left-eye image&#039;s Exif metadata.&lt;br /&gt;
&lt;br /&gt;
== Maker Note ==&lt;br /&gt;
&lt;br /&gt;
Every Nintendo 3DS Camera photo contains a maker note in its Exif metadata. 3D images contain two maker notes - one for the left-eye image, and one for the right - but only the left-eye image&#039;s maker note is used. Two maker notes within the same 3D image may be identical to one another, but they are not guaranteed to be. The maker note of a 2D JPEG image seems to always contain an identical maker note to one of its respective 3D image&#039;s individual images, but which one it is identical to is not consistent.&lt;br /&gt;
&lt;br /&gt;
The maker note consists of two custom TIFF fields that both have a type of &amp;lt;code&amp;gt;UNDEFINED&amp;lt;/code&amp;gt;. Regardless of the Exif metadata&#039;s endianness, which the TIFF fields must match, the fields&#039; contents are encoded in little endian.&lt;br /&gt;
&lt;br /&gt;
The first field, which is identified by tag &amp;lt;code&amp;gt;0x1100&amp;lt;/code&amp;gt;, is 80 bytes long. The meanings of its contents are not known, but the first byte Seems to always have a value of 1. The remaining bytes always seem to have values of zero, unless the photo used a sepia filter, in which case bytes &amp;lt;code&amp;gt;0x8&amp;lt;/code&amp;gt;-&amp;lt;code&amp;gt;0x1a&amp;lt;/code&amp;gt; (inclusive) are set. This field can be excluded from the maker note without invalidating the 3DS Camera maker note.&lt;br /&gt;
&lt;br /&gt;
The second field uses tag &amp;lt;code&amp;gt;0x1101&amp;lt;/code&amp;gt;. It is 64 bytes long, although its length can be reduced to as few as 21 bytes without issue.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Address&lt;br /&gt;
!  Size&lt;br /&gt;
!  Type&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x0&lt;br /&gt;
| 0x4&lt;br /&gt;
| char[4]&lt;br /&gt;
| Spells &amp;quot;3DS1&amp;quot; in ASCII. Required.&lt;br /&gt;
|-&lt;br /&gt;
| 0x4&lt;br /&gt;
| 0x4&lt;br /&gt;
| unknown&lt;br /&gt;
| Possibly a version number. Seems to always be 1 or 2.&lt;br /&gt;
|-&lt;br /&gt;
| 0x8&lt;br /&gt;
| 0x4&lt;br /&gt;
| u32&lt;br /&gt;
| Photo timestamp&lt;br /&gt;
|-&lt;br /&gt;
| 0xc&lt;br /&gt;
| 0x4&lt;br /&gt;
| unknown&lt;br /&gt;
| Unknown. Seems to always be 0.&lt;br /&gt;
|-&lt;br /&gt;
| 0x10&lt;br /&gt;
| 0x4&lt;br /&gt;
| unknown&lt;br /&gt;
| Unknown. Seems to always be 516.&lt;br /&gt;
|-&lt;br /&gt;
| 0x14&lt;br /&gt;
| 0x1&lt;br /&gt;
| u8&lt;br /&gt;
| Unknown. Seems to always be 20, but any non-zero value seems acceptable. Required.&lt;br /&gt;
|-&lt;br /&gt;
| 0x15&lt;br /&gt;
| 0x3&lt;br /&gt;
| unknown&lt;br /&gt;
| Unknown. Seems to always be 0.&lt;br /&gt;
|-&lt;br /&gt;
| 0x18&lt;br /&gt;
| 0x4&lt;br /&gt;
| u32&lt;br /&gt;
| This is the lower word of [[Cfg:GenHashConsoleUnique]].&lt;br /&gt;
|-&lt;br /&gt;
| 0x1c&lt;br /&gt;
| 0xc&lt;br /&gt;
| unknown&lt;br /&gt;
| Unknown. Seems to always be 0.&lt;br /&gt;
|-&lt;br /&gt;
| 0x28&lt;br /&gt;
| 0x4&lt;br /&gt;
| f32&lt;br /&gt;
| Left translation&lt;br /&gt;
|-&lt;br /&gt;
| 0x2c&lt;br /&gt;
| 0x4&lt;br /&gt;
| unknown&lt;br /&gt;
| Unknown. Seems to always be 0.&lt;br /&gt;
|-&lt;br /&gt;
| 0x30&lt;br /&gt;
| 0x4&lt;br /&gt;
| u32&lt;br /&gt;
| Photo filter(s)&lt;br /&gt;
|-&lt;br /&gt;
| 0x34&lt;br /&gt;
| 0xc&lt;br /&gt;
| unknown&lt;br /&gt;
| Unknown. Seems to always be 0.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The photo timestamp is represented by the number of seconds that had passed since the beginning of the year 2000 in the photographer&#039;s 3DS&#039;s time zone.&lt;br /&gt;
&lt;br /&gt;
The left translation number indicates how many pixels to move the left-eye image to the left before scaling it to fit the entire image on-screen without stretching it. It inversely affects the positions of the right-eye image and the 3D Focus slider. The 3DS Camera clamps this value to prevent the image from moving off-screen. This value is zero in 2D photos, though 3D photos can use a value of zero as well.&lt;br /&gt;
&lt;br /&gt;
Take, for example, a 640x480 3DS photograph. The 3DS Camera will scale the photo down to 50% of its original size to fit the top 3DS screen, which is 240 pixels tall. This leaves a gap of 40 pixels on both the left and right sides of the image. If these gaps were resized to match the photo&#039;s original scale, which is twice as large as its on-screen scale, the gaps would be 80 pixels wide. As such, the left translation value can effectively range from +80.0, which will move the image to the left edge of the screen, to -80.0, which will move it to the right edge. Despite this range working as expected for an image of this size, the 3DS Camera&#039;s image gallery does not allow the user to move any photo to the very edge of the screen. For the example above, the maximum absolute value seems to be somewhere within the mid-to-low 50s.&lt;br /&gt;
&lt;br /&gt;
The left translation value can be changed by moving the 3D Focus slider while zoomed in, or by readjusting the photo&#039;s position while zoomed out. This will update the left translation value held in the left-eye image&#039;s maker note as well.&lt;br /&gt;
&lt;br /&gt;
The photo filter(s) value seems to specify information about photo filters that were applied to the image. Some filters seem to use the same values. When filters are not present, this value is 0.&lt;/div&gt;</summary>
		<author><name>EvilFlight</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=Serials&amp;diff=21833</id>
		<title>Serials</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=Serials&amp;diff=21833"/>
		<updated>2022-04-02T06:04:10Z</updated>

		<summary type="html">&lt;p&gt;EvilFlight: 2020s cartridge serial year format&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page talks about the 3DS products&#039; serial number and model number structures (the console, manual, accessories, games, etc...).&lt;br /&gt;
&lt;br /&gt;
== Console Serial Numbers ==&lt;br /&gt;
&lt;br /&gt;
A 3DS console serial number is composed of at least two letters followed by nine decimal digits.  The ninth digit is a &amp;quot;check digit&amp;quot;, meaning that it is derived from the other digits.&lt;br /&gt;
&lt;br /&gt;
The check digit is an industry-standard algorithm, the one used for UPC codes.  To calculate the check digit of a 3DS console, separate the non-check digits into &amp;quot;odd&amp;quot; and &amp;quot;even&amp;quot; groups, where the &amp;quot;odd&amp;quot; group is digits in odd-numbered positions, and the &amp;quot;even&amp;quot; group is digits in even-numbered positions.  (The first digit is &amp;quot;odd&amp;quot;, with &amp;quot;first&amp;quot; representing &amp;quot;1&amp;quot;.)&lt;br /&gt;
&lt;br /&gt;
After separating the digits, add the digits in each group together.  Multiply the sum of the even digits by 3, then add the sum of the odd digits. To calculate the check digit, take this value modulo 10, and if not 0, subtract from 10.&lt;br /&gt;
&lt;br /&gt;
Example: CW404567772&lt;br /&gt;
&lt;br /&gt;
The non-check digits are 40456777.  Separating into odd and even groups, we get the following:&lt;br /&gt;
&lt;br /&gt;
Odds: 4 + 4 + 6 + 7 = 21&lt;br /&gt;
Evens: 0 + 5 + 7 + 7 = 19&lt;br /&gt;
&lt;br /&gt;
Applying the algorithm, we get ((3 * 19) + 21) % 10 = 8, which is not 0, thus 10 - 8 = 2, matching the example&#039;s check digit.&lt;br /&gt;
&lt;br /&gt;
The letter prefixes are a letter specifying the device, followed by one letter specifying the region in which it was sold.  In some regions, a third letter is present; a current guess is that this letter distinguishes among factories for a given sales region.  Note that several different sales regions&#039; console may be considered to be the same region for region-locking purposes, such as Europe and Australia.&lt;br /&gt;
&lt;br /&gt;
The current serial number scheme began with the DSi, hence its listing in the tables below.  Among standalone consoles, the Wii U belongs to this scheme as well; the Switch started a new scheme.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Model !! Device Prefix (Retail) !! Device Prefix (Dev/Test)&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;DSi&#039;&#039; || T || V&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;DSi XL/LL&#039;&#039; || W || D&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;Nintendo Zone Box&#039;&#039; || Z || &#039;&#039;N/A&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;Wii U&#039;&#039; || F || &#039;&#039;unknown&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;Wii U gamepad&#039;&#039; || J || J&lt;br /&gt;
|-&lt;br /&gt;
| 3DS || C || E&lt;br /&gt;
|-&lt;br /&gt;
| 3DS XL/LL || S || R&lt;br /&gt;
|-&lt;br /&gt;
| 2DS || A || P&lt;br /&gt;
|-&lt;br /&gt;
| New 3DS || Y || Y&lt;br /&gt;
|-&lt;br /&gt;
| New 3DS XL/LL || Q || Q&lt;br /&gt;
|-&lt;br /&gt;
| New 2DS XL/LL || N || N&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Test (&amp;quot;Panda&amp;quot;) units with the same prefix as retail can be distinguished by test units having 00 or 01 as the first two digits of the serial number portion.  00 was used with the New 3DS and New 3DS XL for test units; 01 was used with the New 2DS XL test unit.  Preview versions of the N2DS XL given out to the press had 01; these appear to have been test units with the development titles deleted.&lt;br /&gt;
&lt;br /&gt;
Old 3DS development systems (Partner-CTR, IS-CTR-BOX, IS-SPR-BOX) use the &amp;quot;E&amp;quot; and &amp;quot;R&amp;quot; prefixes like test systems, but have 90 (Partner-CTR) or 91 (IS-CTR-BOX, IS-SPR-BOX) as their first two digits.  Similarly, the main New 3DS development unit, IS-SNAKE-BOX, uses the Y prefix (same as retail) with 91.  It is currently unknown what is the serial number format of the rare New 3DS XL development system (IS-CLOSER-BOX).&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Sales Region !! Region Lock !! Region Suffix&lt;br /&gt;
|-&lt;br /&gt;
| Japan || Japan || JF, JH, JM&lt;br /&gt;
|-&lt;br /&gt;
| North America || North America || W&lt;br /&gt;
|-&lt;br /&gt;
| Middle East / Southeast Asia || North America || S&lt;br /&gt;
|-&lt;br /&gt;
| Europe || Europe || EE, EF, EH, EM&lt;br /&gt;
|-&lt;br /&gt;
| Australia || Europe || AH, AG&lt;br /&gt;
|-&lt;br /&gt;
| South Korea || Korea || KF, KH, KM&lt;br /&gt;
|-&lt;br /&gt;
| China (iQue) || China || CF, CH, CM&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Console Models ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Device !! Product Code&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;DS&#039;&#039; || NTR&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;DS lite&#039;&#039; || USG&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;DSi&#039;&#039; || TWL&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;DSi XL/LL&#039;&#039; || UTL&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;Wii U&#039;&#039; || WUP&lt;br /&gt;
|-&lt;br /&gt;
| 3DS || CTR&lt;br /&gt;
|-&lt;br /&gt;
| 3DS XL/LL || SPR&lt;br /&gt;
|-&lt;br /&gt;
| 2DS || FTR&lt;br /&gt;
|-&lt;br /&gt;
| [[New 3DS]] || KTR&lt;br /&gt;
|-&lt;br /&gt;
| [[New 3DS]] XL/LL || RED&lt;br /&gt;
|-&lt;br /&gt;
| New 2DS XL/LL || JAN&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The DS had the product code NTR (short for Nitro), so we see the TR is recurring.&lt;br /&gt;
&lt;br /&gt;
== Title ID and Unique ID ==&lt;br /&gt;
&#039;&#039;see [[Titles]]&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== NCCH Product Code ==&lt;br /&gt;
&lt;br /&gt;
This serial is similiar to the &amp;quot;physical serial&amp;quot; described later in this page; it is the canonical identifier for a specific title in the field of business formalities with Nintendo, but this is not reflected in the 3DS&#039;s software architecture (where it is vastly unused in favor of the Title ID: it is therefore considered the successor of the &amp;quot;internal name&amp;quot; contained in ROMs of previous handhelds), is not guaranteed to be unique.&lt;br /&gt;
&lt;br /&gt;
The product code is located in a [[NCCH]]&#039;s header (not its ExHeader).&lt;br /&gt;
&lt;br /&gt;
The product code &amp;quot;CTR-P-CTAP&amp;quot; is the default generic product code for NCCH files. Most [[NCSD|NCCHs apart from the first one]] in a title are generally CTR-P-CTAP.&lt;br /&gt;
Referring to &amp;quot;the product code of a title&amp;quot; is therefore a simplification for &amp;quot;the product code of the NCCH in its first partition&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
So, for example, a Japanese copy of Ridge Racer 3D would have a product code of &amp;quot;CTR-P-ARRJ&amp;quot; and a serial of &amp;quot;LNA-CTR-ARRJ-JPN&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
A Nintendo-assigned product code follows this format, however, there is no requirement for a product code to match or resemble this structure as long as it&#039;s within the length limit:&lt;br /&gt;
&lt;br /&gt;
[CTR/KTR]-[Category letter]-[Type][Identifier][Region]-[Sub ID]&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Category letter !! Description&lt;br /&gt;
|-&lt;br /&gt;
| P || Cartridge software, or downloadable versions of them.&lt;br /&gt;
|-&lt;br /&gt;
| N || Digital-only releases, including [[Title list|system applications and applets]].&lt;br /&gt;
|-&lt;br /&gt;
| M || [[DLC]]&lt;br /&gt;
|-&lt;br /&gt;
| T || [[eShop Demos]], excluding so-called &amp;quot;special demos&amp;quot; which are category N.&lt;br /&gt;
|-&lt;br /&gt;
| U || [[Title list#0004000E - Add-on Content (Updates)|Patches]] for category P titles.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;sub ID&amp;quot; only applies to DLC, demos, and local copies of Download Play titles. It&#039;s a 2-digit number associated with the [[Title list|Title ID Variation]].&lt;br /&gt;
&lt;br /&gt;
See the next chapter for explanation of the other components of the Product Code.&lt;br /&gt;
&lt;br /&gt;
== Physical Serial ==&lt;br /&gt;
[Product][Retail/Demo]-[Platform]-[Type][Game ID][Region]-[Label Region]&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Field !! Length !! Description !! colspan=2 | Values&lt;br /&gt;
|-&lt;br /&gt;
|-align=center&lt;br /&gt;
| rowspan=&amp;quot;6&amp;quot; | Product&lt;br /&gt;
| rowspan=&amp;quot;6&amp;quot; | 2&lt;br /&gt;
| rowspan=&amp;quot;6&amp;quot; | Product type&lt;br /&gt;
|-&lt;br /&gt;
| LN || Cartridge&lt;br /&gt;
|-&lt;br /&gt;
| MA || Instruction manual&lt;br /&gt;
|-&lt;br /&gt;
| TS || Game box&lt;br /&gt;
|-&lt;br /&gt;
| FA || Leaflet&lt;br /&gt;
|-&lt;br /&gt;
| MK || Quick-start Guide&lt;br /&gt;
|-align=center&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; | Retail/Demo&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; | 1 &lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; |&lt;br /&gt;
|-&lt;br /&gt;
| A || Retail&lt;br /&gt;
|-&lt;br /&gt;
| Z || Demo&lt;br /&gt;
|-align=center&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; | CTR/KTR&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; | 3&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; | Platform&lt;br /&gt;
|-&lt;br /&gt;
| CTR || 3DS&lt;br /&gt;
|-&lt;br /&gt;
| KTR || New 3DS&lt;br /&gt;
|-align=center&lt;br /&gt;
| rowspan=&amp;quot;11&amp;quot; | Type&lt;br /&gt;
| rowspan=&amp;quot;11&amp;quot; | 1&lt;br /&gt;
| rowspan=&amp;quot;11&amp;quot; | &lt;br /&gt;
|-&lt;br /&gt;
| A || retail&lt;br /&gt;
|-&lt;br /&gt;
| B || retail&lt;br /&gt;
|-&lt;br /&gt;
| C || used for N3DS exclusive retail and default &#039;CTAP&#039;&lt;br /&gt;
|-&lt;br /&gt;
| E || used for card 2 type retail cartridges&lt;br /&gt;
|-&lt;br /&gt;
| H || used for built in applications like [[Mii Maker]]&lt;br /&gt;
|-&lt;br /&gt;
| J || normal eShop Title&lt;br /&gt;
|-&lt;br /&gt;
| K || normal eShop Title?&lt;br /&gt;
|-&lt;br /&gt;
| S || 3D Classics&lt;br /&gt;
|-&lt;br /&gt;
| P || used with GBA eShop titles&lt;br /&gt;
|-&lt;br /&gt;
| T || used with NES eShop titles&lt;br /&gt;
|-align=center&lt;br /&gt;
| Identifier&lt;br /&gt;
| 2&lt;br /&gt;
| colspan=3 |Game ID (two alphanumeric characters)&lt;br /&gt;
|-align=center&lt;br /&gt;
| rowspan=&amp;quot;10&amp;quot; | Region&lt;br /&gt;
| rowspan=&amp;quot;10&amp;quot; | 1&lt;br /&gt;
| rowspan=&amp;quot;10&amp;quot; | &lt;br /&gt;
|-&lt;br /&gt;
| E || English (US)&lt;br /&gt;
|-&lt;br /&gt;
| P || PAL (Europe/Australia)&lt;br /&gt;
|-&lt;br /&gt;
| J || Japanese (Japan)&lt;br /&gt;
|-&lt;br /&gt;
| K || Korean (Korea)&lt;br /&gt;
|-&lt;br /&gt;
| C || Chinese (China/Taiwan)&lt;br /&gt;
|-&lt;br /&gt;
| Y || Multiple regions&lt;br /&gt;
|-&lt;br /&gt;
| W || Tai&#039;&#039;&#039;w&#039;&#039;&#039;an(?) (Taiwan/Hong Kong)&lt;br /&gt;
|-&lt;br /&gt;
| Z || Multiple regions&lt;br /&gt;
|-&lt;br /&gt;
| A || All (region-free)&lt;br /&gt;
|-&lt;br /&gt;
|-align=center&lt;br /&gt;
| rowspan=&amp;quot;12&amp;quot; | Label Region&lt;br /&gt;
| rowspan=&amp;quot;12&amp;quot; | 3&lt;br /&gt;
| rowspan=&amp;quot;12&amp;quot; | &lt;br /&gt;
|-&lt;br /&gt;
| USA || United States&lt;br /&gt;
|-&lt;br /&gt;
| EUR || Europe&lt;br /&gt;
|-&lt;br /&gt;
| CAN || Canada (US version with additional French text added to box)&lt;br /&gt;
|-&lt;br /&gt;
| AUS || Australia&lt;br /&gt;
|-&lt;br /&gt;
| JPN || Japan&lt;br /&gt;
|-&lt;br /&gt;
| KOR || Korea&lt;br /&gt;
|-&lt;br /&gt;
| TWN || Taiwan/Hong Kong&lt;br /&gt;
|-&lt;br /&gt;
| CHT || Taiwan/Hong Kong (&amp;quot;Chinese-Traditional&amp;quot;)&lt;br /&gt;
|-&lt;br /&gt;
| CHN || China&lt;br /&gt;
|-&lt;br /&gt;
| UKV || United Kingdom (&amp;quot;United Kingdom version&amp;quot;)&lt;br /&gt;
|-&lt;br /&gt;
| MDE || Saudi Arabia/U.A.E./Malaysia/Singapore (&amp;quot;Middle East&amp;quot;)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Electronic Manuals ===&lt;br /&gt;
&lt;br /&gt;
Some eShop titles have [[NCCH#CFA|Electronic Manuals]] which store the product code at the end of the &#039;Health &amp;amp; Safety&#039; section of the manual. However,   product codes can differ from the above format as shown below:&lt;br /&gt;
&lt;br /&gt;
CTR-[P/N/T/U]-[Type][Game ID][Region]-[Region]-[Digit]&lt;br /&gt;
&lt;br /&gt;
CTR-[Type][Game ID][Region]-[Region]-[Digit]&lt;br /&gt;
&lt;br /&gt;
* P/N/T/U - Same as in product code structure&lt;br /&gt;
* [Type][Game ID][Region] - Same as in serial structure&lt;br /&gt;
* [Region] - A three character representation of the title region, i.e. &#039;EUR&#039; (not always present)&lt;br /&gt;
* [Digit] - A single digit usually &#039;1&#039; or &#039;0&#039; (not always present). Possibly revision or manual revision.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; These alternate versions of the product code, potentially found in [[NCCH#CFA|Electronic Manuals]] don&#039;t represent the actual product code, as found in the game&#039;s CXI. They are only found in the game&#039;s Home Menu manual, and on the game&#039;s packaging and external labeling.&lt;br /&gt;
&lt;br /&gt;
==Back of Card Serial==&lt;br /&gt;
AREPY10111 (example)&lt;br /&gt;
&lt;br /&gt;
AAAABCDEEE&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;A&#039;&#039;&#039; - Identifier (last 4 digits of product code)&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;B&#039;&#039;&#039; - Production Month (numbers, then after Sep its X,Y,Z for Oct,Nov,Dec)&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;C&#039;&#039;&#039; - Production Year (2010 + C)*&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;D&#039;&#039;&#039; - Revision/Remaster Version (should match the main NCCH&#039;s Exheader Remaster Version)&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;E&#039;&#039;&#039; - Production Run? (000-999)**&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;* &amp;lt;/nowiki&amp;gt;Or (2020 + C), if produced in that decade. Example [https://www.youtube.com/watch?v=DcH8mK6yXj4 here] at the 2:10 mark.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;nowiki&amp;gt;** &amp;lt;/nowiki&amp;gt;European demo/kiosk carts have &amp;quot;08B&amp;quot; or &amp;quot;08H&amp;quot;&lt;/div&gt;</summary>
		<author><name>EvilFlight</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=Friend_code&amp;diff=21812</id>
		<title>Friend code</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=Friend_code&amp;diff=21812"/>
		<updated>2022-02-04T05:34:33Z</updated>

		<summary type="html">&lt;p&gt;EvilFlight: Reverted Omgsteven3ds‎&amp;#039;s edits that completely broken the Friend Code table&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is a list of friend codes of different users.&lt;br /&gt;
&lt;br /&gt;
Remember to [http://3dbrew.org/w/index.php?title=Friend_code&amp;amp;action=watch watch this article] if you wish to get notified when someone modifies the list.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! width=&amp;quot;20%&amp;quot; | User !! width=&amp;quot;15%&amp;quot; | IrcNick !! width=&amp;quot;20%&amp;quot; | Friend code !! width=&amp;quot;10%&amp;quot; |Region !! width=&amp;quot;30%&amp;quot; |Comment here !! Mii image&lt;br /&gt;
|-&lt;br /&gt;
|[[User:V10lator|V10lator]]  || || 1049-5141-1277 || EUR (Germany) || Add me and write on 3DS Letterbox ||[[File:V10lator.png|120px]]&lt;br /&gt;
|-&lt;br /&gt;
|[[explosions]]  || haxmaster123 || 4141-5323-9570 || USA || I play ironfall: invasion and smash ||&lt;br /&gt;
|-&lt;br /&gt;
|[[User:Brayton1234567]]  || I don&#039;t know what this is || 0662-4312-7555 || USA || Add me, I added everyone else! ||&lt;br /&gt;
|-&lt;br /&gt;
|[[User:Thejsa|thejsa]]  || thejsa / jsa_ || 5043-5145-7887 || EUR (UK, N3DS) || My body is ready - ready to Sm4sh, race on MK7 and write homebrew!  ||&lt;br /&gt;
|-&lt;br /&gt;
|[[User:SynRxn|SynRxn]]  || ||0962-9776-8195 ||USA ||Let&#039;s pwn the 3DS! ||[[File:SynRxn.JPG|120px]]&lt;br /&gt;
|-&lt;br /&gt;
| z2442 ||  || &amp;lt;nowiki&amp;gt;4554-0595-5890&amp;lt;/nowiki&amp;gt; || USA || hack the 3ds yes! || &lt;br /&gt;
|-&lt;br /&gt;
|[[User:ClassicToxin|ClassicToxin]]  || || 1864-8732-8338 ||AUS ||Add me can/will probably play any game with you if you like ||&lt;br /&gt;
|-&lt;br /&gt;
|[[User:Allnewryan1|Allnewryan1]]  || ||   0001-4540-5587 || USA || Looking to help the devs, add me and send me a message when you find crashes || &lt;br /&gt;
|-&lt;br /&gt;
| Crediar  || ||   2535-3625-3742 || Europe || None || &lt;br /&gt;
|-&lt;br /&gt;
| [[User:Skyneo|Skyneo]] || Skyneo || 1950-8547-6804 || Europe (France) || Young beginner dev dreaming of making a Nintendo game. My hair is anarchy. || [[File:SkyneoMii.JPG|120px]]&lt;br /&gt;
|-&lt;br /&gt;
| Kazuma  || ||   2277-6646-9164 || Europe || None ||&lt;br /&gt;
|-&lt;br /&gt;
| SaltyPancakes  || ||   0044-2836-4738 || Europe || None || &lt;br /&gt;
|-&lt;br /&gt;
| Inspectah  || ||   3909-7495-9525 || Europe || None ||&lt;br /&gt;
|-&lt;br /&gt;
| XanLoves  || ||   3995-6523-2805 || Europe || None || &lt;br /&gt;
|-&lt;br /&gt;
| dillan  || ||   0173-1686-8946 || Europe || Currently devving garfieldcarthax, add me!|| &lt;br /&gt;
|-&lt;br /&gt;
| dillan (2)  || ||   5086-4891-370|| Europe || dillan&#039;s| other 3ds, also for haxxing, add me!|| &lt;br /&gt;
|-&lt;br /&gt;
| muhkuh2005  || ||   2449-4689-9707 || Europe || Germanfag ||&lt;br /&gt;
|-&lt;br /&gt;
| RHOPKINS13  || ||   4854-6450-1577 || USA || None || [[File:RHOPKINS13_Mii.JPG]]&lt;br /&gt;
|-&lt;br /&gt;
| fishuyo  || ||   2535-3630-0678 || USA || None ||&lt;br /&gt;
|-&lt;br /&gt;
| marcosxd  || ||   0216-0901-5448 || Mexico || Crediar add me please, I already added you :) ||&lt;br /&gt;
|-&lt;br /&gt;
| Mafril  || ||   5112-3460-1421 || USA || None || [[File:Mafril_Mii.JPG]]&lt;br /&gt;
|-&lt;br /&gt;
| Epicdude  || ||0130-1922-3022 ||USA || None ||&lt;br /&gt;
|-&lt;br /&gt;
| David  || ||3553-9962-0973 ||USA ||Add me ||&lt;br /&gt;
|-&lt;br /&gt;
| Muzer  || || 3136-6762-5385 || Europe || I have added everyone on this list who has a valid friend code (David and marcosxd don&#039;t) - so please add me if you get the chance. || [[File:Muzer_Mii.jpg|120px]]&lt;br /&gt;
|-&lt;br /&gt;
|[[User:Schumi|Schumi]]  || || 1934-1000-7068 || Germany (Europe) || add and write with me ;) ||&lt;br /&gt;
|-&lt;br /&gt;
|[[User:Rikku2000|Rikku2000]]  || ||   EUR: 1461-6425-0347 JPN: 1375-8084-1845 || Germany || Write me on 3DS Letterbox ||[[File:Rikku2000_Mii.JPG|100px]]&lt;br /&gt;
|-&lt;br /&gt;
|[[User:Elisherer|Elisherer]]  || elisherer ||0001-3489-0550 ||USA ||None ||[[File:Elisherer_Mii.JPG|120px]]&lt;br /&gt;
|-&lt;br /&gt;
|Liam87  || ||2664-2361-9358 ||England ||Add me please, i have added everyone on here, thank you ||&lt;br /&gt;
|-&lt;br /&gt;
|Luishane  || ||1289-8459-2533 ||Venezuela ||Add me...thanks ||&lt;br /&gt;
|-&lt;br /&gt;
|Immortal_no1  || ||0516-7257-0011 ||UK ||Add me and PM me on gbatemp.net with yours or e-mail me on  &amp;quot;immortal_no1@hotmail.com&amp;quot; ||&lt;br /&gt;
|-&lt;br /&gt;
|CrimsonΣ (CrimsonSigma)  || ||5284-1673-1864 ||Brazil ||Add me ||&lt;br /&gt;
|-&lt;br /&gt;
|E-Chan  || ||2062-9187-2394 ||Spain ||Add me please~! Im up for online gaming of any sorts and discussing the scene! ||&lt;br /&gt;
|-&lt;br /&gt;
|Lazymarek9614  || ||1590-4676-4678 ||Europe ||Online gaming SSF IV 3D, I try to add everyone here! ||&lt;br /&gt;
|-&lt;br /&gt;
|FireFly  || ||4554-0352-3499 ||Europe || None ||&lt;br /&gt;
|-&lt;br /&gt;
|Hikari06  || ||5241-1966-6545 ||Europe || I added everyone, please add me :)  ||[[File:HIKARI06MII.jpg|120px]]&lt;br /&gt;
|-&lt;br /&gt;
|UpSilon_Project  || ||1848-1843-3651 ||France (Europe) || UpSilon from the UpSilon Project ||&lt;br /&gt;
|-&lt;br /&gt;
|CVosler  || ||4554-0499-6731 ||USA || I added everyone. You can also email me your code after you add me &amp;quot;cvosler@hotmail.com&amp;quot; ||[[File:Chip.JPG|120px]]&lt;br /&gt;
|-&lt;br /&gt;
|[[User:CHR15x94|CHR15x94]]  || ||0688-5814-3517 ||Canada (USA) || Feel free to add me. I&#039;ll add anyone. If you need to contact me, message me on 3DBrew, or through one of my contacts on my 3DBrew profile. ||[[File:CHR15x94_-_Mii.JPG|120px]]&lt;br /&gt;
|-&lt;br /&gt;
|[[User:DarkWork0|DarkWork0]]  || ||1075-0737-9684 ||USA ||Add me and email me your friends code: darkwork0@gmail.com  I&#039;ll add anyone who adds me! ||[[File:HNI_0006.JPG‎|120px]]&lt;br /&gt;
|-&lt;br /&gt;
|[[User:Aliak11|Aliak11]]  || ||1160-9718-1643 ||USA ||Add me and email me your friends code: atthegulf@gmail.com ||&lt;br /&gt;
|-&lt;br /&gt;
|[[User:capt.danny|capt.danny]]  || ||4339:2914:5427 ||USA||Added everyone. Email fcs to danny9ds@gmail.com ||&lt;br /&gt;
|-&lt;br /&gt;
||[[user:jordan|jordan]]|| ||0473-8413-4597||USA||added all.||&lt;br /&gt;
|-&lt;br /&gt;
|[[User:Stopwatch8|Stopwatch8]]  || Stopwatch8 ||2449-4811-6942 ||USA || I have added everyone here. I would be happy if I were added as well! I just like to see what titles everyone plays. :)  ||[[File:Stopwatch8.JPG|120px]] &lt;br /&gt;
|-&lt;br /&gt;
| [[User:mr_seeker|mr_seeker]]  || ||3909-7860-3744 ||EUR ||Add me, find me, streetpass me! ||&lt;br /&gt;
|-&lt;br /&gt;
|[[User:missou|missou]]  || missou ||1762-3951-0686 ||EUR || I have added everyone...and everyone can add me!  ||[[File:MissouMii.JPG|120px]]&lt;br /&gt;
|-&lt;br /&gt;
|[[User:GuyInDogSuit|GuyInDogSuit]]  ||  ||4957-2209-2798 ||USA || I have added everyone except David and marcosxd (invalid codes), and everyone can add me in return.  ||[[File:GuyInDogSuit.jpg|120px]]&lt;br /&gt;
|-&lt;br /&gt;
|[[User:NintendoFan|NintendoFan]]  || ||2492-4592-1206 ||USA ||None ||&lt;br /&gt;
|-&lt;br /&gt;
|[[User:Rllns05|Kresma]]  || ||0190-1796-8987 ||USA ||Add me, I won&#039;t Bite. ||[[File:Rllns05.JPG|120px]]&lt;br /&gt;
|-&lt;br /&gt;
|[[User:Beefsloth|Beefsloth]]  || ||3239-7434-0366 ||USA ||Add me, if nintendo hasn&#039;t banned us all already. ||&lt;br /&gt;
|-&lt;br /&gt;
|[[User:Light4wing]]  || ||4871-8801-5208 ||KOR || Add and email your friend code(s) =&amp;gt; ruckus71472@outlook.com ||&lt;br /&gt;
|-&lt;br /&gt;
|[[User:MoneyBags|MoneyBasket]]   || ||4485-5249-2780 ||USA || i add you, you add me.||&lt;br /&gt;
|-&lt;br /&gt;
|[[User:NoFace]]   || ||2853-1277-2658 ||EUR || add me if you need a friend.||[[File:HNI 0053.JPG|120px]]&lt;/div&gt;</summary>
		<author><name>EvilFlight</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=User:EmilieNorthmore&amp;diff=21553</id>
		<title>User:EmilieNorthmore</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=User:EmilieNorthmore&amp;diff=21553"/>
		<updated>2021-08-12T00:37:48Z</updated>

		<summary type="html">&lt;p&gt;EvilFlight: spam link&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;I&#039;m Mazie and was born on 1 July 1983. My hobbies are Reading and Jewelry making.&lt;/div&gt;</summary>
		<author><name>EvilFlight</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=Management_Efek_Dalam_Permainan_Poker_Online&amp;diff=21552</id>
		<title>Management Efek Dalam Permainan Poker Online</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=Management_Efek_Dalam_Permainan_Poker_Online&amp;diff=21552"/>
		<updated>2021-08-12T00:36:10Z</updated>

		<summary type="html">&lt;p&gt;EvilFlight: spam&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>EvilFlight</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=Sikap_Yang_Wajib_Dicegah_Dalam_Taruhan_Judi_Bola_Online&amp;diff=21551</id>
		<title>Sikap Yang Wajib Dicegah Dalam Taruhan Judi Bola Online</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=Sikap_Yang_Wajib_Dicegah_Dalam_Taruhan_Judi_Bola_Online&amp;diff=21551"/>
		<updated>2021-08-12T00:35:26Z</updated>

		<summary type="html">&lt;p&gt;EvilFlight: spam&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>EvilFlight</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=Title_list&amp;diff=21339</id>
		<title>Title list</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=Title_list&amp;diff=21339"/>
		<updated>2020-10-12T02:26:27Z</updated>

		<summary type="html">&lt;p&gt;EvilFlight: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==== CTR Title List Notes ====&lt;br /&gt;
Reports/title-lists [https://yls8.mtheall.com/ninupdates/reports.php here] are automatically obtained from the system update SOAP.&lt;br /&gt;
&lt;br /&gt;
== CTR System Titles ==&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Category Bit Mask&lt;br /&gt;
!  Title Type&lt;br /&gt;
!  Internal Description&lt;br /&gt;
!  Bit Mask(s)&lt;br /&gt;
|-&lt;br /&gt;
|  0x0010&lt;br /&gt;
|  Application&lt;br /&gt;
|  SYSTEM_APPLICATION&lt;br /&gt;
|  Normal&amp;lt;nowiki&amp;gt; | &amp;lt;/nowiki&amp;gt;System&lt;br /&gt;
|-&lt;br /&gt;
|  0x001B&lt;br /&gt;
|  System Data Archives&lt;br /&gt;
|  SYSTEM_CONTENT&lt;br /&gt;
|  Contents&amp;lt;nowiki&amp;gt; | &amp;lt;/nowiki&amp;gt;CannotExecution&amp;lt;nowiki&amp;gt; | &amp;lt;/nowiki&amp;gt;System&lt;br /&gt;
|-&lt;br /&gt;
|  0x009B&lt;br /&gt;
|  Shared Data Archives&lt;br /&gt;
|  SHARED_CONTENT&lt;br /&gt;
|  Contents&amp;lt;nowiki&amp;gt; | &amp;lt;/nowiki&amp;gt;CannotExecution&amp;lt;nowiki&amp;gt; | &amp;lt;/nowiki&amp;gt;System&amp;lt;nowiki&amp;gt; | &amp;lt;/nowiki&amp;gt;NotRequireRightForMount&lt;br /&gt;
|-&lt;br /&gt;
|  0x00DB&lt;br /&gt;
|  System Data Archives&lt;br /&gt;
|  AUTO_UPDATE_CONTENT&lt;br /&gt;
|  Contents&amp;lt;nowiki&amp;gt; | &amp;lt;/nowiki&amp;gt;CannotExecution&amp;lt;nowiki&amp;gt; | &amp;lt;/nowiki&amp;gt;System&amp;lt;nowiki&amp;gt; | &amp;lt;/nowiki&amp;gt;NotRequireUserApproval&amp;lt;nowiki&amp;gt; | &amp;lt;/nowiki&amp;gt;NotRequireRightForMount&lt;br /&gt;
|-&lt;br /&gt;
|  0x0030&lt;br /&gt;
|  Applet&lt;br /&gt;
|  APPLET&lt;br /&gt;
|  Normal&amp;lt;nowiki&amp;gt; | &amp;lt;/nowiki&amp;gt;System&amp;lt;nowiki&amp;gt; | &amp;lt;/nowiki&amp;gt;RequireBatchUpdate&lt;br /&gt;
|-&lt;br /&gt;
|  0x0130&lt;br /&gt;
|  Module&lt;br /&gt;
|  BASE&lt;br /&gt;
|  Normal&amp;lt;nowiki&amp;gt; | &amp;lt;/nowiki&amp;gt;System&amp;lt;nowiki&amp;gt; | &amp;lt;/nowiki&amp;gt;RequireBatchUpdate&amp;lt;nowiki&amp;gt; | &amp;lt;/nowiki&amp;gt;CanSkipConvertJumpId&lt;br /&gt;
|-&lt;br /&gt;
|  0x0138&lt;br /&gt;
|  Firmware &lt;br /&gt;
|  FIRMWARE&lt;br /&gt;
|  Normal&amp;lt;nowiki&amp;gt; | &amp;lt;/nowiki&amp;gt;CannotExecution&amp;lt;nowiki&amp;gt; | &amp;lt;/nowiki&amp;gt;System&amp;lt;nowiki&amp;gt; | &amp;lt;/nowiki&amp;gt;RequireBatchUpdate&amp;lt;nowiki&amp;gt; | &amp;lt;/nowiki&amp;gt;CanSkipConvertJumpId&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== 00040010 - System Applications ===&lt;br /&gt;
==== System Application Notes ====&lt;br /&gt;
System Application titles have a unique title low that varies by region.&lt;br /&gt;
Regardless of version, the ExeFS:/.code for mset is the same for USA/EUR/JPN. &lt;br /&gt;
The [[4.0.0-7]] version of mset([[4.1.0-8]] for TWN) has the same ExeFS:/.code for all regions(JPN, USA, EUR, CHN, KOR, TWN). &lt;br /&gt;
The [[5.0.0-11]] mset ExeFS:/.code is the same for all regions as well, except for CHN. The [[7.0.0-13]] mset ExeFS:/.code is unique for the following regions: CHN, KOR, and TWN.&lt;br /&gt;
A limited number of system-applications are included with gamecard-sysupdates. They are: [[System Settings]], [[Download Play]], SAFE_MODE [[System Settings#System Updater|System Updater]], and [[Nintendo 3DS Sound]] (this one was only in firms 3.0.0 - 6.2.0 inclusive). &lt;br /&gt;
The only system-applications included with the New3DS gamecard-sysupdate partition are: &amp;quot;menu&amp;quot; stub and &amp;quot;friend&amp;quot; stub.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  JPN TIDLow&lt;br /&gt;
!  USA TIDLow&lt;br /&gt;
!  EUR TIDLow&lt;br /&gt;
!  CHN TIDLow&lt;br /&gt;
!  KOR TIDLow&lt;br /&gt;
!  TWN TIDLow&lt;br /&gt;
!  [[Product code]]&lt;br /&gt;
!  Description&lt;br /&gt;
!  JPN Versions&lt;br /&gt;
!  EUR Versions&lt;br /&gt;
!  USA Versions&lt;br /&gt;
!  CHN Versions&lt;br /&gt;
!  KOR Versions&lt;br /&gt;
!  TWN Versions&lt;br /&gt;
!  Status&lt;br /&gt;
|-&lt;br /&gt;
| 00020000&lt;br /&gt;
| 00021000&lt;br /&gt;
| 00022000&lt;br /&gt;
| 00026000&lt;br /&gt;
| 00027000&lt;br /&gt;
| 00028000&lt;br /&gt;
| CTR-N-HAS?&lt;br /&gt;
| [[System Settings]] (mset)&lt;br /&gt;
| [[1.0.0-0|v0]], [[2.0.0-2|v1027]], [[3.0.0-5|v2060]], [[4.0.0-7|v3074]], [[5.0.0-11|v4097]], [[6.0.0-11|v5127]], [[7.0.0-13|v6157]], [[7.2.0-17|v7173]], [[8.1.0-0_New3DS|v8198]]([[8.1.0-0_New3DS]]), [[9.0.0-20|v9224]], [[9.6.0-24|v10245]], [[10.6.0-31|v10256]], [[11.5.0-38|v11266]]&lt;br /&gt;
| [[1.0.0-0|v0]], [[2.0.0-2|v1027]], [[3.0.0-5|v2061]], [[4.0.0-7|v3075]], [[5.0.0-11|v4097]], [[6.0.0-11|v5127]], [[7.0.0-13|v6157]], [[7.2.0-17|v7174]], [[9.0.0-20|v8202]], [[9.6.0-24|v9220]], [[11.4.0-37|v10241]](New2DSXL), [[11.5.0-38|v10256]]&lt;br /&gt;
| [[1.0.0-0|v0]], [[2.0.0-2|v1027]], [[3.0.0-5|v2062]], [[4.0.0-7|v3078]], [[5.0.0-11|v4098]], [[6.0.0-11|v5128]], [[7.0.0-13|v6157]], [[7.2.0-17|v7174]], [[9.0.0-20|v8203]], [[9.6.0-24|v9221]], [[11.5.0-38|v10241]]&lt;br /&gt;
| [[4.0.0-7|v8]], [[4.4.0-10|v1024]](CHN-only sysupdate for just mset), [[5.0.0-11|v2049]], [[7.0.0-13|v3075]]&lt;br /&gt;
| [[4.0.0-7|v1026]], [[5.0.0-11|v2049]], [[7.0.0-13|v4098]]&lt;br /&gt;
| [[4.1.0-8|v8]], [[4.2.0-9|v1024]], [[5.0.0-11|v2050]], [[7.0.0-13|v3074]]&lt;br /&gt;
| Active&lt;br /&gt;
|-&lt;br /&gt;
| 00020100&lt;br /&gt;
| 00021100&lt;br /&gt;
| 00022100&lt;br /&gt;
| 00026100&lt;br /&gt;
| 00027100&lt;br /&gt;
| 00028100&lt;br /&gt;
| CTR-N-HDL?&lt;br /&gt;
| [[Download Play]] (dlplay)&lt;br /&gt;
| [[1.0.0-0|v0]], [[2.1.0-4|v1026]], [[4.0.0-7|v2051]], [[9.0.0-20|v3072]](Also for [[8.1.0-0_New3DS]])&lt;br /&gt;
| [[1.0.0-0|v0]], [[2.1.0-4|v1026]], [[4.0.0-7|v2051]], [[9.0.0-20|v3073]]&lt;br /&gt;
| [[1.0.0-0|v0]], [[2.1.0-4|v1026]], [[4.0.0-7|v2051]], [[9.0.0-20|v3073]]&lt;br /&gt;
| [[4.0.0-7|v4]]&lt;br /&gt;
| [[4.0.0-7|v1027]]&lt;br /&gt;
| [[4.1.0-8|v4]]&lt;br /&gt;
| Active&lt;br /&gt;
|-&lt;br /&gt;
| 00020200&lt;br /&gt;
| 00021200&lt;br /&gt;
| 00022200&lt;br /&gt;
| 00026200&lt;br /&gt;
| 00027200&lt;br /&gt;
| 00028200&lt;br /&gt;
| CTR-N-HMK?&lt;br /&gt;
| [[Activity Log]] (PLOG)&lt;br /&gt;
| [[1.0.0-0|v0]], [[2.0.0-2|v1026]], [[3.0.0-5|v2051]], [[10.6.0-31|v2080]]&lt;br /&gt;
| [[1.0.0-0|v0]], [[2.0.0-2|v1026]], [[3.0.0-5|v2054]], [[7.0.0-13|v2064]]&lt;br /&gt;
| Same as EUR&lt;br /&gt;
| [[4.0.0-7|v3]]&lt;br /&gt;
| [[4.0.0-7|v2]], [[7.0.0-13|v16]]&lt;br /&gt;
| [[4.1.0-8|v2]]&lt;br /&gt;
| Active&lt;br /&gt;
|-&lt;br /&gt;
| 00020300&lt;br /&gt;
| 00021300&lt;br /&gt;
| 00022300&lt;br /&gt;
| 00026300&lt;br /&gt;
| 00027300&lt;br /&gt;
| 00028300&lt;br /&gt;
| ?&lt;br /&gt;
| [[Health and Safety Information]] (safe)&lt;br /&gt;
| [[1.0.0-0|v0]], [[4.0.0-7|v1024]], [[6.0.0-11|v2050]]&lt;br /&gt;
| [[1.0.0-0|v0]], [[3.0.0-5|v1024]], [[4.0.0-7|v2050]], [[6.0.0-11|v3077]]&lt;br /&gt;
| [[1.0.0-0|v0]], [[4.0.0-7|v1026]], [[6.1.0-12U|v2051]]&lt;br /&gt;
| [[4.0.0-7|v5]]&lt;br /&gt;
| [[4.0.0-7|v2]]&lt;br /&gt;
| [[4.1.0-8|v5]]&lt;br /&gt;
| Active&lt;br /&gt;
|-&lt;br /&gt;
| 20020300&lt;br /&gt;
| 20021300&lt;br /&gt;
| 20022300&lt;br /&gt;
| N/A&lt;br /&gt;
| 20027300&lt;br /&gt;
| N/A&lt;br /&gt;
| CTR-N-HAC?&lt;br /&gt;
| [[New_3DS]] [[Health and Safety Information]] (ssafe)&lt;br /&gt;
| [[8.1.0-0_New3DS|v2]], [[9.3.0-21|v17]]&lt;br /&gt;
| [[8.1.0-0_New3DS|v1]], [[11.4.0-37|v16]](New2DSXL)&lt;br /&gt;
| Same as EUR.&lt;br /&gt;
| N/A&lt;br /&gt;
| [[9.6.0-24|v2]]&lt;br /&gt;
| N/A&lt;br /&gt;
| Active&lt;br /&gt;
|-&lt;br /&gt;
| 00020400&lt;br /&gt;
| 00021400&lt;br /&gt;
| 00022400&lt;br /&gt;
| 00026400&lt;br /&gt;
| 00027400&lt;br /&gt;
| 00028400&lt;br /&gt;
| CTR-N-HEP?&lt;br /&gt;
| [[Nintendo 3DS Camera]] (CtrApp)&lt;br /&gt;
| [[1.0.0-0|v0]], [[2.1.0-4|v16]], [[3.0.0-5|v1038]], [[4.0.0-7|v2048]], [[6.0.0-11|v3073]], [[9.0.0-20|v4097]](Also for [[8.1.0-0_New3DS]]), [[10.6.0-31|v4112]], [[11.5.0-38|v5120]]&lt;br /&gt;
| [[1.0.0-0|v0]], [[2.1.0-4|v16]], [[3.0.0-5|v1039]], [[4.0.0-7|v2048]], [[6.0.0-11|v3073]], [[7.0.0-13|v3088]], [[9.0.0-20|v4097]], [[11.4.0-37|v5120]](New2DSXL), [[11.5.0-38|v5120]]&lt;br /&gt;
| [[1.0.0-0|v0]], [[2.1.0-4|v16]], [[3.0.0-5|v1039]], [[4.0.0-7|v2048]], [[6.1.0-12U|v3074]], [[7.0.0-13|v3088]], [[9.0.0-20|v4097]],  [[11.5.0-38|v5120]]&lt;br /&gt;
| [[4.0.0-7|v3]]&lt;br /&gt;
| [[4.0.0-7|v2]], [[7.0.0-13|v1040]]&lt;br /&gt;
| [[4.1.0-8|v3]]&lt;br /&gt;
| Active&lt;br /&gt;
|-&lt;br /&gt;
| 00020500&lt;br /&gt;
| 00021500&lt;br /&gt;
| 00022500&lt;br /&gt;
| 00026500&lt;br /&gt;
| 00027500&lt;br /&gt;
| 00028500&lt;br /&gt;
| CTR-N-HES?&lt;br /&gt;
| [[Nintendo 3DS Sound]] (CtrApp)&lt;br /&gt;
| [[1.0.0-0|v0]], [[2.1.0-4|v1027]], [[3.0.0-5|v2049]], [[4.0.0-7|v3072]], [[7.0.0-13|v3089]],  [[11.4.0-37|v4096]]&lt;br /&gt;
| [[1.0.0-0|v0]], [[2.1.0-4|v1027]], [[3.0.0-5|v2049]], [[4.0.0-7|v3072]], [[7.0.0-13|v3088]], [[11.4.0-37|v4096]]&lt;br /&gt;
| [[1.0.0-0|v0]], [[2.1.0-4|v1027]], [[3.0.0-5|v2049]], [[4.0.0-7|v3072]], [[7.0.0-13|v3088]], [[11.4.0-37|v4096]]&lt;br /&gt;
| [[4.0.0-7|v2]], [[11.4.0-37|v1024]]&lt;br /&gt;
| [[4.0.0-7|v2]], [[7.0.0-13|v16]],[[11.4.0-37|v4096]]&lt;br /&gt;
| [[4.1.0-8|v3]], [[11.4.0-37|v1024]]&lt;br /&gt;
| Active&lt;br /&gt;
|-&lt;br /&gt;
| 00020700&lt;br /&gt;
| 00021700&lt;br /&gt;
| 00022700&lt;br /&gt;
| 00026700&lt;br /&gt;
| 00027700&lt;br /&gt;
| 00028700&lt;br /&gt;
| CTR-N-HED?&lt;br /&gt;
| [[Mii Maker]] (EDIT)&lt;br /&gt;
| [[1.0.0-0|v0]], [[2.0.0-2|v1026]], [[7.0.0-13|v2055]], [[10.6.0-31|v2064]]&lt;br /&gt;
| Same as JPN&lt;br /&gt;
| Same as JPN&lt;br /&gt;
| [[4.0.0-7|v1]]&lt;br /&gt;
| [[4.0.0-7|v1]], [[7.0.0-13|v16]]&lt;br /&gt;
| [[4.1.0-8|v2]]&lt;br /&gt;
| Active&lt;br /&gt;
|-&lt;br /&gt;
| 00020800&lt;br /&gt;
| 00021800&lt;br /&gt;
| 00022800&lt;br /&gt;
| 00026800&lt;br /&gt;
| 00027800&lt;br /&gt;
| 00028800&lt;br /&gt;
| CTR-N-HME?&lt;br /&gt;
| [[StreetPass Mii Plaza]] (MEET)&lt;br /&gt;
| [[1.0.0-0|v0]], v1027, [[2.1.0-4|v2048]], [[3.0.0-5|v3087]], [[3.0.0-6|v4096]], [[6.0.0-11|v5121]]&lt;br /&gt;
| [[1.0.0-0|v0]], v1027, [[2.1.0-4|v2048]], [[3.0.0-5|v3087]], [[3.0.0-6|v4096]], [[6.0.0-11|v5122]]&lt;br /&gt;
| [[1.0.0-0|v0]], v1027, [[2.1.0-4|v2048]], [[3.0.0-5|v3087]], [[3.0.0-6|v4096]], [[6.1.0-12U|v5124]], [[7.0.0-13|v5136]]&lt;br /&gt;
| [[4.0.0-7|v0]], [[4.4.0-10|v4096]]&lt;br /&gt;
| [[4.0.0-7|v1]], [[4.4.0-10|v4096]], [[7.0.0-13|v5120]]&lt;br /&gt;
| [[4.1.0-8|v1]], [[4.4.0-10|v4096]]&lt;br /&gt;
| Active&lt;br /&gt;
|-&lt;br /&gt;
| 00020900&lt;br /&gt;
| 00021900&lt;br /&gt;
| 00022900&lt;br /&gt;
| N/A&lt;br /&gt;
| 00027900&lt;br /&gt;
| 00028900&lt;br /&gt;
| CTR-N-HGR?&lt;br /&gt;
| [[eShop]] (tiger)&lt;br /&gt;
| [[2.0.0-2|v4]], [[2.1.0-3|v1026]], [[3.0.0-5|v2057]], [[4.0.0-7|v3081]], [[4.1.0-8|v4096]], [[4.2.0-9|v5123]], [[4.3.0-10|v6146]], [[5.0.0-11|v7169]], [[7.0.0-13|v8206]], [[7.1.0-14|v9231]], [[7.2.0-17|v10245]], [[8.0.0-18|v11265]], [[8.1.0-19|v12288]], [[9.0.0-20|v13320]], [[9.3.0-21|v15366]], [[9.5.0-22|v16384]], [[9.6.0-24|v17421]], [[9.7.0-25|v18432]], [[10.0.0-27|v19465]], [[10.4.0-29|v20483]], [[10.7.0-32|v21504]], [[11.3.0-36|v23552]], [[11.5.0-38|v25600]]&lt;br /&gt;
| [[2.0.0-2|v4]], [[2.1.0-3|v1026]], [[3.0.0-5|v2058]], [[4.0.0-7|v3081]], [[4.1.0-8|v4096]], [[4.2.0-9|v5123]], [[4.3.0-10|v6146]], [[5.0.0-11|v7171]], [[7.0.0-13|v8206]], [[7.1.0-14|v9231]], [[7.2.0-17|v10245]], [[8.0.0-18|v11265]], [[8.1.0-19|v12288]], [[9.0.0-20|v13320]], [[9.3.0-21|v15366]], [[9.5.0-22|v16384]], [[9.6.0-24|v17421]], [[9.7.0-25|v18432]], [[10.0.0-27|v19465]], [[10.4.0-29|v20482]], [[10.7.0-32|v21505]], [[11.2.0-35|v22528]], [[11.3.0-36|v23552]], [[11.4.0-37|v24576]](New2DSXL), [[11.5.0-38|v25600]]&lt;br /&gt;
| [[2.0.0-2|v4]], [[2.1.0-3|v1026]], [[3.0.0-5|v2058]], [[4.0.0-7|v3081]], [[4.1.0-8|v4096]], [[4.2.0-9|v5123]], [[4.3.0-10|v6146]], [[5.0.0-11|v7170]], [[7.0.0-13|v8206]], [[7.1.0-14|v9231]], [[7.2.0-17|v10246]], [[8.0.0-18|v11265]], [[8.1.0-19|v12288]], [[9.0.0-20|v13321]], [[9.3.0-21|v15366]], [[9.5.0-22|v16384]], [[9.6.0-24|v17422]], [[9.7.0-25|v18432]], [[10.0.0-27|v19465]], [[10.4.0-29|v20482]], [[10.7.0-32|v21506]], [[11.3.0-36|v23552]], [[11.5.0-38|v25600]]&lt;br /&gt;
| N/A&lt;br /&gt;
| [[4.0.0-7|v3082]], [[4.1.0-8|v4096]], [[4.2.0-9|v5123]], [[4.3.0-10|v6146]], [[5.0.0-11|v7169]], [[7.0.0-13|v8205]], [[7.1.0-14|v9231]], [[8.1.0-19|v12288]], [[9.0.0-20|v13320]], [[9.3.0-21|v15366]], [[9.5.0-22|v16384]], [[9.6.0-24|v17420]], [[9.7.0-25|v18432]], [[10.0.0-27|v19465]], [[10.4.0-29|v20482]]&lt;br /&gt;
| [[4.1.0-8|v4096]], [[4.2.0-9|v5123]], [[4.3.0-10|v6146]], [[5.0.0-11|v7170]], [[7.0.0-13|v8205]], [[7.1.0-14|v9231]], [[8.1.0-19|v12288]], [[9.3.0-21|v15366]], [[9.5.0-22|v16384]], [[9.6.0-24|v17421]], [[9.7.0-25|v18432]], [[10.0.0-27|v19465]]&lt;br /&gt;
| Active&lt;br /&gt;
|-&lt;br /&gt;
| 00020A00&lt;br /&gt;
| 00021A00&lt;br /&gt;
| 00022A00&lt;br /&gt;
| N/A&lt;br /&gt;
| 00027A00&lt;br /&gt;
| 00028A00&lt;br /&gt;
| CTR-N-HCB?&lt;br /&gt;
| [[System Transfer]] (CARDBOARD)&lt;br /&gt;
| [[2.0.0-2|v4]], [[3.0.0-5|v1035]], [[4.0.0-7|v2050]], [[5.0.0-11|v3074]], [[7.0.0-13|v4109]], [[9.0.0-20|v5130]], [[9.6.0-24|v6154]]&lt;br /&gt;
| [[2.0.0-2|v4]], [[3.0.0-5|v1035]], [[4.0.0-7|v2050]], [[5.0.0-11|v3073]], [[7.0.0-13|v4109]], [[9.0.0-20|v5131]], [[9.6.0-24|v6155]]&lt;br /&gt;
| [[2.0.0-2|v4]], [[3.0.0-5|v1035]], [[4.0.0-7|v2051]], [[5.0.0-11|v3073]], [[7.0.0-13|v4109]], [[9.0.0-20|v5131]], [[9.6.0-24|v6156]]&lt;br /&gt;
| N/A&lt;br /&gt;
| [[4.0.0-7|v2]], [[5.0.0-11|v1025]], [[7.0.0-13|v2061]], [[9.0.0-20|v3082]]&lt;br /&gt;
| [[4.1.0-8|v2]], [[5.0.0-11|v1025]], [[7.0.0-13|v2061]]&lt;br /&gt;
| Active&lt;br /&gt;
|-&lt;br /&gt;
| 00020B00&lt;br /&gt;
| 00021B00&lt;br /&gt;
| 00022B00&lt;br /&gt;
| N/A&lt;br /&gt;
| N/A&lt;br /&gt;
| N/A&lt;br /&gt;
| CTR-N-HMA?&lt;br /&gt;
| [[Nintendo Zone]] (&amp;quot;Nintendo&amp;quot;) (MARS)&lt;br /&gt;
| [[1.0.0-0|v0]], [[3.0.0-5|v1034]]&lt;br /&gt;
| Same as JPN&lt;br /&gt;
| Same as JPN&lt;br /&gt;
| N/A&lt;br /&gt;
| N/A&lt;br /&gt;
| N/A&lt;br /&gt;
| Active&lt;br /&gt;
|-&lt;br /&gt;
| 00020D00&lt;br /&gt;
| 00021D00&lt;br /&gt;
| 00022D00&lt;br /&gt;
| 00026D00&lt;br /&gt;
| 00027D00&lt;br /&gt;
| 00028D00&lt;br /&gt;
| CTR-N-HCH?&lt;br /&gt;
| [[Face Raiders]]&lt;br /&gt;
| [[1.0.0-0|v0]], [[2.1.0-4|v1028]]&lt;br /&gt;
| [[1.0.0-0|v0]], [[2.1.0-4|v1028]], [[7.0.0-13|v1040]]&lt;br /&gt;
| Same as EUR&lt;br /&gt;
| [[4.0.0-7|v0]]&lt;br /&gt;
| [[4.0.0-7|v0]]&lt;br /&gt;
| [[4.1.0-8|v2]]&lt;br /&gt;
| Active&lt;br /&gt;
|-&lt;br /&gt;
| 20020D00&lt;br /&gt;
| 20021D00&lt;br /&gt;
| 20022D00&lt;br /&gt;
| N/A&lt;br /&gt;
| 20027D00&lt;br /&gt;
| N/A&lt;br /&gt;
| ?&lt;br /&gt;
| [[New_3DS]] [[Face Raiders]] (FACE)&lt;br /&gt;
| [[8.1.0-0_New3DS|v2050]]&lt;br /&gt;
| [[8.1.0-0_New3DS|v2049]]&lt;br /&gt;
| Same as EUR.&lt;br /&gt;
| N/A&lt;br /&gt;
| [[9.6.0-24|v2049]]&lt;br /&gt;
| N/A&lt;br /&gt;
| Active&lt;br /&gt;
|-&lt;br /&gt;
| 00020E00&lt;br /&gt;
| 00021E00&lt;br /&gt;
| 00022E00&lt;br /&gt;
| 00026E00&lt;br /&gt;
| 00027E00&lt;br /&gt;
| 00028E00&lt;br /&gt;
| CTR-N-HAR?&lt;br /&gt;
| [[AR Games]] (AR_ACT)&lt;br /&gt;
| [[1.0.0-0|v0]], [[2.1.0-4|v1026]]&lt;br /&gt;
| [[1.0.0-0|v0]], [[2.1.0-4|v1026]], [[7.0.0-13|v1040]]&lt;br /&gt;
| [[1.0.0-0|v0]], [[2.1.0-4|v1027]], [[7.0.0-13|v1040]]&lt;br /&gt;
| [[4.0.0-7|v0]]&lt;br /&gt;
| [[4.0.0-7|v0]], [[7.0.0-13|v16]]&lt;br /&gt;
| [[4.1.0-8|v1]]&lt;br /&gt;
| Active&lt;br /&gt;
|-&lt;br /&gt;
| 00020F00&lt;br /&gt;
| 00021F00&lt;br /&gt;
| 00022F00&lt;br /&gt;
| 00026F00&lt;br /&gt;
| 00027F00&lt;br /&gt;
| 00028F00&lt;br /&gt;
| CTR-N-HSH?&lt;br /&gt;
| SAFE_MODE [[System Settings#System Updater|System Updater]] (mset)&lt;br /&gt;
| [[1.0.0-0|v0]], [[3.0.0-5|v1024]], [[6.0.0-11|v2049]]&lt;br /&gt;
| [[1.0.0-0|v0]], [[3.0.0-5|v1024]], [[6.0.0-11|v2050]]&lt;br /&gt;
| Same as JPN&lt;br /&gt;
| [[4.0.0-7|v1]], [[6.0.0-11|v1026]]&lt;br /&gt;
| [[4.0.0-7|v1]]&lt;br /&gt;
| [[4.1.0-8|v1]]&lt;br /&gt;
| Active&lt;br /&gt;
|-&lt;br /&gt;
| 00023000&lt;br /&gt;
| 00024000&lt;br /&gt;
| 00025000&lt;br /&gt;
| N/A&lt;br /&gt;
| N/A&lt;br /&gt;
| N/A&lt;br /&gt;
| (Variable?)&lt;br /&gt;
| Promotional video&lt;br /&gt;
| [[1.1.0-1|v2]], [[2.0.0-2|v2048]]&lt;br /&gt;
| [[1.1.0-1|v&amp;lt;unknown&amp;gt;]], [[2.0.0-2|v2048]]&lt;br /&gt;
| [[1.1.0-1|v0]], [[2.0.0-2|v2048]]&lt;br /&gt;
| N/A&lt;br /&gt;
| N/A&lt;br /&gt;
| N/A&lt;br /&gt;
| Stubbed&lt;br /&gt;
|-&lt;br /&gt;
| 0002BF00&lt;br /&gt;
| 0002C000&lt;br /&gt;
| 0002C100&lt;br /&gt;
| N/A&lt;br /&gt;
| N/A&lt;br /&gt;
| N/A&lt;br /&gt;
| CTR-N-HAF?&lt;br /&gt;
| [[Nintendo Network ID Settings]] (act)&lt;br /&gt;
| [[7.0.0-13|v14]], [[7.2.0-17|v1029]], [[9.0.0-20|v2051]], [[9.3.0-21|v3072]]&lt;br /&gt;
| Same as JPN&lt;br /&gt;
| Same as JPN&lt;br /&gt;
| N/A&lt;br /&gt;
| N/A&lt;br /&gt;
| N/A&lt;br /&gt;
| Active&lt;br /&gt;
|-&lt;br /&gt;
| 20023100&lt;br /&gt;
| 20024100&lt;br /&gt;
| 20025100&lt;br /&gt;
| N/A&lt;br /&gt;
| N/A&lt;br /&gt;
| N/A&lt;br /&gt;
| CTR-N-HAJ?&lt;br /&gt;
| [[microSD Management]] (&#039;mcopy&#039;) ([[New_3DS]]-only)&lt;br /&gt;
| [[8.1.0-0_New3DS|v8]], [[9.0.0-20|v1024]]&lt;br /&gt;
| [[8.1.0-0_New3DS|v4]]&lt;br /&gt;
| [[8.1.0-0_New3DS|v5]]&lt;br /&gt;
| N/A&lt;br /&gt;
| N/A&lt;br /&gt;
| N/A&lt;br /&gt;
| Available&lt;br /&gt;
|-&lt;br /&gt;
| 2002C800&lt;br /&gt;
| 2002CF00&lt;br /&gt;
| 2002D000&lt;br /&gt;
| N/A&lt;br /&gt;
| 2002D700&lt;br /&gt;
| N/A&lt;br /&gt;
| CTR-P-CTAP&lt;br /&gt;
| [[New_3DS]] HOME menu digital manual&lt;br /&gt;
| [[8.1.0-0_New3DS|v2]], [[9.0.0-20|v18]], [[9.3.0-21|v34]], [[9.6.0-24|v50]]&lt;br /&gt;
| [[8.1.0-0_New3DS|v1]], [[9.3.0-21|v17]], [[9.6.0-24|v34]], [[11.4.0-37|v48]](New2DSXL)&lt;br /&gt;
| [[8.1.0-0_New3DS|v1]], [[9.3.0-21|v18]], [[9.6.0-24|v33]]&lt;br /&gt;
| N/A&lt;br /&gt;
| [[9.6.0-24|v2]]&lt;br /&gt;
| N/A&lt;br /&gt;
| Stubbed&lt;br /&gt;
|-&lt;br /&gt;
| 2002C900&lt;br /&gt;
| 2002D100&lt;br /&gt;
| 2002D200&lt;br /&gt;
| N/A&lt;br /&gt;
| 2002D800&lt;br /&gt;
| N/A&lt;br /&gt;
| CTR-P-CTAP&lt;br /&gt;
| [[New_3DS]] Friends list digital manual&lt;br /&gt;
| [[8.1.0-0_New3DS|v1]]&lt;br /&gt;
| Same as JPN.&lt;br /&gt;
| [[8.1.0-0_New3DS|v0]], [[9.3.0-21|v16]]&lt;br /&gt;
| N/A&lt;br /&gt;
| [[9.6.0-24|v2]]&lt;br /&gt;
| N/A&lt;br /&gt;
| Stubbed&lt;br /&gt;
|-&lt;br /&gt;
| 2002CA00&lt;br /&gt;
| 2002D300&lt;br /&gt;
| 2002D400&lt;br /&gt;
| N/A&lt;br /&gt;
| 2002D900&lt;br /&gt;
| N/A&lt;br /&gt;
| CTR-P-CTAP&lt;br /&gt;
| [[New_3DS]] Notifications digital manual&lt;br /&gt;
| [[8.1.0-0_New3DS|v0]], v1([[Home_Menu|JPN-only]] Oct 2, 2014 &amp;quot;sysupdate&amp;quot;, actually uploaded on 09-29-14. Identical to v0, same TMDs besides title-versions)&lt;br /&gt;
| [[8.1.0-0_New3DS|v2]]&lt;br /&gt;
| [[8.1.0-0_New3DS|v0]]&lt;br /&gt;
| N/A&lt;br /&gt;
| [[9.6.0-24|v2]]&lt;br /&gt;
| N/A&lt;br /&gt;
| Stubbed&lt;br /&gt;
|-&lt;br /&gt;
| 2002CB00&lt;br /&gt;
| 2002D500&lt;br /&gt;
| 2002D600&lt;br /&gt;
| N/A&lt;br /&gt;
| 2002DA00&lt;br /&gt;
| N/A&lt;br /&gt;
| CTR-P-CTAP&lt;br /&gt;
| [[New_3DS]] Game Notes digital manual&lt;br /&gt;
| [[8.1.0-0_New3DS|v0]], [[9.0.0-20|v1]]&lt;br /&gt;
| [[8.1.0-0_New3DS|v2]]&lt;br /&gt;
| Same as EUR.&lt;br /&gt;
| N/A&lt;br /&gt;
| [[9.6.0-24|v1]]&lt;br /&gt;
| N/A&lt;br /&gt;
| Stubbed&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== 0004001B - [[NCCH#CFA|System Data Archives]] ===&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  TitleID Low&lt;br /&gt;
!  Description&lt;br /&gt;
!  Versions&lt;br /&gt;
|-&lt;br /&gt;
| 00010002&lt;br /&gt;
| [[ClCertA]]&lt;br /&gt;
| [[1.0.0-0|v0]]&lt;br /&gt;
|-&lt;br /&gt;
| 00010702&lt;br /&gt;
| [[NS CFA]]&lt;br /&gt;
| [[3.0.0-5|v0]], [[6.0.0-11|v1028]], [[6.3.0-12|v2048]], [[7.0.0-13|v3073]], [[9.0.0-20|v4096]](also for [[8.1.0-0_New3DS]])&lt;br /&gt;
|-&lt;br /&gt;
| 00010802&lt;br /&gt;
| This CFA only contains a 1-byte &amp;quot;dummy.txt&amp;quot; in the RomFS, which contains &#039;0&#039;.&lt;br /&gt;
| [[6.3.0-12|v0]], [[9.5.0-23|v1024]], [[10.5.0-30|v2048]], [[11.0.0-33|v3072]]&lt;br /&gt;
|-&lt;br /&gt;
| 00018002&lt;br /&gt;
| Same contents as 00010802. Starting with [[7.1.0-15]], the &amp;quot;dummy.txt&amp;quot; file was removed from RomFS: this CFA RomFS now contains web-browser data(similar to 00018102) for NNID / networking, etc.&lt;br /&gt;
| [[7.0.0-13|v14]], [[7.1.0-15|v1025]], [[7.2.0-17|v2055]], [[9.0.0-20|v3078]], [[9.3.0-21|v4096]], [[9.6.0-24|v5120]]&lt;br /&gt;
|-&lt;br /&gt;
| 00018102&lt;br /&gt;
| This contains local web-browser data(html/js, gfx, etc) for the Miiverse Offline-mode.&lt;br /&gt;
| [[7.0.0-13|v11]], [[9.0.0-20|v1025]](also for [[8.1.0-0_New3DS]])&lt;br /&gt;
|-&lt;br /&gt;
| 00018202&lt;br /&gt;
| This contains the webkit/OSS [[CRO0|CROs]] used with the Miiverse applet and the &amp;quot;act&amp;quot; application.&lt;br /&gt;
| [[7.0.0-13|v7]], [[8.1.0-0_New3DS|v1026]]([[8.1.0-0_New3DS]]), [[9.0.0-20|v2050]]&lt;br /&gt;
|-&lt;br /&gt;
| 00019002&lt;br /&gt;
| [[Fangate_updater]]&lt;br /&gt;
| [[9.3.0-21|v2]], [[9.6.0-24|v1026]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== 00040030 - System Applets===&lt;br /&gt;
==== System Applet Notes ====&lt;br /&gt;
Most of these processes are applets, see [[NS_and_APT_Services|here]] for details.&lt;br /&gt;
All of the below processes use the &amp;quot;SYSTEM&amp;quot; [[SVC|memory-region]].&lt;br /&gt;
The ExeFS for Home Menu is exactly the same for USA/EUR/JPN.&lt;br /&gt;
The Miiverse applet seems to use a web browser with webkit.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  JPN TitleIDLow&lt;br /&gt;
!  USA TitleIDLow&lt;br /&gt;
!  EUR TitleIDLow&lt;br /&gt;
!  CHN TitleIDLow&lt;br /&gt;
!  KOR TitleIDLow&lt;br /&gt;
!  TWN TitleIDLow&lt;br /&gt;
!  [[Product code]]&lt;br /&gt;
!  Description&lt;br /&gt;
!  JPN Versions&lt;br /&gt;
!  USA Versions&lt;br /&gt;
!  EUR Versions&lt;br /&gt;
|-&lt;br /&gt;
|colspan=6 align=center| 00008102&lt;br /&gt;
| CTR-P-CTAP&lt;br /&gt;
| [[NS#Alternate menu|Test Menu]] (Demo1)&lt;br /&gt;
|colspan=3 align=center| ..., v64, ..., v27648&lt;br /&gt;
|-&lt;br /&gt;
| 00008202&lt;br /&gt;
| 00008F02&lt;br /&gt;
| 00009802&lt;br /&gt;
| 0000A102&lt;br /&gt;
| 0000A902&lt;br /&gt;
| 0000B102&lt;br /&gt;
| CTR-P-HMM?&lt;br /&gt;
| [[Home Menu]] (menu)&lt;br /&gt;
| [[1.0.0-0|v0]], [[2.0.0-2|v1027]], [[2.1.0-3|v2049]], [[2.2.0-X|v3075]], [[3.0.0-5|v4111]], [[4.0.0-7|v5131]], [[4.2.0-9|v6146]], [[5.0.0-11|v7172]], [[6.0.0-11|v8198]], [[7.0.0-13|v9230]], [[8.1.0-0_New3DS|v10250]]([[8.1.0-0_New3DS]]), [[9.0.0-20|v13313]], [[9.1.0-20J|v14336]], [[9.2.0-20|v15360]], [[9.3.0-21|v16402]], [[9.4.0-21|v17408]], [[9.5.0-22|v18432]], [[9.6.0-24|v19476]], [[9.7.0-25|v20487]], [[9.8.0-25|v22528]], [[10.1.0-27|v23552]], [[10.2.0-28|v24576]], [[10.3.0-28|v25600]], [[10.4.0-29|v26626]], [[10.6.0-31|v27648]], [[11.1.0-34|v28672]], [[11.3.0-36|v29696]], [[11.5.0-38|v30721]]&lt;br /&gt;
| [[1.0.0-0|v0]], [[2.0.0-2|v1027]], [[2.1.0-3|v2049]], [[2.2.0-X|v3075]], [[3.0.0-5|v4111]], [[4.0.0-7|v5131]], [[4.2.0-9|v6146]], [[5.0.0-11|v7172]], [[6.0.0-11|v8198]], [[7.0.0-13|v9230]], [[9.0.0-20|v11272]], [[9.2.0-20|v12288]], [[9.3.0-21|v13330]], [[9.4.0-21|v14336]], [[9.5.0-22|v15360]], [[9.6.0-24|v16404]], [[9.7.0-25|v17415]], [[9.8.0-25|v19456]], [[9.9.0-26|v20480]], [[10.1.0-27|v21504]], [[10.2.0-28|v22528]], [[10.3.0-28|v23552]], [[10.4.0-29|v24578]], [[10.6.0-31|v25600]], [[11.1.0-34|v26624]], [[11.3.0-36|v27648]], [[11.5.0-38|v28673]]&lt;br /&gt;
| [[1.0.0-0|v0]], [[2.0.0-2|v1027]], [[2.1.0-3|v2049]], [[2.2.0-X|v3075]], [[3.0.0-5|v4111]], [[4.0.0-7|v5131]], [[4.2.0-9|v6146]], [[5.0.0-11|v7172]], [[6.0.0-11|v8198]], [[7.0.0-13|v9230]], [[9.0.0-20|v11272]], [[9.2.0-20|v12288]], [[9.3.0-21|v13330]], [[9.4.0-21|v14336]], [[9.5.0-22|v15360]], [[9.6.0-24|v16404]], [[9.7.0-25|v17415]], [[9.8.0-25|v19456]], [[10.1.0-27|v20480]], [[10.2.0-28|v21504]], [[10.3.0-28|v22528]], [[10.4.0-29|v23554]], [[10.6.0-31|v24576]], [[11.1.0-34|v25600]], [[11.3.0-36|v26624]], [[11.4.0-37|v27649]](New2DSXL), [[11.5.0-38|v27649]]&lt;br /&gt;
|-&lt;br /&gt;
| 00008402&lt;br /&gt;
| 00009002&lt;br /&gt;
| 00009902&lt;br /&gt;
| 0000A202&lt;br /&gt;
| 0000AA02&lt;br /&gt;
| 0000B202&lt;br /&gt;
| CTR-N-HCS?&lt;br /&gt;
| Camera applet used by Home-menu (CtrApp)&lt;br /&gt;
|colspan=3| v0, v1036, [[9.0.0-20|v2049]](Also for [[8.1.0-0_New3DS]])&lt;br /&gt;
|-&lt;br /&gt;
| 00008502&lt;br /&gt;
| 00009102&lt;br /&gt;
| 00009A02&lt;br /&gt;
| ?&lt;br /&gt;
| ?&lt;br /&gt;
| ?&lt;br /&gt;
| ?&lt;br /&gt;
| Not available on CDN&lt;br /&gt;
| ?&lt;br /&gt;
| ?&lt;br /&gt;
| ?&lt;br /&gt;
|-&lt;br /&gt;
| 00008602&lt;br /&gt;
| 00009202&lt;br /&gt;
| 00009B02&lt;br /&gt;
| 0000A402&lt;br /&gt;
| 0000AC02&lt;br /&gt;
| 0000B402&lt;br /&gt;
| CTR-N-HMV?&lt;br /&gt;
| Instruction Manual, applet for displaying instruction manuals&lt;br /&gt;
|colspan=3| v0, v1026, v2048, v3072, [[5.0.0-11|v4097]], [[9.0.0-20|v5120]](Also for [[8.1.0-0_New3DS]])&lt;br /&gt;
|-&lt;br /&gt;
| 00008702&lt;br /&gt;
| 00009302&lt;br /&gt;
| 00009C02&lt;br /&gt;
| 0000A502&lt;br /&gt;
| 0000AD02&lt;br /&gt;
| 0000B502&lt;br /&gt;
| CTR-N-HGM?&lt;br /&gt;
| Game Notes (Cherry)&lt;br /&gt;
|colspan=3| v0, v1026, v2049, [[5.0.0-11|v3073]], [[9.0.0-20|v4096]](Also for [[8.1.0-0_New3DS]])&lt;br /&gt;
|-&lt;br /&gt;
| 00008802&lt;br /&gt;
| 00009402&lt;br /&gt;
| 00009D02&lt;br /&gt;
| 0000A602&lt;br /&gt;
| 0000AE02&lt;br /&gt;
| 0000B602&lt;br /&gt;
| &lt;br /&gt;
| [[Internet Browser]] (spider)&lt;br /&gt;
|colspan=3| [[2.0.0-2|v6]], [[2.1.0-4|v1024]], [[4.0.0-7|v2050]], [[5.0.0-11|v3074 (EUR)/v3075(USA,JAP)]], [[7.0.0-13|v3088]], [[7.1.0-16|v4096]], [[9.5.0-23|v5121]], [[9.9.0-26|v6149]], [[10.2.0-28|v7168]], [[10.6.0-31|v8192]], [[10.7.0-32|v9232]], [[11.1.0-34|v10240]], [[11.9.0-42|v11297]]&lt;br /&gt;
|-&lt;br /&gt;
| 20008802&lt;br /&gt;
| 20009402&lt;br /&gt;
| 20009D02&lt;br /&gt;
| ?&lt;br /&gt;
| 2000AE02&lt;br /&gt;
| N/A&lt;br /&gt;
| CTR-N-HBR?&lt;br /&gt;
| [[New 3DS]] [[Internet Browser]] (SKATER)&lt;br /&gt;
|colspan=3| [[8.1.0-0_New3DS|v10]], [[9.3.0-21|v1027]], [[9.6.0-24|v2051]], [[9.9.0-26|v3077]], [[10.2.0-28|v4096]], [[10.4.0-29|v5121]], [[10.6.0-31|v6144]], [[10.7.0-32|v7184]], [[11.1.0-34|v8192]], [[11.9.0-42|v10272]]&lt;br /&gt;
|-&lt;br /&gt;
|colspan=6| 00008A02&lt;br /&gt;
| &lt;br /&gt;
| Fatal error viewer ([[ErrDisp]])&lt;br /&gt;
|colspan=3| v0, v1025, [[2.2.0-X|v2048]], [[3.0.0-5|v3072]], [[4.0.0-7|v4096]], [[5.0.0-11|v5121]], [[8.0.0-18|v6144]], [[9.0.0-20|v7168]](Also for [[8.1.0-0_New3DS]])&lt;br /&gt;
|-&lt;br /&gt;
|colspan=6| 00008A03&lt;br /&gt;
| &lt;br /&gt;
| SAFE_MODE [[ErrDisp]]&lt;br /&gt;
|colspan=3| v0&lt;br /&gt;
|-&lt;br /&gt;
| 20008A03&lt;br /&gt;
| 20008A03&lt;br /&gt;
| 20008A03&lt;br /&gt;
| ?&lt;br /&gt;
| 20008A03&lt;br /&gt;
| N/A&lt;br /&gt;
| &lt;br /&gt;
| [[New_3DS]] SAFE_MODE [[ErrDisp]]&lt;br /&gt;
|colspan=3| [[8.1.0-0_New3DS|v7169]]&lt;br /&gt;
|-&lt;br /&gt;
| 00008D02&lt;br /&gt;
| 00009602&lt;br /&gt;
| 00009F02&lt;br /&gt;
| 0000A702&lt;br /&gt;
| 0000AF02&lt;br /&gt;
| 0000B702&lt;br /&gt;
| CTR-N-HFR?&lt;br /&gt;
| Friend List (friend)&lt;br /&gt;
|colspan=3| v0, v1026, [[2.2.0-X|v2051]], v3082, v4099, [[7.0.0-13|v5120]], [[9.0.0-20|v6144]](Also for [[8.1.0-0_New3DS]]) (EUR v6, v1024, v3082, v4099, [[7.0.0-13|v5120]], [[9.0.0-20|v6144]])&lt;br /&gt;
|-&lt;br /&gt;
| 00008E02&lt;br /&gt;
| 00009702&lt;br /&gt;
| 0000A002&lt;br /&gt;
| 0000A802&lt;br /&gt;
| 0000B002&lt;br /&gt;
| 0000B802&lt;br /&gt;
| CTR-N-HCR?&lt;br /&gt;
| Notifications (newslist)&lt;br /&gt;
|colspan=3| v0, v1029, v2054, v3075, [[9.0.0-20|v4097]] (EUR v6, v1024, v2054, v3075, [[9.0.0-20|v4097]]) (JPN: ..., [[8.1.0-0_New3DS|v4096]], [[9.0.0-20|v5121]])&lt;br /&gt;
|-&lt;br /&gt;
| 0000C002&lt;br /&gt;
| 0000C802&lt;br /&gt;
| 0000D002&lt;br /&gt;
| 0000D802&lt;br /&gt;
| 0000DE02&lt;br /&gt;
| 0000E402&lt;br /&gt;
| CTR-N-HKY?&lt;br /&gt;
| Software Keyboard (swkbd)&lt;br /&gt;
|colspan=3| v0, v1026, v2053, [[7.0.0-13|v3072]], [[9.0.0-20|v4096]](Also for [[8.1.0-0_New3DS]])&lt;br /&gt;
|-&lt;br /&gt;
| 0000C003&lt;br /&gt;
| 0000C803&lt;br /&gt;
| 0000D003&lt;br /&gt;
| 0000D803&lt;br /&gt;
| 0000DE03&lt;br /&gt;
| 0000E403&lt;br /&gt;
| &lt;br /&gt;
| SAFE_MODE Software Keyboard (swkbd)&lt;br /&gt;
|colspan=3| v0&lt;br /&gt;
|-&lt;br /&gt;
| 2000C003&lt;br /&gt;
| 2000C803&lt;br /&gt;
| 2000D003&lt;br /&gt;
| ?&lt;br /&gt;
| 2000DE03&lt;br /&gt;
| N/A&lt;br /&gt;
| &lt;br /&gt;
| [[New 3DS]] SAFE_MODE Software Keyboard (swkbd)&lt;br /&gt;
| [[8.1.0-0_New3DS|v1024]]&lt;br /&gt;
|colspan=2|[[9.0.0-20|v0]]&lt;br /&gt;
|-&lt;br /&gt;
| 0000C102&lt;br /&gt;
| 0000C902&lt;br /&gt;
| 0000D102&lt;br /&gt;
| 0000D902&lt;br /&gt;
| 0000DF02&lt;br /&gt;
| 0000E502&lt;br /&gt;
| CTR-N-HMS?&lt;br /&gt;
| Mii picker (appletEd)&lt;br /&gt;
|colspan=3| v0, v1026, [[9.0.0-20|v2048]](Also for [[8.1.0-0_New3DS]]), [[9.3.0-21|v3077]]&lt;br /&gt;
|-&lt;br /&gt;
| 0000C302&lt;br /&gt;
| 0000CB02&lt;br /&gt;
| 0000D302&lt;br /&gt;
| 0000DB02&lt;br /&gt;
| 0000E102&lt;br /&gt;
| 0000E702&lt;br /&gt;
| CTR-N-HCC?&lt;br /&gt;
| Picture picker (PNOTE_AP)&lt;br /&gt;
|colspan=3| v0, v1024, [[8.1.0-0_New3DS|v2049]]([[8.1.0-0_New3DS]]), [[9.0.0-20|v3075]], [[9.3.0-21|v4096]]&lt;br /&gt;
|-&lt;br /&gt;
| 0000C402&lt;br /&gt;
| 0000CC02&lt;br /&gt;
| 0000D402&lt;br /&gt;
| 0000DC02&lt;br /&gt;
| 0000E202&lt;br /&gt;
| 0000E802&lt;br /&gt;
| CTR-N-HMC?&lt;br /&gt;
| [[Nintendo 3DS Sound|Voice memo]] picker (SNOTE_AP)&lt;br /&gt;
|colspan=3| v0, v3, [[8.0.0-18|v1026]], [[9.0.0-20|v2048]](Also for [[8.1.0-0_New3DS]])&lt;br /&gt;
|-&lt;br /&gt;
|colspan=3| 0000C502&lt;br /&gt;
|colspan=3| 0000CF02&lt;br /&gt;
| CTR-N-HEEA&lt;br /&gt;
CTR-N-HEEK&lt;br /&gt;
| Non-critical (online, etc) error display (error)&lt;br /&gt;
|colspan=3| v0, v1026, v2053, v3074, [[8.1.0-0_New3DS|v4096]]([[8.1.0-0_New3DS]]), [[9.0.0-20|v5128]], [[9.6.0-24|v6145]]&lt;br /&gt;
|-&lt;br /&gt;
|colspan=3| 0000C503&lt;br /&gt;
|colspan=3| 0000CF03&lt;br /&gt;
| &lt;br /&gt;
| SAFE_MODE error applet&lt;br /&gt;
|colspan=3| v0&lt;br /&gt;
|-&lt;br /&gt;
| 2000C503&lt;br /&gt;
| 2000C503&lt;br /&gt;
| 2000C503&lt;br /&gt;
| ?&lt;br /&gt;
| 2000CF03&lt;br /&gt;
| N/A&lt;br /&gt;
| &lt;br /&gt;
| [[New 3DS]] SAFE_MODE error applet&lt;br /&gt;
|colspan=3| [[8.1.0-0_New3DS|v1024]]&lt;br /&gt;
|-&lt;br /&gt;
|colspan=3| 0000CD02&lt;br /&gt;
|colspan=3| 0000D502&lt;br /&gt;
| CTR-N-HADA&lt;br /&gt;
CTR-N-HADK&lt;br /&gt;
| [[Circle Pad Pro]] test/calibration applet (extrapad)&lt;br /&gt;
|colspan=3| v1, v1026, [[8.1.0-0_New3DS|v2048]]([[8.1.0-0_New3DS]]), [[9.0.0-20|v3073]], [[11.4.0-37|v4097]](New2DSXL), [[11.5.0-38|v4097]]&lt;br /&gt;
|-&lt;br /&gt;
| 0000C602&lt;br /&gt;
| 0000CE02&lt;br /&gt;
| 0000D602&lt;br /&gt;
| N/A&lt;br /&gt;
| 0000E302&lt;br /&gt;
| 0000E902&lt;br /&gt;
| CTR-N-HAA?&lt;br /&gt;
| eShop applet, used by applications for accessing the eShop, for DLC/etc. Also used by the eShop application itself. (mint)&lt;br /&gt;
|colspan=3| v5, v1028, [[4.2.0-9|v2050]], [[5.0.0-11|v3072]], [[7.0.0-13|v4109]], [[7.2.0-17|v5125]](v5123 for JPN), [[8.0.0-18|v6145]], [[8.1.0-0_New3DS|v7168]]([[8.1.0-0_New3DS]]), [[9.0.0-20|v8200]], [[9.3.0-21|v9224]], [[9.6.0-24|v10247]], [[9.8.0-25|v11264]], [[10.0.0-27|v12293]], [[10.1.0-27|v13312]], [[10.3.0-28|v14337]], [[10.4.0-29|v15360]], [[10.7.0-32|v16384]], [[11.2.0-35|v17408]](EUR), [[11.3.0-36|v18432]], [[11.5.0-38|v19457]]&lt;br /&gt;
|-&lt;br /&gt;
| 0000BC02&lt;br /&gt;
| 0000BD02&lt;br /&gt;
| 0000BE02&lt;br /&gt;
| ?&lt;br /&gt;
| N/A&lt;br /&gt;
| ?&lt;br /&gt;
| CTR-N-HAE?&lt;br /&gt;
| Miiverse (olv)&lt;br /&gt;
|colspan=3| [[7.0.0-13|v14]], [[7.2.0-17|v1024]], [[9.0.0-20|v2048]](Also for [[8.1.0-0_New3DS]]), [[9.3.0-21|v3072]], [[9.6.0-24|v4096]]&lt;br /&gt;
|-&lt;br /&gt;
|colspan=3| 0000F602&lt;br /&gt;
| ?&lt;br /&gt;
| N/A&lt;br /&gt;
| ?&lt;br /&gt;
| CTR-N-HAGA&lt;br /&gt;
| Likely the &amp;quot;system library&amp;quot; for Miiverse (memolib)&lt;br /&gt;
|colspan=3| [[7.0.0-13|v5]], [[8.1.0-0_New3DS|v1024]]([[8.1.0-0_New3DS]]), [[9.0.0-20|v2050]], [[9.3.0-21|v3072]]&lt;br /&gt;
|-&lt;br /&gt;
| 00008302&lt;br /&gt;
| 00008B02&lt;br /&gt;
| 0000BA02&lt;br /&gt;
| ?&lt;br /&gt;
| N/A&lt;br /&gt;
| ?&lt;br /&gt;
| CTR-N-HAH?&lt;br /&gt;
| In-app Miiverse-posting applet (solv3)&lt;br /&gt;
|colspan=3| [[9.0.0-20|v6]]&lt;br /&gt;
|-&lt;br /&gt;
| 00009502&lt;br /&gt;
| 00009E02&lt;br /&gt;
| 0000B902&lt;br /&gt;
| ?&lt;br /&gt;
| 00008C02&lt;br /&gt;
| 0000BF02&lt;br /&gt;
| CTR-N-HA3?&lt;br /&gt;
| Cabinet ([[amiibo Settings]])&lt;br /&gt;
|colspan=3| [[9.3.0-21|v7]], (v1024 for TWN), [[9.6.0-24|v1031]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== 0004009B - [[NCCH#CFA|Shared Data Archives]] ===&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  JPN TitleIDLow&lt;br /&gt;
!  USA TitleIDLow&lt;br /&gt;
!  EUR TitleIDLow&lt;br /&gt;
!  CHN TitleIDLow&lt;br /&gt;
!  KOR TitleIDLow&lt;br /&gt;
!  TWN TitleIDLow&lt;br /&gt;
!  Description&lt;br /&gt;
!  Versions&lt;br /&gt;
|-&lt;br /&gt;
| 00010202&lt;br /&gt;
| 00010202&lt;br /&gt;
| 00010202&lt;br /&gt;
| 00010202&lt;br /&gt;
| 00010202&lt;br /&gt;
| 00010202&lt;br /&gt;
| Probably Mii-related, contains &amp;quot;CFL_Res.dat&amp;quot; in the RomFS.&lt;br /&gt;
| v0&lt;br /&gt;
|-&lt;br /&gt;
| 00010402&lt;br /&gt;
| 00010402&lt;br /&gt;
| 00010402&lt;br /&gt;
| 00010402&lt;br /&gt;
| 00010402&lt;br /&gt;
| 00010402&lt;br /&gt;
| Region Manifest. Mounted as &amp;quot;area:&amp;quot;&lt;br /&gt;
| v0, v1024, v2050, v3072, [[7.0.0-13|v4098]], [[9.6.0-24|v5122]]&lt;br /&gt;
|-&lt;br /&gt;
| 00010602&lt;br /&gt;
| 00010602&lt;br /&gt;
| 00010602&lt;br /&gt;
| 00010602&lt;br /&gt;
| 00010602&lt;br /&gt;
| 00010602&lt;br /&gt;
| Non-Nintendo TLS Root-CA Certificates (RomFS contains files with filename &amp;quot;CACERT_PUBLIC_CA_&amp;lt;val&amp;gt;.der&amp;quot;, where &amp;lt;val&amp;gt; is 5..8)&lt;br /&gt;
| v2, [[10.5.0-30|v1024]]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| 00011002&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|  &amp;quot;CHN/CN&amp;quot; Dictionary.&lt;br /&gt;
|  v1&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| 00011102  &lt;br /&gt;
| &amp;quot;TWN/TN&amp;quot; dictionary.&lt;br /&gt;
| v1&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| 00011202&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|  &lt;br /&gt;
| &amp;quot;NL/NL&amp;quot; dictionary.&lt;br /&gt;
| v0&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| 00011302&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|  &lt;br /&gt;
| &amp;quot;EN/GB&amp;quot; dictionary.&lt;br /&gt;
| v0&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
| 00011402&lt;br /&gt;
|&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|&lt;br /&gt;
| &amp;quot;EN/US&amp;quot; dictionary.&lt;br /&gt;
| v0&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| 00011502&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| &lt;br /&gt;
| &amp;quot;FR/FR/regular&amp;quot; dictionary.&lt;br /&gt;
| v0&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
| 00011602&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| &lt;br /&gt;
|  &lt;br /&gt;
| &amp;quot;FR/CA/regular&amp;quot; dictionary.&lt;br /&gt;
| v0&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| 00011702&lt;br /&gt;
|&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &amp;quot;DE/regular&amp;quot; dictionary.&lt;br /&gt;
| v0&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| 00011802&lt;br /&gt;
|&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &amp;quot;IT/IT&amp;quot; dictionary.&lt;br /&gt;
| v0&lt;br /&gt;
|-&lt;br /&gt;
| 00011902&lt;br /&gt;
| &lt;br /&gt;
|&lt;br /&gt;
| &lt;br /&gt;
|&lt;br /&gt;
|  &lt;br /&gt;
| &amp;quot;JA_small/32&amp;quot; dictionary.&lt;br /&gt;
| v0&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| 00011A02&lt;br /&gt;
|  &lt;br /&gt;
| &amp;quot;KO/KO&amp;quot; dictionary.&lt;br /&gt;
| v1&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| 00011B02&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| &lt;br /&gt;
| &amp;quot;PT/PT/regular&amp;quot; dictionary.&lt;br /&gt;
| v0&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| 00011C02&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| &lt;br /&gt;
| &amp;quot;RU/regular&amp;quot; dictionary.&lt;br /&gt;
| v0&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
| 00011D02&lt;br /&gt;
| 00011D02&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| &lt;br /&gt;
| &amp;quot;ES/ES&amp;quot; dictionary.&lt;br /&gt;
| v0&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
| 00011E02&lt;br /&gt;
|&lt;br /&gt;
| &lt;br /&gt;
|&lt;br /&gt;
| &lt;br /&gt;
| &amp;quot;PT/BR/regular&amp;quot; dictionary.&lt;br /&gt;
| v0&lt;br /&gt;
|-&lt;br /&gt;
| 00012202&lt;br /&gt;
| 00012302&lt;br /&gt;
| 00012102&lt;br /&gt;
| 00012402&lt;br /&gt;
| 00012502&lt;br /&gt;
| 00012602&lt;br /&gt;
| ?contains a lists with error strings&lt;br /&gt;
| v1026, v2053, v3073, [[4.2.0-9|v4096]], [[5.0.0-11|v5120]], [[7.0.0-13|v6149]], [[7.2.0-17|v7168]], [[8.0.0-18|v8192]], [[9.0.0-20|v9218]], [[9.3.0-21|v10242]], [[9.6.0-24|v11269]], [[10.0.0-27|v12289]], [[10.4.0-29|v13312]], [[10.7.0-32|v13313]] (JPN: [[11.1.0-34|v14336]]) (KOR: [[9.6.0-24|v6148]], [[10.0.0-27|v7169]], [[10.3.0-28|v8193]], [[10.4.0-29|v9216]], [[11.1.0-34|v10240]])&lt;br /&gt;
|-&lt;br /&gt;
| 00013202&lt;br /&gt;
| 00013302&lt;br /&gt;
| 00013102&lt;br /&gt;
| 00013502&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| Mounted as &amp;quot;eula:&amp;quot;&lt;br /&gt;
| v0, v1024, v2049 USA: v1024, v2051, [[7.0.0-13|v3074]], [[7.2.0-17|v4100]](EUR-only), [[9.0.0-20|v4099]], [[9.9.0-26|v6144]], [[10.4.0-29|v7168]] (KOR: [[9.7.0-25|v1025]])&lt;br /&gt;
|-&lt;br /&gt;
| 00014002&lt;br /&gt;
| 00014002&lt;br /&gt;
| 00014002&lt;br /&gt;
| 00014002&lt;br /&gt;
| 00014002&lt;br /&gt;
| 00014002&lt;br /&gt;
| JPN/EUR/USA [[System Font]] (&amp;quot;font:&amp;quot;)&lt;br /&gt;
| v0&lt;br /&gt;
|-&lt;br /&gt;
| 00014102&lt;br /&gt;
| 00014102&lt;br /&gt;
| 00014102&lt;br /&gt;
| 00014102&lt;br /&gt;
| 00014102&lt;br /&gt;
| 00014102&lt;br /&gt;
| CHN [[System Font]] (&amp;quot;font:&amp;quot;)&lt;br /&gt;
| v0, v1024&lt;br /&gt;
|-&lt;br /&gt;
| 00014202&lt;br /&gt;
| 00014202&lt;br /&gt;
| 00014202&lt;br /&gt;
| 00014202&lt;br /&gt;
| 00014202&lt;br /&gt;
| 00014202&lt;br /&gt;
| KOR [[System Font]] (&amp;quot;font:&amp;quot;)&lt;br /&gt;
| v0, v1024&lt;br /&gt;
|-&lt;br /&gt;
| 00014302&lt;br /&gt;
| 00014302&lt;br /&gt;
| 00014302&lt;br /&gt;
| 00014302&lt;br /&gt;
| 00014302&lt;br /&gt;
| 00014302&lt;br /&gt;
| TWN [[System Font]] (&amp;quot;font:&amp;quot;)&lt;br /&gt;
| v0, v1024&lt;br /&gt;
|-&lt;br /&gt;
| 00015202&lt;br /&gt;
| 00015302&lt;br /&gt;
| 00015102&lt;br /&gt;
| N/A&lt;br /&gt;
| 00015502&lt;br /&gt;
| 0015602&lt;br /&gt;
| Mounted as &amp;quot;rate:&amp;quot;&lt;br /&gt;
| v0 (EUR: v0, v1024) (KOR: v1024)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== 000400DB - [[NCCH#CFA|System Data Archives]] ===&lt;br /&gt;
==== System Data Archive Notes ====&lt;br /&gt;
These [[NVer]] titleIDs can be found @ offset 0x320 in every [[CCI]].&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  EUR TitleIDLow&lt;br /&gt;
!  JPN TitleIDLow&lt;br /&gt;
!  USA TitleIDLow&lt;br /&gt;
!  CHN TitleIDLow&lt;br /&gt;
!  KOR TitleIDLow&lt;br /&gt;
!  TWN TitleIDLow&lt;br /&gt;
!  Description&lt;br /&gt;
!  USA/EUR/JPN Versions&lt;br /&gt;
!  CHN Versions&lt;br /&gt;
!  TWN Versions&lt;br /&gt;
!  KOR Versions&lt;br /&gt;
|-&lt;br /&gt;
| 00010302&lt;br /&gt;
| 00010302&lt;br /&gt;
| 00010302&lt;br /&gt;
| 00010302&lt;br /&gt;
| 00010302&lt;br /&gt;
| 00010302&lt;br /&gt;
| NGWord bad word list&lt;br /&gt;
|colspan=4| [[1.0.0-0|v0]], [[2.0.0-2|v1024]], [[3.0.0-5|v2052]], [[4.0.0-7|v3072]], [[4.3.0-10|v4096]], [[5.0.0-11|v5120]], [[9.0.0-20|v6144]], [[9.3.0-21|v7168]], [[9.6.0-24|v8192]], [[11.1.0-34|v9217]]&lt;br /&gt;
|-&lt;br /&gt;
| 00010502&lt;br /&gt;
| 00010502&lt;br /&gt;
| 00010502&lt;br /&gt;
| 00010502&lt;br /&gt;
| 00010502&lt;br /&gt;
| 00010502&lt;br /&gt;
| [[Nintendo Zone]] hotspot list&lt;br /&gt;
|colspan=4| [[1.0.0-0|v0]], [[2.0.0-2|v1024]], [[3.0.0-5|v2048]], [[4.0.0-7|v3073]], [[4.3.0-10|v4096]], [[4.4.0-10|v5120]], [[4.5.0-10|v6144]], [[5.0.0-11|v7169]], [[6.0.0-11|v8192]], [[6.2.0-12|v9216]], [[7.0.0-13|v10242]], [[7.2.0-17|v11267]], [[8.0.0-18|v12288]], [[9.0.0-20|v14336]], [[9.3.0-21|v15360]], [[9.6.0-24|v16386]], [[10.0.0-27|v17409]], [[10.4.0-29|v18432]], [[11.1.0-34|v19457]], [[11.5.0-38|v20480]], [[11.9.0-42|v22528]]&lt;br /&gt;
|-&lt;br /&gt;
| 00016102&lt;br /&gt;
| 00016202&lt;br /&gt;
| 00016302&lt;br /&gt;
| 00016402&lt;br /&gt;
| 00016502&lt;br /&gt;
| 00016602&lt;br /&gt;
| [[NVer]]&lt;br /&gt;
| [[1.0.0-0|v0]], [[1.1.0-1|v16]], [[2.0.0-2|v32]], [[2.1.0-3|v48]], [[2.1.0-4|v64]], [[3.0.0-5|v80]], [[3.0.0-6|v96]], [[4.0.0-7|v112]],  [[4.1.0-8|v128]], [[4.2.0-9|v144]], [[4.3.0-10|v160]], [[5.0.0-11|v176]], non-USA=[[6.0.0-11|v192]]/USA=[[6.1.0-12U|v192]], [[7.0.0-13|v208]], [[7.1.0-14|v224]], [[7.1.0-15|v240]], [[7.1.0-16|v256]], [[7.2.0-17|v272]], [[8.0.0-18|v288]], [[8.1.0-19|v304]], [[9.0.0-20|v320]], [[9.3.0-21|v336]], [[9.5.0-22|v352]], [[9.5.0-23|v368]], [[9.6.0-24|v384]], [[9.7.0-25|v400]], [[9.9.0-26|v416]], [[10.0.0-27|v432]], [[10.2.0-28|v448]], [[10.4.0-29|v464]], [[10.5.0-30|v480]], [[10.6.0-31|v496]], [[10.7.0-32|v512]], [[11.0.0-33|v528]], [[11.1.0-34|v544]], [[11.2.0-35|v560]], [[11.3.0-36|v576]], [[11.5.0-38|v608]], ..., [[11.9.0-42|v672]]&lt;br /&gt;
| [[4.0.0-7|v113]], [[4.2.0-9|v128]], [[5.0.0-11|v129]], [[7.1.0-16|v130]], [[7.2.0-17|v272]], [[9.5.0-23|v131]], [[9.9.0-26|v132]]&lt;br /&gt;
| [[4.1.0-8|v114]], [[4.2.0-9|v133]], [[4.3.0-10|v134]], [[5.0.0-11|v136]], [[7.0.0-13|v144]], [[7.1.0-14|v160]] [[7.1.0-16|v192]], [[7.2.0-17|v272]], [[8.0.0-18|v208]], [[8.1.0-19|v224]], [[9.0.0-20|v240]], [[9.5.0-22|v272]], [[9.5.0-23|v288]], [[9.6.0-24|v304]], [[9.7.0-25|v320]], [[9.9.0-26|v336]], [[10.0.0-27|v352]], [[10.2.0-28|v368]], [[10.4.0-29|v384]], [[10.5.0-30|v400]], [[10.6.0-31|v416]], [[10.7.0-32|v432]], [[11.0.0-33|v448]], [[11.1.0-34|v464]], [[11.2.0-35|v480]], [[11.3.0-36|v496]], ..., [[11.9.0-42|v544]]&lt;br /&gt;
| [[4.0.0-7|v113]], [[4.1.0-8|v114]], [[4.2.0-9|v133]], [[4.3.0-10|v134]], [[5.0.0-11|v136]], [[7.0.0-13|v160]], [[7.1.0-14|v176]], [[7.1.0-16|v176]], [[7.2.0-17|v272]], [[8.0.0-18|v224]], [[8.1.0-19|v240]], [[9.0.0-20|v256]], [[9.3.0-21|v272]], [[9.5.0-22|v288]], [[9.5.0-23|v304]], [[9.6.0-24|v320]], [[9.7.0-25|v336]], [[9.9.0-26|v352]], [[10.0.0-27|v368]], [[10.2.0-28|v384]], [[10.4.0-29|v400]], [[10.5.0-30|v416]], [[10.6.0-31|v432]], [[10.7.0-32|v448]], [[11.0.0-33|v464]], [[11.1.0-34|v480]], [[11.2.0-35|v496]], [[11.3.0-36|v512]], ..., [[11.9.0-42|v576]]&lt;br /&gt;
|-&lt;br /&gt;
| 20016102&lt;br /&gt;
| 20016202&lt;br /&gt;
| 20016302&lt;br /&gt;
| N/A&lt;br /&gt;
| 20016502&lt;br /&gt;
| N/A&lt;br /&gt;
| [[New_3DS]] [[NVer]]&lt;br /&gt;
| [[8.1.0-0_New3DS|v0]], [[9.0.0-20|v320]], [[9.3.0-21|v336]], [[9.5.0-22|v352]], [[9.5.0-22|v352]], [[9.5.0-23|v368]], [[9.6.0-24|v384]], [[9.7.0-25|v400]], [[9.9.0-26|v416]], [[10.0.0-27|v432]], [[10.2.0-28|v448]], [[10.4.0-29|v464]], [[10.5.0-30|v480]], [[10.6.0-31|v496]], [[10.7.0-32|v512]], [[11.0.0-33|v528]], [[11.1.0-34|v544]], [[11.2.0-35|v560]], [[11.3.0-36|v576]], ..., [[11.9.0-42|v672]]&lt;br /&gt;
| N/A&lt;br /&gt;
| N/A&lt;br /&gt;
| [[9.6.0-24|v320]], [[9.7.0-25|v336]], [[9.9.0-26|v352]], [[10.0.0-27|v368]], [[10.2.0-28|v384]], [[10.4.0-29|v400]], [[10.5.0-30|v416]], [[10.6.0-31|v432]], [[10.7.0-32|v448]], [[11.0.0-33|v464]], [[11.2.0-35|v496]], [[11.3.0-36|v512]], ..., [[11.9.0-42|v576]]&lt;br /&gt;
|-&lt;br /&gt;
| 00017102&lt;br /&gt;
| 00017202&lt;br /&gt;
| 00017302&lt;br /&gt;
| 00017402&lt;br /&gt;
| 00017502&lt;br /&gt;
| 00017602&lt;br /&gt;
| [[CVer]]&lt;br /&gt;
| [[1.0.0-0|v1024]], [[1.1.0-1|v1045]], [[2.0.0-2|v2049]], [[2.1.0-3|v2069]], [[2.2.0-X|v2088]] [[3.0.0-5|v3088]], [[4.0.0-7|v4098]], [[4.1.0-8|v4113]], [[4.2.0-9|v4130]], [[4.3.0-10|v4145]], [[4.4.0-10|v4163]], [[4.5.0-10|v4176]], [[5.0.0-11|v5120]], [[5.1.0-11|v5136]], [[6.0.0-11|v6146]], [[6.1.0-11|v6160]], [[6.2.0-12|v6178]], [[6.3.0-12|v6192]], [[7.0.0-13|v7175]], [[7.1.0-14|v7187]], [[7.2.0-17|v7203]], [[8.0.0-18|v8196]], [[8.1.0-18|v8208]], [[8.1.0-0_New3DS|v8215]](8.1.0-0_New3DS), [[9.0.0-20|v9218]], [[9.1.0-20J|v9232]](JPN-only), [[9.2.0-20|v9248]], [[9.3.0-21|v9264]], [[9.4.0-21|v9280]], [[9.5.0-22|v9296]], [[9.6.0-24|v9319]], [[9.7.0-25|v9328]], [[9.8.0-25|v9344]], [[9.9.0-26|v9360]], [[10.0.0-27|v10240]], [[10.1.0-27|v10256]], [[10.2.0-28|v10272]], [[10.3.0-28|v10288]], [[10.4.0-29|v10304]], [[10.5.0-30|v10320]], [[10.6.0-31|v10336]], [[10.7.0-32|v10352]], [[11.0.0-33|v11264]], [[11.1.0-34|v11280]], [[11.2.0-35|v11296]], [[11.3.0-36|v11312]], [[11.4.0-37|...]], [[11.5.0-38|v11344]], ..., [[11.9.0-42|v11408]]&lt;br /&gt;
| [[1.0.0-0|v1024]], [[1.1.0-1|v1045]], [[2.0.0-2|v2049]], [[2.1.0-3|v2069]], [[2.2.0-X|v2088]] [[3.0.0-5|v3088]], [[4.0.0-7|v4098]], [[4.1.0-8|v4113]], [[4.2.0-9|v4130]], [[4.3.0-10|v4145]], [[4.4.0-10|v4163]], [[4.5.0-10|v4176]], [[5.0.0-11|v5120]], [[5.1.0-11|v5136]], [[6.0.0-11|v6146]], [[6.1.0-11|v6160]], [[6.2.0-12|v6178]], [[6.3.0-12|v6192]], [[7.0.0-13|v7175]], [[7.1.0-14|v7187]], [[7.2.0-17|v7203]], [[8.0.0-18|v8196]], [[8.1.0-18|v8208]], [[9.0.0-20|v9217]], [[9.3.0-21|v9264]], [[9.5.0-22|v9296]], [[9.6.0-24|v9319]], [[9.7.0-25|v9328]], [[9.8.0-25|v9344]], [[9.9.0-26|v9360]], [[10.0.0-27|v10240]], [[10.2.0-28|v10272]], [[10.4.0-29|v10304]], [[10.5.0-30|v10320]], [[10.6.0-31|v10336]], [[10.7.0-32|v10352]], [[11.2.0-35|v11296]], [[11.3.0-36|v11312]], ..., [[11.9.0-42|v11408]]&lt;br /&gt;
| Same as CHN&lt;br /&gt;
| Same as CHN + [[11.1.0-34|v11280]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== 00040130 - System [[Services API|Modules]] ===&lt;br /&gt;
==== System Module Notes ====&lt;br /&gt;
Once Home Menu finishes loading, all of the below system modules are running, except for MP, RO, and act which are automatically [[Process_Manager_Services|loaded]] when a process requires them. &lt;br /&gt;
When [[Process_Manager_Services|PM]]-module terminates processes, it will check whether the processes listed as dependencies for this process are listed as dependencies for other processes. &lt;br /&gt;
Any processes which are no longer listed in any processes dependencies lists are then terminated. On [[New_3DS]], the only New3DS-specific system-module which automatically gets loaded during system boot is qtm.&lt;br /&gt;
All of the below system modules use the &amp;quot;BASE&amp;quot; [[SVC|memory-region]](specified in the exheader), except when listed otherwise for certain modules.&lt;br /&gt;
When handling the exheader dependency list starting with [[8.0.0-18]], Old3DS FIRM [[Process_Manager_Services|PM]]-module now skips handling titles in this list which have any bits in programID-low bitmask 0xF0000000 set(with [[8.0.0-18]] this is hard-coded). &lt;br /&gt;
The exheader dependency list handling change is for the [[New 3DS]] system-module(s), which do not exist on Old3DS. &lt;br /&gt;
When the New3DS pm-module is launching any title except [[NS]], it first attempts to launch the title with programID-low bitmask 0x20000000 set, then with that bitmask clear if launching fails.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  TitleID Low&lt;br /&gt;
!  Description&lt;br /&gt;
!  Versions&lt;br /&gt;
|-&lt;br /&gt;
| 00001002&lt;br /&gt;
| [[Services|sm]] (Stored in [[FIRM|NATIVE_FIRM]])&lt;br /&gt;
| N/A&lt;br /&gt;
|-&lt;br /&gt;
| 00001003&lt;br /&gt;
| SAFE_MODE [[Services|sm]] (Stored in SAFE_MODE NATIVE_FIRM)&lt;br /&gt;
| N/A&lt;br /&gt;
|-&lt;br /&gt;
| 00001102&lt;br /&gt;
| [[Filesystem services‎|fs]] (Stored in [[FIRM|NATIVE_FIRM]])&lt;br /&gt;
| N/A&lt;br /&gt;
|-&lt;br /&gt;
| 00001103&lt;br /&gt;
| SAFE_MODE [[Filesystem services‎|fs]] (Stored in SAFE_MODE NATIVE_FIRM)&lt;br /&gt;
| N/A&lt;br /&gt;
|-&lt;br /&gt;
| 00001202&lt;br /&gt;
| [[Process Manager Services|pm]] (Stored in [[FIRM|NATIVE_FIRM]])&lt;br /&gt;
| N/A&lt;br /&gt;
|-&lt;br /&gt;
| 00001203&lt;br /&gt;
| SAFE_MODE [[Process Manager Services|pm]] (Stored in SAFE_MODE NATIVE_FIRM)&lt;br /&gt;
| N/A&lt;br /&gt;
|-&lt;br /&gt;
| 00001302&lt;br /&gt;
| [[Loader Services‎|loader]]  (Stored in [[FIRM|NATIVE_FIRM]])&lt;br /&gt;
| N/A&lt;br /&gt;
|-&lt;br /&gt;
| 00001303&lt;br /&gt;
| SAFE_MODE [[Loader Services‎|loader]]  (Stored in SAFE_MODE NATIVE_FIRM)&lt;br /&gt;
| N/A&lt;br /&gt;
|-&lt;br /&gt;
| 00001402&lt;br /&gt;
| [[PXI Services‎|pxi]]  (Stored in [[FIRM|NATIVE_FIRM]])&lt;br /&gt;
| N/A&lt;br /&gt;
|-&lt;br /&gt;
| 00001403&lt;br /&gt;
| SAFE_MODE [[PXI Services‎|pxi]]  (Stored in SAFE_MODE NATIVE_FIRM)&lt;br /&gt;
| N/A&lt;br /&gt;
|-&lt;br /&gt;
| 00001502&lt;br /&gt;
| [[Application Manager Services|AM]] ( Application Manager )&lt;br /&gt;
| [[1.0.0-0|v0]], [[2.0.0-2|v1026]], [[3.0.0-5|v2053]], [[4.0.0-7|v3072]], [[5.0.0-11|v4098]], [[6.0.0-11|v5120]], [[8.0.0-18|v6148]], [[8.1.0-0_New3DS|v7168]]([[8.1.0-0_New3DS]]), [[9.0.0-20|v8192]], [[10.0.0-27|v9217]]&lt;br /&gt;
|-&lt;br /&gt;
| 00001503&lt;br /&gt;
| SAFE_MODE [[Application Manager Services|AM]]&lt;br /&gt;
| [[1.0.0-0|v0]]&lt;br /&gt;
|-&lt;br /&gt;
| 20001503&lt;br /&gt;
| [[New_3DS]] SAFE_MODE [[Application Manager Services|AM]]&lt;br /&gt;
| [[8.1.0-0_New3DS|v7169]]&lt;br /&gt;
|-&lt;br /&gt;
| 00001602&lt;br /&gt;
| [[Camera Services|Camera]]&lt;br /&gt;
| [[1.0.0-0|v0]], [[2.0.0-2|v1026]], [[3.0.0-5|v2048]], [[4.0.0-7|v3074]], [[5.0.0-11|v4098]], [[6.0.0-11|v5120]], [[7.1.0-14|v6146]], [[8.0.0-18|v7172]], [[9.0.0-20|v9216]], [[9.3.0-21|v10242]], [[10.0.0-27|v11265]]&lt;br /&gt;
|-&lt;br /&gt;
| 20001602&lt;br /&gt;
| [[New_3DS]] [[Camera Services|Camera]]&lt;br /&gt;
| [[8.1.0-0_New3DS|v8200]], [[9.0.0-20|v9218]], [[9.3.0-21|v10242]], [[10.0.0-27|v11265]], [[11.4.0-37|v12288]](New2DSXL)&lt;br /&gt;
|-&lt;br /&gt;
| 00001702&lt;br /&gt;
| [[Config Services|Config]] (cfg)&lt;br /&gt;
| [[1.0.0-0|v0]], [[2.0.0-2|v1024]], [[3.0.0-5|v2049]], v3072, [[4.0.0-7|v4096]], [[5.0.0-11|v5122]], [[6.0.0-11|v6145]], [[6.1.0-11|v7168]], [[7.0.0-13|v8196]], [[7.2.0-17|v9220]], [[8.0.0-18|v10243]], [[8.1.0-0_New3DS|v11265]]([[8.1.0-0_New3DS]]), [[9.0.0-20|v12290]], [[9.3.0-21|v13315]], [[9.6.0-24|v14342]], [[11.4.0-37|v15360]](New2DSXL)[[11.5.0-38|v15360]]&lt;br /&gt;
|-&lt;br /&gt;
| 00001703&lt;br /&gt;
| SAFE_MODE [[Config Services|Config]] (cfg)&lt;br /&gt;
| [[1.0.0-0|v0]]&lt;br /&gt;
|-&lt;br /&gt;
| 20001703&lt;br /&gt;
| [[New_3DS]] SAFE_MODE [[Config Services|Config]] (cfg)&lt;br /&gt;
| [[8.1.0-0_New3DS|v11265]]&lt;br /&gt;
|-&lt;br /&gt;
| 00001802&lt;br /&gt;
| [[Codec Services|Codec]]&lt;br /&gt;
| [[1.0.0-0|v0]], [[2.0.0-2|v1025]], [[2.2.0-X|v2048]], [[3.0.0-5|v3072]], [[5.0.0-11|v4098]], [[7.0.0-13|v5120]], [[8.0.0-18|v6144]], [[9.0.0-20|v7168]](Also for [[8.1.0-0_New3DS]])&lt;br /&gt;
|-&lt;br /&gt;
| 00001803&lt;br /&gt;
| SAFE_MODE [[Codec Services|Codec]]&lt;br /&gt;
| [[1.0.0-0|v0]]&lt;br /&gt;
|-&lt;br /&gt;
| 20001803&lt;br /&gt;
| [[New_3DS]] SAFE_MODE [[Codec Services|Codec]]&lt;br /&gt;
| [[8.1.0-0_New3DS|v7169]]&lt;br /&gt;
|-&lt;br /&gt;
| 00001A02&lt;br /&gt;
| [[DSP Services|DSP]]&lt;br /&gt;
| [[1.0.0-0|v0]], [[3.0.0-5|v1024]], [[4.0.0-7|v2048]], [[5.0.0-11|v3074]], [[6.0.0-11|v4096]], [[8.0.0-18|v5120]], [[9.7.0-25|v6145]], [[11.1.0-34|v7169]]&lt;br /&gt;
|-&lt;br /&gt;
| 00001A03&lt;br /&gt;
| SAFE_MODE [[DSP Services|DSP]]&lt;br /&gt;
| [[1.0.0-0|v0]]&lt;br /&gt;
|-&lt;br /&gt;
| 20001A03&lt;br /&gt;
| [[New_3DS]] SAFE_MODE [[DSP Services|DSP]]&lt;br /&gt;
| [[8.1.0-0_New3DS|v6145]]&lt;br /&gt;
|-&lt;br /&gt;
| 00001B02&lt;br /&gt;
| [[GPIO Services|GPIO]]&lt;br /&gt;
| [[1.0.0-0|v0]], [[5.0.0-11|v1025]], [[8.0.0-18|v2048]], [[9.5.0-22|v3073]]&lt;br /&gt;
|-&lt;br /&gt;
| 00001B03&lt;br /&gt;
| SAFE_MODE [[GPIO Services|GPIO]]&lt;br /&gt;
| [[1.0.0-0|v0]]&lt;br /&gt;
|-&lt;br /&gt;
| 20001B03&lt;br /&gt;
| [[New_3DS]] SAFE_MODE [[GPIO Services|GPIO]]&lt;br /&gt;
| [[8.1.0-0_New3DS|v3073]]&lt;br /&gt;
|-&lt;br /&gt;
| 00001C02&lt;br /&gt;
| [[GSP Services|GSP]]&lt;br /&gt;
| [[1.0.0-0|v0]], [[1.1.0-1|v1040]], [[2.0.0-2|v2049]], [[3.0.0-5|v3075]], v4098, [[4.0.0-7|v5120]], [[5.0.0-11|v6145]], [[6.0.0-11|v7168]], [[8.0.0-18|v8196]], [[9.0.0-20|v10240]], [[9.3.0-21|v11264]], [[9.6.0-24|v12294]], [[11.3.0-36|v13312]], [[11.5.0-38|v14336]]&lt;br /&gt;
|-&lt;br /&gt;
| 20001C02&lt;br /&gt;
| [[New_3DS]] [[GSP Services|GSP]]&lt;br /&gt;
| [[8.1.0-0_New3DS|v10243]], [[9.3.0-21|v11267]], [[9.6.0-24|v12294]], [[11.3.0-36|v13312]], [[11.4.0-37|v14336]](New2DSXL)&lt;br /&gt;
|-&lt;br /&gt;
| 00001C03&lt;br /&gt;
| SAFE_MODE [[GSP Services|GSP]]&lt;br /&gt;
| [[1.0.0-0|v0]]&lt;br /&gt;
|-&lt;br /&gt;
| 20001C03&lt;br /&gt;
| [[New_3DS]] SAFE_MODE [[GSP Services|GSP]]&lt;br /&gt;
| [[8.1.0-0_New3DS|v9217]]&lt;br /&gt;
|-&lt;br /&gt;
| 00001D02&lt;br /&gt;
| [[HID Services|HID]] (Human Interface Devices) &lt;br /&gt;
| [[1.0.0-0|v0]], [[2.0.0-2|v1025]], [[2.2.0-X|v2048]], [[3.0.0-5|v3072]], [[4.0.0-7|v4096]], [[5.0.0-11|v5121]], [[7.2.0-17|v6148]], [[8.0.0-18|v7168]], [[8.1.0-0_New3DS|v8192]]([[8.1.0-0_New3DS]]), [[9.0.0-20|v9216]], [[9.3.0-21|v10240]]&lt;br /&gt;
|-&lt;br /&gt;
| 00001D03&lt;br /&gt;
| SAFE_MODE [[HID Services|HID]]&lt;br /&gt;
| [[1.0.0-0|v0]]&lt;br /&gt;
|-&lt;br /&gt;
| 20001D03&lt;br /&gt;
| [[New_3DS]] SAFE_MODE [[HID Services|HID]]&lt;br /&gt;
| [[8.1.0-0_New3DS|v8193]]&lt;br /&gt;
|-&lt;br /&gt;
| 00001E02&lt;br /&gt;
| [[I2C Services|i2c]]&lt;br /&gt;
| [[1.0.0-0|v0]], [[3.0.0-5|v1024]], [[5.0.0-11|v2049]], [[8.0.0-18|v3076]], [[9.3.0-21|v5120]]&lt;br /&gt;
|-&lt;br /&gt;
| 20001E02&lt;br /&gt;
| [[New_3DS]] [[I2C Services|i2c]]&lt;br /&gt;
| [[8.1.0-0_New3DS|v4096]], [[9.3.0-21|v5121]]&lt;br /&gt;
|- &lt;br /&gt;
| 00001E03&lt;br /&gt;
| SAFE_MODE [[I2C Services|i2c]]&lt;br /&gt;
| [[1.0.0-0|v0]]&lt;br /&gt;
|- &lt;br /&gt;
| 20001E03&lt;br /&gt;
| [[New_3DS]] SAFE_MODE [[I2C Services|i2c]]&lt;br /&gt;
| [[8.1.0-0_New3DS|v4097]]&lt;br /&gt;
|-&lt;br /&gt;
| 00001F02&lt;br /&gt;
| [[MCU Services|MCU]]&lt;br /&gt;
| [[1.0.0-0|v0]], [[2.0.0-2|v1026]], [[2.1.0-3|v2048]], [[3.0.0-5|v3072]], [[4.0.0-7|v4102]], [[5.0.0-11|v5122]], [[6.0.0-11|v6145]], [[7.0.0-13|v7168]], [[8.0.0-18|v8192]]&lt;br /&gt;
|-&lt;br /&gt;
| 20001F02&lt;br /&gt;
| [[New_3DS]] [[MCU Services|MCU]]&lt;br /&gt;
| [[8.1.0-0_New3DS|v8192]], [[11.4.0-37|v9216]](New2DSXL)&lt;br /&gt;
|-&lt;br /&gt;
| 00001F03&lt;br /&gt;
| SAFE_MODE [[MCU Services|MCU]]&lt;br /&gt;
| [[1.0.0-0|v0]]&lt;br /&gt;
|-&lt;br /&gt;
| 20001F03&lt;br /&gt;
| [[New_3DS]] SAFE_MODE [[MCU Services|MCU]]&lt;br /&gt;
| [[8.1.0-0_New3DS|v9217]]&lt;br /&gt;
|-&lt;br /&gt;
| 00002002&lt;br /&gt;
| [[MIC Services|MIC]] (Microphone)&lt;br /&gt;
| [[1.0.0-0|v0]], [[5.0.0-11|v1025]], [[8.0.0-18|v2048]]&lt;br /&gt;
|-&lt;br /&gt;
| 00002102&lt;br /&gt;
| [[PDN Services|PDN]]&lt;br /&gt;
| [[1.0.0-0|v0]], [[5.0.0-11|v1025]], [[8.0.0-18|v2048]]&lt;br /&gt;
|-&lt;br /&gt;
| 00002103&lt;br /&gt;
| SAFE_MODE [[PDN Services|PDN]]&lt;br /&gt;
| [[1.0.0-0|v0]]&lt;br /&gt;
|-&lt;br /&gt;
| 20002103&lt;br /&gt;
| [[New_3DS]] SAFE_MODE [[PDN Services|PDN]]&lt;br /&gt;
| [[8.1.0-0_New3DS|v3073]]&lt;br /&gt;
|-&lt;br /&gt;
| 00002202&lt;br /&gt;
| [[PTM Services|PTM]] (Play time, pedometer, and battery manager)&lt;br /&gt;
| [[1.0.0-0|v0]], [[2.0.0-2|v1026]], [[2.2.0-X|v2048]], [[3.0.0-5|v3075]], v4096, [[4.0.0-7|v5120]], [[5.0.0-11|v6146]], [[6.0.0-11|v7168]], [[7.0.0-13|v8192]], [[8.0.0-18|v9219]], [[9.6.0-24|v11264]]&lt;br /&gt;
|-&lt;br /&gt;
| 20002202&lt;br /&gt;
| [[New_3DS]] [[PTM Services|PTM]] (Play time, pedometer, and battery manager)&lt;br /&gt;
| [[8.1.0-0_New3DS|v10240]], [[9.6.0-24|v11264]]&lt;br /&gt;
|-&lt;br /&gt;
| 00002203&lt;br /&gt;
| SAFE_MODE [[PTM Services|PTM]]&lt;br /&gt;
| [[1.0.0-0|v0]]&lt;br /&gt;
|-&lt;br /&gt;
| 20002203&lt;br /&gt;
| [[New_3DS]] SAFE_MODE [[PTM Services|PTM]]&lt;br /&gt;
| [[8.1.0-0_New3DS|v10241]]&lt;br /&gt;
|-&lt;br /&gt;
| 00002302&lt;br /&gt;
| [[SPI Services|spi]]&lt;br /&gt;
| [[1.0.0-0|v0]], [[2.0.0-2|v1025]], [[5.0.0-11|v2049]], [[8.0.0-18|v3072]]&lt;br /&gt;
|-&lt;br /&gt;
| 20002302&lt;br /&gt;
| [[New_3DS]] [[SPI Services|spi]]&lt;br /&gt;
| [[8.1.0-0_New3DS|v4096]]&lt;br /&gt;
|-&lt;br /&gt;
| 00002303&lt;br /&gt;
| SAFE_MODE [[SPI Services|spi]]&lt;br /&gt;
| [[1.0.0-0|v0]]&lt;br /&gt;
|-&lt;br /&gt;
| 20002303&lt;br /&gt;
| [[New_3DS]] SAFE_MODE [[SPI Services|spi]]&lt;br /&gt;
| [[8.1.0-0_New3DS|v4097]]&lt;br /&gt;
|-&lt;br /&gt;
| 00002402&lt;br /&gt;
| [[AC Services|AC]] (Network manager)&lt;br /&gt;
| [[1.0.0-0|v0]], [[1.1.0-1|v1024]], [[2.0.0-2|v2052]], [[2.1.0-3|v3072]], [[3.0.0-5|v4101]], [[5.0.0-11|v5122]], [[7.0.0-13|v6145]], [[8.0.0-18|v7172]], [[9.0.0-20|v8192]](Also for [[8.1.0-0_New3DS]]), [[9.3.0-21|v9216]]&lt;br /&gt;
|-&lt;br /&gt;
| 00002403&lt;br /&gt;
| SAFE_MODE [[AC Services|AC]]&lt;br /&gt;
| [[1.0.0-0|v0]]&lt;br /&gt;
|-&lt;br /&gt;
| 20002403&lt;br /&gt;
| [[New_3DS]] SAFE_MODE [[AC Services|AC]]&lt;br /&gt;
| [[8.1.0-0_New3DS|v8193]]&lt;br /&gt;
|-&lt;br /&gt;
| 00002602&lt;br /&gt;
| [[CECD Services|Cecd]] (StreetPass)&lt;br /&gt;
| [[1.0.0-0|v0]], [[2.0.0-2|v1026]], [[2.2.0-X|v2048]], [[3.0.0-5|v3073]], [[4.0.0-7|v4097]], [[5.0.0-11|v5122]], [[6.0.0-11|v6144]], [[6.2.0-12|v7170]], [[7.0.0-13|v8193]], [[8.0.0-18|v9216]], [[9.0.0-20|v10240]]&lt;br /&gt;
|-&lt;br /&gt;
| 00002702&lt;br /&gt;
| [[CSND Services|CSND]]&lt;br /&gt;
| [[1.0.0-0|v0]], [[2.0.0-2|v1025]], [[4.0.0-7|v2048]], [[5.0.0-11|v3073]], [[8.0.0-18|v4096]], [[9.0.0-20|v5120]]&lt;br /&gt;
|-&lt;br /&gt;
| 00002703&lt;br /&gt;
| SAFE_MODE [[CSND Services|CSND]]&lt;br /&gt;
| [[1.0.0-0|v0]]&lt;br /&gt;
|-&lt;br /&gt;
| 20002703&lt;br /&gt;
| [[New_3DS]] SAFE_MODE [[CSND Services|CSND]]&lt;br /&gt;
| [[8.1.0-0_New3DS|v5121]]&lt;br /&gt;
|-&lt;br /&gt;
| 00002802&lt;br /&gt;
| [[DLP Services|DLP]] ([[Download Play]])&lt;br /&gt;
| [[1.0.0-0|v0]], [[2.0.0-2|v1026]], [[2.2.0-X|v2048]], [[3.0.0-5|v3078]], [[5.0.0-11|v4099]], [[8.0.0-18|v5123]], [[9.0.0-20|v6145]](Also for [[8.1.0-0_New3DS]]), [[9.6.0-24|v7174]], [[10.0.0-27|v8192]]&lt;br /&gt;
|-&lt;br /&gt;
| 00002902&lt;br /&gt;
| [[HTTP Services|HTTP]]&lt;br /&gt;
| [[1.0.0-0|v0]], [[2.0.0-2|v1026]], [[2.1.0-3|v2049]], [[2.2.0-X|v3072]], [[3.0.0-5|v4099]], [[4.0.0-7|v5122]], [[5.0.0-11|v6145]], [[7.0.0-13|v7171]], [[7.1.0-14|v8192]], [[8.0.0-18|v9220]], [[8.1.0-18|v10245]], [[8.1.0-0_New3DS|v11264]]([[8.1.0-0_New3DS]]), [[9.0.0-20|v12288]], [[9.6.0-24|v13318]], [[11.4.0-37|v14336]]&lt;br /&gt;
|-&lt;br /&gt;
| 00002903&lt;br /&gt;
| SAFE_MODE [[HTTP Services|HTTP]]&lt;br /&gt;
| [[1.0.0-0|v0]]&lt;br /&gt;
|-&lt;br /&gt;
| 20002903&lt;br /&gt;
| [[New_3DS]] SAFE_MODE [[HTTP Services|HTTP]]&lt;br /&gt;
| [[8.1.0-0_New3DS|v10241]]&lt;br /&gt;
|-&lt;br /&gt;
| 00002A02&lt;br /&gt;
| [[MP Services|MP]]&lt;br /&gt;
| [[1.0.0-0|v0]], [[5.0.0-11|v1025]], [[8.0.0-18|v2048]]&lt;br /&gt;
|-&lt;br /&gt;
| 00002A03&lt;br /&gt;
| SAFE_MODE [[MP Services|MP]]&lt;br /&gt;
| [[1.0.0-0|v0]]&lt;br /&gt;
|-&lt;br /&gt;
| 00002B02&lt;br /&gt;
| [[NDM Services|NDM]]&lt;br /&gt;
| [[1.0.0-0|v0]], [[2.0.0-2|v1025]], [[3.0.0-5|v2049]], [[4.0.0-7|v3072]], [[5.0.0-11|v4098]], [[8.0.0-18|v5124]], [[8.1.0-0_New3DS|v6144]]([[8.1.0-0_New3DS]]), [[9.0.0-20|v7169]]&lt;br /&gt;
|-&lt;br /&gt;
| 00002C02&lt;br /&gt;
| [[NIM Services|NIM]]&lt;br /&gt;
| [[1.0.0-0|v0]], [[2.0.0-2|v1028]], [[3.0.0-5|v2055]], [[4.0.0-7|v3074]], [[5.0.0-11|v4100]], [[6.0.0-11|v5120]], [[7.0.0-13|v6148]], [[7.2.0-17|v7174]], [[8.0.0-18|v8195]], [[8.1.0-0_New3DS|v9217]]([[8.1.0-0_New3DS]]), [[9.0.0-20|v10249]], [[9.3.0-21|v11267]], [[9.6.0-24|v12296]], [[10.0.0-27|v13313]]&lt;br /&gt;
|-&lt;br /&gt;
| 00002C03&lt;br /&gt;
| SAFE_MODE [[NIM Services|NIM]]&lt;br /&gt;
| [[1.0.0-0|v0]]&lt;br /&gt;
|-&lt;br /&gt;
| 20002C03&lt;br /&gt;
| [[New_3DS]] SAFE_MODE [[NIM Services|NIM]]&lt;br /&gt;
| [[8.1.0-0_New3DS|v9217]]&lt;br /&gt;
|-&lt;br /&gt;
| 00002D02&lt;br /&gt;
| [[NWM Services|NWM]] ( Low-level wifi manager )&lt;br /&gt;
| [[1.0.0-0|v0]], [[1.1.0-1|v1024]], [[2.0.0-2|v2052]], [[2.2.0-X|v3072]], [[3.0.0-5|v4101]], [[4.0.0-7|v5120]], [[5.0.0-11|v6148]], [[6.0.0-11|v7169]], [[7.2.0-17|v8196]], [[8.0.0-18|v9216]], [[9.0.0-20|v10240]]&lt;br /&gt;
|-&lt;br /&gt;
| 00002D03&lt;br /&gt;
| SAFE_MODE [[NWM Services|NWM]]&lt;br /&gt;
| [[1.0.0-0|v0]], [[6.0.0-11|v5120]]&lt;br /&gt;
|-&lt;br /&gt;
| 20002D03&lt;br /&gt;
| [[New_3DS]] SAFE_MODE [[NWM Services|NWM]]&lt;br /&gt;
| [[8.1.0-0_New3DS|v10241]]&lt;br /&gt;
|-&lt;br /&gt;
| 00002E02&lt;br /&gt;
| [[Socket Services|Sockets]]&lt;br /&gt;
| [[1.0.0-0|v0]], [[1.1.0-1|v1024]], [[2.0.0-2|v2053]], [[3.0.0-5|v3075]], [[4.0.0-7|v4096]], [[5.0.0-11|v5121]], [[8.0.0-18|v6144]], [[9.0.0-20|v7168]], [[10.6.0-31|v8192]]&lt;br /&gt;
|-&lt;br /&gt;
| 00002E03&lt;br /&gt;
| SAFE_MODE [[Socket Services|Sockets]]&lt;br /&gt;
| [[1.0.0-0|v0]]&lt;br /&gt;
|-&lt;br /&gt;
| 20002E03&lt;br /&gt;
| [[New_3DS]] SAFE_MODE [[Socket Services|Sockets]]&lt;br /&gt;
| [[8.1.0-0_New3DS|v7169]]&lt;br /&gt;
|-&lt;br /&gt;
| 00002F02&lt;br /&gt;
| [[SSL Services|SSL]]&lt;br /&gt;
| [[1.0.0-0|v0]], [[2.0.0-2|v1024]], [[2.1.0-3|v2048]], [[3.0.0-5|v3072]], [[4.0.0-7|v4096]], [[5.0.0-11|v5122]], [[8.0.0-18|v6144]], [[9.0.0-20|v7168]], [[9.6.0-24|v8198]]&lt;br /&gt;
|-&lt;br /&gt;
| 00002F03&lt;br /&gt;
| SAFE_MODE [[SSL Services|SSL]]&lt;br /&gt;
| [[1.0.0-0|v0]]&lt;br /&gt;
|-&lt;br /&gt;
| 20002F03&lt;br /&gt;
| [[New_3DS]] SAFE_MODE [[SSL Services|SSL]]&lt;br /&gt;
| [[8.1.0-0_New3DS|v7169]]&lt;br /&gt;
|-&lt;br /&gt;
| 00003000&lt;br /&gt;
| [[FIRM|Process9]] (in SAFE_MODE and normal NATIVE_FIRM)&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| 00003102&lt;br /&gt;
| [[Process Services‎|PS]] ( Process Manager )&lt;br /&gt;
| [[1.0.0-0|v0]], [[2.0.0-2|v1025]], [[5.0.0-11|v2049]], [[6.0.0-11|v3072]], [[8.0.0-18|v4096]], [[9.0.0-20|v5120]]&lt;br /&gt;
|-&lt;br /&gt;
| 00003103&lt;br /&gt;
| SAFE_MODE [[Process Services‎|PS]]&lt;br /&gt;
| [[1.0.0-0|v0]]&lt;br /&gt;
|-&lt;br /&gt;
| 20003103&lt;br /&gt;
| [[New_3DS]] SAFE_MODE [[Process Services‎|PS]]&lt;br /&gt;
| [[8.1.0-0_New3DS|v5121]]&lt;br /&gt;
|-&lt;br /&gt;
| 00003202&lt;br /&gt;
| [[Friend Services‎|friends]] (Friends list)&lt;br /&gt;
| [[1.0.0-0|v0]], [[2.0.0-2|v1028]], [[2.2.0-X|v2048]], [[3.0.0-5|v3072]], [[4.0.0-7|v4096]], [[5.0.0-11|v5122]], [[7.0.0-13|v6145]], [[8.0.0-18|v7172]], [[9.0.0-20|v8192]](Also for [[8.1.0-0_New3DS]]), [[10.5.0-30|v9216]], [[10.7.0-32|v10240]], [[11.0.0-33|v11264]], [[11.1.0-34|v12288]], [[11.2.0-35|v13312]], [[11.3.0-36|v14336]], [[11.4.0-37|v15360]]&lt;br /&gt;
|-&lt;br /&gt;
| 00003203&lt;br /&gt;
| SAFE_MODE [[Friend Services‎|friends]] (Friends list)&lt;br /&gt;
| [[1.0.0-0|v0]]&lt;br /&gt;
|-&lt;br /&gt;
| 20003203&lt;br /&gt;
| [[New_3DS]] SAFE_MODE [[Friend Services‎|friends]] (Friends list)&lt;br /&gt;
| [[8.1.0-0_New3DS|v8193]]&lt;br /&gt;
|-&lt;br /&gt;
| 00003302&lt;br /&gt;
| [[IR Services‎|IR]] (Infrared)&lt;br /&gt;
| [[1.0.0-0|v0]], [[2.0.0-2|v1026]], [[2.2.0-X|v2048]], [[3.0.0-5|v3072]], [[4.0.0-7|v4096]], [[5.0.0-11|v5121]], [[8.0.0-18|v6148]], [[8.1.0-0_New3DS|v7170]]([[8.1.0-0_New3DS]]), [[9.0.0-20|v8192]], [[9.3.0-21|v9216]], [[9.6.0-24|v10246]], [[10.0.0-27|v11265]], [[10.6.0-31|v12289]]&lt;br /&gt;
|-&lt;br /&gt;
| 00003303&lt;br /&gt;
| SAFE_MODE [[IR Services‎|IR]]&lt;br /&gt;
| [[1.0.0-0|v0]]&lt;br /&gt;
|-&lt;br /&gt;
| 20003303&lt;br /&gt;
| [[New_3DS]] SAFE_MODE [[IR Services‎|IR]]&lt;br /&gt;
| [[8.1.0-0_New3DS|v7169]]&lt;br /&gt;
|- &lt;br /&gt;
| 00003402&lt;br /&gt;
| [[BOSS Services‎|BOSS]] (SpotPass)&lt;br /&gt;
| [[1.0.0-0|v0]], [[1.1.0-1|v1024]], [[2.0.0-2|v2053]], [[2.2.0-X|v3073]], [[3.0.0-5|v4101]], [[4.0.0-7|v5122]], [[5.0.0-11|v6146]], [[6.0.0-11|v7169]], [[6.2.0-12|v8193]], [[7.0.0-13|v9222]], [[8.0.0-18|v10240]], [[9.0.0-20|v11266]], [[10.0.0-27|v12289]], [[10.4.0-29|v13314]]&lt;br /&gt;
|-&lt;br /&gt;
| 00003502&lt;br /&gt;
| [[News Services‎|News]] (Notifications)&lt;br /&gt;
| [[1.0.0-0|v0]], [[2.0.0-2|v1028]], [[2.2.0-X|v2048]], [[3.0.0-5|v3072]], [[5.0.0-11|v4097]], [[8.0.0-18|v5120]], [[9.0.0-20|v6147]], [[9.7.0-25|v7168]]&lt;br /&gt;
|-&lt;br /&gt;
| 00003702&lt;br /&gt;
| [[RO_Services|RO]]&lt;br /&gt;
| [[2.0.0-2|v0]], [[4.0.0-7|v1024]], [[5.0.0-11|v2049]], [[7.2.0-17|v3074]], [[8.0.0-18|v4096]], [[9.0.0-20|v5120]](Also for [[8.1.0-0_New3DS]]), [[9.3.0-21|v6148]]&lt;br /&gt;
|-&lt;br /&gt;
| 00003802&lt;br /&gt;
| [[ACT Services‎|act]] (handles Nintendo Network &#039;&#039;&#039;a&#039;&#039;&#039;c&#039;&#039;&#039;c&#039;&#039;&#039;oun&#039;&#039;&#039;t&#039;&#039;&#039;s)&lt;br /&gt;
| [[7.0.0-13|v1029]], [[7.1.0-14|v2050]], [[7.2.0-17|v3077]], [[8.0.0-18|v4099]], [[8.1.0-0_New3DS|v5120]]([[8.1.0-0_New3DS]]), [[9.0.0-20|v6144]], [[9.3.0-21|v7168]], [[9.6.0-24|v8198]], [[11.4.0-37|v9216]](New2DSXL), [[11.5.0-38|v9216]]&lt;br /&gt;
|-&lt;br /&gt;
| 00004002&lt;br /&gt;
| Old3DS [[NFC_Services|nfc]]&lt;br /&gt;
| [[9.3.0-21|v2053]], [[9.6.0-24|v4106]], [[9.7.0-25|v5121]], [[10.0.0-27|v6145]], [[10.6.0-31|v7168]], [[10.7.0-32|v8192]]&lt;br /&gt;
|-&lt;br /&gt;
| 20004002&lt;br /&gt;
| [[New_3DS]] [[NFC_Services|nfc]]&lt;br /&gt;
| [[8.1.0-0_New3DS|v0]], [[9.0.0-20|v1024]], [[9.3.0-21|v2053]], [[9.5.0-22|v3073]], [[9.6.0-24|v4102]], [[10.0.0-27|v6145]], [[10.6.0-31|v7168]]&lt;br /&gt;
|-&lt;br /&gt;
| 20004102&lt;br /&gt;
| [[New_3DS]] [[MVD Services|mvd]]&lt;br /&gt;
| [[8.1.0-0_New3DS|v0]], [[9.0.0-20|v1024]]&lt;br /&gt;
|-&lt;br /&gt;
| 20004202&lt;br /&gt;
| [[New_3DS]] [[QTM Services|qtm]]&lt;br /&gt;
| [[8.1.0-0_New3DS|v8]], [[9.0.0-20|v1024]], [[9.3.0-21|v2052]], [[11.4.0-37|v3072]](New2DSXL)&lt;br /&gt;
|-&lt;br /&gt;
| 00008002&lt;br /&gt;
| [[NS]] (Memory-region: &amp;quot;SYSTEM&amp;quot;)&lt;br /&gt;
| [[1.0.0-0|v0]], [[2.0.0-2|v1028]], [[2.2.0-X|v2048]], [[3.0.0-5|v3077]], v4096, [[4.0.0-7|v5121]], [[5.0.0-11|v6148]], [[5.1.0-11|v7168]], [[6.0.0-11|v8193]], [[6.1.0-11|v9216]], [[7.0.0-13|v10248]], [[7.2.0-17|v11268]], [[8.0.0-18|v12291]], [[8.1.0-0_New3DS|v13312]]([[8.1.0-0_New3DS]]), [[9.0.0-20|v14336]], [[9.3.0-21|v15360]], [[9.6.0-24|v16390]], [[9.8.0-25|v17408]], [[10.0.0-27|v18433]], [[10.4.0-29|v19458]], [[11.1.0-34|v20482]], [[11.3.0-36|v21504]]&lt;br /&gt;
|-&lt;br /&gt;
| 00008003&lt;br /&gt;
| SAFE_MODE [[NS]] (Memory-region: &amp;quot;SYSTEM&amp;quot;)&lt;br /&gt;
| [[1.0.0-0|v0]]&lt;br /&gt;
|-&lt;br /&gt;
| 20008003&lt;br /&gt;
| [[New_3DS]] SAFE_MODE [[NS]] (Memory-region: &amp;quot;SYSTEM&amp;quot;)&lt;br /&gt;
| [[8.1.0-0_New3DS|v13313]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== 00040138 - [[FIRM|System Firmware]] ===&lt;br /&gt;
==== System Firmare Notes ====&lt;br /&gt;
NATIVE_FIRM and SAFE_MODE_FIRM for the initial versions are exactly the same, besides [[Configuration_Memory|core-version]] fields. SAFE_MODE_FIRM is used for running SAFE_MODE titles, on retail SAFE_MODE_FIRM seems to be only used for running the [[System_Settings#System_Updater|System Updater]] application. When a GBA VC title is launched, AGB_FIRM is launched to handle running this title. GBA VC savegames stored under SD card /title/&amp;lt;TID&amp;gt;/data use a custom format, this is handled by AGB_FIRM.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  TitleID Low&lt;br /&gt;
!  Description&lt;br /&gt;
!  USA/EUR/JPN Versions&lt;br /&gt;
!  CHN Versions&lt;br /&gt;
!  KOR Versions&lt;br /&gt;
!  TWN Versions&lt;br /&gt;
|-&lt;br /&gt;
| 00000001&lt;br /&gt;
| Unknown, very similar to SAFE_MODE_FIRM. Exists only on dev units and seems to only be used by SystemUpdaters.&lt;br /&gt;
| v0&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| 00000002&lt;br /&gt;
| NATIVE_FIRM (Native Firmware)&lt;br /&gt;
| [[1.0.0-0|v432]], [[1.1.0-1|v1472]], [[2.0.0-2|v2516]], [[2.1.0-3|v3553]], [[2.2.0-X|v4595]], [[3.0.0-5|v5647]], [[4.0.0-7|v6677]], [[4.1.0-8|v7712]], [[5.0.0-11|v8758]], [[5.1.0-11|v9792]], [[6.0.0-11|v10833]], [[6.1.0-11|v11872]], [[7.0.0-13|v12916]], [[7.2.0-17|v13956]], v15043, [[8.0.0-18|v15047]], [[9.0.0-20|v17120]], [[9.3.0-21|v18182]], [[9.5.0-22|v19216]], [[9.6.0-24|v20262]], [[10.0.0-27|v21288]], [[10.2.0-28|v22313]], [[10.4.0-29|v23341]], [[11.0.0-33|v24368]], [[11.1.0-34|v25396]], [[11.2.0-35|v26432]], [[11.3.0-36|v27476]]&lt;br /&gt;
| Same as USA/EUR/JPN starting with the USA/EUR/JPN [[4.0.0-7]] title-version&lt;br /&gt;
| Same as CHN.&lt;br /&gt;
| Same as CHN.&lt;br /&gt;
|-&lt;br /&gt;
| 20000002&lt;br /&gt;
| [[New_3DS]] NATIVE_FIRM (Native Firmware)&lt;br /&gt;
| [[8.1.0-0_New3DS|v16085]], [[9.0.0-20|v17120]], [[9.3.0-21|v18182]], [[9.5.0-22|v19218]], [[9.6.0-24|v20262]], [[10.0.0-27|v21288]], [[10.2.0-28|v22313]], [[10.4.0-29|v23341]], [[11.0.0-33|v24368]], [[11.1.0-34|v25396]], [[11.2.0-35|v26432]], [[11.3.0-36|v27476]]&lt;br /&gt;
| N/A&lt;br /&gt;
| Same as CHN.&lt;br /&gt;
| Same as CHN.&lt;br /&gt;
|-&lt;br /&gt;
| 00000003&lt;br /&gt;
| SAFE_MODE_FIRM &lt;br /&gt;
| [[1.0.0-0|v432]], [[3.0.0-5|v5632]]&lt;br /&gt;
| Same as USA/EUR/JPN starting with the USA/EUR/JPN [[3.0.0-5]] title-version&lt;br /&gt;
| Same as CHN.&lt;br /&gt;
| Same as CHN.&lt;br /&gt;
|-&lt;br /&gt;
| 20000003&lt;br /&gt;
| [[New_3DS]] SAFE_MODE_FIRM &lt;br /&gt;
| [[8.1.0-0_New3DS|v16081]]&lt;br /&gt;
| N/A&lt;br /&gt;
| Same as CHN.&lt;br /&gt;
| Same as CHN.&lt;br /&gt;
|-&lt;br /&gt;
| 00000102 &lt;br /&gt;
| TWL_FIRM ( DSi Firmware )&lt;br /&gt;
| [[1.0.0-0|v432]], [[2.0.0-2|v1489]], [[3.0.0-5|v2565]], v3601, [[4.0.0-7|v4625]], [[4.4.0-10|v5681]], [[4.5.0-10|v6704]], [[6.0.0-11|v7762]], [[6.2.0-12|v8817]]&lt;br /&gt;
| Same as USA/EUR/JPN starting with the USA/EUR/JPN [[4.0.0-7]] title-version&lt;br /&gt;
| Same as CHN.&lt;br /&gt;
| Same as CHN.&lt;br /&gt;
|-&lt;br /&gt;
| 20000102 &lt;br /&gt;
| [[New_3DS]] TWL_FIRM ( DSi Firmware )&lt;br /&gt;
| [[8.1.0-0_New3DS|v9936]]&lt;br /&gt;
| N/A&lt;br /&gt;
| Same as CHN.&lt;br /&gt;
| Same as CHN.&lt;br /&gt;
|- &lt;br /&gt;
| 00000202&lt;br /&gt;
| AGB_FIRM ( GBA Firmware )&lt;br /&gt;
| [[3.0.0-5|v519]], v1553, [[4.0.0-7|v2576]], [[6.0.0-11|v3665]]&lt;br /&gt;
| [[4.0.0-7|v2576]]&lt;br /&gt;
| [[4.0.0-7|v2576]], [[6.0.0-11|v3665]]&lt;br /&gt;
| Same as CHN.&lt;br /&gt;
|- &lt;br /&gt;
| 20000202&lt;br /&gt;
| [[New_3DS]] AGB_FIRM ( GBA Firmware )&lt;br /&gt;
| [[8.1.0-0_New3DS|v4816]]&lt;br /&gt;
| N/A&lt;br /&gt;
| N/A&lt;br /&gt;
| N/A&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Application Titles ==&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Category Bit Mask&lt;br /&gt;
!  Content Category&lt;br /&gt;
!  Bit Mask(s)&lt;br /&gt;
|-&lt;br /&gt;
|  0x0000&lt;br /&gt;
|  [[Title list/eShop Titles|Application / eShop]]&lt;br /&gt;
|  Normal&lt;br /&gt;
|-&lt;br /&gt;
|  0x0001&lt;br /&gt;
|  Download Play Child&lt;br /&gt;
|  DlpChild&lt;br /&gt;
|-&lt;br /&gt;
|  0x0002&lt;br /&gt;
|  [[EShop Demos|Demo]]&lt;br /&gt;
|  Demo&lt;br /&gt;
|-&lt;br /&gt;
|  0x000E&lt;br /&gt;
|  [[Title list/Patches|Patch]]&lt;br /&gt;
|  CannotExecution&amp;lt;nowiki&amp;gt; | &amp;lt;/nowiki&amp;gt;Patch&lt;br /&gt;
|-&lt;br /&gt;
|  0x008C&lt;br /&gt;
|  [[Title list/DLC|Downloadable Content]]&lt;br /&gt;
|  NotRequireRightForMount&amp;lt;nowiki&amp;gt; | &amp;lt;/nowiki&amp;gt;CannotExecution&amp;lt;nowiki&amp;gt; | &amp;lt;/nowiki&amp;gt;AddOnContents&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== 00040001 - [[Download Play]] Titles ===&lt;br /&gt;
==== Download Play Notes ====&lt;br /&gt;
This titleID-high/programID-high is used for the titles sent over [[Download Play]]. Only one 00040001 Download Play title is installed to NAND /title at a time. There can be a maximum of 255 Download Play child titles per Unique ID, indexed by Title ID Variation. The legal index range: 0x0 - 0xff.&lt;br /&gt;
&lt;br /&gt;
== Factory Titles ==&lt;br /&gt;
==== Factory Titles Notes ====&lt;br /&gt;
This section is for hard-coded titleIDs referenced in codebins on retail. This can include [[Factory_Setup|factory]]/[[Nintendo_Service_Center_Tools|repair]] titles as well.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  TitleID&lt;br /&gt;
!  Description&lt;br /&gt;
!  Versions&lt;br /&gt;
|-&lt;br /&gt;
| 000400000F802A00&lt;br /&gt;
| Unknown. Appears to be a [[9.8.0-25|gamecard]] title. See also [[11.3.0-36|here]].&lt;br /&gt;
Used during [[Nintendo_Service_Center_Tools|repair]], first non-system title listed in [[PTM_Services|playlog]] from repair.&lt;br /&gt;
| ?&lt;br /&gt;
|-&lt;br /&gt;
| 000400000F802100&lt;br /&gt;
| Used during [[Nintendo_Service_Center_Tools|repair]], second non-system title listed in [[PTM_Services|playlog]] from repair.&lt;br /&gt;
| ?&lt;br /&gt;
|-&lt;br /&gt;
| 000400000F802200&lt;br /&gt;
| Used during [[Nintendo_Service_Center_Tools|repair]], third non-system title listed in [[PTM_Services|playlog]] from repair.&lt;br /&gt;
| ?&lt;br /&gt;
|-&lt;br /&gt;
| 000400000FFFFD00&lt;br /&gt;
|  Used by retail NS for appID 0xF11, but this isn&#039;t available on retail CDN.&lt;br /&gt;
| ?&lt;br /&gt;
|-&lt;br /&gt;
| 000400000FFFFC00&lt;br /&gt;
|  Used by retail NS for appID 0xF12, but this isn&#039;t available on retail CDN.&lt;br /&gt;
| ?&lt;br /&gt;
|-&lt;br /&gt;
| 000400000FFFFB00&lt;br /&gt;
|  Used by retail NS for appID 0xF13, but this isn&#039;t available on retail CDN.&lt;br /&gt;
| ?&lt;br /&gt;
|-&lt;br /&gt;
| 000400000FFFF900&lt;br /&gt;
|  Used by retail NS for appID 0xF14, but this isn&#039;t available on retail CDN.&lt;br /&gt;
| ?&lt;br /&gt;
|-&lt;br /&gt;
| 000400000FFFF800&lt;br /&gt;
|  Used by retail NS for appID 0xF15, but this isn&#039;t available on retail CDN.&lt;br /&gt;
| ?&lt;br /&gt;
|-&lt;br /&gt;
| 000400000FFFF700&lt;br /&gt;
|  Used by retail NS for appID 0xF16, but this isn&#039;t available on retail CDN.&lt;br /&gt;
| ?&lt;br /&gt;
|-&lt;br /&gt;
| 000400000FFFF600&lt;br /&gt;
|  Used by retail NS for appID 0xF17, but this isn&#039;t available on retail CDN.&lt;br /&gt;
| ?&lt;br /&gt;
|-&lt;br /&gt;
| 000400000FFFF500&lt;br /&gt;
|  Used by retail NS for appID 0xF18, but this isn&#039;t available on retail CDN.&lt;br /&gt;
| ?&lt;br /&gt;
|-&lt;br /&gt;
| 0004003000008900&lt;br /&gt;
|  Used by retail NS for appID 0xF10, but this isn&#039;t available on retail CDN.&lt;br /&gt;
| ?&lt;br /&gt;
|-&lt;br /&gt;
| 0004013000001902&lt;br /&gt;
| dmnt, debugger sysmodule. This use devunit-only HIO for devunit&amp;lt;&amp;gt;pc comms. This only exists for development units(launched by NS during startup depending on certain [[Configuration_Memory]] fields&#039; values). &lt;br /&gt;
This is installed at the [[Factory_Setup|factory]], then later deleted at the factory on retail units.&lt;br /&gt;
| ?&lt;br /&gt;
|-&lt;br /&gt;
| 0004013000003602&lt;br /&gt;
| &amp;quot;debugger&amp;quot;. This only exist for development units(launched by NS during startup depending on certain [[Configuration_Memory]] fields&#039; values).&lt;br /&gt;
| ?&lt;br /&gt;
|-&lt;br /&gt;
| 000401300FEF0000&lt;br /&gt;
| Referenced in eShop Metadata (NS_UID 50010000000584), but does not exist on retail CDN&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== TWL (DSi) Titles ==&lt;br /&gt;
==== TWL Title Notes ====&lt;br /&gt;
Bitmask 0x1 for TWL titles denotes a system title (determining whether the title will be updated during a System Update).&lt;br /&gt;
 &lt;br /&gt;
It appears to be sufficient, but not necessary, to make the title invisible on the [[Home Menu]].&lt;br /&gt;
&lt;br /&gt;
Bitmask 0x2 for TWL titles may indicate no-execute.&lt;br /&gt;
&lt;br /&gt;
Bitmask 0x4 for TWL titles indicates internal storage.&lt;br /&gt;
&lt;br /&gt;
Bitmask 0x10 for TWL titles is found on developer tools.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Content Category&lt;br /&gt;
!  Bit Mask(s)&lt;br /&gt;
!  Category Bit Mask&lt;br /&gt;
|-&lt;br /&gt;
|  Application (DSiWare)&lt;br /&gt;
|  TWL&amp;lt;nowiki&amp;gt; | &amp;lt;/nowiki&amp;gt;0x4&lt;br /&gt;
|  0x8004&lt;br /&gt;
|-&lt;br /&gt;
|  System Application&lt;br /&gt;
|  TWL&amp;lt;nowiki&amp;gt; | &amp;lt;/nowiki&amp;gt;0x1&amp;lt;nowiki&amp;gt; | &amp;lt;/nowiki&amp;gt;0x4&lt;br /&gt;
|  0x8005&lt;br /&gt;
|-&lt;br /&gt;
|  System Archive&lt;br /&gt;
|  TWL&amp;lt;nowiki&amp;gt; | &amp;lt;/nowiki&amp;gt;0x1&amp;lt;nowiki&amp;gt; | &amp;lt;/nowiki&amp;gt;0x2&amp;lt;nowiki&amp;gt; | &amp;lt;/nowiki&amp;gt;0x4&amp;lt;nowiki&amp;gt; | &amp;lt;/nowiki&amp;gt;0x8&lt;br /&gt;
|  0x800F&lt;br /&gt;
|-&lt;br /&gt;
|  Developer Tool&lt;br /&gt;
|  TWL&amp;lt;nowiki&amp;gt; | &amp;lt;/nowiki&amp;gt;0x1&amp;lt;nowiki&amp;gt; | &amp;lt;/nowiki&amp;gt;0x4&amp;lt;nowiki&amp;gt; | &amp;lt;/nowiki&amp;gt;0x10&lt;br /&gt;
|  0x8015&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== 00048005 - System Applications===&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  TitleID Low&lt;br /&gt;
!  Region&lt;br /&gt;
!  Description&lt;br /&gt;
!  Versions&lt;br /&gt;
!  Information&lt;br /&gt;
|-&lt;br /&gt;
| 42383841(B88A)&lt;br /&gt;
| ALL&lt;br /&gt;
| [[DS Internet]]&lt;br /&gt;
| v0, [[2.1.0-4|v1025]], [[3.0.0-5|v2048]]&lt;br /&gt;
| [[DS Internet]] is the DS-mode application, (also integrated in every online-enabled DS game) and now accessible through [[System Settings]] for configuring network settings for DS software. &lt;br /&gt;
|-&lt;br /&gt;
| 484E4441(HNDA)&lt;br /&gt;
| ALL&lt;br /&gt;
| [[Download Play]]&lt;br /&gt;
| v1024&lt;br /&gt;
| This [[Download Play]] application is the DS-mode Download Play client, launched by the 3DS-mode Download Play application.&lt;br /&gt;
|-&lt;br /&gt;
| 484E4443(HNDC)&lt;br /&gt;
| CHN&lt;br /&gt;
| [[Download Play]]&lt;br /&gt;
| v1024&lt;br /&gt;
| See Above Description.&lt;br /&gt;
|-&lt;br /&gt;
| 484E444B(HNDK)&lt;br /&gt;
| KOR&lt;br /&gt;
| [[Download Play]]&lt;br /&gt;
| v1024&lt;br /&gt;
| See Above Description.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== 0004800F - System Data Archives===&lt;br /&gt;
==== System Data Archive Notes ====&lt;br /&gt;
New system updates only block DS flash-cards when whitelist is updated, or when TWL_FIRM is updated. &lt;br /&gt;
The whitelist contains the data used for detecting flash-cards, this is used by TWL_FIRM.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  TitleID Low&lt;br /&gt;
!  Description&lt;br /&gt;
!  Versions&lt;br /&gt;
|-&lt;br /&gt;
| 484E4841(HNHA)&lt;br /&gt;
| [[Nintendo DS Cart Whitelist]] - &lt;br /&gt;
| v0, [[2.0.0-2|v1026]], [[2.2.0-X|v2048]], [[3.0.0-5|v3072]], [[4.0.0-7|v4096]], [[4.2.0-9|v5120]], [[4.3.0-10|v6145]], [[4.4.0-10|v7168]], [[4.5.0-10|v8192]], [[5.0.0-11|v9216]], [[6.0.0-11|v10240]], [[7.0.0-13|v11264]]&lt;br /&gt;
|-&lt;br /&gt;
| 484E4C41(HNLA)&lt;br /&gt;
| [[Version Data]]&lt;br /&gt;
| v0&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== 00048004 - DSiWare Ports ===&lt;br /&gt;
==== DSiWare Port Notes ====&lt;br /&gt;
Although these have a titleID high separate from DSi and a titleID is stored in the SRLs, the content of these SRLs are identical to DSi.&lt;br /&gt;
See [[3DS DSiWare Titles]] for a complete list.&lt;/div&gt;</summary>
		<author><name>EvilFlight</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=3DS_Userland_Flaws&amp;diff=21337</id>
		<title>3DS Userland Flaws</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=3DS_Userland_Flaws&amp;diff=21337"/>
		<updated>2020-10-04T11:09:38Z</updated>

		<summary type="html">&lt;p&gt;EvilFlight: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page lists vulnerabilities / exploits for 3DS applications and applets. Exploiting these initially results in ROP, from that ROP one can then for example try exploiting [[3DS_System_Flaws|system]] flaw(s).&lt;br /&gt;
&lt;br /&gt;
=Non-system applications=&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Application name&lt;br /&gt;
!  Summary&lt;br /&gt;
!  Description&lt;br /&gt;
!  Fixed in app/system version&lt;br /&gt;
!  Last app/system version this flaw was checked for&lt;br /&gt;
!  Timeframe info related to this was added to wiki&lt;br /&gt;
!  Timeframe this vuln was discovered&lt;br /&gt;
!  Vuln discovered by&lt;br /&gt;
|-&lt;br /&gt;
| Cubic Ninja&lt;br /&gt;
| Map-data stack smash&lt;br /&gt;
| See [[Ninjhax|here]] regarding Ninjhax.&lt;br /&gt;
| None&lt;br /&gt;
| App: Initial version. System: [[10.4.0-29]].&lt;br /&gt;
| Ninjhax release&lt;br /&gt;
| July 2014&lt;br /&gt;
| [[User:smea|smea]]&lt;br /&gt;
|-&lt;br /&gt;
| The Legend of Zelda: Ocarina of Time 3D&lt;br /&gt;
| UTF-16 name string buffer overflow via unchecked u8 length field&lt;br /&gt;
| The u8 at offset 0x2C in the savefile is the character-length of the UTF-16 string at offset 0x1C. When copying this string, it&#039;s essentially a memory-copy with lenval*2, not a string-copy. This can be used to trigger buffer overflows at various locations depending on the string length.&lt;br /&gt;
* When value is &amp;gt;=0x6E it crashes when saving the saveslot, this causes a stack-smash however it normally crashes before it returns from the function which had the stack-frame overwritten.&lt;br /&gt;
* With value &amp;gt;=0x9A, it crashes via stack-smash in-game once any dialogs are opened(touching buttons on the touch-screen can trigger it too).&lt;br /&gt;
* Length value&amp;gt;=0xCD causes a crash while loading the saveslot, via a heap buffer overflow. This buf-overflow overwrites a heap memchunk following the allocated buffer. When the first 16-bits overwriting that heap memchunk is not the memchunk magic-number(0x7373), the mem-alloc code will just return a NULL ptr which later results in a crash. When the magic-number is valid, the mem-alloc code will continue to attempt to parse the memchunk, which may crash depending on the data which overwrote the memchunk. This heap code is separate from the CTRSDK heap code. Exploiting this doesn&#039;t seem to be possible: since the heap code actually verifies that the magic-number for the next/prev memchunk ptrs are correct(unlike CTRSDK), it&#039;s not possible to change those ptrs to useful arbitrary addresses outside of savedata(like with triggering a write to a c++ object ptr which later is used with a vtable func-call, this is what one would do with CTRSDK heap here).&lt;br /&gt;
&lt;br /&gt;
On March 11, 2015, an exploit using this vuln was released, that one was intended for warez/etc. The following exploit wasn&#039;t released before then mainly because doing so would (presumably) result in the vuln being fixed. The following old exploit was released on March 14, 2015: [https://github.com/yellows8/oot3dhax].&lt;br /&gt;
| None&lt;br /&gt;
| App: Initial version. System: [[10.6.0-31]].&lt;br /&gt;
| March 11, 2015&lt;br /&gt;
| Around October 22, 2012&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| Super Smash Bros 3DS&lt;br /&gt;
| Buffer overflow in local-multiplayer beacon handling.&lt;br /&gt;
| See [[smashbroshax|here]].&lt;br /&gt;
| App: v1.1.3&lt;br /&gt;
| See [[smashbroshax|here]]. System: [[10.3.0-28]].&lt;br /&gt;
| Time of exploit release.&lt;br /&gt;
| See [[smashbroshax|here]].&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| Pokemon Super Mystery Dungeon&lt;br /&gt;
| Heap overflow within linear memory via unchecked save file length&lt;br /&gt;
| Pokemon Super Mystery Dungeon uses zlib compression for most of its save files, possibly due to the save files being larger than its predecessor, Gates to Infinity. When a save file is being prepared to be loaded and read from, only a 0x32000 large buffer is allocated for file reading, and a 0x3e800-large buffer for decompression is also allocated before the file is read. However, the game does not limit the size of the file read to this allocation bound, allowing for the file to overflow into the linear memory heap and into the next allocation. Since Pokemon Super Mystery Dungeon stores allocation memchunks directly before the allocation, overwriting the next memchunk with a corrupted one allows for arbitrary writes of linear heap pointers when the next buffer is allocated or arbitrary writes of any pointer within writable memory when the corrupted buffer is freed.&lt;br /&gt;
| None&lt;br /&gt;
| O3DS: [[11.3.0-36]]. N3DS: [[11.4.0-37]].&lt;br /&gt;
| Time of exploit release.&lt;br /&gt;
| April 14, 2016&lt;br /&gt;
| [[User:Shinyquagsire23|Shiny Quagsire]]&lt;br /&gt;
|-&lt;br /&gt;
| VVVVVV&lt;br /&gt;
| Buffer overflow in XML save file array parsing&lt;br /&gt;
| VVVVVV utilizes several XML files (renamed with a .vvv extension) to store level save data, stats and settings. Within these XML files are several tags containing an array of data which, when parsed, is not properly checked to be of proper length for the tag being parsed from. This allows for an overflow of 16-bit array values from the location where the array is parsed. With unlock.vvv, XML data is parsed to the stack, and with level saves the heap. This allows for the pointer where the level save worldmap tag array should be parsed into to be overwritten with a stack address, allowing for ROP from within the XML array parsing function on the next level load.&lt;br /&gt;
| App: v1.1&lt;br /&gt;
| [[10.7.0-32]].&lt;br /&gt;
| Time of exploit release.&lt;br /&gt;
| April 25, 2016&lt;br /&gt;
| [[User:Shinyquagsire23|Shiny Quagsire]]&lt;br /&gt;
|-&lt;br /&gt;
| Citizens of Earth&lt;br /&gt;
| Save file read stack smash&lt;br /&gt;
| Citizens of Earth also uses &amp;quot;XML&amp;quot; files for saves, which are actually entirely binary data (not XML at all) with no checksums. These files are read from the filesystem on to a fixed size stack buffer which leads to an incredibly trivial stack smash. When using the autosave slot for this, the save is parsed when the user selects &amp;quot;continue&amp;quot;. When using one of the dedicated save slots (1-3), the save is parsed shortly after the company splash screens fade. Note that the save is read quite high (descending) on the stack - when exploiting this, one would likely need to move SP due to almost instantly overflowing the physical stack.&lt;br /&gt;
| None&lt;br /&gt;
| [[10.7.0-32]].&lt;br /&gt;
| Time of exploit release.&lt;br /&gt;
| May 5, 2016&lt;br /&gt;
| [[User:Dazzozo|Dazzozo]]&lt;br /&gt;
|-&lt;br /&gt;
| SmileBASIC 3.x&lt;br /&gt;
| Poor parameter validation on &amp;quot;BGSCREEN&amp;quot; command&lt;br /&gt;
| The SmileBASIC &amp;quot;BGSCREEN&amp;quot; command&#039;s second parameter is not properly validated as being within range.  As a result, one can set the screen size to an absurdly large value.  This means that the &amp;quot;BGGET&amp;quot; and &amp;quot;BGPUT&amp;quot; commands can then be used on out-of-range values to read and write a significant chunk of the interpreter&#039;s address space.&lt;br /&gt;
With a series of carefully-designed BGPUT commands, one can build a ROP chain and cause it to be executed.&lt;br /&gt;
| App: 3.3.2.&lt;br /&gt;
| System: [[11.0.0-33]].&lt;br /&gt;
| July 20, 2016&lt;br /&gt;
| Around June 26, 2016&lt;br /&gt;
| slackerSnail, 12Me12, incvoid&lt;br /&gt;
Exploited by MrNbaYoh and [[User:Plutooo|plutoo]].&lt;br /&gt;
|-&lt;br /&gt;
| SmileBASIC 3.x&lt;br /&gt;
| Subscripted TIME$/DATE$ allow write access to DATA/BSS&lt;br /&gt;
| Utf-16 characters can be assigned to subscripted TIME$/DATE$ interpreter sysvars which results in write-only access to all of DATA and some BSS in userland.&lt;br /&gt;
TIME$[0]/DATE$[0] actually point to somewhere in rodata, and an overly large subscript can be used to write well past it and into the aforementioned areas. Demo [https://github.com/zoogie/smilehax-IIe here.]&lt;br /&gt;
| App: 3.6.2 (3.6.0 latest for US/EU, JP appvers. can be downgraded)&lt;br /&gt;
| System: [[11.13.0-45]].&lt;br /&gt;
| April 2020&lt;br /&gt;
| February 2020&lt;br /&gt;
| bug publicly documented [https://translate.google.com/translate?sl=auto&amp;amp;tl=en&amp;amp;u=http%3A%2F%2Fsmilebasic.com%2Fdebug%2Farchive%2F here.]&lt;br /&gt;
Exploited by Zoogie&lt;br /&gt;
|-&lt;br /&gt;
| The Legend of Zelda: Tri Force Heroes&lt;br /&gt;
| [[3DS_System_Flaws#General.2FCTRSDK|CTRSDK]] CTPK buffer overflow combined with game&#039;s usage of SpotPass&lt;br /&gt;
| During the very first screen displayed by the game during boot(&amp;quot;Loading...&amp;quot;), just seconds after title launch, the game loads CTPK from the [[BOSS_Services|stored]] SpotPass content. Hence, this game could be exploited via the vulnerable CTRSDK CTPK code &#039;&#039;if&#039;&#039; one could get custom SpotPass data into extdata somehow(ctr-httpwn &amp;gt;=v1.2 with bosshaxx allows this).&lt;br /&gt;
&lt;br /&gt;
The code for this runs from a thread separate from the main-thread, with the stack in linearmem heap. This SpotPass handling triggers before the game ever opens the regular savedata archive. The extdata is opened at some point before this: it opens a file for checking if it exists, then immediately closes it.&lt;br /&gt;
&lt;br /&gt;
The two SpotPass URLs for this have always(?) returned HTTP 404 as of November 2016. It appears these were intended for use as textures for additional costumes(and never got used publicly), but this wasn&#039;t tested.&lt;br /&gt;
&lt;br /&gt;
This is used by [https://github.com/yellows8/ctpkpwn ctpkpwn_tfh].&lt;br /&gt;
| None&lt;br /&gt;
| App: v2.1.0&lt;br /&gt;
| November 18, 2016&lt;br /&gt;
| November 14, 2016&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| Pixel Paint&lt;br /&gt;
| Buffer overflow via unchecked extdata file length&lt;br /&gt;
| Pixel Paint loads pictures saved by the user from extdatas. The file is read to a fixed size buffer but the file length remains unchecked, so with a large enough file, one can overwrite pointers in memory and gain control of the execution flow.&lt;br /&gt;
| None&lt;br /&gt;
| App: Initial version. System: [[11.2.0-35]].&lt;br /&gt;
| December 27, 2016&lt;br /&gt;
| November 5, 2016&lt;br /&gt;
| [[User:Nba_Yoh|MrNbaYoh]]&lt;br /&gt;
|-&lt;br /&gt;
| Steel Diver : Sub Wars&lt;br /&gt;
| Heap overflow / arbitrary memcpy&lt;br /&gt;
| Savefile datas are stored as key/value pairs, a large enough string key makes the game overwrite a memcpy source/destination addresses and size arguments. So one can actually memcpy a rop on the stack and gain control of the execution flow.&lt;br /&gt;
| None&lt;br /&gt;
| System: [[11.2.0-35]].&lt;br /&gt;
| December 27, 2016&lt;br /&gt;
| Around July 15, 2016&lt;br /&gt;
| [[User:Nba_Yoh|MrNbaYoh]], Vegaroxas&lt;br /&gt;
|-&lt;br /&gt;
| 1001 Spikes&lt;br /&gt;
| Buffer overflow via unchecked array-indexes in XML savefile parsing&lt;br /&gt;
| The savefiles are stored as renamed .xml files, which contain several tags with attributes like &#039;array-index=&amp;quot;array-value&amp;quot;&#039;, where both of these are converted from ASCII strings to integers as signed-int32, and the array-value given blindly written to an array inside a structure using the (unchecked) index given. With several of these attributes, one can overwrite the stack starting from the stored lr of the function that does this parsing, and write a ROP chain there. Testing used the &amp;quot;LevelAttempts&amp;quot; tag which is the last such tag parsed in that function.&lt;br /&gt;
| None&lt;br /&gt;
| App: v1.2.0 (TMD v2096)&lt;br /&gt;
| December 27, 2016&lt;br /&gt;
| Around November 2, 2016&lt;br /&gt;
| [[User:Riley|Riley]]&lt;br /&gt;
|-&lt;br /&gt;
| Pokemon Omega Ruby/Alpha Sapphire&lt;br /&gt;
| Secret base team name heap overflow&lt;br /&gt;
| When the player wants to edit the team name, it is copied over the heap, however its length is not verified. So with a large enough team name one can overwrite some pointers and get two arbitrary jumps and then get control of the execution flow.&lt;br /&gt;
| None&lt;br /&gt;
| App: 1.4. System: [[11.2.0-35]].&lt;br /&gt;
| December 30, 2016&lt;br /&gt;
| June, 2016&lt;br /&gt;
| [[User:Nba_Yoh|MrNbaYoh]]&lt;br /&gt;
|-&lt;br /&gt;
| Swapdoodle&lt;br /&gt;
| Heap buffer overflow via unchecked size&lt;br /&gt;
| The letter file format used by doodlebomb is composed of multiple chunks. Each chunks is described in the header of the file where the name, size and CRC of each chunk are stored. Some chunks are meant to be headers, every header&#039;s size should be 0x80, however the length of the STAHED1 chunk remains unchecked and the game memcpy the chunk to a 0x80 byte buffer with the length provided in the file. This way one is able to overwrite some pointers and get control of the execution flow.&lt;br /&gt;
| App: &amp;gt; v1.1.1&lt;br /&gt;
| App: v1.1.1&lt;br /&gt;
| April 24, 2017&lt;br /&gt;
| February, 2017&lt;br /&gt;
| [[User:Nba_Yoh|MrNbaYoh]]&lt;br /&gt;
|-&lt;br /&gt;
| Pokemon Picross&lt;br /&gt;
| Arbitrary memcpy via unchecked size&lt;br /&gt;
| When reading the savefile, the game handles some lists of buffers that are copied to memory. These buffers should always be 0x14-bytes long but the game uses the size provided in the savefile to copy them. These buffers are copied in some structs and thus with a big enough length value, one can overwrite the next struct which contains a size and a destination address for a memcpy.&lt;br /&gt;
| None?&lt;br /&gt;
| App: ?&lt;br /&gt;
| May 29, 2017&lt;br /&gt;
| June, 2016&lt;br /&gt;
| [[User:Nba_Yoh|MrNbaYoh]]&lt;br /&gt;
|-&lt;br /&gt;
| RPG Maker Fes/Player&lt;br /&gt;
| Buffer overflow on .bss section&lt;br /&gt;
| When loading a project, the game copies multiple chunks over the BSS section. However the number of chunks to copy is not checked, thus a large amount of chunk result in a buffer overflow. There&#039;s multiple way to exploit this flaw to gain an arbitrary memcpy or an arbitrary jump.&lt;br /&gt;
| None?&lt;br /&gt;
| App: ?&lt;br /&gt;
| August 28, 2017&lt;br /&gt;
| August, 2017&lt;br /&gt;
| [[User:Nba_Yoh|MrNbaYoh]]&lt;br /&gt;
|-&lt;br /&gt;
| RPG Maker Fes/Player&lt;br /&gt;
| Buffer overflow via unchecked file size&lt;br /&gt;
| When loading a project, the game loads the file to a 0x200000 bytes long buffer. However the size remains unchecked, so with a big enough file one can overflow the buffer and overwrite a thread stack and then achieve ROP.&lt;br /&gt;
| None?&lt;br /&gt;
| App: ?&lt;br /&gt;
| August 29, 2017&lt;br /&gt;
| August, 2017&lt;br /&gt;
| [[User:Nba_Yoh|MrNbaYoh]], [[User: ChampionLeake|ChampionLeake]]&lt;br /&gt;
|-&lt;br /&gt;
| Pokemon Omega Ruby/Alpha Sapphire&lt;br /&gt;
| PSS data heap/stack overflow&lt;br /&gt;
| When launching the game, multiple chunks from the save file are parsed and copied to a large heap buffer. When parsing PSS data (acquaintances, passerby) the game copies each entry to the heap buffer, the number of entries to copy is read from the end of the multiple pss data chunks and is not checked, leading to an overflow. The &amp;quot;PSS data - friends&amp;quot; chunk is vulnerable too, but the overflow occurs on the stack and unfortunately this isn&#039;t exploitable because of a 4 bytes uncontrolled value (in each entry) that gets written on sensitive data.&lt;br /&gt;
| None&lt;br /&gt;
| App: 1.4. System: [[11.6.0]].&lt;br /&gt;
| October 1, 2017&lt;br /&gt;
| June, 2016&lt;br /&gt;
| [[User:Nba_Yoh|MrNbaYoh]]&lt;br /&gt;
|-&lt;br /&gt;
| RPG Maker Fes/Player&lt;br /&gt;
| OOB write&lt;br /&gt;
| When handling events in a map, the indices of &amp;quot;buttons&amp;quot; are not checked. This results in an out of bound bit write, one can thus write a rop directly on the stack (bit by bit).&lt;br /&gt;
| None?&lt;br /&gt;
| App: ?&lt;br /&gt;
| August 5, 2018&lt;br /&gt;
| &lt;br /&gt;
| [[User:Nba_Yoh|MrNbaYoh]]&lt;br /&gt;
|-&lt;br /&gt;
| Unholy Heights&lt;br /&gt;
| Buffer overflow via unchecked string size&lt;br /&gt;
| The game stores some utf-16 messages in the savefile. Right before the message is the length(u32) for the string, the game uses this size to memcpy the message from the savefile to the stack without checking the length. This allows one to overwrite some function addresses on the stack and form a rop chain.&lt;br /&gt;
| None&lt;br /&gt;
| App: Initial Version&lt;br /&gt;
| September 13, 2018&lt;br /&gt;
| August, 2018&lt;br /&gt;
| Kartik&lt;br /&gt;
|-&lt;br /&gt;
| Mononoke Forest&lt;br /&gt;
| String Buffer Overflow via unchecked string length&lt;br /&gt;
| The game stores plaintext profile names in the savefile. The profile names are strcpy/memcpy to different areas of the game&#039;s functions in the stack. Using a large extensive profile name, a user can overwrite some stack-registers and point to stack buffer addresses to eventually gain control of the stack to lead and form a rop-chain. &lt;br /&gt;
| None&lt;br /&gt;
| App: v1.0.0&lt;br /&gt;
| August 14, 2019&lt;br /&gt;
| February 8, 2019&lt;br /&gt;
| [[User: ChampionLeake|ChampionLeake]] and [[User: Kartik|Kartik]]&lt;br /&gt;
|-&lt;br /&gt;
| Picross 3D: Round 2&lt;br /&gt;
| Out of bounds array access allowing to point to fabricated objects and vtable&lt;br /&gt;
| Game only checks save header. With the last interacted save slot index at +0xb270 in the save data unchecked we can achieve a predictable out of bounds access, as well inserting ROP data without detecting save corruption. Game references an object from an array of 3 elements and passes it to a function that will read object pointers and hit a vtable call. With a copy save data left in memory and a properly calculated index, we can point to a fake object position in the save, vtable jump to a stack pivot and start the ROP chain.&lt;br /&gt;
| None&lt;br /&gt;
| App: Initial version&lt;br /&gt;
| September 10, 2020&lt;br /&gt;
| August 24, 2020&lt;br /&gt;
| [[User: Luigoalma|Luigoalma]] and [[User: Kartik|Kartik]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Flipnote Studio 3D==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Summary&lt;br /&gt;
!  Description&lt;br /&gt;
!  Fixed in app/system version&lt;br /&gt;
!  Timeframe info related to this was added to wiki&lt;br /&gt;
!  Flaw discovered by&lt;br /&gt;
|-&lt;br /&gt;
| KFH frame count overflow&lt;br /&gt;
| The KFH frame count field should not be &amp;gt;= 0x3E8, but it wasn&#039;t checked and so uncontrolled data were written over pointers, causing an unexploitable crash.&lt;br /&gt;
| System: 11.6&lt;br /&gt;
| September 20, 2017&lt;br /&gt;
| [[User:Nba_Yoh|MrNbaYoh]]&lt;br /&gt;
|-&lt;br /&gt;
| KMI paper color overflow&lt;br /&gt;
| Paper color field (and similar color fields) in KMI chunks was not checked, a too high value caused a jump to an uncontrolled location.&lt;br /&gt;
| System: 11.6&lt;br /&gt;
| September 20, 2017&lt;br /&gt;
| [[User:Nba_Yoh|MrNbaYoh]]&lt;br /&gt;
|-&lt;br /&gt;
| KSN BGM data size overflow&lt;br /&gt;
| The size of the BGM data in the KSN chunk was not checked, it was used in a memcpy so with a big enough size one could overwrite a thread stack on linear mem and achieve ROP (notehax v1).&lt;br /&gt;
| System: 11.6&lt;br /&gt;
| September 20, 2017&lt;br /&gt;
| [[User:Nba_Yoh|MrNbaYoh]]&lt;br /&gt;
|-&lt;br /&gt;
| KMC chunk unchecked&lt;br /&gt;
| The KMC chunk was not verified at all, the CRC32 and the size were not checked. A big enough size caused an integer overflow and made the game read the file backward.&lt;br /&gt;
| System: 11.6&lt;br /&gt;
| September 20, 2017&lt;br /&gt;
| [[User:Nba_Yoh|MrNbaYoh]]&lt;br /&gt;
|-&lt;br /&gt;
| KMI layer size unchecked&lt;br /&gt;
| The 3 layer size fields in KMI chunks were not checked, leading to some crashes in the editor.&lt;br /&gt;
| System: 11.6&lt;br /&gt;
| September 20, 2017&lt;br /&gt;
| [[User:Nba_Yoh|MrNbaYoh]]&lt;br /&gt;
|-&lt;br /&gt;
| Bad &amp;quot;queue&amp;quot; implementation&lt;br /&gt;
| When a KWZ was parsed, frames were copied in a kind of queue, bounds were not checked obviously, so with the KMI layer size flaw one was able to fill completely the queue, then write past the buffer and overwrite a heap chunk header (notehax v2). This is not possible anymore, the queue cannot be filled because layer sizes are checked. Moreover each time an element is removed from the queue, the whole content is memmoved *facepalm*.&lt;br /&gt;
| System: 11.6&lt;br /&gt;
| September 20, 2017&lt;br /&gt;
| [[User:Nba_Yoh|MrNbaYoh]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Useless crashes / applications which were fuzzed==&lt;br /&gt;
* Pushmo (3DSWare), QR codes: level name is properly limited to 16 characters, game doesn&#039;t crash with a longer name. The only possible crashes are triggered by out-of-bounds array index values, these crashes are not exploitable due to the index value being 8bit.&lt;br /&gt;
&lt;br /&gt;
* [[Pyramids (3DSWare)]], QR codes: no strings. Only crashes are from out-of-bounds values (like background ID) and are not exploitable.&lt;br /&gt;
&lt;br /&gt;
* [[Pyramids 2 (3DSWare)]], QR codes: no strings. Only crashes are from out-of-bounds values (like background ID) and are not exploitable.&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/yellows8/mm3d_re The Legend of Zelda: Majora&#039;s Mask 3D]&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;The Legend of Zelda: A Link Between Worlds&amp;quot; and &amp;quot;The Legend of Zelda: Tri Force Heroes&amp;quot;: these games don&#039;t crash at all when the entire save-file(minus constant header data) is overwritten with /dev/random output / 0xFF-bytes. All of the CRC32s were updated for this of course.  Note that this refers to the regular save file: Tri Force Heroes can be exploited via BOSS extdata - see above.&lt;br /&gt;
&lt;br /&gt;
* Pokemon Mystery Dungeon: Gates to Infinity has the same unchecked file bounds as Pokemon Super Mystery Dungeon, however since save compression was introduced in Pokemon Super Mystery Dungeon, it only allocates one buffer within the application heap instead of several within the linear heap, resulting in nothing to corrupt or overwrite even if the file&#039;s length is extended past its allocation.&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;Kid Icarus: Uprising&amp;quot;: Overwriting the entire savedata results in various crashes, nothing useful.&lt;br /&gt;
&lt;br /&gt;
* Savedata/extdata for &amp;quot;Super Smash Bros 3DS&amp;quot;: Overwriting the various files stored under savedata/extdata results in useless crashes.&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;StarFox 64 3D&amp;quot;: Doesn&#039;t crash at all with the entire savedata overwritten.&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;Frogger 3D&amp;quot;: Overwriting a savefile with random-data results in *nothing* crashing.&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;Mutant Mudds&amp;quot;: Overwriting the savefile with random data results in a crash&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;Worcle Worlds&amp;quot;: Overwriting the savefile with 0xFF results in a crash due to an out of bound read&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;Animal Crossing: New Leaf&amp;quot;: Creating a QR code from random data results in a valid QR code and a random design. In some very rare cases(which aren&#039;t always reproducible?) a crash/etc may occur, but this isn&#039;t known to be useful.&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;Angry Birds Star Wars&amp;quot;: Strings in the savefile are preceded by their lengths. These strings are never stored on the stack and are memcpy&#039;d into heap memory. If the size is invalid the alloc will fail and thus the memcpy will operate on a nullptr resulting in a useless data abort.&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;Gem Smashers&amp;quot;: Overwriting the savefile with random bytes results in useless crashes.&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;Luxor:&amp;quot; Strings/plaintext in the savefile are present and these&#039;s no checks. Overwriting the whole save (excluding the header), with /dev/random cause a useless crash.&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;Luv Me Buddies Wonderland:&amp;quot; Doesn&#039;t crash at all with the entire savedata overwritten. Overwriting some areas, points to useless nulls&lt;br /&gt;
&lt;br /&gt;
==Crashes needing investigation==&lt;br /&gt;
* Disney Infinity crashes when all savedata overwritten with /dev/urandom. No checksums. 0xFF bytes don&#039;t cause a crash.&lt;br /&gt;
&lt;br /&gt;
* Football Up Online / Soccer Up Online and Football Up 3D / Soccer Up 3D crash when teamname(UTF-16) length = 0x48 AND 0x20 null bytes are removed after just the name or if teamname length is way longer than 0x48.&lt;br /&gt;
&lt;br /&gt;
=System applications=&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Summary&lt;br /&gt;
!  Description&lt;br /&gt;
!  Fixed in version&lt;br /&gt;
!  Last version this flaw was checked for&lt;br /&gt;
!  Timeframe this was discovered&lt;br /&gt;
!  Discovered by&lt;br /&gt;
|-&lt;br /&gt;
| 3DS [[System Settings]] DS profile string stack-smash&lt;br /&gt;
| Too long or corrupted strings (01Ah  2   Nickname length in characters     050h  2   Message length in characters) in the NVRAM DS user settings (System Settings-&amp;gt;Other Settings-&amp;gt;Profile-&amp;gt;Nintendo DS Profile) cause it to crash in 3DS-mode due to a stack-smash. The DSi is not vulnerable to this, DSi launcher(menu) and DSi System Settings will reset the NVRAM user-settings if the length field values are too long(same result as when the CRCs are invalid). TWL_FIRM also resets the NVRAM user-settings when the string-length(s) are too long.&lt;br /&gt;
| [[7.0.0-13]]&lt;br /&gt;
| [[7.0.0-13]]&lt;br /&gt;
| 2012&lt;br /&gt;
| [[User:Ichfly|Ichfly]]&lt;br /&gt;
|-&lt;br /&gt;
| 3DS [[System Settings]] stack smash via title strings in [[DSiWare_Exports]]&lt;br /&gt;
| DSiWare export banners contain 16 consecutive 0x100 byte, utf-16 game title strings for different languages. Nintendo correctly limits the string&#039;s max length by placing a NULL at str[127] before it&#039;s copied to the stack. However, they didn&#039;t allocate enough space for all 128 wchars (char/wchar type confusion?), so an attacker can craft a valid full-length string that will crash the stack at about str+0xEC. ROP execution can then be obtained from this crash in DSiWare Data Management as demonstrated [https://github.com/zoogie/Bannerbomb3 here].&lt;br /&gt;
&lt;br /&gt;
Interesting note: A line feed wchar (00 0A) at any point in the string before the crash offset will prevent the crash from occurring.&lt;br /&gt;
| None&lt;br /&gt;
| [[11.13.0-45]]&lt;br /&gt;
| Dec. 2018&lt;br /&gt;
| Zoogie&lt;br /&gt;
|-&lt;br /&gt;
| 3DS SAFE_MODE [https://www.3dbrew.org/wiki/System_Settings#System_Updater System Updater] stack smash from proxy-url string&lt;br /&gt;
| During [[Recovery Mode]] and after all 3 wifi slots fail to find an access point for sysupdate, a user is permitted to access the wifi settings mode to make changes. Here, if the proxy-url field string&#039;s NULL terminator had been altered beforehand, a stack smash can occur when the user selects Proxy Settings -&amp;gt; Detailed Setup and the corrupted url string is displayed.&lt;br /&gt;
&lt;br /&gt;
This is a difficult crash to control because the url string is converted from ascii to utf-16 between the slot and stack, effectively reducing the available gadgets to 0.4% of the normal amount. It&#039;s possible to improvise an &amp;quot;escape&amp;quot; using an eoreq pc w/shift gadget to combine registers and form a jump that can access 1/2 of all available gadgets.&lt;br /&gt;
&lt;br /&gt;
Because this exploit runs *under* SAFE_MODE, it&#039;s possible to run safehax with one&#039;s choice of k11 and arm9 hax. Prerequisite: a userland exploit with cfg:s/i access to modify the wifi slot. A demonstration can be viewed [https://github.com/zoogie/unSAFE_MODE here].&lt;br /&gt;
| None&lt;br /&gt;
| [[11.13.0-45]]&lt;br /&gt;
| Jan. 2020&lt;br /&gt;
| Zoogie&lt;br /&gt;
|-&lt;br /&gt;
| [[Nintendo 3DS Sound]]&lt;br /&gt;
| When a .m4a is loaded, the song name is copied to a 256 byte buffer. When the song name begins with a Unicode BOM marker, it memcpy&#039;s the tag using the user-provided length. This gives an arbitrary write which can be used to achieve ROP.&lt;br /&gt;
| [[11.4.0-37]]&lt;br /&gt;
| [[11.4.0-37]]&lt;br /&gt;
| June/July 2016&lt;br /&gt;
| [[User:nedwill|nedwill]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=System applets=&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Summary&lt;br /&gt;
!  Description&lt;br /&gt;
!  Fixed in version&lt;br /&gt;
!  Last version this flaw was checked for&lt;br /&gt;
!  Introduced with version&lt;br /&gt;
!  Timeframe info related to this was added to wiki&lt;br /&gt;
!  Timeframe this was discovered&lt;br /&gt;
!  Discovered by&lt;br /&gt;
|-&lt;br /&gt;
| Webkit/web-browser bugs&lt;br /&gt;
| spider has had at least three different code-execution exploits. Majority of them are use-after-free issues. See also [[browserhax|here]].&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| &lt;br /&gt;
| 2013?&lt;br /&gt;
|&lt;br /&gt;
| A lot of people.&lt;br /&gt;
|-&lt;br /&gt;
| Old3DS/New3DS [[Internet_Browser|Browser-version-check]] bypass&lt;br /&gt;
| When the browser-version-check code runs where the savedata for it was never initialized(such as when the user used the &amp;quot;Initialize savedata&amp;quot; option), it will use base_timestamp=0 instead of the timestamp loaded from savedata. This is then used with &amp;quot;if(cur_timestamp - base_timestamp &amp;gt;= &amp;lt;24h timestamp&amp;gt;){Run browser-version-check HTTPS request code}&amp;quot;.&lt;br /&gt;
Hence, if the savedata was just initialized, and if the system datetime is set to before January 2, 2000, the browser-version-check will be skipped. This includes January 1, 2000, 00:00, because that&#039;s the epoch(timestamp value 0x0) used with this timestamp.&lt;br /&gt;
&lt;br /&gt;
See [http://yls8.mtheall.com/3dsbrowserhax.php here] for bypass usage instructions.&lt;br /&gt;
&lt;br /&gt;
This was fixed with [[10.7.0-32|10.7.0-32]], see [[Internet_Browser|here]] for details.&lt;br /&gt;
| [[10.7.0-32|10.7.0-32]]&lt;br /&gt;
| &lt;br /&gt;
| [[9.9.0-26|9.9.0-26]]&lt;br /&gt;
| February 25, 2016&lt;br /&gt;
| November 2, 2015 (Exactly one week after the browser version pages were initially updated server-side)&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| Skater - Bookmark OOB write&lt;br /&gt;
| Each bookmark has an id that should not exceed 0x63 (99), however ids are not checked, this results in an OOB write on the stack, but only the value 0x01 can be written.&lt;br /&gt;
| &lt;br /&gt;
| [[11.6.0-39|11.6.0-39]]&lt;br /&gt;
| &lt;br /&gt;
| May 21, 2018&lt;br /&gt;
| May 20, 2018&lt;br /&gt;
| [[User:Nba_Yoh|MrNbaYoh]]&lt;br /&gt;
|-&lt;br /&gt;
| MicroSD Management - malformed security blob causes stack buffer overflow (mhax) &lt;br /&gt;
| The MicroSD Management application&#039;s parsing of Windows NTLM security blobs in the SMB/CIFS protocol doesn&#039;t verify that the client&#039;s specified NT domain name is less than 32 UTF-16 characters.  When it&#039;s longer, a stack buffer overrun occurs, leading to a ROP chain and complete control of the mcopy application.&lt;br /&gt;
&lt;br /&gt;
The malformed security blob can be sent by an attacker within the SMB_COM_SESSION_SETUP_ANDX (0x73) packet.&lt;br /&gt;
| [[11.8.0-41|11.8.0-41]]&lt;br /&gt;
| [[11.8.0-41|11.8.0-41]]&lt;br /&gt;
| [[9.0.0-20|9.0.0-20]]&lt;br /&gt;
| August 12, 2018&lt;br /&gt;
| 2018&lt;br /&gt;
| smea&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Home Menu==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Summary&lt;br /&gt;
!  Description&lt;br /&gt;
!  Fixed in version&lt;br /&gt;
!  Last version this flaw was checked for&lt;br /&gt;
!  Introduced with version&lt;br /&gt;
!  Timeframe info related to this was added to wiki&lt;br /&gt;
!  Timeframe this was discovered&lt;br /&gt;
!  Discovered by&lt;br /&gt;
|-&lt;br /&gt;
| u8 brightness setting OOB index (menuhax67)&lt;br /&gt;
| Config block 0x50001, which contains a u8 brightness setting that indexes a table of u32 addresses, can be set to an out-of-bounds index (it&#039;s normally 1-5). Located within cfg block 0x50009, there exists a single controllable u32 that&#039;s located within the u8&#039;s range. With these set properly, one can eventually redirect a function pointer to an address of their choice. This is triggered after the Home Menu quick launch tab is activated. POC [https://github.com/zoogie/menuhax67 here].&lt;br /&gt;
| None&lt;br /&gt;
| [[11.13.0-45]]&lt;br /&gt;
| &lt;br /&gt;
| October 4, 2020&lt;br /&gt;
| September, 2020&lt;br /&gt;
| Zoogie&lt;br /&gt;
|-&lt;br /&gt;
| bossbannerhax&lt;br /&gt;
| After successfully loading [[Extended_Banner|extended-banner]] data(done when selecting an icon), Home Menu attempts to load &amp;quot;[[CBMD]]&amp;quot; data into a 0x100000-byte heap buffer from the [[BOSS_Services|stored]] SpotPass content. When successful and the magic-number is CBMD, Home Menu then decompresses the exbanner sections into another fixed-size heap buffer, without checking the outsize at all. The main CBMD CGFX code with ExeFS checks the size, but this code doesn&#039;t(however this is exbanner &amp;quot;CBMD&amp;quot;, not a &amp;quot;normal&amp;quot; CBMD).&lt;br /&gt;
&lt;br /&gt;
Used with menuhax as of v3.2.&lt;br /&gt;
| [[11.3.0-36|11.3.0-X]]&lt;br /&gt;
| &lt;br /&gt;
| [[1.0.0-0|1.0.0-0]]&lt;br /&gt;
| November 18, 2016&lt;br /&gt;
| December 23, 2014&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| sdiconhax&lt;br /&gt;
| This is basically the same as nandiconhax, the vulnerable SD/NAND functions are &#039;&#039;identical&#039;&#039; minus the file-buffer offsets. Exploitation is different due to different heap-buffer location though. Unlike nandiconhax, the icon buffer for SD is located in linearmem(with recent Home Menu versions at least). This is used by [[menuhax]].&lt;br /&gt;
| [[11.1.0-34|11.1.0-X]]&lt;br /&gt;
| &lt;br /&gt;
| [[4.0.0-7|4.0.0-X]]&lt;br /&gt;
| July 27, 2016&lt;br /&gt;
| October 23, 2015&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| [[System_SaveData|NAND-savedata]] Launcher.dat icons (nandiconhax)&lt;br /&gt;
| The homemenu code processing the titleid list @ launcherdat+8 copies those titleIDs to another buffer, where the offset relative to that buffer is calculated using the corresponding s8/s16 entries. Those two values are not range checked at all. Hence, one can use this to write u64(s) with arbitrary values to before/after this allocated output buffer. See [[Home_Menu|here]] regarding Launcher.dat structure.&lt;br /&gt;
&lt;br /&gt;
This can be exploited(with Launcher.dat loading at startup at least) by using a s16 for the icon entry with value 0xFFEC(-20)(and perhaps more icons with similar s16 values to write multiple u64s). The result is that the u64 value is written to outbuf-0xA0, which overwrites object+0(vtable) and object+4(doesn&#039;t matter here) for an object that gets used a bit after the vulnerable function triggers. The low 32bits of the u64 can then be set to the address of controlled memory(either outbuf in regular heap or the entire launcherdat buffer in linearmem), for use as a fake vtable in order to get control of PC. From there one can begin ROP via vtable funcptrs to do a stack-pivot(r4=objectaddr at the time the above object gets used).&lt;br /&gt;
&lt;br /&gt;
Originally this vuln could only be triggered via Launcher.dat at Home Menu startup, right after Launcher.dat gets loaded + memory gets allocated, once the file-format version code is finished running. Starting with v9.6 this can be triggered when loading layouts from SD extdata as well. The vuln itself triggers before the layout data is written to Launcher.dat, but it doesn&#039;t seem to be possible to overwrite anything which actually gets used before the function which writes Launcher.dat into the layout gets called.&lt;br /&gt;
&lt;br /&gt;
Home Menu has some sort of fail-safe system(or at least on v9.7) when Home Menu crashes due to Launcher.dat(this also applies for other things with Home Menu): after crashing once, Home Menu resets Launcher.dat to a state where it no longer crashes anymore. However, note that any exploits using this which hang/etc without crashing will still brick the system. &#039;&#039;&#039;Hence, attempting anything with this on physnand without hw-nand-access isn&#039;t really recommended.&#039;&#039;&#039;&lt;br /&gt;
| [[11.1.0-34|11.1.0-X]]&lt;br /&gt;
| &lt;br /&gt;
| [[4.0.0-7|4.0.0-X]]&lt;br /&gt;
| &lt;br /&gt;
| May 14, 2015&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| Theme-data decompression buffer overflow ([[menuhax|themehax]])&lt;br /&gt;
| The only func-call size parameter used by the theme decompression function is one for the compressed size, none for the decompressed size. The decompressed-size value from the LZ header is used by this function to check when to stop decompressing, but this function itself has nothing to verify the decompressed_size with. The code calling this function does not check or even use the decompressed size from the header either.&lt;br /&gt;
&lt;br /&gt;
This function is separate from the rest of the Home Menu code: the function used for decompressing themes is *only* used for decompressing themes, nothing else. There&#039;s a separate decompression function in Home Menu used for decompressing everything else.&lt;br /&gt;
&lt;br /&gt;
That other decompression function in Home Menu handles decompression size properly(decompressed size check for max buffer size is done by code calling the other function, not in the function itself). Unlike the other function, the theme function supports multiple LZ algorithms, but the one which actually gets used in official themes is the same one supported by the other function anyway.&lt;br /&gt;
&lt;br /&gt;
See also [[menuhax|here]].&lt;br /&gt;
&lt;br /&gt;
With [[10.2.0-28|10.2.0-X]] Home Menu, the only code change was that the following was added right after theme-load and before actual decompression: &amp;quot;if(&amp;lt;get_lzheader_decompressed_size&amp;gt;(compressed_buf) &amp;gt; 0x150000)&amp;lt;exit&amp;gt;;&amp;quot;. This fixed the vuln.&lt;br /&gt;
| [[10.2.0-28|10.2.0-X]]&lt;br /&gt;
| [[10.2.0-28|10.2.0-X]]&lt;br /&gt;
| &amp;lt;Old3DS/New3DS version which added initial theme support&amp;gt;&lt;br /&gt;
| &lt;br /&gt;
| December 22, 2014&lt;br /&gt;
| [[User:Yellows8|Yellows8]], [[User:Myria|Myria]] independently (~spring 2015)&lt;br /&gt;
|-&lt;br /&gt;
| Shuffle body-data buffer overflow ([[menuhax|shufflehax]])&lt;br /&gt;
| See [[menuhax|here]].&lt;br /&gt;
| [[10.6.0-31|10.6.0-X]]&lt;br /&gt;
| [[10.6.0-31|10.6.0-X]]&lt;br /&gt;
| [[9.3.0-21|9.3.0-X]]&lt;br /&gt;
| &lt;br /&gt;
| January 3, 2015&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| Extdata file-data loading buffer overflow&lt;br /&gt;
| The extdata file-reading code allocates a fixed-size heap buffer for the expected filesize, then reads the filedata into this buffer using the actual FS filesize. Before v5.0 the filesize used here wasn&#039;t validated, hence if the filesize is larger than alloc_size a buffer overflow would occur. &#039;&#039;After&#039;&#039; doing the file-read it does validate that the actual_readsize matches the alloc_size, but at this point the buffer overflow has already occurred.&lt;br /&gt;
&lt;br /&gt;
This affected at least the following: SaveData.dat and Cache.dat.&lt;br /&gt;
&lt;br /&gt;
This can be triggered with SaveData.dat by installing a &amp;lt;v4.0 Home Menu version, with Home Menu extdata from &amp;gt;=v4.0 still on SD. When this is done with v2.0 Home Menu, a kernelpanic occurs when processing an AM command(it appears a buffer ptr which is then passed to a command was overwritten with 0x0 - of course other SaveData.dat filesizes may result in different behaviour).&lt;br /&gt;
| [[5.0.0-11|5.0.0-X]]&lt;br /&gt;
| &lt;br /&gt;
| [[2.0.0-2|2.0.0-X]]&lt;br /&gt;
| June 9, 2016&lt;br /&gt;
| June 9, 2016&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The icon data arrays used with {sd/nand}iconhax were added to SaveData.dat/Launcher.dat with [[4.0.0-7|4.0.0-X]], hence the vulnerable functions were added with that same version.&lt;br /&gt;
&lt;br /&gt;
With &amp;lt;=v4.0 the SaveData.dat buffer is located in the regular heap. It&#039;s unknown when exactly it was moved to linearmem, which is where it&#039;s located with recent versions. It&#039;s located in linearmem for KOR &amp;gt;=v9.6 for example.&lt;br /&gt;
&lt;br /&gt;
The SaveData.dat/Launcher.dat icon vulns were fixed by doing various unsigned &amp;gt;=60/&amp;gt;=360 checks on the loaded values. When these checks fail, it just skips over handling this icon entry. Hence, the original value can&#039;t be negative / out-of-bounds any more.&lt;br /&gt;
&lt;br /&gt;
==Useless crashes==&lt;br /&gt;
Old3DS system web-browser:&lt;br /&gt;
* 2^32 characters long string(&#039;&#039;finally&#039;&#039; fixed with v10.6): this is similar to the vulnerability fixed [http://git.chromium.org/gitweb/?p=external/Webkit.git;a=commitdiff;h=ec471f16fbd1f879cb631f9b022fd16acd75f4d4 here], concat-large-strings-crash2.html triggers a crash which is about the same as the one triggered by a 2^32 string. Most of the time this vulnerability will cause a memory page permissions fault, since the WebKit code attempts to copy the string text data to the output buffer located in read-only [[CRO0|CRO]] heap memory. The only difference between a crash triggered by a 2^32 string and the concat-large-strings-crash2.html crash is at the former copies the string data using the original string length(like 1 text character for &amp;quot;x&amp;quot;, 4 for &amp;quot;xxxx&amp;quot;) while the latter attempts to copy &amp;gt;12MB. In some &#039;&#039;very&#039;&#039; rare cases a thread separate from the string data-copy thread will crash, this might be exploitable. However, this is mostly useless since it rarely crashes this way.&lt;br /&gt;
&lt;br /&gt;
* Trying to directly load a page via the browser &amp;quot;URL&amp;quot; option with [https://github.com/yellows8/3ds_browserhax_common webkitdebug] setup, causes a crash to trigger in oss.cro due to an use-after-free being caught with webkitdebug. This is presumably some sort of realloc() issue in the libcurl version used by the &amp;lt;={v10.2-v10.3} browser. This happens with *every* *single* *page* one tries to load via the &amp;quot;URL&amp;quot; option, but not when loading links on the current page, hence this is probably useless. A different use-after-free with realloc triggers with loading any page at all regardless of method too(libcurl probably).&lt;br /&gt;
&lt;br /&gt;
* This WebKit build has &#039;&#039;a lot&#039;&#039; of crash-trigger bugs that only happen with [https://github.com/yellows8/3ds_browserhax_common webkitdebug] completely setup(addr accesses near 0x0), with &#039;&#039;just&#039;&#039; trying to load any page at all.&lt;/div&gt;</summary>
		<author><name>EvilFlight</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=Filesystem_services&amp;diff=21318</id>
		<title>Filesystem services</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=Filesystem_services&amp;diff=21318"/>
		<updated>2020-07-28T08:32:40Z</updated>

		<summary type="html">&lt;p&gt;EvilFlight: /* IntegrityVerificationSeed */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Services]]&lt;br /&gt;
&lt;br /&gt;
= Services =&lt;br /&gt;
== Filesystem service &amp;quot;fs:USER&amp;quot; ==&lt;br /&gt;
You can at most have 32 FS archive handles.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Command Header&lt;br /&gt;
!  Available since system version &lt;br /&gt;
!  Description&lt;br /&gt;
!   scope=&amp;quot;col&amp;quot; width=&amp;quot;400&amp;quot; | Required [[NCCH/Extended_Header|exheader]] access info bitmask&lt;br /&gt;
|-&lt;br /&gt;
| 0x000100C6&lt;br /&gt;
|?&lt;br /&gt;
| [[FS:Dummy1|Dummy1]]&lt;br /&gt;
| None&lt;br /&gt;
|-&lt;br /&gt;
| 0x040100C4&lt;br /&gt;
|?&lt;br /&gt;
| [[FS:Control|Control]]&lt;br /&gt;
| None&lt;br /&gt;
|-&lt;br /&gt;
| 0x08010002&lt;br /&gt;
|?&lt;br /&gt;
| [[FS:Initialize|Initialize]]&lt;br /&gt;
| None&lt;br /&gt;
|-&lt;br /&gt;
| 0x080201C2&lt;br /&gt;
|?&lt;br /&gt;
| [[FS:OpenFile|OpenFile]]&lt;br /&gt;
| None&lt;br /&gt;
|-&lt;br /&gt;
| 0x08030204&lt;br /&gt;
|?&lt;br /&gt;
| [[FS:OpenFileDirectly|OpenFileDirectly]]&lt;br /&gt;
| None&lt;br /&gt;
|-&lt;br /&gt;
| 0x08040142&lt;br /&gt;
|?&lt;br /&gt;
| [[FS:DeleteFile|DeleteFile]]&lt;br /&gt;
| None&lt;br /&gt;
|-&lt;br /&gt;
| 0x08050244&lt;br /&gt;
|?&lt;br /&gt;
| [[FS:RenameFile|RenameFile]]&lt;br /&gt;
| None&lt;br /&gt;
|-&lt;br /&gt;
| 0x08060142&lt;br /&gt;
|?&lt;br /&gt;
| [[FS:DeleteDirectory|DeleteDirectory]]&lt;br /&gt;
| None&lt;br /&gt;
|-&lt;br /&gt;
| 0x08070142&lt;br /&gt;
|?&lt;br /&gt;
| [[FS:DeleteDirectoryRecursively|DeleteDirectoryRecursively]]&lt;br /&gt;
| None&lt;br /&gt;
|-&lt;br /&gt;
| 0x08080202&lt;br /&gt;
|?&lt;br /&gt;
| [[FS:CreateFile|CreateFile]]&lt;br /&gt;
| None&lt;br /&gt;
|-&lt;br /&gt;
| 0x08090182&lt;br /&gt;
|?&lt;br /&gt;
| [[FS:CreateDirectory|CreateDirectory]]&lt;br /&gt;
| None&lt;br /&gt;
|-&lt;br /&gt;
| 0x080A0244&lt;br /&gt;
|?&lt;br /&gt;
| [[FS:RenameDirectory|RenameDirectory]]&lt;br /&gt;
| None&lt;br /&gt;
|-&lt;br /&gt;
| 0x080B0102&lt;br /&gt;
|?&lt;br /&gt;
| [[FS:OpenDirectory|OpenDirectory]]&lt;br /&gt;
| None&lt;br /&gt;
|-&lt;br /&gt;
| 0x080C00C2&lt;br /&gt;
|?&lt;br /&gt;
| [[FS:OpenArchive|OpenArchive]]&lt;br /&gt;
| Each archive ID code has separate access info bitmasks, if it has any&lt;br /&gt;
|-&lt;br /&gt;
| 0x080D0144&lt;br /&gt;
|?&lt;br /&gt;
| [[FS:ControlArchive|ControlArchive]]&lt;br /&gt;
| None&lt;br /&gt;
|-&lt;br /&gt;
| 0x080E0080&lt;br /&gt;
|?&lt;br /&gt;
| [[FS:CloseArchive|CloseArchive]]&lt;br /&gt;
| None&lt;br /&gt;
|-&lt;br /&gt;
| 0x080F0180&lt;br /&gt;
|?&lt;br /&gt;
| [[FS:Obsoleted_2_0_FormatThisUserSaveData|Obsoleted_2_0_FormatThisUserSaveData]]&lt;br /&gt;
| None&lt;br /&gt;
|-&lt;br /&gt;
| 0x08100200&lt;br /&gt;
|?&lt;br /&gt;
| [[FS:Obsoleted_3_0_CreateSystemSaveData|Obsoleted_3_0_CreateSystemSaveData]]&lt;br /&gt;
| 0x4, for when the input saveID doesn&#039;t match the exheader saveID&lt;br /&gt;
|-&lt;br /&gt;
| 0x08110040&lt;br /&gt;
|?&lt;br /&gt;
| [[FS:Obsoleted_3_0_DeleteSystemSaveData|Obsoleted_3_0_DeleteSystemSaveData]]&lt;br /&gt;
| 0x1004, for when the input saveID doesn&#039;t match the exheader saveID&lt;br /&gt;
|-&lt;br /&gt;
| 0x08120080&lt;br /&gt;
|?&lt;br /&gt;
| [[FS:GetFreeBytes|GetFreeBytes]]&lt;br /&gt;
| None&lt;br /&gt;
|-&lt;br /&gt;
| 0x08130000&lt;br /&gt;
|?&lt;br /&gt;
| [[FS:GetCardType|GetCardType]]&lt;br /&gt;
| 0x1017&lt;br /&gt;
|-&lt;br /&gt;
| 0x08140000&lt;br /&gt;
|?&lt;br /&gt;
| [[FS:GetSdmcArchiveResource|GetSdmcArchiveResource]]&lt;br /&gt;
| None&lt;br /&gt;
|-&lt;br /&gt;
| 0x08150000&lt;br /&gt;
|?&lt;br /&gt;
| [[FS:GetNandArchiveResource|GetNandArchiveResource]]&lt;br /&gt;
| 0x1007&lt;br /&gt;
|-&lt;br /&gt;
| 0x08160000&lt;br /&gt;
|?&lt;br /&gt;
| [[FS:GetSdmcFatfsError|GetSdmcFatfsError]]&lt;br /&gt;
| 0x2&lt;br /&gt;
|-&lt;br /&gt;
| 0x08170000&lt;br /&gt;
|?&lt;br /&gt;
| [[FS:IsSdmcDetected|IsSdmcDetected]]&lt;br /&gt;
| None&lt;br /&gt;
|-&lt;br /&gt;
| 0x08180000&lt;br /&gt;
|?&lt;br /&gt;
| [[FS:IsSdmcWritable|IsSdmcWritable]]&lt;br /&gt;
| None&lt;br /&gt;
|-&lt;br /&gt;
| 0x08190042&lt;br /&gt;
|?&lt;br /&gt;
| [[FS:GetSdmcCid|GetSdmcCid]]&lt;br /&gt;
| 0x2&lt;br /&gt;
|-&lt;br /&gt;
| 0x081A0042&lt;br /&gt;
|?&lt;br /&gt;
| [[FS:GetNandCid|GetNandCid]]&lt;br /&gt;
| 0x2&lt;br /&gt;
|-&lt;br /&gt;
| 0x081B0000&lt;br /&gt;
|?&lt;br /&gt;
| [[FS:GetSdmcSpeedInfo|GetSdmcSpeedInfo]]&lt;br /&gt;
| 0x2&lt;br /&gt;
|-&lt;br /&gt;
| 0x081C0000&lt;br /&gt;
|?&lt;br /&gt;
| [[FS:GetNandSpeedInfo|GetNandSpeedInfo]]&lt;br /&gt;
| 0x2&lt;br /&gt;
|-&lt;br /&gt;
| 0x081D0042&lt;br /&gt;
|?&lt;br /&gt;
| [[FS:GetSdmcLog|GetSdmcLog]]&lt;br /&gt;
| 0x2&lt;br /&gt;
|-&lt;br /&gt;
| 0x081E0042&lt;br /&gt;
|?&lt;br /&gt;
| [[FS:GetNandLog|GetNandLog]]&lt;br /&gt;
| 0x2&lt;br /&gt;
|-&lt;br /&gt;
| 0x081F0000&lt;br /&gt;
|?&lt;br /&gt;
| [[FS:ClearSdmcLog|ClearSdmcLog]]&lt;br /&gt;
| 0x2&lt;br /&gt;
|-&lt;br /&gt;
| 0x08200000&lt;br /&gt;
|?&lt;br /&gt;
| [[FS:ClearNandLog|ClearNandLog]]&lt;br /&gt;
| 0x2&lt;br /&gt;
|-&lt;br /&gt;
| 0x08210000&lt;br /&gt;
|?&lt;br /&gt;
| [[FS:CardSlotIsInserted|CardSlotIsInserted]]&lt;br /&gt;
| 0x1017&lt;br /&gt;
|-&lt;br /&gt;
| 0x08220000&lt;br /&gt;
|?&lt;br /&gt;
| [[FS:CardSlotPowerOn|CardSlotPowerOn]]&lt;br /&gt;
| 0x2&lt;br /&gt;
|-&lt;br /&gt;
| 0x08230000&lt;br /&gt;
|?&lt;br /&gt;
| [[FS:CardSlotPowerOff|CardSlotPowerOff]]&lt;br /&gt;
| 0x2&lt;br /&gt;
|-&lt;br /&gt;
| 0x08240000&lt;br /&gt;
|?&lt;br /&gt;
| [[FS:CardSlotGetCardIFPowerStatus|CardSlotGetCardIFPowerStatus]]&lt;br /&gt;
| 0x2&lt;br /&gt;
|-&lt;br /&gt;
| 0x08250040&lt;br /&gt;
|?&lt;br /&gt;
| [[FS:CardNorDirectCommand|CardNorDirectCommand]]&lt;br /&gt;
| 0x2&lt;br /&gt;
|-&lt;br /&gt;
| 0x08260080&lt;br /&gt;
|?&lt;br /&gt;
| [[FS:CardNorDirectCommandWithAddress|CardNorDirectCommandWithAddress]]&lt;br /&gt;
| 0x2&lt;br /&gt;
|-&lt;br /&gt;
| 0x08270082&lt;br /&gt;
|?&lt;br /&gt;
| [[FS:CardNorDirectRead|CardNorDirectRead]]&lt;br /&gt;
| 0x2&lt;br /&gt;
|-&lt;br /&gt;
| 0x082800C2&lt;br /&gt;
|?&lt;br /&gt;
| [[FS:CardNorDirectReadWithAddress|CardNorDirectReadWithAddress]]&lt;br /&gt;
| 0x2&lt;br /&gt;
|-&lt;br /&gt;
| 0x08290082&lt;br /&gt;
|?&lt;br /&gt;
| [[FS:CardNorDirectWrite|CardNorDirectWrite]]&lt;br /&gt;
| 0x2&lt;br /&gt;
|-&lt;br /&gt;
| 0x082A00C2&lt;br /&gt;
|?&lt;br /&gt;
| [[FS:CardNorDirectWriteWithAddress|CardNorDirectWriteWithAddress]]&lt;br /&gt;
| 0x2&lt;br /&gt;
|-&lt;br /&gt;
| 0x082B00C2&lt;br /&gt;
|?&lt;br /&gt;
| [[FS:CardNorDirectRead_4xIO|CardNorDirectRead_4xIO]]&lt;br /&gt;
| 0x2&lt;br /&gt;
|-&lt;br /&gt;
| 0x082C0082&lt;br /&gt;
|?&lt;br /&gt;
| [[FS:CardNorDirectCpuWriteWithoutVerify|CardNorDirectCpuWriteWithoutVerify]]&lt;br /&gt;
| 0x2&lt;br /&gt;
|-&lt;br /&gt;
| 0x082D0040&lt;br /&gt;
|?&lt;br /&gt;
| [[FS:CardNorDirectSectorEraseWithoutVerify|CardNorDirectSectorEraseWithoutVerify]]&lt;br /&gt;
| 0x2&lt;br /&gt;
|-&lt;br /&gt;
| 0x082E0040&lt;br /&gt;
|?&lt;br /&gt;
| [[FS:GetProductInfo|GetProductInfo]]&lt;br /&gt;
| 0x1005&lt;br /&gt;
|-&lt;br /&gt;
| 0x082F0040&lt;br /&gt;
|?&lt;br /&gt;
| [[FS:GetProgramLaunchInfo|GetProgramLaunchInfo]]&lt;br /&gt;
| 0x1005&lt;br /&gt;
|-&lt;br /&gt;
| 0x08300182&lt;br /&gt;
|?&lt;br /&gt;
| [[FS:Obsoleted_3_0_CreateExtSaveData|Obsoleted_3_0_CreateExtSaveData]]&lt;br /&gt;
| 0xC, for when the input extdataID doesn&#039;t match the exheader extdataID&lt;br /&gt;
|-&lt;br /&gt;
| 0x08310180&lt;br /&gt;
|?&lt;br /&gt;
| [[FS:Obsoleted_3_0_CreateSharedExtSaveData|Obsoleted_3_0_CreateSharedExtSaveData]]&lt;br /&gt;
| 0x1005&lt;br /&gt;
|-&lt;br /&gt;
| 0x08320102&lt;br /&gt;
|?&lt;br /&gt;
| [[FS:Obsoleted_3_0_ReadExtSaveDataIcon|Obsoleted_3_0_ReadExtSaveDataIcon]]&lt;br /&gt;
| 0x100D, for when the input extdataID doesn&#039;t match the exheader extdataID&lt;br /&gt;
|-&lt;br /&gt;
| 0x08330082&lt;br /&gt;
|?&lt;br /&gt;
| [[FS:Obsoleted_3_0_EnumerateExtSaveData|Obsoleted_3_0_EnumerateExtSaveData]]&lt;br /&gt;
| 0x1005&lt;br /&gt;
|-&lt;br /&gt;
| 0x08340082&lt;br /&gt;
|?&lt;br /&gt;
| [[FS:Obsoleted_3_0_EnumerateSharedExtSaveData|Obsoleted_3_0_EnumerateSharedExtSaveData]]&lt;br /&gt;
| 0x1005&lt;br /&gt;
|-&lt;br /&gt;
| 0x08350080&lt;br /&gt;
|?&lt;br /&gt;
| [[FS:Obsoleted_3_0_DeleteExtSaveData|Obsoleted_3_0_DeleteExtSaveData]]&lt;br /&gt;
| 0x100D, for when the input extdataID doesn&#039;t match the exheader extdataID&lt;br /&gt;
|-&lt;br /&gt;
| 0x08360080&lt;br /&gt;
|?&lt;br /&gt;
| [[FS:Obsoleted_3_0_DeleteSharedExtSaveData|Obsoleted_3_0_DeleteSharedExtSaveData]]&lt;br /&gt;
| 0x1005&lt;br /&gt;
|-&lt;br /&gt;
| 0x08370040&lt;br /&gt;
|?&lt;br /&gt;
| [[FS:SetCardSpiBaudRate|SetCardSpiBaudRate]]&lt;br /&gt;
| 0x2&lt;br /&gt;
|-&lt;br /&gt;
| 0x08380040&lt;br /&gt;
|?&lt;br /&gt;
| [[FS:SetCardSpiBusMode|SetCardSpiBusMode]]&lt;br /&gt;
| 0x2&lt;br /&gt;
|-&lt;br /&gt;
| 0x08390000&lt;br /&gt;
|?&lt;br /&gt;
| [[FS:SendInitializeInfoTo9|SendInitializeInfoTo9]]&lt;br /&gt;
| None&lt;br /&gt;
|-&lt;br /&gt;
| 0x083A0100&lt;br /&gt;
|?&lt;br /&gt;
| [[FS:GetSpecialContentIndex|GetSpecialContentIndex]]&lt;br /&gt;
| 0x1005&lt;br /&gt;
|-&lt;br /&gt;
| 0x083B00C2&lt;br /&gt;
|?&lt;br /&gt;
| [[FS:GetLegacyRomHeader|GetLegacyRomHeader]]&lt;br /&gt;
| 0x1015&lt;br /&gt;
|-&lt;br /&gt;
| 0x083C00C2&lt;br /&gt;
|?&lt;br /&gt;
| [[FS:GetLegacyBannerData|GetLegacyBannerData]]&lt;br /&gt;
| 0x1015&lt;br /&gt;
|-&lt;br /&gt;
| 0x083D0100&lt;br /&gt;
|?&lt;br /&gt;
| [[FS:CheckAuthorityToAccessExtSaveData|CheckAuthorityToAccessExtSaveData]]&lt;br /&gt;
| 0x44&lt;br /&gt;
|-&lt;br /&gt;
| 0x083E00C2&lt;br /&gt;
|?&lt;br /&gt;
| [[FS:QueryTotalQuotaSize|QueryTotalQuotaSize]]&lt;br /&gt;
| None&lt;br /&gt;
|-&lt;br /&gt;
| 0x083F00C0&lt;br /&gt;
|?&lt;br /&gt;
| [[FS:Obsoleted_3_0_GetExtDataBlockSize|Obsoleted_3_0_GetExtDataBlockSize]]&lt;br /&gt;
| None&lt;br /&gt;
|-&lt;br /&gt;
| 0x08400040&lt;br /&gt;
|?&lt;br /&gt;
| [[FS:AbnegateAccessRight|AbnegateAccessRight]]&lt;br /&gt;
|?&lt;br /&gt;
|-&lt;br /&gt;
| 0x08410000&lt;br /&gt;
|?&lt;br /&gt;
| [[FS:DeleteSdmcRoot|DeleteSdmcRoot]]&lt;br /&gt;
| 0x1005&lt;br /&gt;
|-&lt;br /&gt;
| 0x08420040&lt;br /&gt;
|?&lt;br /&gt;
| [[FS:DeleteAllExtSaveDataOnNand|DeleteAllExtSaveDataOnNand]]&lt;br /&gt;
| 0x1005&lt;br /&gt;
|-&lt;br /&gt;
| 0x08430000&lt;br /&gt;
|?&lt;br /&gt;
| [[FS:InitializeCtrFileSystem|InitializeCtrFileSystem]]&lt;br /&gt;
| None&lt;br /&gt;
|-&lt;br /&gt;
| 0x08440000&lt;br /&gt;
|?&lt;br /&gt;
| [[FS:CreateSeed|CreateSeed]]&lt;br /&gt;
| 0x2&lt;br /&gt;
|-&lt;br /&gt;
| 0x084500C2&lt;br /&gt;
|?&lt;br /&gt;
| [[FS:GetFormatInfo|GetFormatInfo]]&lt;br /&gt;
|?&lt;br /&gt;
|-&lt;br /&gt;
| 0x08460102&lt;br /&gt;
|?&lt;br /&gt;
| [[FS:GetLegacyRomHeader2|GetLegacyRomHeader2]]&lt;br /&gt;
| 0x1015&lt;br /&gt;
|-&lt;br /&gt;
| 0x08470180&lt;br /&gt;
|?&lt;br /&gt;
| [[FS:Obsoleted_2_0_FormatCtrCardUserSaveData|Obsoleted_2_0_FormatCtrCardUserSaveData]]&lt;br /&gt;
| 0x6&lt;br /&gt;
|-&lt;br /&gt;
| 0x08480042&lt;br /&gt;
|?&lt;br /&gt;
| [[FS:GetSdmcCtrRootPath|GetSdmcCtrRootPath]]&lt;br /&gt;
| 0x100D&lt;br /&gt;
|-&lt;br /&gt;
| 0x08490040&lt;br /&gt;
|?&lt;br /&gt;
| [[FS:GetArchiveResource|GetArchiveResource]]&lt;br /&gt;
|?&lt;br /&gt;
|-&lt;br /&gt;
| 0x084A0002&lt;br /&gt;
|?&lt;br /&gt;
| [[FS:ExportIntegrityVerificationSeed|ExportIntegrityVerificationSeed]]&lt;br /&gt;
| 0x4000&lt;br /&gt;
|-&lt;br /&gt;
| 0x084B0002&lt;br /&gt;
|?&lt;br /&gt;
| [[FS:ImportIntegrityVerificationSeed|ImportIntegrityVerificationSeed]]&lt;br /&gt;
| 0x4000&lt;br /&gt;
|-&lt;br /&gt;
| 0x084C0242&lt;br /&gt;
|?&lt;br /&gt;
| [[FS:FormatSaveData|FormatSaveData]]&lt;br /&gt;
| 0x6, in some cases this write isn&#039;t needed however&lt;br /&gt;
|-&lt;br /&gt;
| 0x084D0102&lt;br /&gt;
|?&lt;br /&gt;
| [[FS:GetLegacySubBannerData|GetLegacySubBannerData]]&lt;br /&gt;
| 0x1015&lt;br /&gt;
|-&lt;br /&gt;
| 0x084E0342&lt;br /&gt;
|?&lt;br /&gt;
| [[FS:UpdateSha256Context|UpdateSha256Context]]&lt;br /&gt;
| 0x5&lt;br /&gt;
|-&lt;br /&gt;
| 0x084F0102&lt;br /&gt;
|?&lt;br /&gt;
| [[FS:ReadSpecialFile|ReadSpecialFile]]&lt;br /&gt;
| None&lt;br /&gt;
|-&lt;br /&gt;
| 0x08500040&lt;br /&gt;
|?&lt;br /&gt;
| [[FS:GetSpecialFileSize|GetSpecialFileSize]]&lt;br /&gt;
| None&lt;br /&gt;
|-&lt;br /&gt;
| 0x08510242&lt;br /&gt;
| [[3.0.0-5]]&lt;br /&gt;
| [[FS:CreateExtSaveData|CreateExtSaveData]]&lt;br /&gt;
| Shared extdata: 0x101005. Regular extdata in certain cases: 0xC&lt;br /&gt;
|-&lt;br /&gt;
| 0x08520100&lt;br /&gt;
| [[3.0.0-5]]&lt;br /&gt;
| [[FS:DeleteExtSaveData|DeleteExtSaveData]]&lt;br /&gt;
| Shared extdata: 0x101005. Regular extdata in certain cases: 0x10100D&lt;br /&gt;
|-&lt;br /&gt;
| 0x08530142&lt;br /&gt;
| [[3.0.0-5]]&lt;br /&gt;
| [[FS:ReadExtSaveDataIcon|ReadExtSaveDataIcon]]&lt;br /&gt;
| 0x10100D (this doesn&#039;t apply in certain cases, however)&lt;br /&gt;
|-&lt;br /&gt;
| 0x085400C0&lt;br /&gt;
| [[3.0.0-5]]&lt;br /&gt;
| [[FS:GetExtDataBlockSize|GetExtDataBlockSize]]&lt;br /&gt;
| 0x10100D (this doesn&#039;t apply in certain cases, however)&lt;br /&gt;
|-&lt;br /&gt;
| 0x08550102&lt;br /&gt;
| [[3.0.0-5]]&lt;br /&gt;
| [[FS:EnumerateExtSaveData|EnumerateExtSaveData]]&lt;br /&gt;
| 0x101005&lt;br /&gt;
|-&lt;br /&gt;
| 0x08560240&lt;br /&gt;
| [[3.0.0-5]]&lt;br /&gt;
| [[FS:CreateSystemSaveData|CreateSystemSaveData]]&lt;br /&gt;
| 0x4 (this doesn&#039;t apply in certain cases, however)&lt;br /&gt;
|-&lt;br /&gt;
| 0x08570080&lt;br /&gt;
| [[3.0.0-5]]&lt;br /&gt;
| [[FS:DeleteSystemSaveData|DeleteSystemSaveData]]&lt;br /&gt;
| 0x1004 (this doesn&#039;t apply in certain cases, however)&lt;br /&gt;
|-&lt;br /&gt;
| 0x08580000&lt;br /&gt;
| [[3.0.0-5]]&lt;br /&gt;
| [[FS:StartDeviceMoveAsSource|StartDeviceMoveAsSource]]&lt;br /&gt;
| 0x2004&lt;br /&gt;
|-&lt;br /&gt;
| 0x08590200&lt;br /&gt;
| [[3.0.0-5]]&lt;br /&gt;
| [[FS:StartDeviceMoveAsDestination|StartDeviceMoveAsDestination]]&lt;br /&gt;
| 0x2004&lt;br /&gt;
|-&lt;br /&gt;
| 0x085A00C0&lt;br /&gt;
| [[3.0.0-5]]&lt;br /&gt;
| [[FS:SetArchivePriority|SetArchivePriority]]&lt;br /&gt;
| None&lt;br /&gt;
|-&lt;br /&gt;
| 0x085B0080&lt;br /&gt;
| [[3.0.0-5]]&lt;br /&gt;
| [[FS:GetArchivePriority|GetArchivePriority]]&lt;br /&gt;
| None&lt;br /&gt;
|-&lt;br /&gt;
| 0x085C00C0&lt;br /&gt;
| [[3.0.0-5]]&lt;br /&gt;
| [[FS:SetCtrCardLatencyParameter|SetCtrCardLatencyParameter]]&lt;br /&gt;
| 0xE&lt;br /&gt;
|-&lt;br /&gt;
| 0x085D01C0&lt;br /&gt;
| [[3.0.0-5]]&lt;br /&gt;
| [[FS:SetFsCompatibilityInfo|SetFsCompatibilityInfo]]&lt;br /&gt;
| 0x100001&lt;br /&gt;
|-&lt;br /&gt;
| 0x085E0040&lt;br /&gt;
| [[3.0.0-5]]&lt;br /&gt;
| [[FS:ResetCardCompatibilityParameter|ResetCardCompatibilityParameter]]&lt;br /&gt;
| 0xE&lt;br /&gt;
|-&lt;br /&gt;
| 0x085F0040&lt;br /&gt;
| [[3.0.0-5]]&lt;br /&gt;
| [[FS:SwitchCleanupInvalidSaveData|SwitchCleanupInvalidSaveData]]&lt;br /&gt;
| 0x12004&lt;br /&gt;
|-&lt;br /&gt;
| 0x08600042&lt;br /&gt;
| [[3.0.0-5]]&lt;br /&gt;
| [[FS:EnumerateSystemSaveData|EnumerateSystemSaveData]]&lt;br /&gt;
| 0x2004&lt;br /&gt;
|-&lt;br /&gt;
| 0x08610042&lt;br /&gt;
| [[3.0.0-5]]&lt;br /&gt;
| [[FS:InitializeWithSdkVersion|InitializeWithSdkVersion]]&lt;br /&gt;
| None&lt;br /&gt;
|-&lt;br /&gt;
| 0x08620040&lt;br /&gt;
| [[3.0.0-5]]&lt;br /&gt;
| [[FS:SetPriority|SetPriority]]&lt;br /&gt;
| None&lt;br /&gt;
|-&lt;br /&gt;
| 0x08630000&lt;br /&gt;
| [[3.0.0-5]]&lt;br /&gt;
| [[FS:GetPriority|GetPriority]]&lt;br /&gt;
| None&lt;br /&gt;
|-&lt;br /&gt;
| 0x08640000&lt;br /&gt;
| [[3.0.0-5]]&lt;br /&gt;
| [[FS:Obsoleted_4_0_GetNandInfo|Obsoleted_4_0_GetNandInfo]]&lt;br /&gt;
| Stubbed, this returns an error&lt;br /&gt;
|-&lt;br /&gt;
| 0x08650140&lt;br /&gt;
| [[4.0.0-7]]&lt;br /&gt;
| [[FS:SetSaveDataSecureValue|SetSaveDataSecureValue]]&lt;br /&gt;
| 0x121004 (in certain cases this doesn&#039;t apply, however)&lt;br /&gt;
|-&lt;br /&gt;
| 0x086600C0&lt;br /&gt;
| [[4.0.0-7]]&lt;br /&gt;
| [[FS:GetSaveDataSecureValue|GetSaveDataSecureValue]]&lt;br /&gt;
| 0x121004 (in certain cases this doesn&#039;t apply, however)&lt;br /&gt;
|-&lt;br /&gt;
| 0x086700C4&lt;br /&gt;
| [[4.0.0-7]]&lt;br /&gt;
| [[FS:ControlSecureSave|ControlSecureSave]]&lt;br /&gt;
| 0x121004&lt;br /&gt;
|-&lt;br /&gt;
| 0x08680000&lt;br /&gt;
| [[4.0.0-7]]&lt;br /&gt;
| [[FS:GetMediaType|GetMediaType]]&lt;br /&gt;
| None&lt;br /&gt;
|-&lt;br /&gt;
| 0x08690000&lt;br /&gt;
| [[4.0.0-7]]&lt;br /&gt;
| [[FS:Obsoleted_4_0_GetNandEraseCount|Obsoleted_4_0_GetNandEraseCount]]&lt;br /&gt;
| Stubbed, this returns an error.&lt;br /&gt;
|-&lt;br /&gt;
| 0x086A0082&lt;br /&gt;
| [[4.0.0-7]]&lt;br /&gt;
| [[FS:ReadNandReport|ReadNandReport]]&lt;br /&gt;
| None&lt;br /&gt;
|-&lt;br /&gt;
| 0x086B00C2&lt;br /&gt;
|?&lt;br /&gt;
|SetOtherSaveDataSecureValue&lt;br /&gt;
| 00121004&lt;br /&gt;
|-&lt;br /&gt;
| 0x086C00C2&lt;br /&gt;
|?&lt;br /&gt;
|GetOtherSaveDataSecureValue&lt;br /&gt;
| 00121004&lt;br /&gt;
|-&lt;br /&gt;
| 0x086D0040&lt;br /&gt;
|?&lt;br /&gt;
|?&lt;br /&gt;
| 00020004&lt;br /&gt;
|-&lt;br /&gt;
| 0x086E00C0&lt;br /&gt;
|Related to Secure Value? Used in Pokemon Sun/Moon.&lt;br /&gt;
|SetThisSaveDataSecureValue&lt;br /&gt;
|None?&lt;br /&gt;
|-&lt;br /&gt;
| 0x086F0040&lt;br /&gt;
|Related to Secure Value? Used in Pokemon Sun/Moon.&lt;br /&gt;
|GetThisSaveDataSecureValue&lt;br /&gt;
| 0xE&lt;br /&gt;
|-&lt;br /&gt;
| 0x087000C2&lt;br /&gt;
|?&lt;br /&gt;
|?&lt;br /&gt;
|None?&lt;br /&gt;
|-&lt;br /&gt;
| 0x08710100&lt;br /&gt;
|?&lt;br /&gt;
|?&lt;br /&gt;
| 0xC&lt;br /&gt;
|-&lt;br /&gt;
| 0x087201C0&lt;br /&gt;
|?&lt;br /&gt;
|?&lt;br /&gt;
| 00080004&lt;br /&gt;
|-&lt;br /&gt;
| 0x087300C0&lt;br /&gt;
|?&lt;br /&gt;
|?&lt;br /&gt;
| 00080004&lt;br /&gt;
|-&lt;br /&gt;
| 0x08740000&lt;br /&gt;
|?&lt;br /&gt;
|?&lt;br /&gt;
| 00080004&lt;br /&gt;
|-&lt;br /&gt;
| 0x08750140&lt;br /&gt;
|?&lt;br /&gt;
|?&lt;br /&gt;
|None?&lt;br /&gt;
|-&lt;br /&gt;
| 0x087600C0&lt;br /&gt;
|?&lt;br /&gt;
|?&lt;br /&gt;
|None?&lt;br /&gt;
|-&lt;br /&gt;
| 0x08770100&lt;br /&gt;
|?&lt;br /&gt;
|?&lt;br /&gt;
|?&lt;br /&gt;
|-&lt;br /&gt;
| 0x087800C0&lt;br /&gt;
|?&lt;br /&gt;
|?&lt;br /&gt;
|?&lt;br /&gt;
|-&lt;br /&gt;
| 0x087900C2&lt;br /&gt;
| ?&lt;br /&gt;
| Same as GetLegacyBannerData, except for the last parameter this passes u8 value 0x1 instead of 0x0, for the FSPXI command.&lt;br /&gt;
| 0x00101015&lt;br /&gt;
|-&lt;br /&gt;
| 0x087A0180&lt;br /&gt;
| [[9.6.0-24|9.6.0-X]]&lt;br /&gt;
| [[FS:AddSeed|AddSeed]]&lt;br /&gt;
| 0x00200000&lt;br /&gt;
|-&lt;br /&gt;
| 0x087B....&lt;br /&gt;
| [[9.6.0-24|9.6.0-X]]&lt;br /&gt;
| Wrapper for the code internally used for command &amp;lt;0x087A....&amp;gt;.&lt;br /&gt;
| 0x00200000&lt;br /&gt;
|-&lt;br /&gt;
| 0x087C....&lt;br /&gt;
| [[9.6.0-24|9.6.0-X]]&lt;br /&gt;
| Eventually calls same code as command &amp;lt;0x087A....&amp;gt;.&lt;br /&gt;
| 0x00200000&lt;br /&gt;
|-&lt;br /&gt;
| 0x087D0000&lt;br /&gt;
| [[9.6.0-24|9.6.0-X]]&lt;br /&gt;
| GetNumSeeds. Writes the number of seeds to cmdreply[2]&lt;br /&gt;
| 0x00200000&lt;br /&gt;
|-&lt;br /&gt;
| 0x087E0042&lt;br /&gt;
| [[9.6.0-24|9.6.0-X]]&lt;br /&gt;
| Eventually calls same code as command &amp;lt;0x087A....&amp;gt;. Writes a list of titleIDs to the outbuf, this is for titles with content-lock-seed(s) stored in SEEDDB. (u32 total_titleids_probably, ((Size&amp;lt;&amp;lt;4)  &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; 12), outbufptr)&lt;br /&gt;
| 0x00200000&lt;br /&gt;
|-&lt;br /&gt;
| 0x087F....&lt;br /&gt;
| [[9.6.0-24|9.6.0-X]]&lt;br /&gt;
| ?&lt;br /&gt;
| 0x00200000&lt;br /&gt;
|-&lt;br /&gt;
| 0x0880....&lt;br /&gt;
| [[9.6.0-24|9.6.0-X]]&lt;br /&gt;
| Eventually calls same code as command &amp;lt;0x087A....&amp;gt;.&lt;br /&gt;
| 0x00200000&lt;br /&gt;
|-&lt;br /&gt;
| 0x0881....&lt;br /&gt;
| [[9.6.0-24|9.6.0-X]]&lt;br /&gt;
| Eventually calls same code as command &amp;lt;0x087A....&amp;gt;.&lt;br /&gt;
| 0x00200000&lt;br /&gt;
|-&lt;br /&gt;
| 0x0882....&lt;br /&gt;
| [[9.6.0-24|9.6.0-X]]&lt;br /&gt;
| Eventually calls same code as command &amp;lt;0x087A....&amp;gt;.&lt;br /&gt;
| 0x00200000&lt;br /&gt;
|-&lt;br /&gt;
| 0x08830000&lt;br /&gt;
| [[9.6.0-24|9.6.0-X]]&lt;br /&gt;
| Writes an output value to cmdreply[2].&lt;br /&gt;
| 0x00200000&lt;br /&gt;
|-&lt;br /&gt;
| 0x08840042&lt;br /&gt;
| [[9.6.0-24|9.6.0-X]]&lt;br /&gt;
| Eventually calls same code as command &amp;lt;0x087A....&amp;gt;.&lt;br /&gt;
| 0x00200000&lt;br /&gt;
|-&lt;br /&gt;
| 0x0885....&lt;br /&gt;
| [[9.6.0-24|9.6.0-X]]&lt;br /&gt;
| ?&lt;br /&gt;
| 0x00200000&lt;br /&gt;
|-&lt;br /&gt;
| 0x088600C0&lt;br /&gt;
| [[11.1.0-34|11.1.0-X]]&lt;br /&gt;
| [[FS:CheckUpdatedDat|CheckUpdatedDat]]&lt;br /&gt;
| 0x00080000&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Note: The question marks from Dummy1 to GetSpecialFileSize on the &amp;quot;available since system version&amp;quot; field are mainly there because I think that most of these are necessary for the main system to function, so theoretically that would mean that since the creation of the 3DS these were available, or since launch if that makes more sense. But because of the peculiar nature of some of the functions, they will remain question marks until they can be confirmed 100%.&lt;br /&gt;
&lt;br /&gt;
When access rights are required for a command, at least one of the bits in the process access info specified in the above table for the command must be set. Error 0xD9004676 is returned when a process attempts to use a command which it doesn&#039;t have access rights for the command. The exheader access info field is all zero&#039;s for most applications. Note that the permissions listed in the above table is for system-version v2.x, therefore permission bit(s) added with newer FIRM may be missing from this.&lt;br /&gt;
&lt;br /&gt;
Each session for fs:USER has separate permissions, initially these are set to all zero&#039;s for new fs:USER sessions. The permissions/etc for fs:USER sessions are initialized via [[FS:Initialize]](loaded from the user process exheader).&lt;br /&gt;
&lt;br /&gt;
== Filesystem service &amp;quot;fs:LDR&amp;quot; ==&lt;br /&gt;
This service is identical to fs:USER, except [[FS:OpenArchive]] archive 0x2345678E can only be accessed with fs:LDR.&lt;br /&gt;
&lt;br /&gt;
== ProgramRegistry service &amp;quot;fs:REG&amp;quot; ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Command Header&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x000100C6&lt;br /&gt;
| [[FSReg:Dummy1|Dummy1]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x040103C0&lt;br /&gt;
| [[FSReg:Register|Register]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x04020040&lt;br /&gt;
| [[FSReg:Unregister|Unregister]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x040300C0&lt;br /&gt;
| [[FSReg:GetProgramInfo|GetProgramInfo]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x04040100&lt;br /&gt;
| [[FSReg:LoadProgram|LoadProgram]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x04050080&lt;br /&gt;
| [[FSReg:UnloadProgram|UnloadProgram]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x04060080&lt;br /&gt;
| [[FSReg:CheckHostLoadId|CheckHostLoadId]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Only two sessions can be opened for this service at a time, hence no other processes can use this due to [[Process_Manager_Services|pm-module]] and [[Loader_Services|loader]] using this.&lt;br /&gt;
&lt;br /&gt;
=File and directory access=&lt;br /&gt;
==Files==&lt;br /&gt;
File session handles obtained via [[FS:OpenFile]] et al can be used to access files through a service-like interface, despite not being an actual service registered using [[SRV:RegisterService]].&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Command Header&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x000100C6&lt;br /&gt;
| [[FSFile:Dummy1|Dummy1]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x040100C4&lt;br /&gt;
| [[FSFile:Control|Control]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x08010100&lt;br /&gt;
| [[FSFile:OpenSubFile|OpenSubFile]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x080200C2&lt;br /&gt;
| [[FSFile:Read|Read]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x08030102&lt;br /&gt;
| [[FSFile:Write|Write]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x08040000&lt;br /&gt;
| [[FSFile:GetSize|GetSize]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x08050080&lt;br /&gt;
| [[FSFile:SetSize|SetSize]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x08060000&lt;br /&gt;
| [[FSFile:GetAttributes|GetAttributes]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x08070040&lt;br /&gt;
| [[FSFile:SetAttributes|SetAttributes]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x08080000&lt;br /&gt;
| [[FSFile:Close|Close]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x08090000&lt;br /&gt;
| [[FSFile:Flush|Flush]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x080A0040&lt;br /&gt;
| [[FSFile:SetPriority|SetPriority]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x080B0000&lt;br /&gt;
| [[FSFile:GetPriority|GetPriority]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x080C0000&lt;br /&gt;
| [[FSFile:OpenLinkFile|OpenLinkFile]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C010100&lt;br /&gt;
| [[FSFile:GetAvailable|GetAvailable]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Directories==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Command Header&lt;br /&gt;
!  Available since system version&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x000100C6&lt;br /&gt;
| [[1.0.0-0]]&lt;br /&gt;
| [[FSDir:Dummy1|Dummy1]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x040100C4&lt;br /&gt;
| [[1.0.0-0]]&lt;br /&gt;
| [[FSDir:Control|Control]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x08010042&lt;br /&gt;
| [[1.0.0-0]]&lt;br /&gt;
| [[FSDir:Read|Read]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x08020000&lt;br /&gt;
| [[1.0.0-0]]&lt;br /&gt;
| [[FSDir:Close|Close]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x08030040&lt;br /&gt;
| ?&lt;br /&gt;
| [[FSDir:SetPriority|SetPriority]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x08040000&lt;br /&gt;
| ?&lt;br /&gt;
| [[FSDir:GetPriority|GetPriority]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Archives =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  ArchiveId&lt;br /&gt;
!  Description&lt;br /&gt;
!  Accessible via [[Filesystem_services|FS]]&lt;br /&gt;
!  Accessible via [[Filesystem_services_PXI|FSPXI]]&lt;br /&gt;
!  Only accessible by Process9 internally&lt;br /&gt;
!  Requires binary [[FS:OpenFile|Lowpath]]&lt;br /&gt;
!  Required exheader FS access info bitmask&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000003&lt;br /&gt;
| SelfNCCH (including [[#RomFS|RomFS]])&lt;br /&gt;
| Yes&lt;br /&gt;
| No&lt;br /&gt;
| No&lt;br /&gt;
| No&lt;br /&gt;
| None&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000004&lt;br /&gt;
| SaveData (the saveID/mediatype for this is loaded from data originally from the user process&#039; exheader)&lt;br /&gt;
| Yes&lt;br /&gt;
| No&lt;br /&gt;
| No&lt;br /&gt;
| No&lt;br /&gt;
| None&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000006&lt;br /&gt;
| ExtSaveData&lt;br /&gt;
| Yes&lt;br /&gt;
| No&lt;br /&gt;
| No&lt;br /&gt;
| Yes&lt;br /&gt;
| 0x100D, when the input extdataID isn&#039;t listed in the exheader.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000007&lt;br /&gt;
| Shared ExtSaveData&lt;br /&gt;
| Yes&lt;br /&gt;
| No&lt;br /&gt;
| No&lt;br /&gt;
| Yes&lt;br /&gt;
| None&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000008&lt;br /&gt;
| SystemSaveData&lt;br /&gt;
| Yes&lt;br /&gt;
| No&lt;br /&gt;
| No&lt;br /&gt;
| Yes&lt;br /&gt;
| 0x4, when the input saveID doesn&#039;t match the exheader system-saveID.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000009&lt;br /&gt;
| SDMC&lt;br /&gt;
| Yes&lt;br /&gt;
| Yes&lt;br /&gt;
| No&lt;br /&gt;
| No&lt;br /&gt;
| 0x8E&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000A&lt;br /&gt;
| SDMC Write-Only&lt;br /&gt;
| Yes&lt;br /&gt;
| No&lt;br /&gt;
| No&lt;br /&gt;
| No&lt;br /&gt;
| 0x808E&lt;br /&gt;
|-&lt;br /&gt;
| 0x12345678&lt;br /&gt;
| ExtSaveData for BOSS&lt;br /&gt;
| Yes&lt;br /&gt;
| No&lt;br /&gt;
| No&lt;br /&gt;
| Yes&lt;br /&gt;
| 0x44&lt;br /&gt;
|-&lt;br /&gt;
| 0x12345679&lt;br /&gt;
| CARD SPI FS&lt;br /&gt;
| Yes&lt;br /&gt;
| Yes&lt;br /&gt;
| No&lt;br /&gt;
| No&lt;br /&gt;
| 0x16&lt;br /&gt;
|-&lt;br /&gt;
| 0x1234567B&lt;br /&gt;
| ExtSaveData, and ExtSaveData for BOSS&lt;br /&gt;
| No&lt;br /&gt;
| Yes&lt;br /&gt;
| No&lt;br /&gt;
| Yes&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| 0x1234567C&lt;br /&gt;
| SystemSaveData&lt;br /&gt;
| No&lt;br /&gt;
| Yes&lt;br /&gt;
| No&lt;br /&gt;
| Yes&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| 0x1234567D&lt;br /&gt;
| NAND RW&lt;br /&gt;
| Yes&lt;br /&gt;
| Yes&lt;br /&gt;
| No&lt;br /&gt;
| No&lt;br /&gt;
| 0x800&lt;br /&gt;
|-&lt;br /&gt;
| 0x1234567E&lt;br /&gt;
| NAND RO&lt;br /&gt;
| Yes&lt;br /&gt;
| Yes&lt;br /&gt;
| No&lt;br /&gt;
| No&lt;br /&gt;
| 0x200&lt;br /&gt;
|-&lt;br /&gt;
| 0x1234567F&lt;br /&gt;
| NAND RO Write FS&lt;br /&gt;
| No&lt;br /&gt;
| Yes&lt;br /&gt;
| No&lt;br /&gt;
| No&lt;br /&gt;
| ?&lt;br /&gt;
|-&lt;br /&gt;
| 0x12345680&lt;br /&gt;
| Unknown. There&#039;s code for this in spider v9.9, but that code isn&#039;t actually used.&lt;br /&gt;
| Yes&lt;br /&gt;
| ?&lt;br /&gt;
| No&lt;br /&gt;
| Yes&lt;br /&gt;
| ?&lt;br /&gt;
|-&lt;br /&gt;
| 0x12345681&lt;br /&gt;
| Unknown. Accessed by FS service.&lt;br /&gt;
| ?&lt;br /&gt;
| ?&lt;br /&gt;
| No&lt;br /&gt;
| ?&lt;br /&gt;
| ?&lt;br /&gt;
|-&lt;br /&gt;
| 0x12345682&lt;br /&gt;
| Unknown. There&#039;s code for this in spider v9.9, but that code isn&#039;t actually used.&lt;br /&gt;
| Yes&lt;br /&gt;
| ?&lt;br /&gt;
| No&lt;br /&gt;
| Yes&lt;br /&gt;
| ?&lt;br /&gt;
|-&lt;br /&gt;
| 0x2345678A&lt;br /&gt;
| Used for accessing general NCCH data. With FSPXI this also allows savedata access.&lt;br /&gt;
| Yes&lt;br /&gt;
| Yes&lt;br /&gt;
| No&lt;br /&gt;
| Yes&lt;br /&gt;
| 0x1005&lt;br /&gt;
|-&lt;br /&gt;
| 0x2345678B&lt;br /&gt;
| ?&lt;br /&gt;
| No&lt;br /&gt;
| No&lt;br /&gt;
| Yes&lt;br /&gt;
| Yes&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| 0x2345678C&lt;br /&gt;
| Used internally to access [[Title_Database|/dbs]] files?&lt;br /&gt;
| No&lt;br /&gt;
| No&lt;br /&gt;
| Yes&lt;br /&gt;
| Yes&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| 0x2345678D&lt;br /&gt;
| ?&lt;br /&gt;
| No&lt;br /&gt;
| No&lt;br /&gt;
| Yes&lt;br /&gt;
| No&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| 0x2345678E&lt;br /&gt;
| FSPXI: Similar to archive 0x2345678A. For fs:LDR(used by the &amp;quot;loader&amp;quot; FIRM ARM11-process), only ExeFS. Not accessible with fs:USER.&lt;br /&gt;
| Yes&lt;br /&gt;
| Yes&lt;br /&gt;
| No&lt;br /&gt;
| Yes&lt;br /&gt;
| None, see description.&lt;br /&gt;
|-&lt;br /&gt;
| 0x567890AB&lt;br /&gt;
| NAND CTR FS&lt;br /&gt;
| No&lt;br /&gt;
| Yes&lt;br /&gt;
| No&lt;br /&gt;
| No&lt;br /&gt;
| ?&lt;br /&gt;
|-&lt;br /&gt;
| 0x567890AC&lt;br /&gt;
| TWL PHOTO&lt;br /&gt;
| Yes&lt;br /&gt;
| Yes&lt;br /&gt;
| No&lt;br /&gt;
| No&lt;br /&gt;
| ?&lt;br /&gt;
|-&lt;br /&gt;
| 0x567890AD&lt;br /&gt;
| TWLS (DSi Sound stores recordings here). This is mapped to the FAT12 image stored in the file at [[Twln/shared2/0000]].&lt;br /&gt;
| No&lt;br /&gt;
| Yes&lt;br /&gt;
| No&lt;br /&gt;
| No&lt;br /&gt;
| ?&lt;br /&gt;
|-&lt;br /&gt;
| 0x567890AE&lt;br /&gt;
| NAND TWL FS&lt;br /&gt;
| Yes&lt;br /&gt;
| Yes&lt;br /&gt;
| No&lt;br /&gt;
| No&lt;br /&gt;
| 0x100&lt;br /&gt;
|-&lt;br /&gt;
| 0x567890AF&lt;br /&gt;
| NAND W FS&lt;br /&gt;
| Yes&lt;br /&gt;
| Yes&lt;br /&gt;
| No&lt;br /&gt;
| No&lt;br /&gt;
| 0x100&lt;br /&gt;
|-&lt;br /&gt;
| 0x567890B0&lt;br /&gt;
| ?&lt;br /&gt;
| No&lt;br /&gt;
| Yes&lt;br /&gt;
| No&lt;br /&gt;
| No&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| 0x567890B1&lt;br /&gt;
| Gamecard SaveData (for check). This is a wrapper for UserSaveDataForCheck: the OpenArchive code for that is called with archive-lowpath TID=0/mediatype=2(gamecard).&lt;br /&gt;
| Yes&lt;br /&gt;
| No&lt;br /&gt;
| No&lt;br /&gt;
| No&lt;br /&gt;
| 0x6&lt;br /&gt;
|-&lt;br /&gt;
| 0x567890B2&lt;br /&gt;
| UserSaveData (for check). This is the same as the regular SaveData archive, except with this the savedata ID and mediatype is loaded from the input archive lowpath.&lt;br /&gt;
| Yes&lt;br /&gt;
| No&lt;br /&gt;
| No&lt;br /&gt;
| Yes&lt;br /&gt;
| 0x6&lt;br /&gt;
|-&lt;br /&gt;
| 0x567890B4&lt;br /&gt;
| Similar to 0x567890B2 but can only access Accessible Save specified in [[NCCH/Extended_Header#Storage_Info|exheader]]?&lt;br /&gt;
| Yes&lt;br /&gt;
| No&lt;br /&gt;
| No&lt;br /&gt;
| Yes&lt;br /&gt;
| ?&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Archives listed as not requiring a binary lowpath, use lowpath type [[FS:OpenFile|empty]].&lt;br /&gt;
&lt;br /&gt;
The above permission bitmasks are from v2.x, see the above Services section for how these are handled.&lt;br /&gt;
&lt;br /&gt;
Archives CTR NAND, NAND RO Write FS, TWL NAND, NAND W FS, and CARD SPI FS require the corresponding process exheader access control mount flag to be set, in the exheader for any of the currently running ARM11 processes, for [[Filesystem_services_PXI|FSPXI]]. The access rights checked by [[Filesystem services|FS]] module for archive mounting with fs:USER, are stored in the process&#039; exheader accessinfo.&lt;br /&gt;
&lt;br /&gt;
The CARDSPI archive allows access to the gamecard CARD1 raw savedata flash(aka &amp;quot;cardspi:/&amp;quot; in [[FIRM|Process9]]), the file lowpath must be WCHAR &amp;quot;/&amp;quot;. The &amp;quot;NAND W FS&amp;quot; archive allows access to the raw NAND image(aka &amp;quot;wnand:/&amp;quot; in Process9), the file lowpath must be WCHAR &amp;quot;/&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
= Filenames and Paths =&lt;br /&gt;
PathType:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Value&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| -1&lt;br /&gt;
| Returned internally by Process9, when errors occur it seems(in particular when no nul-terminator was found in the input path). The data ptr is set to NULL.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0&lt;br /&gt;
| INVALID - Specifies an invalid path&lt;br /&gt;
|-&lt;br /&gt;
| 0x1&lt;br /&gt;
| EMPTY - Specifies an empty path&lt;br /&gt;
|-&lt;br /&gt;
| 0x2&lt;br /&gt;
| BINARY - Non-text based path. Meaning is per-archive&lt;br /&gt;
|-&lt;br /&gt;
| 0x3&lt;br /&gt;
| ASCII - Text-based path with 7-bit ASCII characters padded to 8-bits each (signed char)&lt;br /&gt;
|-&lt;br /&gt;
| 0x4&lt;br /&gt;
| UTF16 - Text-based path with UTF-16 characters&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In IPC requests, sizes of ASCII and UTF16 paths must include space for the null-terminator. &lt;br /&gt;
&lt;br /&gt;
== Binary LowPath ==&lt;br /&gt;
The format of the data that a binary LowPath points to is custom per archive.&lt;br /&gt;
&lt;br /&gt;
=== SelfNCCH File Path Data Format ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Index word&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0 &lt;br /&gt;
| Type:&lt;br /&gt;
* 0x0: RomFS&lt;br /&gt;
* 0x1: error 0xD9004676&lt;br /&gt;
* 0x2: ExeFS&lt;br /&gt;
* 0x3: Error 0xE0E046BE.&lt;br /&gt;
* 0x4: FS-module crashes on this&lt;br /&gt;
* 0x5: Update RomFS?&lt;br /&gt;
|-&lt;br /&gt;
| 1-2&lt;br /&gt;
| File name for ExeFS (&amp;quot;icon&amp;quot;/&amp;quot;banner&amp;quot;/&amp;quot;logo&amp;quot;). &amp;quot;.code&amp;quot; is not allowed&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Note that ExeFS files only support reading from offset=0 and with size=file_size. &lt;br /&gt;
&lt;br /&gt;
=== SystemSaveData Archive Path Data Format ===&lt;br /&gt;
==== FS ====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Index word&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0 &lt;br /&gt;
| [[Mediatypes|Mediatype]] (must be zero for NAND)&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| saveid&lt;br /&gt;
|}&lt;br /&gt;
The file/directory lowpath is a text lowpath in the [[Savegames|savegame]] filesystem.&lt;br /&gt;
&lt;br /&gt;
==== FSPXI ====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Index word&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0 &lt;br /&gt;
| u8 [[Mediatypes|Mediatype]] (must be zero for NAND)&lt;br /&gt;
|}&lt;br /&gt;
The file lowpath is a binary lowpath containing the u64 saveid, however the high word of the saveid is always zero. The mounted file is the cleartext savegame image. Up to 32 SystemSaveData image files can be opened under a single mounted FSPXI archive.&lt;br /&gt;
&lt;br /&gt;
=== UserSaveDataForCheck Archive Path Data Format ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Index word&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0 &lt;br /&gt;
| [[Mediatypes|Mediatype]] (must be non-zero)&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| Lower word saveid&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| Upper word saveid&lt;br /&gt;
|}&lt;br /&gt;
The file/directory lowpath for this FS archive is a text path in the [[Savegames|savegame]] filesystem.&lt;br /&gt;
&lt;br /&gt;
=== 0x567890B4 Archive Path Data Format ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Index word&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0 &lt;br /&gt;
| [[Mediatypes|Mediatype]]&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;Lower_word_saveid &amp;gt;&amp;gt; 8&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; ?&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| Unknown. Game calculate this using formula &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;0xFFFFFF00 | unknown_b&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== ExtSaveData Archive Path Data Format ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Index word&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0 &lt;br /&gt;
| [[Mediatypes|Mediatype]]&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| Lower word saveid&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| Upper word saveid&lt;br /&gt;
|}&lt;br /&gt;
For FS, the file/directory lowpath is a text path in the [[extdata]] filesystem. For FSPXI, the file lowpath is a text path relative to the &amp;quot;/extdata/&amp;lt;ExtdataIDHigh&amp;gt;/&amp;lt;ExtdataIDLow&amp;gt;&amp;quot; directory on SD/NAND, for the cleartext extdata image to mount.&lt;br /&gt;
&lt;br /&gt;
=== 0x2345678A Archive Path Data Format ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Index word&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| Lower word programID&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| Upper word programID&lt;br /&gt;
|-&lt;br /&gt;
| 2 &lt;br /&gt;
| ([[Mediatypes|Mediatype]] &amp;amp; 0xFF) | (uninitialized_data? &amp;amp; 0xFFFFFF00)&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| Number of something? Hardcoded per-archive, 0 for ExeFS, 200 for area:, 100 for rate:, 40 for eula:, etc.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
File lowpath:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Index word&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| 0 for NCCH data, 1 for savedata. The latter is only valid for FSPXI. Value 2 is allowed via archive 0x3, it&#039;s unknown what this is.&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| TMD content index / NCSD partition index.&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| Type: 0=romfs(0 for non-NCCH as well), 1=exefs &amp;quot;.code&amp;quot;(?), 2=exefs &amp;quot;icon&amp;quot;/&amp;quot;banner&amp;quot;/&amp;quot;logo&amp;quot;, 3=unknown, 4=unknown, 5=unknown.&lt;br /&gt;
|-&lt;br /&gt;
| 3-4&lt;br /&gt;
| Filename for ExeFS.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The 0x14-byte lowpath is all-zero for accessing the title&#039;s main RomFS.&lt;br /&gt;
&lt;br /&gt;
=== [[RomFS]] ===&lt;br /&gt;
&lt;br /&gt;
Archives 0x3 and 0x2345678E both allow for accessing the [[RomFS#Level_3_Format|level-3 IVFC images]] for RomFS access. The main CXI RomFS is accessible via an all-zero 0xc-byte binary file-lowpath. The update RomFS can be accessed with the first u32 in the binary file-lowpath being set to 0x5. The user must handle parsing the filesystem used in the exposed image itself.&lt;br /&gt;
&lt;br /&gt;
With FSPXI the returned data for RomFS is the entire RomFS section from the NCCH, starting at the IVFC header.&lt;br /&gt;
&lt;br /&gt;
The 0x3 archive is an interface for the 0x2345678E archive with the current process programID+mediatype. The file lowpath is 3-words. These words are written to 0x2345678E-archive file_lowpath+0, with the rest of that lowpath set to all-zero(lowpath is different from archive 0x2345678A). File lowpath:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Index word&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| See above. The only values which FS-module doesn&#039;t allow to be used here are:&lt;br /&gt;
* 0x1: Error 0xE0E046BE.&lt;br /&gt;
* 0x3: Error 0xE0E046BE.&lt;br /&gt;
* 0x4: FS-module executes svcBreak when using this.&lt;br /&gt;
|-&lt;br /&gt;
| 1-2&lt;br /&gt;
| See above. Not validated by FS-module.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=SEEDDB=&lt;br /&gt;
With [[9.6.0-24|9.6.0-X]] new [[System_SaveData]] with saveID 0001000F was added, this seems to be handled by FS-module itself, probably via the new service-cmds added to fsuser. [[Home Menu]] and [[NIM_Services|NIM]] module have access to those commands.&lt;br /&gt;
&lt;br /&gt;
The SEEDDB savedata contains the title-unique seed-data used for the new [[NCCH]] keyY generation added with FIRM [[9.6.0-24|9.6.0-X]].&lt;br /&gt;
&lt;br /&gt;
= Common Types =&lt;br /&gt;
== MediaType ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Value&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| NAND&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| SD&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| Game Card&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== SystemMediaType ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Value&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| CTR NAND&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| TWL NAND&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| SD&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| TWL Photo&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== OpenFlags ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Bit&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| Read&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| Write&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| Create&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Attributes ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Offset&lt;br /&gt;
!  Size&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x0&lt;br /&gt;
| 0x1&lt;br /&gt;
| Is Directory&lt;br /&gt;
|-&lt;br /&gt;
| 0x1&lt;br /&gt;
| 0x1&lt;br /&gt;
| Is Hidden&lt;br /&gt;
|-&lt;br /&gt;
| 0x2&lt;br /&gt;
| 0x1&lt;br /&gt;
| Is Archive&lt;br /&gt;
|-&lt;br /&gt;
| 0x3&lt;br /&gt;
| 0x1&lt;br /&gt;
| Is Read-Only&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== WriteOption ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Offset&lt;br /&gt;
!  Size&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x0&lt;br /&gt;
| 0x1&lt;br /&gt;
| Flush&lt;br /&gt;
|-&lt;br /&gt;
| 0x1&lt;br /&gt;
| 0x1&lt;br /&gt;
| Update Time Stamp&lt;br /&gt;
|-&lt;br /&gt;
| 0x2&lt;br /&gt;
| 0x1&lt;br /&gt;
| Reserved&lt;br /&gt;
|-&lt;br /&gt;
| 0x3&lt;br /&gt;
| 0x1&lt;br /&gt;
| Reserved&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== DirectoryEntry ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Offset&lt;br /&gt;
!  Size&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x0&lt;br /&gt;
| 0x20C&lt;br /&gt;
| UTF-16 Entry Name&lt;br /&gt;
|-&lt;br /&gt;
| 0x20C&lt;br /&gt;
| 0xA&lt;br /&gt;
| 8.3 short filename name&lt;br /&gt;
|-&lt;br /&gt;
| 0x216&lt;br /&gt;
| 0x4&lt;br /&gt;
| 8.3 short filename extension&lt;br /&gt;
|-&lt;br /&gt;
| 0x21A&lt;br /&gt;
| 0x1&lt;br /&gt;
| Always 1&lt;br /&gt;
|-&lt;br /&gt;
| 0x21B&lt;br /&gt;
| 0x1&lt;br /&gt;
| Reserved&lt;br /&gt;
|-&lt;br /&gt;
| 0x21C&lt;br /&gt;
| 0x4&lt;br /&gt;
| [[Filesystem_services#Attributes|Attributes]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x220&lt;br /&gt;
| 0x8&lt;br /&gt;
| Entry Size&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== ArchiveResource ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Offset&lt;br /&gt;
!  Size&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x0&lt;br /&gt;
| 0x4&lt;br /&gt;
| Sector byte-size&lt;br /&gt;
|-&lt;br /&gt;
| 0x4&lt;br /&gt;
| 0x4&lt;br /&gt;
| Cluster byte-size&lt;br /&gt;
|-&lt;br /&gt;
| 0x8&lt;br /&gt;
| 0x4&lt;br /&gt;
| Partition capacity in clusters&lt;br /&gt;
|-&lt;br /&gt;
| 0xC&lt;br /&gt;
| 0x4&lt;br /&gt;
| Available free space in clusters&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== ProgramInfo ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Offset&lt;br /&gt;
!  Size&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x0&lt;br /&gt;
| 0x8&lt;br /&gt;
| Program ID&lt;br /&gt;
|-&lt;br /&gt;
| 0x8&lt;br /&gt;
| 0x1&lt;br /&gt;
| [[Filesystem_services#MediaType|Media Type]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x9&lt;br /&gt;
| 0x7&lt;br /&gt;
| Padding&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== ProductInfo ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Offset&lt;br /&gt;
!  Size&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x0&lt;br /&gt;
| 0x10&lt;br /&gt;
| Product Code&lt;br /&gt;
|-&lt;br /&gt;
| 0x10&lt;br /&gt;
| 0x2&lt;br /&gt;
| Company Code&lt;br /&gt;
|-&lt;br /&gt;
| 0x12&lt;br /&gt;
| 0x2&lt;br /&gt;
| Remaster Version&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== IntegrityVerificationSeed ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Offset&lt;br /&gt;
!  Size&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
|  0x0&lt;br /&gt;
|  0x10&lt;br /&gt;
|  AES-CBC MAC over a SHA256 hash, which hashes the first 0x110-bytes of the cleartext SEED.&lt;br /&gt;
|-&lt;br /&gt;
|  0x10&lt;br /&gt;
|  0x120&lt;br /&gt;
|  The [[nand/private/movable.sed]], encrypted with AES-CBC using the above MAC for the counter.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== ExtSaveDataInfo ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Offset&lt;br /&gt;
!  Size&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x0&lt;br /&gt;
| 0x1&lt;br /&gt;
| [[Filesystem_services#MediaType|Media Type]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x1&lt;br /&gt;
| 0x1&lt;br /&gt;
| Unknown&lt;br /&gt;
|-&lt;br /&gt;
| 0x2&lt;br /&gt;
| 0x2&lt;br /&gt;
| Reserved&lt;br /&gt;
|-&lt;br /&gt;
| 0x4&lt;br /&gt;
| 0x8&lt;br /&gt;
| Save ID&lt;br /&gt;
|-&lt;br /&gt;
| 0xC&lt;br /&gt;
| 0x4&lt;br /&gt;
| Reserved&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== SystemSaveDataInfo ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Offset&lt;br /&gt;
!  Size&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x0&lt;br /&gt;
| 0x1&lt;br /&gt;
| [[Filesystem_services#MediaType|Media Type]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x1&lt;br /&gt;
| 0x1&lt;br /&gt;
| Unknown&lt;br /&gt;
|-&lt;br /&gt;
| 0x2&lt;br /&gt;
| 0x2&lt;br /&gt;
| Reserved&lt;br /&gt;
|-&lt;br /&gt;
| 0x4&lt;br /&gt;
| 0x4&lt;br /&gt;
| Save ID&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== SecureValueSlot ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Value&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x1000&lt;br /&gt;
| SD Application&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== CardSpiBaudRate ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Value&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x0&lt;br /&gt;
| 512KHz&lt;br /&gt;
|-&lt;br /&gt;
| 0x1&lt;br /&gt;
| 1MHz&lt;br /&gt;
|-&lt;br /&gt;
| 0x2&lt;br /&gt;
| 2MHz&lt;br /&gt;
|-&lt;br /&gt;
| 0x3&lt;br /&gt;
| 4MHz&lt;br /&gt;
|-&lt;br /&gt;
| 0x4&lt;br /&gt;
| 8MHz&lt;br /&gt;
|-&lt;br /&gt;
| 0x5&lt;br /&gt;
| 16MHz&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== CardSpiBusMode ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Value&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x0&lt;br /&gt;
| 1-bit&lt;br /&gt;
|-&lt;br /&gt;
| 0x1&lt;br /&gt;
| 4-bit&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== SpecialContentType ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Value&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x1&lt;br /&gt;
| Update&lt;br /&gt;
|-&lt;br /&gt;
| 0x2&lt;br /&gt;
| Manual&lt;br /&gt;
|-&lt;br /&gt;
| 0x3&lt;br /&gt;
| DLP Child&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== DeviceMoveContext ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Offset&lt;br /&gt;
!  Size&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
|  0x0&lt;br /&gt;
|  0x10&lt;br /&gt;
|  IVs&lt;br /&gt;
|-&lt;br /&gt;
|  0x10&lt;br /&gt;
|  0x10&lt;br /&gt;
|  Encrypt Parameter&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=Errors=&lt;br /&gt;
See [[Filesystem_services_PXI]].&lt;/div&gt;</summary>
		<author><name>EvilFlight</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=FSPXI:ImportIntegrityVerificationSeed&amp;diff=21317</id>
		<title>FSPXI:ImportIntegrityVerificationSeed</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=FSPXI:ImportIntegrityVerificationSeed&amp;diff=21317"/>
		<updated>2020-07-28T08:31:35Z</updated>

		<summary type="html">&lt;p&gt;EvilFlight: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Request=&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Index Word&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| Header code [0x00450002]&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| Always 0x00013006, for 0x130 size: (size&amp;lt;&amp;lt;8) &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; 6&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| Input IntegrityVerificationSeed pointer&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=Response=&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Index Word&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| Header code&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| Result code&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=IntegrityVerificationSeed=&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Offset&lt;br /&gt;
!  Size&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
|  0x0&lt;br /&gt;
|  0x10&lt;br /&gt;
|  AES-CBC MAC over a SHA256 hash, which hashes the first 0x110-bytes of the cleartext SEED.&lt;br /&gt;
|-&lt;br /&gt;
|  0x10&lt;br /&gt;
|  0x120&lt;br /&gt;
|  The [[nand/private/movable.sed]], encrypted with AES-CBC using the above MAC for the counter.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=Description=&lt;br /&gt;
This decrypts the input SEED and verifies it with the input AES-CBC MAC, verifies the RSA-signature, then writes the data to [[nand/private/movable.sed]].&lt;/div&gt;</summary>
		<author><name>EvilFlight</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=AES_Registers&amp;diff=21316</id>
		<title>AES Registers</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=AES_Registers&amp;diff=21316"/>
		<updated>2020-07-28T08:30:00Z</updated>

		<summary type="html">&lt;p&gt;EvilFlight: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Registers ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Old3DS&lt;br /&gt;
!  Name&lt;br /&gt;
!  Address&lt;br /&gt;
!  Width&lt;br /&gt;
!  RW&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#AES_CNT|AES_CNT]]&lt;br /&gt;
| 0x10009000&lt;br /&gt;
| 4&lt;br /&gt;
| RW&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#AES_MACEXTRABLKCNT|AES_MACBLKCNT]]&lt;br /&gt;
| 0x10009004&lt;br /&gt;
| 2&lt;br /&gt;
| W&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#AES_BLKCNT|AES_BLKCNT]]&lt;br /&gt;
| 0x10009006&lt;br /&gt;
| 2&lt;br /&gt;
| W&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#AES_WRFIFO/AES_RDFIFO|AES_WRFIFO]]&lt;br /&gt;
| 0x10009008&lt;br /&gt;
| 4&lt;br /&gt;
| W&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#AES_WRFIFO/AES_RDFIFO|AES_RDFIFO]]&lt;br /&gt;
| 0x1000900C&lt;br /&gt;
| 4&lt;br /&gt;
| R&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| AES_KEYSEL&lt;br /&gt;
| 0x10009010&lt;br /&gt;
| 1&lt;br /&gt;
| RW&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#AES_KEYCNT|AES_KEYCNT]]&lt;br /&gt;
| 0x10009011&lt;br /&gt;
| 1&lt;br /&gt;
| RW&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#AES_CTR|AES_CTR]]&lt;br /&gt;
| 0x10009020&lt;br /&gt;
| 16&lt;br /&gt;
| W&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#AES_MAC|AES_MAC]]&lt;br /&gt;
| 0x10009030&lt;br /&gt;
| 16&lt;br /&gt;
| W&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| AES_KEY0&lt;br /&gt;
| 0x10009040&lt;br /&gt;
| 48&lt;br /&gt;
| W&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| AES_KEY1&lt;br /&gt;
| 0x10009070&lt;br /&gt;
| 48&lt;br /&gt;
| W&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| AES_KEY2&lt;br /&gt;
| 0x100090A0&lt;br /&gt;
| 48&lt;br /&gt;
| W&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| AES_KEY3&lt;br /&gt;
| 0x100090D0&lt;br /&gt;
| 48&lt;br /&gt;
| W&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| AES_KEYFIFO&lt;br /&gt;
| 0x10009100&lt;br /&gt;
| 4&lt;br /&gt;
| W&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| AES_KEYXFIFO&lt;br /&gt;
| 0x10009104&lt;br /&gt;
| 4&lt;br /&gt;
| W&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| AES_KEYYFIFO&lt;br /&gt;
| 0x10009108&lt;br /&gt;
| 4&lt;br /&gt;
| W&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== AES_CNT ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Bit&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 4-0&lt;br /&gt;
| Write FIFO count (0-16)&lt;br /&gt;
|-&lt;br /&gt;
| 9-5&lt;br /&gt;
| Read FIFO count (0-16)&lt;br /&gt;
|-&lt;br /&gt;
| 10&lt;br /&gt;
| Flush write FIFO (1=Clear write FIFO)&lt;br /&gt;
|-&lt;br /&gt;
| 11&lt;br /&gt;
| Flush read fifo (1=Clear read FIFO)&lt;br /&gt;
|-&lt;br /&gt;
| 12-13&lt;br /&gt;
| Write FIFO DMA size (0=16, 1=12, 2=8, 3=4 words)&lt;br /&gt;
|-&lt;br /&gt;
| 14-15&lt;br /&gt;
| Read FIFO DMA size (0=4, 1=8, 2=12, 3=16 words)&lt;br /&gt;
|-&lt;br /&gt;
| 18-16&lt;br /&gt;
| MAC size (encoding = (maclen-2)/2)&lt;br /&gt;
|-&lt;br /&gt;
| 19&lt;br /&gt;
|? (MAC related)&lt;br /&gt;
|-&lt;br /&gt;
| 20&lt;br /&gt;
| MAC input control (0 = read MAC from FIFO, 1 = read from MAC register)&lt;br /&gt;
|-&lt;br /&gt;
| 21&lt;br /&gt;
| MAC status (0 = invalid, 1 = verified)&lt;br /&gt;
|-&lt;br /&gt;
| 22&lt;br /&gt;
| Output endianness (1=Big endian, 0=Little endian)&lt;br /&gt;
|-&lt;br /&gt;
| 23&lt;br /&gt;
| Input endianness (1=Big endian, 0=Little endian)&lt;br /&gt;
|-&lt;br /&gt;
| 24&lt;br /&gt;
| Output word order (1=Normal order, 0=Reversed order)&lt;br /&gt;
|-&lt;br /&gt;
| 25&lt;br /&gt;
| Input word order (1=Normal order, 0=Reversed order)&lt;br /&gt;
|-&lt;br /&gt;
| 26&lt;br /&gt;
| Update keyslot (selects the keyslot specified by AES_KEYSEL when this bit is set)&lt;br /&gt;
|-&lt;br /&gt;
| 29-27&lt;br /&gt;
| Mode (0=CCM decrypt, 1=CCM encrypt, 2=CTR, 3=CTR, 4=CBC decrypt, 5=CBC encrypt, 6=ECB decrypt, 7=ECB encrypt)&lt;br /&gt;
|-&lt;br /&gt;
| 30&lt;br /&gt;
| Interrupt enable (1=enable, 0=disable)&lt;br /&gt;
|-&lt;br /&gt;
| 31&lt;br /&gt;
| Start (1=enable/busy, 0=idle)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
When bit31 is set, this register essentially becomes locked and doesn&#039;t change when written to. However if bit26 is &amp;quot;set&amp;quot;, keyslot-selection is cued to be handled when bit31 is cleared.&lt;br /&gt;
&lt;br /&gt;
Clearing bit31 while the AES engine is doing crypto will result in the AES engine stopping crypto, once it finishes processing the current block.&lt;br /&gt;
&lt;br /&gt;
Read/Write FIFO counts and the MAC status can never be set by writing to AES_CNT, they are read-only.&lt;br /&gt;
&lt;br /&gt;
Changing the input word order triggers the key/keyX/keyY FIFOs to be flushed.&lt;br /&gt;
&lt;br /&gt;
== AES_MACEXTRABLKCNT ==&lt;br /&gt;
(CCM-MAC extra data length)&amp;gt;&amp;gt;4, i.e. the number of block of CCM-MAC extra data.&lt;br /&gt;
&lt;br /&gt;
== AES_BLKCNT ==&lt;br /&gt;
(Data length)&amp;gt;&amp;gt;4, i.e. the number of blocks to process&lt;br /&gt;
&lt;br /&gt;
== AES_WRFIFO/AES_RDFIFO ==&lt;br /&gt;
The AES engine can accept up to 64 bytes of input data (16 32-bit words) and can hold up to 64 bytes of output data at a time (for a total of 128 bytes of buffered data). Bits 12-13 and 14-15 in AES_CNT configure the DMA request for the relevant FIFO (see above).&lt;br /&gt;
&lt;br /&gt;
The input data for the AES crypto operation is written to AES_WRFIFO, the output data is read from AES_RDFIFO.&lt;br /&gt;
&lt;br /&gt;
Reading from AES_RDFIFO when there&#039;s no data available in the RDFIFO will result in reading the last word that was in the RDFIFO.&lt;br /&gt;
&lt;br /&gt;
When triggering either RDFIFO or WRFIFO to be flushed, the AES Engine does not clear either buffer.&lt;br /&gt;
&lt;br /&gt;
Word order and endianness can be changed between each read/write to these FIFOs. However changing the word order when writing to WRFIFO can cause the word to be written outside the current block, leaving uninitialized data in its place. Attempts to change endianness or word order are not honored when reading from RDFIFO when no more data is available.&lt;br /&gt;
&lt;br /&gt;
== AES_KEYCNT ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Bit&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 5-0&lt;br /&gt;
| Keyslot&lt;br /&gt;
|-&lt;br /&gt;
| 6&lt;br /&gt;
| Hardware key-generator type: 0 = 3DS, 1 = DSi.&lt;br /&gt;
|-&lt;br /&gt;
| 7&lt;br /&gt;
| This normally has value 1 written here when updating keys. 0 = disable key FIFO flush, 1 = enable key FIFO flush.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Bit6 is only used when keyslots &amp;gt;=4 are used, value1 has the same affect as doing key-init with the TWL keyslots. Bit6 is only checked when a keyY was completely written, for when the final-normalkey needs updated via the key-generator. Changing bit6 has no affect on the generated normalkey when writing to this bit immediately after writing the last keyY word.&lt;br /&gt;
&lt;br /&gt;
== AES_CTR ==&lt;br /&gt;
This register specifies the counter (CTR mode), nonce (CCM mode) or the initialization vector (CBC mode) depending on the mode of operation.&lt;br /&gt;
For CBC and CTR mode this register takes up the full 16 bytes, but for CCM mode the nonce is only the first 12 bytes.&lt;br /&gt;
The AES engine will automatically increment the counter up to the maximum BLKCNT, after which point it must be manually incremented and set again.&lt;br /&gt;
&lt;br /&gt;
== AES_MAC ==&lt;br /&gt;
This register specifies the message authentication code (MAC) for use in CCM mode.&lt;br /&gt;
&lt;br /&gt;
== AES_KEY0/1/2/3 ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Byte&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0-15&lt;br /&gt;
| Normalkey&lt;br /&gt;
|-&lt;br /&gt;
| 16-31&lt;br /&gt;
| KeyX&lt;br /&gt;
|-&lt;br /&gt;
| 32-47&lt;br /&gt;
| KeyY&lt;br /&gt;
|-}&lt;br /&gt;
&lt;br /&gt;
These registers are the same as they were on TWL, and are likely preserved for compatibility reasons. The keyslot is updated immediately after *any* data(u8/u32/...) is written here, which was used on DSi to [[3DS_System_Flaws|break]] the key-generator.&lt;br /&gt;
&lt;br /&gt;
== Endianness and word order ==&lt;br /&gt;
&lt;br /&gt;
=== AES_CNT.input_endianness ===&lt;br /&gt;
&lt;br /&gt;
Swaps the bytes of 32-bit writes to AES_CTR, AES_WRFIFO, AES_KEY*FIFO according to specified endianness. AES_MAC?&lt;br /&gt;
&lt;br /&gt;
=== AES_CNT.output_endianness ===&lt;br /&gt;
&lt;br /&gt;
Swaps the bytes of 32-bit reads from AES_RDFIFO.&lt;br /&gt;
&lt;br /&gt;
=== AES_CNT.input_word_order ===&lt;br /&gt;
&lt;br /&gt;
If reversed, writes to AES_KEY*FIFO and AES_WRFIFO fill the FIFO backwards. For AES_WRFIFO, this means that every 16-byte block will have its words in the reverse order, but the order of these blocks remains the same. AES_CTR is unaffected by this field. AES_MAC?&lt;br /&gt;
&lt;br /&gt;
=== AES_CNT.output_word_order ===&lt;br /&gt;
&lt;br /&gt;
If reversed, reads from AES_RDFIFO will drain the FIFO backwards. This means that every 16-byte output block will have its words in the reverse order, but the order of these blocks remains the same.&lt;br /&gt;
&lt;br /&gt;
== CCM mode pitfall ==&lt;br /&gt;
Non-standard AES-CCM behaviour is observed on [[APT:Wrap|Wrap]]/[[APT:Unwrap|Unwrap]] function. According to [https://tools.ietf.org/html/rfc3610 RFC 3610], the first block B_0 for authentication should be generated from the message length and some other parameters. Using these function, it seems that the message length is aligned up to 16 when generating B_0. This makes the generated MAC not compliant with the standard when (inputsize-noncesize)%16!=0. It is very likely that this non-standard behaviour happens on the hardware level, but not confirmed yet.&lt;br /&gt;
&lt;br /&gt;
== Keyslot ranges ==&lt;br /&gt;
This is approximately a table of what is set by bootrom before booting into FIRM. Often it appears that keyslots in groups of 4 have the same keyX, and sometimes also same keyY set.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Keyslot&lt;br /&gt;
!  Name&lt;br /&gt;
!  KeyX&lt;br /&gt;
!  KeyY/Normal-key&lt;br /&gt;
!  Console unique.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00-0x03&lt;br /&gt;
| TWL keys.&lt;br /&gt;
| Probably unset.&lt;br /&gt;
| Probably unset.&lt;br /&gt;
| -&lt;br /&gt;
|-&lt;br /&gt;
| 0x04-0x07&lt;br /&gt;
| NAND partition keys.&lt;br /&gt;
| Same for all.&lt;br /&gt;
| Different for all.&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
|-&lt;br /&gt;
| 0x08-0x0B&lt;br /&gt;
| See below.&lt;br /&gt;
| Same for all.&lt;br /&gt;
| Different for all.&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C-0x0F&lt;br /&gt;
| SSL cert key.&lt;br /&gt;
| Same for all.&lt;br /&gt;
| Same for all, normalkeys-only.&lt;br /&gt;
| style=&amp;quot;background: orange&amp;quot; | The keyXs are console-unique, however the normalkeys setup by Boot9 later during keyinit are not console-unique.&lt;br /&gt;
|-&lt;br /&gt;
| 0x10-0x17&lt;br /&gt;
| -&lt;br /&gt;
| Set for all except 0x11..0x13. Keydata is different for these.&lt;br /&gt;
| Normalkey, same for all except the last 4 are all different.&lt;br /&gt;
| -&lt;br /&gt;
|-&lt;br /&gt;
| 0x18-0x1B&lt;br /&gt;
| Never used.&lt;br /&gt;
| Same for all.&lt;br /&gt;
| Same for all, normalkeys-only.&lt;br /&gt;
| style=&amp;quot;background: orange&amp;quot; | The keyXs are console-unique, however the normalkeys setup by Boot9 later during keyinit are not console-unique.&lt;br /&gt;
|-&lt;br /&gt;
| 0x1C-0x1F&lt;br /&gt;
| Never used.&lt;br /&gt;
| Same for all.&lt;br /&gt;
| Same for all, normalkeys-only.&lt;br /&gt;
| style=&amp;quot;background: orange&amp;quot; | The keyXs are console-unique, however the normalkeys setup by Boot9 later during keyinit are not console-unique.&lt;br /&gt;
|-&lt;br /&gt;
| 0x20-0x23&lt;br /&gt;
| Never used.&lt;br /&gt;
| Same for all.&lt;br /&gt;
| Same for all, normalkeys-only.&lt;br /&gt;
| style=&amp;quot;background: orange&amp;quot; | The keyXs are console-unique, however the normalkeys setup by Boot9 later during keyinit are not console-unique.&lt;br /&gt;
|-&lt;br /&gt;
| 0x24&lt;br /&gt;
| Never used.&lt;br /&gt;
| Individually set.&lt;br /&gt;
| Individually set, normalkey-only.&lt;br /&gt;
| style=&amp;quot;background: orange&amp;quot; | The keyX is console-unique, however the normalkey setup by Boot9 later during keyinit is not console-unique.&lt;br /&gt;
|-&lt;br /&gt;
| 0x25-0x27&lt;br /&gt;
| -&lt;br /&gt;
| Not set.&lt;br /&gt;
| Same for all, normalkeys-only. Same keydata as keyslot 0x24.&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
|-&lt;br /&gt;
| 0x28-0x2B&lt;br /&gt;
| Never used.&lt;br /&gt;
| Individually set.&lt;br /&gt;
| Individually set, normalkeys-only. Keyslot 0x28 has same normalkey as keyslot 0x24.&lt;br /&gt;
| style=&amp;quot;background: orange&amp;quot; | The keyX is console-unique, however the normalkey setup by Boot9 later during keyinit is not console-unique.&lt;br /&gt;
|-&lt;br /&gt;
| 0x2C-0x2F&lt;br /&gt;
| Various uniques.&lt;br /&gt;
| Same for all.&lt;br /&gt;
| Same for all, normalkeys-only.&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
|-&lt;br /&gt;
| 0x30-0x33&lt;br /&gt;
| Various uniques.&lt;br /&gt;
| Same for all.&lt;br /&gt;
| Same for all, normalkeys-only.&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
|-&lt;br /&gt;
| 0x34-0x37&lt;br /&gt;
| Various uniques.&lt;br /&gt;
| Same for all.&lt;br /&gt;
| Same for all, normalkeys-only.&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
|-&lt;br /&gt;
| 0x38-0x3B&lt;br /&gt;
| Various uniques.&lt;br /&gt;
| Same for all.&lt;br /&gt;
| Same for all, normalkeys-only.&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
|-&lt;br /&gt;
| 0x3C-0x3F&lt;br /&gt;
| Various uniques.&lt;br /&gt;
| Individually set.&lt;br /&gt;
| Individually set, normalkeys-only. Keyslot 0x3C has same normalkey as 0x38-0x3B.&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Keyslot pairs (0x24, 0x28) and (0x38, 0x3C) shares the same normal-key, while at the same time having different keyX&#039;s. This suggests they were set to same normal-key by bootrom.&lt;br /&gt;
&lt;br /&gt;
== Keyslots ==&lt;br /&gt;
There are 0x40 keyslots, each of which stores three keys called keyX, keyY and normalkey. All keys can be set explicitly, but the normalkey can optionally be generated using a hardware key generator instead (see [[#Hardware_key_generator|below]]). There is no way to read the contents of a keyslot.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Keyslot&lt;br /&gt;
!  Description&lt;br /&gt;
!  KeyX set by&lt;br /&gt;
!  KeyY set by&lt;br /&gt;
!  Normal-key&lt;br /&gt;
!  Old3DS&lt;br /&gt;
|-&lt;br /&gt;
| 0x00-0x03&lt;br /&gt;
| TWL keys.&lt;br /&gt;
| NATIVE_FIRM hard-boot.&lt;br /&gt;
| NATIVE_FIRM hard-boot.&lt;br /&gt;
| -&lt;br /&gt;
| Yes&lt;br /&gt;
|-&lt;br /&gt;
| 0x04..0x07&lt;br /&gt;
| [[Flash_Filesystem|NAND]] partition keys.&lt;br /&gt;
&lt;br /&gt;
Keyslot is determined by [[NCSD]] partition FS type and encryption type. &lt;br /&gt;
The New3DS Process9 sets the keyY for keyslot 0x05 (New3DS CTRNAND) to a key from .(ro)data. Its keyX is console-unique and set by the bootloader.&lt;br /&gt;
| Bootrom.&lt;br /&gt;
| Bootrom.&lt;br /&gt;
| -&lt;br /&gt;
| Yes&lt;br /&gt;
|-&lt;br /&gt;
| 0x0A&lt;br /&gt;
| DSiWare export key.&lt;br /&gt;
&lt;br /&gt;
Used for encrypting the all-zero 0x10-byte block in the [[DSiWare_Exports|DSiWare_Exports]] header. Console-unique.&lt;br /&gt;
| See above keyslot info.&lt;br /&gt;
| See above keyslot info.&lt;br /&gt;
| -&lt;br /&gt;
| Yes&lt;br /&gt;
|-&lt;br /&gt;
| 0x0B&lt;br /&gt;
| This is console-unique. This keyslot is used for the NAND [[Title_Database|dbs]] images AES-CMACs, and the [[Nand/private/movable.sed]] AES-CMAC(when used).&lt;br /&gt;
| See above keyslot info.&lt;br /&gt;
| See above keyslot info.&lt;br /&gt;
| -&lt;br /&gt;
| Yes&lt;br /&gt;
|-&lt;br /&gt;
| 0x0D&lt;br /&gt;
| SSL-certificate key.&lt;br /&gt;
&lt;br /&gt;
See [[PSPXI:EncryptDecryptAes|EncryptDecryptAes]].&lt;br /&gt;
| -&lt;br /&gt;
| -&lt;br /&gt;
| Bootrom.&lt;br /&gt;
| Yes&lt;br /&gt;
|-&lt;br /&gt;
| 0x11&lt;br /&gt;
| Temporary keyslot.&lt;br /&gt;
&lt;br /&gt;
Used by FIRM for general normal-key crypto. Also used by the New3DS [[FIRM]] arm9 binary loader.&lt;br /&gt;
| Arm9Loader. &lt;br /&gt;
| Arm9Loader.&lt;br /&gt;
| NATIVE_FIRM.&lt;br /&gt;
| Yes&lt;br /&gt;
|-&lt;br /&gt;
| 0x14&lt;br /&gt;
| Starting with [[5.0.0-11]], NATIVE_FIRM Process9 now sets the keyY for this to the same one it uses for initializing 3 of the keyslots&#039; keyYs from [[PSPXI:EncryptDecryptAes|here]].&lt;br /&gt;
| Bootrom.&lt;br /&gt;
| NATIVE_FIRM boot.&lt;br /&gt;
| -&lt;br /&gt;
| Yes&lt;br /&gt;
|-&lt;br /&gt;
| 0x15&lt;br /&gt;
| Used/initialized by the New3DS arm9 binary loader, see [[FIRM|here]].&lt;br /&gt;
| Arm9Loader.&lt;br /&gt;
| Arm9Loader.&lt;br /&gt;
| See previous info for this keyslot.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| 0x16&lt;br /&gt;
| Used/initialized by the New3DS arm9 binary loader starting with [[9.5.0-22|9.5.0-X]], see [[FIRM|here]].&lt;br /&gt;
| Arm9Loader.&lt;br /&gt;
| Arm9Loader.&lt;br /&gt;
| See previous info for this keyslot.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| 0x18..0x1F&lt;br /&gt;
| These are the New3DS keyslots, where the keyX is generated with keyslot 0x11 by the New3DS arm9 binary [[FIRM|loader]]. As of [[FIRM]] [[9.6.0-24|9.6.0-X]] keyslots 0x1C..0x1F are not yet used by Process9.&lt;br /&gt;
| Arm9Loader.&lt;br /&gt;
| NATIVE_FIRM / see previous info for these keyslots.&lt;br /&gt;
| See previous info for these keyslots.&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| 0x18&lt;br /&gt;
| New3DS [[9.3.0-21|9.3.0-X]] [[NCCH]] key, when ncchflag[3] is 0x0A.&lt;br /&gt;
| Arm9Loader.&lt;br /&gt;
| NATIVE_FIRM&lt;br /&gt;
| -&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| 0x19&lt;br /&gt;
| New3DS gamecard [[Savegames|savedata]] AES-CMAC key.&lt;br /&gt;
&lt;br /&gt;
Equivalent of keyslot 0x33, used when a [[NCSD]] flag is set to a certain value (implemented with [[9.3.0-21|9.3.0-X]]).&lt;br /&gt;
| Arm9Loader.&lt;br /&gt;
| NATIVE_FIRM&lt;br /&gt;
| -&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| 0x1A&lt;br /&gt;
| New3DS gamecard [[Savegames|savedata]] actual key.&lt;br /&gt;
&lt;br /&gt;
Equivalent of keyslot 0x37, used when a [[NCSD]] flag is set to a certain value (implemented with [[9.3.0-21|9.3.0-X]]).&lt;br /&gt;
| Arm9Loader.&lt;br /&gt;
| NATIVE_FIRM&lt;br /&gt;
| -&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| 0x1B&lt;br /&gt;
| New3DS [[9.6.0-24|9.6.0-X]] [[NCCH]] key, when ncchflag[3] is 0x0B.&lt;br /&gt;
| Arm9Loader.&lt;br /&gt;
| NATIVE_FIRM&lt;br /&gt;
| -&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| 0x24&lt;br /&gt;
| AGB_FIRM savegame AES-CMAC key.&lt;br /&gt;
| Bootrom.&lt;br /&gt;
| AGB/NATIVE_FIRM.&lt;br /&gt;
| -&lt;br /&gt;
| Yes&lt;br /&gt;
|-&lt;br /&gt;
| 0x25&lt;br /&gt;
| [[7.0.0-13|v7.0]] [[NCCH]] key, when ncchflag[3] is 0x01.&lt;br /&gt;
| NATIVE_FIRM [[Savegames#6.0.0-11_Savegame_keyY|boot]].&lt;br /&gt;
| NATIVE_FIRM.&lt;br /&gt;
| -&lt;br /&gt;
| Yes&lt;br /&gt;
|-&lt;br /&gt;
| 0x2C&lt;br /&gt;
| Original [[NCCH|NCCH]] key, when ncchflag[3] is 0x00 and always for certain NCCH sections.&lt;br /&gt;
| Bootrom.&lt;br /&gt;
| Process9.&lt;br /&gt;
| -&lt;br /&gt;
| Yes&lt;br /&gt;
|-&lt;br /&gt;
| 0x2D&lt;br /&gt;
| UDS local-WLAN CCMP key.&lt;br /&gt;
&lt;br /&gt;
See [[PSPXI:EncryptDecryptAes|EncryptDecryptAes]].&lt;br /&gt;
| Bootrom.&lt;br /&gt;
| Bootrom.&lt;br /&gt;
| -&lt;br /&gt;
| Yes&lt;br /&gt;
|-&lt;br /&gt;
| 0x2E&lt;br /&gt;
| Streetpass key.&lt;br /&gt;
&lt;br /&gt;
See [[PSPXI:EncryptDecryptAes|EncryptDecryptAes]].&lt;br /&gt;
| Bootrom.&lt;br /&gt;
| NATIVE_FIRM.&lt;br /&gt;
| -&lt;br /&gt;
| Yes&lt;br /&gt;
|-&lt;br /&gt;
| 0x2F&lt;br /&gt;
| [[Savegames#6.0.0-11_Savegame_keyY|v6.0]] save key.&lt;br /&gt;
| Bootrom.&lt;br /&gt;
| NATIVE_FIRM.&lt;br /&gt;
| -&lt;br /&gt;
| Yes&lt;br /&gt;
|-&lt;br /&gt;
| 0x30&lt;br /&gt;
| SD/NAND AES-CMAC key.&lt;br /&gt;
&lt;br /&gt;
This keyY is initialized via [[Nand/private/movable.sed|movable.sed]]. This is used for calculating the AES-CMACs under SD [[SD_Filesystem|/Nintendo 3DS/&amp;lt;ID0&amp;gt;/&amp;lt;ID1&amp;gt;/]] (except [[DSiWare_Exports]]) and [[Flash_Filesystem|NAND]] /data/.&lt;br /&gt;
| Bootrom.&lt;br /&gt;
| NATIVE_FIRM.&lt;br /&gt;
| -&lt;br /&gt;
| Yes&lt;br /&gt;
|-&lt;br /&gt;
| 0x31&lt;br /&gt;
| APT wrap key.&lt;br /&gt;
&lt;br /&gt;
See [[PSPXI:EncryptDecryptAes|EncryptDecryptAes]]. NATIVE_FIRM sets this keyY to the same one used for keyslot 0x2E.&lt;br /&gt;
| Bootrom.&lt;br /&gt;
| NATIVE_FIRM.&lt;br /&gt;
| -&lt;br /&gt;
| Yes&lt;br /&gt;
|-&lt;br /&gt;
| 0x32&lt;br /&gt;
| Unknown.&lt;br /&gt;
&lt;br /&gt;
See [[PSPXI:EncryptDecryptAes|EncryptDecryptAes]].&lt;br /&gt;
| Bootrom.&lt;br /&gt;
| Bootrom.&lt;br /&gt;
| -&lt;br /&gt;
| Yes&lt;br /&gt;
|-&lt;br /&gt;
| 0x33&lt;br /&gt;
| Gamecard [[Savegames|savedata]] AES-CMAC.&lt;br /&gt;
| Bootrom.&lt;br /&gt;
| NATIVE_FIRM.&lt;br /&gt;
| -&lt;br /&gt;
| Yes&lt;br /&gt;
|-&lt;br /&gt;
| 0x34&lt;br /&gt;
| SD key.&lt;br /&gt;
&lt;br /&gt;
This keyY is initialized via [[Nand/private/movable.sed|movable.sed]]. This is used for encrypting *all* SD card data under [[SD_Filesystem|/Nintendo 3DS/&amp;lt;ID0&amp;gt;/&amp;lt;ID1&amp;gt;/]].&lt;br /&gt;
| Bootrom.&lt;br /&gt;
| NATIVE_FIRM.&lt;br /&gt;
| -&lt;br /&gt;
| Yes&lt;br /&gt;
|-&lt;br /&gt;
| 0x35&lt;br /&gt;
| Movable.sed key.&lt;br /&gt;
&lt;br /&gt;
This is the keyslot used for movable.sed encryption + AES-CBC MAC with the import/export [[FSPXI:ImportIntegrityVerificationSeed|commands]]. The keyYs used for crypto/CMAC are different, but both can be found in process9 rodata.&lt;br /&gt;
| Bootrom.&lt;br /&gt;
| NATIVE_FIRM.&lt;br /&gt;
| -&lt;br /&gt;
| Yes&lt;br /&gt;
|-&lt;br /&gt;
| 0x36&lt;br /&gt;
| Unknown. Used by friends module.&lt;br /&gt;
&lt;br /&gt;
See [[PSPXI:EncryptDecryptAes|EncryptDecryptAes]].&lt;br /&gt;
| Bootrom.&lt;br /&gt;
| Bootrom.&lt;br /&gt;
| -&lt;br /&gt;
| Yes&lt;br /&gt;
|-&lt;br /&gt;
| 0x37&lt;br /&gt;
| Gamecard [[Savegames|savedata]] actual key.&lt;br /&gt;
| Bootrom.&lt;br /&gt;
| NATIVE_FIRM.&lt;br /&gt;
| -&lt;br /&gt;
| Yes&lt;br /&gt;
|-&lt;br /&gt;
| 0x38&lt;br /&gt;
| BOSS key.&lt;br /&gt;
&lt;br /&gt;
See [[PSPXI:EncryptDecryptAes|EncryptDecryptAes]].&lt;br /&gt;
| Bootrom.&lt;br /&gt;
| Bootrom.&lt;br /&gt;
| -&lt;br /&gt;
| Yes&lt;br /&gt;
|-&lt;br /&gt;
| 0x39&lt;br /&gt;
| Download Play key, and the actual NFC key for generating retail [[Amiibo]] keys.&lt;br /&gt;
&lt;br /&gt;
This keyslot is used for two different keys. Both are available via [[PSPXI:EncryptDecryptAes|EncryptDecryptAes]]. NATIVE_FIRM sets this keyY to the same one used for keyslot 0x2E.&lt;br /&gt;
| Bootrom.&lt;br /&gt;
| NATIVE_FIRM.&lt;br /&gt;
| -&lt;br /&gt;
| Yes&lt;br /&gt;
|-&lt;br /&gt;
| 0x3A&lt;br /&gt;
| DSiWare export key.&lt;br /&gt;
&lt;br /&gt;
This keyY is initialized via [[Nand/private/movable.sed|movable.sed]]. This is used for calculating the AES-CMACs for SD [[DSiWare_Exports]].&lt;br /&gt;
| Bootrom.&lt;br /&gt;
| NATIVE_FIRM.&lt;br /&gt;
| -&lt;br /&gt;
| Yes&lt;br /&gt;
|-&lt;br /&gt;
| 0x3B&lt;br /&gt;
| [[CTRCARD_Registers#CTRCARD_SECSEED|CTR-CARD hardware-crypto seed]] decryption key.&lt;br /&gt;
&lt;br /&gt;
AES-CCM is used, the keyY, nonce and MAC are stored in the [[NCSD#Card_Info_Header|Card Info Header]].&lt;br /&gt;
| Bootrom.&lt;br /&gt;
| NATIVE_FIRM.&lt;br /&gt;
| -&lt;br /&gt;
| Yes&lt;br /&gt;
|-&lt;br /&gt;
| 0x3D&lt;br /&gt;
| Common key.&lt;br /&gt;
&lt;br /&gt;
Used to decrypt title keys in [[Ticket]].&lt;br /&gt;
| Bootrom.&lt;br /&gt;
| NATIVE_FIRM.&lt;br /&gt;
| -&lt;br /&gt;
| Yes&lt;br /&gt;
|-&lt;br /&gt;
| 0x3F&lt;br /&gt;
| Used for various internal Boot9 crypto operations, different keydata for each one. Used to decrypt the [[OTP_Registers|OTP]], the FIRM sections when [[Bootloader#Non-NAND_FIRM_boot|booting from non-NAND]], and when generating the console-unique keys.&lt;br /&gt;
&lt;br /&gt;
The keydata for this keyslot is overwritten with other keydata before booting FIRM. This keyslot is not known to be used post-Boot9.&lt;br /&gt;
| Bootrom.&lt;br /&gt;
| Bootrom.&lt;br /&gt;
| Bootrom.&lt;br /&gt;
| Yes&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Updating keydata ===&lt;br /&gt;
The contents of the keyslot specified in AES_KEYCNT can be updated by consecutively writing four words to AES_KEYXFIFO (keyX), AES_KEYYFIFO(keyY), or AES_KEYFIFO (normalkey).&lt;br /&gt;
&lt;br /&gt;
After writing to a keyslot, the keyslot must be selected again(write AES_KEYSEL + set AES_CNT bit26), even when writing to the same keyslot. Writing the last word to a key FIFO immediately after selecting a keyslot will not affect the keyslot keydata that gets used at that time, the new keydata will not get used until the keyslot gets selected again.&lt;br /&gt;
&lt;br /&gt;
Writing to the key FIFOs with byte writes results in the AES engine converting the byte to a word for setting the key word, with this: word = (byteval) | (byteval&amp;lt;&amp;lt;8) | (byteval&amp;lt;&amp;lt;16) | (byteval&amp;lt;&amp;lt;24). The result is the same regardless of which FIFO register byte was written to.&lt;br /&gt;
&lt;br /&gt;
The TWL keyslots 0x00-0x03 can be set directly by writing to the AES_KEY0-AES_KEY3 registers.&lt;br /&gt;
&lt;br /&gt;
The key FIFOs can be written simultaneously. For example, executing the following will result in the keyX and keyY being set to all-zero(unknown for normalkey): memset(0x10009100, 0, 0x100);&lt;br /&gt;
&lt;br /&gt;
Each key FIFO has a 0x10-byte tmp-buffer for storing the words written to that FIFO. Once the last word is written to a key FIFO, the filled tmp-buffer is then written to the key-data for the keyslot selected by AES_KEYCNT at the time the last word was written.&lt;br /&gt;
&lt;br /&gt;
=== Hardware key generator ===&lt;br /&gt;
A dedicated hardware key generator can be used to generate a keyslot&#039;s normal-key from its keyX and keyY. The hardware key generator is triggered by writing the keyY, which is the only way to trigger it with the 3DS keyslots.&lt;br /&gt;
&lt;br /&gt;
The algorithm for generating the normal-key from keyX and keyY is as follows, in big-endian 128-bit unsigned wraparound arithmetic:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Mode&lt;br /&gt;
! Formula&lt;br /&gt;
|-&lt;br /&gt;
| 3DS&lt;br /&gt;
| NormalKey = (((KeyX ROL 2) XOR KeyY) + C1) ROR 41&lt;br /&gt;
|-&lt;br /&gt;
| DSi&lt;br /&gt;
| NormalKey = ((KeyX XOR KeyY) + C2) ROL 42&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Unless noted otherwise, all keyslots on retail units use the hardware key generator.&lt;br /&gt;
&lt;br /&gt;
=== FIRM-launch key clearing ===&lt;br /&gt;
Starting with [[9.0.0-20]] the Process9 FIRM-launch code now &amp;quot;clears&amp;quot; the following AES keyslots, with certain keydata by writing the normal-key: 0x15 and 0x18-0x20. These are the keyslots used by the New3DS [[FIRM]] arm9bin loader(minus keyslot 0x11), the New3DS Process9 does this too.&lt;br /&gt;
&lt;br /&gt;
=== AES key-init ===&lt;br /&gt;
See [[Bootloader|here]] for how Boot9 initializes the AES keyslots.&lt;br /&gt;
&lt;br /&gt;
For an issue with console-unique key-init, see [[OTP_Registers|here]].&lt;br /&gt;
&lt;br /&gt;
Some of the Boot9 key-init appears to have a bug(?) when initializing a chunk of keyslots at once: normally it does &amp;lt;code&amp;gt;for(i=0; i&amp;lt;4; i++){... &amp;lt;setup_keyslot_keydata(keyslotbase+i, keydata)&amp;gt; ...}&amp;lt;/code&amp;gt;, however in some cases it does that except with &amp;lt;code&amp;gt;(keyslotbase,&amp;lt;/code&amp;gt; instead. This results in the keyslot specified by keyslotbase being initialized 4 times in a row, with the remaining 3 keyslots following keyslotbase being left uninitialized.&lt;br /&gt;
&lt;br /&gt;
initialize_aeskeys() works as follows:&lt;br /&gt;
* Validates input, calls panic() on failure. conunique_dataptr and bootrom_dataptr are both input parameters for initialize_aeskeys().&lt;br /&gt;
* Calls crypto_initialize().&lt;br /&gt;
* Then it &#039;&#039;basically&#039;&#039;: copies 0x1C-bytes from conunique_dataptr to tmpbuf+0(sp+12), and copies data from bootrom_dataptr with size 0x40-0x1C to tmpbuf+0x1C(conunique_dataptr and bootrom_dataptr are updated afterwards).&lt;br /&gt;
* The 0x40-byte tmpbuf is hashed with SHA256.&lt;br /&gt;
* Keyslot 0x3F is then initialized using the above hash: keyX = first 0x10-bytes of the hash, keyY = last 0x10-bytes of the hash.&lt;br /&gt;
* Then with each console-unique key-init code-block: IV is loaded from bootrom_dataptr(which is updated afterwards), then the 0x40-bytes from bootrom_dataptr is encrypted with AES-CBC. The output is then used as 4 keyXs for initializing keyslots. How bootrom_dataptr is updated if at all varies per code-block. Hashing similar to the code at the start of this function is also run(when the remaining size for conunique_dataptr is non-zero), but the output hash isn&#039;t used(this code is also slightly different for one code-block).&lt;br /&gt;
* Once finished with that, the non-console-unique keyslots are initialized. This is done with keydata loaded directly from bootrom_dataptr.&lt;br /&gt;
* The last initialized keyslot is 0x3F, via normalkey. The keydata for this is copied to 0xFFF00618. This is for restoring the keydata when non-NAND FIRM boot &#039;&#039;fails&#039;&#039;, since those use keyslot 0x3F with other keydata.&lt;br /&gt;
* Lastly it clears the 0x40-bytes at tmpbuf with the u32 loaded from bootrom_dataptr(the word following the above keyslot 0x3F keydata), then returns.&lt;br /&gt;
&lt;br /&gt;
The keyslots are initialized with the same order of keyslots+keydata_type listed below:&lt;br /&gt;
&lt;br /&gt;
Console-unique keydata, after the initialization for the key-generation keyslot(0x3F):&lt;br /&gt;
  0x04..0x07 keyX&lt;br /&gt;
  0x08..0x0B keyX&lt;br /&gt;
  0x0C..0x0F keyX&lt;br /&gt;
  0x10       keyX&lt;br /&gt;
  0x14..0x17 keyX&lt;br /&gt;
  0x18..0x1B keyX&lt;br /&gt;
  0x1C..0x1F keyX&lt;br /&gt;
  0x20..0x23 keyX&lt;br /&gt;
  0x24       keyX&lt;br /&gt;
  0x28..0x2B keyX&lt;br /&gt;
&lt;br /&gt;
Common keydata:&lt;br /&gt;
&lt;br /&gt;
  0x2C..0x2F keyX&lt;br /&gt;
  0x30..0x33 keyX&lt;br /&gt;
  0x34..0x37 keyX&lt;br /&gt;
  0x38..0x3B keyX&lt;br /&gt;
  0x3C..0x3F keyX&lt;br /&gt;
  0x04..0x0B keyY&lt;br /&gt;
  0x0C..0x0F normalkey&lt;br /&gt;
  0x10..0x13 normalkey&lt;br /&gt;
  0x14..0x17 normalkey&lt;br /&gt;
  0x18..0x1B normalkey&lt;br /&gt;
  0x1C..0x1F normalkey&lt;br /&gt;
  0x20..0x23 normalkey&lt;br /&gt;
  0x24..0x27 normalkey&lt;br /&gt;
  0x28..0x2B normalkey&lt;br /&gt;
  0x2C..0x2F normalkey&lt;br /&gt;
  0x30..0x33 normalkey&lt;br /&gt;
  0x34..0x37 normalkey&lt;br /&gt;
  0x38..0x3B normalkey&lt;br /&gt;
  0x3C..0x3F normalkey&lt;/div&gt;</summary>
		<author><name>EvilFlight</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=Homebrew_Exploits&amp;diff=21303</id>
		<title>Homebrew Exploits</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=Homebrew_Exploits&amp;diff=21303"/>
		<updated>2020-06-16T19:13:21Z</updated>

		<summary type="html">&lt;p&gt;EvilFlight: /* Standalone Homebrew Launcher Exploits */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Payload==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Works on latest fw&lt;br /&gt;
!  Name&lt;br /&gt;
!  Description&lt;br /&gt;
!  Supported firmwares&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: lightgreen&amp;quot; | Yes&lt;br /&gt;
| [https://smealum.github.io/3ds/ *hax payload]&lt;br /&gt;
| Booted by all of the below non-sysmodule exploits. &#039;&#039;&#039;No longer needed as of [https://github.com/AuroraWright/Luma3DS/releases/tag/v8.0 Luma 8.0]&#039;&#039;&#039;&lt;br /&gt;
| From &#039;&#039;&#039;9.0.0-7&#039;&#039;&#039; up to &#039;&#039;&#039;11.9.0-42&#039;&#039;&#039;.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
For the rest of this page, &amp;quot;Supported firmwares&amp;quot; refers to the exploit &#039;&#039;itself&#039;&#039;, not whether *hax payload supports it.&lt;br /&gt;
&lt;br /&gt;
==Standalone Homebrew Launcher Exploits==&lt;br /&gt;
The following homebrew exploits can be executed on a previously un-exploited system. &#039;&#039;Please&#039;&#039; see the above Payload section regarding what &amp;quot;Supported firmwares&amp;quot; indicates &#039;&#039;exactly&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Works on latest fw&lt;br /&gt;
!  Name&lt;br /&gt;
!  Supported firmwares&lt;br /&gt;
!  Requirements&lt;br /&gt;
!  Author&lt;br /&gt;
!  Install&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: salmon&amp;quot; | No&lt;br /&gt;
| [[ninjhax|Ninjhax 1.1b]]&lt;br /&gt;
| From &#039;&#039;&#039;4.0.0-7&#039;&#039;&#039; up to and including &#039;&#039;&#039;9.2.0-20&#039;&#039;&#039;.&lt;br /&gt;
| A cartridge or eShop version (JPN-only) of &amp;quot;Cubic Ninja&amp;quot;.&lt;br /&gt;
| smea&lt;br /&gt;
| [http://smealum.net/ninjhax/ Install]&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: lightgreen&amp;quot; | Yes&lt;br /&gt;
| [[ninjhax|Ninjhax 2.x]]&lt;br /&gt;
| From &#039;&#039;&#039;9.0.0-7&#039;&#039;&#039; up to and including &#039;&#039;&#039;11.9.X&#039;&#039;&#039;.&lt;br /&gt;
|  A cartridge or eShop version (JPN-only, not available anymore for purchase) of &amp;quot;Cubic Ninja&amp;quot;.&lt;br /&gt;
| smea&lt;br /&gt;
| [https://smealum.github.io/ninjhax2/ Install]&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: lightgreen&amp;quot; | Yes&lt;br /&gt;
| [http://plutooo.github.io/freakyhax/ freakyhax]&lt;br /&gt;
| From &#039;&#039;&#039;9.0.0-7&#039;&#039;&#039; up to and including &#039;&#039;&#039;11.9.X&#039;&#039;&#039;.&lt;br /&gt;
|  A cartridge or eShop version (USA/EUR/JPN, not available anymore for purchase) of &amp;quot;Freakyform Deluxe&amp;quot;.&lt;br /&gt;
| plutoo&lt;br /&gt;
| [http://plutooo.github.io/freakyhax/ Install]&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: salmon&amp;quot; | No&lt;br /&gt;
| [http://plutooo.github.io/smilehax/ smilehax]&lt;br /&gt;
| From &#039;&#039;&#039;9.0.0-7&#039;&#039;&#039; up to and including &#039;&#039;&#039;11.0.0-33&#039;&#039;&#039;&lt;br /&gt;
| SmileBASIC (JPN all versions up to 3.32 excluded, USA 3.31 only)&lt;br /&gt;
| plutoo&lt;br /&gt;
| [http://plutooo.github.io/smilehax/ Install]&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: lightgreen&amp;quot; | Yes&lt;br /&gt;
| [https://github.com/zoogie/smilehax-IIe smilehax IIe]&lt;br /&gt;
| From &#039;&#039;&#039;9.0.0-7&#039;&#039;&#039; up to and including &#039;&#039;&#039;11.13.0-45&#039;&#039;&#039;&lt;br /&gt;
| SmileBASIC (JPN version 3.3.2 via app downgrade, USA/EUR 3.6.0, aka latest app version)&lt;br /&gt;
| zoogie&lt;br /&gt;
| [https://github.com/zoogie/smilehax-IIe/releases/latest Install]&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: salmon&amp;quot; | No&lt;br /&gt;
| [http://mrnbayoh.github.io/basicsploit/ BASICSploit]&lt;br /&gt;
| From &#039;&#039;&#039;9.0.0-7&#039;&#039;&#039; up to and including &#039;&#039;&#039;11.0.0-33&#039;&#039;&#039;&lt;br /&gt;
| SmileBASIC (USA all versions)&lt;br /&gt;
| MrNbaYoh&lt;br /&gt;
| [http://mrnbayoh.github.io/basicsploit/ Install]&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: lightgreen&amp;quot; | Yes&lt;br /&gt;
| [[smashbroshax|smashbroshax]] (beaconhax)&lt;br /&gt;
| (New 3DS only) From &#039;&#039;&#039;9.0.0-X&#039;&#039;&#039; up to and including &#039;&#039;&#039;11.9.0-37&#039;&#039;&#039;.&lt;br /&gt;
| Super Smash Bros 3DS (full-game) and a way to broadcast raw wifi beacons. The demo (prior to the updated November 2015 [https://github.com/yellows8/3ds_smashbroshax version]) isn&#039;t usable with the *hax payloads. Game-version v1.1.3 fixed the vuln used with this, see the repo for a workaround for that.&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
| [https://github.com/yellows8/3ds_smashbroshax Install]&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: salmon&amp;quot; | No&lt;br /&gt;
| [[browserhax]]&lt;br /&gt;
| From &#039;&#039;&#039;9.0.0-2&#039;&#039;&#039; to &#039;&#039;&#039;11.0.0-33&#039;&#039;&#039;&lt;br /&gt;
Note that the browser-version-check bypass is only usable prior to [[10.7.0-32]].&lt;br /&gt;
| A USA, EUR, JPN, or KOR system.&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
| [http://yls8.mtheall.com/3dsbrowserhax.php Install]&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: salmon&amp;quot; | No&lt;br /&gt;
| [https://github.com/svanheulen/genhax genhax]&lt;br /&gt;
| (New 3DS only) From &#039;&#039;&#039;9.9.0-X&#039;&#039;&#039; up to and including &#039;&#039;&#039;11.2.0-X&#039;&#039;&#039;.&lt;br /&gt;
| A gamecard or eShop-install of Monster Hunter X (JPN only), and the DLC encryption key (see installer instructions). &#039;&#039;&#039;Note: the secondary exploit still works, see bellow&#039;&#039;&#039;&lt;br /&gt;
| svanheulen&lt;br /&gt;
| [https://github.com/svanheulen/genhax_installer Install]&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: salmon&amp;quot; | No&lt;br /&gt;
| [https://github.com/nedwill/soundhax soundhax]&lt;br /&gt;
| From &#039;&#039;&#039;9.0.0-13&#039;&#039;&#039; up to and including &#039;&#039;&#039;11.3.0-36&#039;&#039;&#039;.&lt;br /&gt;
| A USA, EUR, JPN or KOR system.&lt;br /&gt;
| nedwill&lt;br /&gt;
| [http://soundhax.com Install]&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: lightgreen&amp;quot; | Yes&lt;br /&gt;
| [https://github.com/MrNbaYoh/doodlebomb doodlebomb]&lt;br /&gt;
| From &#039;&#039;&#039;9.0.0-X&#039;&#039;&#039;(?) up to and including &#039;&#039;&#039;11.6.0-X&#039;&#039;&#039;.&lt;br /&gt;
| An eShop-install of Swapdoodle (version 1.1.1 or lower). As of 2017-4-26, version 1.1.2 was released, blocking outdated app version from sending or receiving messages.&lt;br /&gt;
| MrNbaYoh&lt;br /&gt;
| [https://mrnbayoh.github.io/doodlebomb/ Install]&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: lightgreen&amp;quot; | Yes&lt;br /&gt;
| [https://github.com/MrNbaYoh/rpwng2 RPwnG 2]&lt;br /&gt;
| From &#039;&#039;&#039;1.1.7-X&#039;&#039;&#039;(?) up to and including &#039;&#039;&#039;11.9.0-X&#039;&#039;&#039;.&lt;br /&gt;
| A digital copy of RPG Maker Player (free) ver. 1.1.4 on EUR, ver. 1.1.2 on USA. A 3DS on firmware 11.7. &lt;br /&gt;
| MrNbaYoh&lt;br /&gt;
| [https://mrnbayoh.github.io/rpwng2/ Install]&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: darkorange&amp;quot; | Only if installed before August 28, 2017&lt;br /&gt;
| [https://twitter.com/MrNbaYoh/status/899394739543437313 RPwnG]&lt;br /&gt;
| From &#039;&#039;&#039;9.0.0-X&#039;&#039;&#039;(?) up to and including &#039;&#039;&#039;11.9.0-X&#039;&#039;&#039;.&lt;br /&gt;
| An  digital copy of RPG Maker Player (free) ver. 1.1.4 on EUR, ver. 1.1.2 on USA/JPN is required. As of August 28, 2017 the code is instantly removed after publishing.&lt;br /&gt;
| MrNbaYoh&lt;br /&gt;
| [https://mrnbayoh.github.io/rpwng/ Install]&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: salmon&amp;quot; | No&lt;br /&gt;
| [https://github.com/MrNbaYoh/notehax notehax]&lt;br /&gt;
|  From &#039;&#039;&#039;9.9.0-X&#039;&#039;&#039; up to and including &#039;&#039;&#039;11.5.0-X&#039;&#039;&#039;.&lt;br /&gt;
| A digital copy of Flipnote Studio 3D on ver 1.3.1 (JPN) and ver 1.0.0 for EUR/USA (not the latest)&lt;br /&gt;
| MrNbaYoh&lt;br /&gt;
| [https://mrnbayoh.github.io/notehax/ Install]&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: darkorange&amp;quot; | Only if you already purchased Blockfactory before it was removed from the eShop&lt;br /&gt;
| [https://github.com/Stary2001/haxfactory haxfactory]&lt;br /&gt;
| From &#039;&#039;&#039;9.0.0-X&#039;&#039;&#039;(?) up to and including &#039;&#039;&#039;11.9.0-X&#039;&#039;&#039;.&lt;br /&gt;
| A digital copy of &amp;quot;Blockfactory&amp;quot; (USA/EUR)&lt;br /&gt;
| Stary2001&lt;br /&gt;
| [https://github.com/Stary2001/haxfactory Install]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Secondary Exploits==&lt;br /&gt;
Installation of these exploits requires a previously exploited system to install. After installation, they can be used on their own. &#039;&#039;Please&#039;&#039; see the above Payload section regarding what &amp;quot;Supported firmwares&amp;quot; indicates &#039;&#039;exactly&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Works on latest fw&lt;br /&gt;
!  Name&lt;br /&gt;
!  Supported firmwares&lt;br /&gt;
!  Requirements&lt;br /&gt;
!  Author&lt;br /&gt;
!  Install&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: salmon&amp;quot; | No&lt;br /&gt;
| [[ironhax]]&lt;br /&gt;
| From &#039;&#039;&#039;9.5.0-X&#039;&#039;&#039; up to and including &#039;&#039;&#039;10.3.0-X&#039;&#039;&#039;, for &#039;&#039;&#039;X&#039;&#039;&#039; up to and including 28.&lt;br /&gt;
| A copy of &amp;quot;Ironfall: Invasion&amp;quot; downloaded from eShop before August 11th, 2015. Note the updated version that was released on October 13th, 2015 is not supported.&lt;br /&gt;
| smea&lt;br /&gt;
| [http://smealum.github.io/3ds/ Install]&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: lightgreen&amp;quot; | Yes&lt;br /&gt;
| [http://vegaroxas.github.io/ steelhax]&lt;br /&gt;
| From &#039;&#039;&#039;9.0.0-X&#039;&#039;&#039; up to and including &#039;&#039;&#039;11.9.0-X&#039;&#039;&#039;&lt;br /&gt;
| A copy of Steel Diver: Sub Wars&lt;br /&gt;
| Vegaroxas&lt;br /&gt;
| [https://github.com/VegaRoXas/vegaroxas.github.io/raw/master/files/steelhax-installer.zip Install]&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: lightgreen&amp;quot; | Yes&lt;br /&gt;
| [https://github.com/yellows8/oot3dhax oot3dhax]&lt;br /&gt;
| From &#039;&#039;&#039;9.0.0-X&#039;&#039;&#039; up to and including &#039;&#039;&#039;11.9.0-X&#039;&#039;&#039;, for &#039;&#039;&#039;X&#039;&#039;&#039; up to and including 39.&lt;br /&gt;
| A gamecard or eShop-install of Legend of Zelda: Ocarina of Time 3D. Besides using the installer app, writing raw saveimages with a save dongle for example is another option. Before compression was introduced in the 2016-7-18 release, the size of the *hax payload meant the exploit can&#039;t co-exist with regular saves on a physical version of the game.&lt;br /&gt;
| Yellows8 / smea et al.&lt;br /&gt;
| See [https://smealum.github.io/3ds/ here].&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: salmon&amp;quot; | No&lt;br /&gt;
| [[menuhax]]&lt;br /&gt;
| JPN/USA/EUR: From &#039;&#039;&#039;9.0.0-X&#039;&#039;&#039; up to and including &#039;&#039;&#039;11.2.0-X&#039;&#039;&#039;.&lt;br /&gt;
KOR: From &#039;&#039;&#039;9.6.0-X&#039;&#039;&#039; up to and including &#039;&#039;&#039;11.2.0-X&#039;&#039;&#039;.&lt;br /&gt;
| JPN/USA/EUR: Having created [[Home_Menu#Home_Menu_Theme_SD_ExtData|theme extdata]] through opening the official theme selector at least once.&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
| [https://github.com/yellows8/3ds_homemenuhax/releases Download]&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: lightgreen&amp;quot; | Yes&lt;br /&gt;
| [https://github.com/shinyquagsire23/supermysterychunkhax supermysterychunkhax]&lt;br /&gt;
| From &#039;&#039;&#039;9.9.0-X&#039;&#039;&#039; (USA/JPN) / &#039;&#039;&#039;10.2.0-X&#039;&#039;&#039; (EUR) up to &#039;&#039;&#039;11.9.0-X&#039;&#039;&#039;.&lt;br /&gt;
| A gamecard or eShop-install of Pokémon Super Mystery Dungeon.&lt;br /&gt;
| Shiny Quagsire / SALT team&lt;br /&gt;
| [https://smd.salthax.org/ Install].&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: salmon&amp;quot; | No&lt;br /&gt;
| [https://github.com/shinyquagsire23/v_hax (v*)hax]&lt;br /&gt;
| From &#039;&#039;&#039;9.0.0-X&#039;&#039;&#039; up to and including &#039;&#039;&#039;11.0.0-X&#039;&#039;&#039;, for &#039;&#039;&#039;X&#039;&#039;&#039; up to and including 33.&lt;br /&gt;
Note that &#039;&#039;&#039;9.0.0-X&#039;&#039;&#039; is only required for the Homebrew Launcher - the game itself only requires &#039;&#039;&#039;2.1.0-X&#039;&#039;&#039; for primitive userland code execution.&lt;br /&gt;
| A copy of VVVVVV downloaded after March 2012 (v1). v1.1 patches out the overflow vulnerability used by (v*)hax.&lt;br /&gt;
| Shiny Quagsire / SALT team&lt;br /&gt;
| [https://vvvvvv.salthax.org/ Install].&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: lightgreen&amp;quot; | Yes&lt;br /&gt;
| [https://github.com/Dazzozo/humblehax humblehax]&lt;br /&gt;
| From &#039;&#039;&#039;9.0.0-X&#039;&#039;&#039; (USA/EUR) up to and including &#039;&#039;&#039;11.9.0-X&#039;&#039;&#039;.&lt;br /&gt;
| An eShop-install of Citizens of Earth (either v1 or v2), featured in the Humble &amp;quot;Friends of Nintendo&amp;quot; Bundle.&lt;br /&gt;
| Dazzozo / SALT team&lt;br /&gt;
| [https://citizens.salthax.org/ Install].&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: salmon&amp;quot; | No&lt;br /&gt;
| [http://mrnbayoh.github.io/basehaxx/ basehaxx]&lt;br /&gt;
| From &#039;&#039;&#039;9.0.0-X&#039;&#039;&#039; up to and including &#039;&#039;&#039;11.9.0-X&#039;&#039;&#039;.&lt;br /&gt;
| A gamecard or eShop-install of Pokémon Omega Ruby / Alpha Sapphire.&lt;br /&gt;
| MrNbaYoh&lt;br /&gt;
| [http://mrnbayoh.github.io/basehaxx/ install]&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: lightgreen&amp;quot; | Yes&lt;br /&gt;
| [https://github.com/yellows8/stickerhax stickerhax]&lt;br /&gt;
| From &#039;&#039;&#039;9.0.0-X&#039;&#039;&#039; up to and including &#039;&#039;&#039;11.6.0-X&#039;&#039;&#039;.&lt;br /&gt;
| A gamecard or eShop-install of Paper Mario: Sticker Star.&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
| [https://github.com/yellows8/stickerhax Here]&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: lightgreen&amp;quot; | Yes&lt;br /&gt;
| [https://github.com/svanheulen/genhax genhax]&lt;br /&gt;
| (New 3DS only) From &#039;&#039;&#039;9.9.0-X&#039;&#039;&#039;(JPN) or &#039;&#039;&#039;10.3.0-X&#039;&#039;&#039;(EUR/USA) up to and including &#039;&#039;&#039;11.3.0-X&#039;&#039;&#039;.&lt;br /&gt;
| A gamecard or eShop-install of Monster Hunter Generations or Monster Hunter X (without the game updates installed), and an internet connection during installation.&lt;br /&gt;
| svanheulen&lt;br /&gt;
| [https://github.com/svanheulen/genhax_installer Install]&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: lightgreen&amp;quot; | Yes&lt;br /&gt;
| [https://github.com/MrNbaYoh/painthax painthax]&lt;br /&gt;
| From &#039;&#039;&#039;9.0.0-X&#039;&#039;&#039; up to and including &#039;&#039;&#039;11.6.0-X&#039;&#039;&#039;.&lt;br /&gt;
| An eShop-install of Pixel Paint.&lt;br /&gt;
| MrNbaYoh&lt;br /&gt;
| [https://github.com/MrNbaYoh/painthax/releases/latest install]&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: salmon&amp;quot; | No&lt;br /&gt;
| [https://github.com/yellows8/ctpkpwn ctpkpwn_tfh]&lt;br /&gt;
| From &#039;&#039;&#039;9.9.0-X&#039;&#039;&#039; up to and including &#039;&#039;&#039;11.3.0-X&#039;&#039;&#039;.&lt;br /&gt;
| A gamecard or eShop-install of &amp;quot;The Legend of Zelda: Tri Force Heroes&amp;quot;, and an Internet connection during installation. Unless you have &amp;quot;CFW&amp;quot;, ctr-httpwn &amp;gt;=v1.2 with the included bosshaxx on a compatible system-version is also required. If installing via ctr-httpwn, you can&#039;t do so on &amp;gt;=v11.4. Note that the exploit itself was not fixed.&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
| [https://github.com/yellows8/ctpkpwn/releases Install]&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: salmon&amp;quot; | No&lt;br /&gt;
| [https://github.com/MrNbaYoh/doodlebomb doodlebomb]&lt;br /&gt;
| From &#039;&#039;&#039;9.0.0-X&#039;&#039;&#039;(?) up to and including &#039;&#039;&#039;11.4.0-X&#039;&#039;&#039;.&lt;br /&gt;
| An eShop-install of Swapdoodle.&lt;br /&gt;
| MrNbaYoh&lt;br /&gt;
| [https://mrnbayoh.github.io/doodlebomb/ Install]&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: darkorange&amp;quot; | Only if installed before August 28, 2017&lt;br /&gt;
| [https://github.com/ChampionLeake/RPwnG3 RPwnG3]&lt;br /&gt;
| From &#039;&#039;&#039;9.0.0-X&#039;&#039;&#039;(?) up to and including &#039;&#039;&#039;11.12.0-X&#039;&#039;&#039;.&lt;br /&gt;
| A Digital/Physical copy of &amp;quot;RPGMaker Fes Player/RPGMaker Fes&amp;quot; (USA/JPN 1.1.2 or lower ; EUR 1.1.4 or lower).&lt;br /&gt;
| [[User:ChampionLeake|ChampionLeake]]&lt;br /&gt;
| [https://github.com/ChampionLeake/RPwnG3/releases Install]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Exploits without Homebrew Launcher==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;&#039;&#039;&#039;Warning:&#039;&#039;&#039;&amp;lt;/u&amp;gt; The following exploits can run code, but are missing a 3DSX launcher. They cannot launch any homebrew in the 3DSX format, but could still prove useful by chaining to exploits with higher privileges.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Works on latest fw&lt;br /&gt;
!  Name&lt;br /&gt;
!  Supported firmwares&lt;br /&gt;
!  Requirements&lt;br /&gt;
!  Author&lt;br /&gt;
!  Install&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: lime&amp;quot; | Yes&lt;br /&gt;
| [[bannerbomb3]] (System Settings)&lt;br /&gt;
| (Old3DS (2DS) (XL) / New3DS (XL)) &#039;&#039;&#039;11.5.0&#039;&#039;&#039; to &#039;&#039;&#039;11.13.0&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
(New2DS XL) &#039;&#039;&#039;(11.4.0)&#039;&#039;&#039; &#039;&#039;&#039;11.5.0&#039;&#039;&#039; to &#039;&#039;&#039;11.13.0&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
An exploit that uses a buffer overflow in a TWL export banner&#039;s title strings to gain rop execution.&lt;br /&gt;
|A USA, EUR, KOR, or JPN system with its movable.sed keyY extracted.&lt;br /&gt;
|[[User:zoogie|zoogie]]&lt;br /&gt;
|[[bannerbomb3|Install]]&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: salmon&amp;quot; | No&lt;br /&gt;
| [[browserhax]] (Without the loader in the 3ds_browserhax_common repo)&lt;br /&gt;
| (Old3DS) From &#039;&#039;&#039;5.0.0-2&#039;&#039;&#039; to &#039;&#039;&#039;11.0.0-33&#039;&#039;&#039; (Pre-v5.0 is supported for some versions if you manually modify the source)&lt;br /&gt;
&lt;br /&gt;
(New3DS) From &#039;&#039;&#039;9.0.0-20&#039;&#039;&#039; to &#039;&#039;&#039;11.0.0-33&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Note that the browser-version-check bypass is only usable prior to [[10.7.0-32]].&lt;br /&gt;
| An USA, EUR, or JPN system.&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
| [[browserhax|Install]]&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: salmon&amp;quot; | No&lt;br /&gt;
| Ninjhax (with specialized payloads)&lt;br /&gt;
| Up to &#039;&#039;&#039;9.2.0-20&#039;&#039;&#039;?&lt;br /&gt;
| &lt;br /&gt;
| smea + independent developers&lt;br /&gt;
| N/A&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Previous Exploits==&lt;br /&gt;
&amp;lt;u&amp;gt;&#039;&#039;&#039;Warning:&#039;&#039;&#039;&amp;lt;/u&amp;gt; These exploits &#039;&#039;&#039;do not work&#039;&#039;&#039;. They are exploits which no longer function at all, regardless of software or firmware revision.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Works on latest fw&lt;br /&gt;
! Name&lt;br /&gt;
! Supported firmwares&lt;br /&gt;
! Requirements&lt;br /&gt;
! Author&lt;br /&gt;
! Install&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: salmon&amp;quot; | No&lt;br /&gt;
| [[tubehax|Tubehax]]&lt;br /&gt;
| None. &#039;&#039;&#039;Was&#039;&#039;&#039;: From &#039;&#039;&#039;9.0.0-X&#039;&#039;&#039; up to and including &#039;&#039;&#039;10.1.0-X&#039;&#039;&#039;, for &#039;&#039;&#039;X&#039;&#039;&#039; up to and including 27.&lt;br /&gt;
| The YouTube application and an Internet connection. As of October 15, 2015, this is no longer usable due to an update being released which fixes the vuln used by tubehax + app update being forced (see [[YouTube|here]]).&lt;br /&gt;
| smea&lt;br /&gt;
| [http://smealum.github.io/3ds/ Install]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Other Homebrew Loaders==&lt;br /&gt;
The [https://github.com/yellows8/hblauncher_loader hblauncher_loader] title can be used when running under modded-FIRM which allows running unsigned titles, to boot the *hax payloads.&lt;br /&gt;
&lt;br /&gt;
[https://github.com/AuroraWright/Luma3DS Luma3DS], apart from providing signature patches for the installation and use of custom titles, includes the &amp;quot;Rosalina&amp;quot; system module, which among its features allows cleanly loading 3dsx applications as a native process with full ARM11 system permissions, by replacing an installed title&#039;s ExeFS and ExHeader during load time. It is currently the only option for running 3dsx applications on 11.4+ O3DSes; additionally, the *hax 2.x payload is incompatible with Rosalina and therefore so are homebrew applications requiring its target title system.&lt;br /&gt;
&lt;br /&gt;
==Sysmodule Exploits==&lt;br /&gt;
This section is for system-module exploits, which can be run from the *hax payloads.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Works on latest fw&lt;br /&gt;
! Name&lt;br /&gt;
! Supported firmwares&lt;br /&gt;
! Requirements&lt;br /&gt;
! Author&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: salmon&amp;quot; | No, still usable pre-v11.4.&lt;br /&gt;
| [https://github.com/yellows8/ctr-httpwn/releases ctr-httpwn]&lt;br /&gt;
| From &#039;&#039;&#039;9.6.0-X&#039;&#039;&#039; up to and including &#039;&#039;&#039;11.3.0-X&#039;&#039;&#039;. This includes bosshaxx.&lt;br /&gt;
| None&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==WebKit vuln testing==&lt;br /&gt;
See [https://github.com/yellows8/3ds_browserhax_common/issues/28 here].&lt;/div&gt;</summary>
		<author><name>EvilFlight</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=Homebrew_Exploits&amp;diff=21262</id>
		<title>Homebrew Exploits</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=Homebrew_Exploits&amp;diff=21262"/>
		<updated>2020-05-28T20:38:13Z</updated>

		<summary type="html">&lt;p&gt;EvilFlight: /* Exploits without Homebrew Launcher*/&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Payload==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Works on latest fw&lt;br /&gt;
!  Name&lt;br /&gt;
!  Description&lt;br /&gt;
!  Supported firmwares&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: lightgreen&amp;quot; | Yes&lt;br /&gt;
| [https://smealum.github.io/3ds/ *hax payload]&lt;br /&gt;
| Booted by all of the below non-sysmodule exploits. &#039;&#039;&#039;No longer needed as of [https://github.com/AuroraWright/Luma3DS/releases/tag/v8.0 Luma 8.0]&#039;&#039;&#039;&lt;br /&gt;
| From &#039;&#039;&#039;9.0.0-7&#039;&#039;&#039; up to &#039;&#039;&#039;11.9.0-42&#039;&#039;&#039;.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
For the rest of this page, &amp;quot;Supported firmwares&amp;quot; refers to the exploit &#039;&#039;itself&#039;&#039;, not whether *hax payload supports it.&lt;br /&gt;
&lt;br /&gt;
==Standalone Homebrew Launcher Exploits==&lt;br /&gt;
The following homebrew exploits can be executed on a previously un-exploited system. &#039;&#039;Please&#039;&#039; see the above Payload section regarding what &amp;quot;Supported firmwares&amp;quot; indicates &#039;&#039;exactly&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Works on latest fw&lt;br /&gt;
!  Name&lt;br /&gt;
!  Supported firmwares&lt;br /&gt;
!  Requirements&lt;br /&gt;
!  Author&lt;br /&gt;
!  Install&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: salmon&amp;quot; | No&lt;br /&gt;
| [[ninjhax|Ninjhax 1.1b]]&lt;br /&gt;
| From &#039;&#039;&#039;4.0.0-7&#039;&#039;&#039; up to and including &#039;&#039;&#039;9.2.0-20&#039;&#039;&#039;.&lt;br /&gt;
| A cartridge or eShop version (JPN-only) of &amp;quot;Cubic Ninja&amp;quot;.&lt;br /&gt;
| smea&lt;br /&gt;
| [http://smealum.net/ninjhax/ Install]&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: lightgreen&amp;quot; | Yes&lt;br /&gt;
| [[ninjhax|Ninjhax 2.x]]&lt;br /&gt;
| From &#039;&#039;&#039;9.0.0-7&#039;&#039;&#039; up to and including &#039;&#039;&#039;11.9.X&#039;&#039;&#039;.&lt;br /&gt;
|  A cartridge or eShop version (JPN-only, not available anymore for purchase) of &amp;quot;Cubic Ninja&amp;quot;.&lt;br /&gt;
| smea&lt;br /&gt;
| [https://smealum.github.io/ninjhax2/ Install]&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: lightgreen&amp;quot; | Yes&lt;br /&gt;
| [http://plutooo.github.io/freakyhax/ freakyhax]&lt;br /&gt;
| From &#039;&#039;&#039;9.0.0-7&#039;&#039;&#039; up to and including &#039;&#039;&#039;11.9.X&#039;&#039;&#039;.&lt;br /&gt;
|  A cartridge or eShop version (USA/EUR/JPN, not available anymore for purchase) of &amp;quot;Freakyform Deluxe&amp;quot;.&lt;br /&gt;
| plutoo&lt;br /&gt;
| [http://plutooo.github.io/freakyhax/ Install]&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: salmon&amp;quot; | No&lt;br /&gt;
| [http://plutooo.github.io/smilehax/ smilehax]&lt;br /&gt;
| From &#039;&#039;&#039;9.0.0-7&#039;&#039;&#039; up to and including &#039;&#039;&#039;11.0.0-33&#039;&#039;&#039;&lt;br /&gt;
| SmileBASIC (JPN all versions up to 3.32 excluded, USA 3.31 only)&lt;br /&gt;
| plutoo&lt;br /&gt;
| [http://plutooo.github.io/smilehax/ Install]&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: salmon&amp;quot; | No&lt;br /&gt;
| [http://mrnbayoh.github.io/basicsploit/ BASICSploit]&lt;br /&gt;
| From &#039;&#039;&#039;9.0.0-7&#039;&#039;&#039; up to and including &#039;&#039;&#039;11.0.0-33&#039;&#039;&#039;&lt;br /&gt;
| SmileBASIC (USA all versions)&lt;br /&gt;
| MrNbaYoh&lt;br /&gt;
| [http://mrnbayoh.github.io/basicsploit/ Install]&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: lightgreen&amp;quot; | Yes&lt;br /&gt;
| [[smashbroshax|smashbroshax]] (beaconhax)&lt;br /&gt;
| (New 3DS only) From &#039;&#039;&#039;9.0.0-X&#039;&#039;&#039; up to and including &#039;&#039;&#039;11.9.0-37&#039;&#039;&#039;.&lt;br /&gt;
| Super Smash Bros 3DS (full-game) and a way to broadcast raw wifi beacons. The demo (prior to the updated November 2015 [https://github.com/yellows8/3ds_smashbroshax version]) isn&#039;t usable with the *hax payloads. Game-version v1.1.3 fixed the vuln used with this, see the repo for a workaround for that.&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
| [https://github.com/yellows8/3ds_smashbroshax Install]&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: salmon&amp;quot; | No&lt;br /&gt;
| [[browserhax]]&lt;br /&gt;
| From &#039;&#039;&#039;9.0.0-2&#039;&#039;&#039; to &#039;&#039;&#039;11.0.0-33&#039;&#039;&#039;&lt;br /&gt;
Note that the browser-version-check bypass is only usable prior to [[10.7.0-32]].&lt;br /&gt;
| A USA, EUR, JPN, or KOR system.&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
| [http://yls8.mtheall.com/3dsbrowserhax.php Install]&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: salmon&amp;quot; | No&lt;br /&gt;
| [https://github.com/svanheulen/genhax genhax]&lt;br /&gt;
| (New 3DS only) From &#039;&#039;&#039;9.9.0-X&#039;&#039;&#039; up to and including &#039;&#039;&#039;11.2.0-X&#039;&#039;&#039;.&lt;br /&gt;
| A gamecard or eShop-install of Monster Hunter X (JPN only), and the DLC encryption key (see installer instructions). &#039;&#039;&#039;Note: the secondary exploit still works, see bellow&#039;&#039;&#039;&lt;br /&gt;
| svanheulen&lt;br /&gt;
| [https://github.com/svanheulen/genhax_installer Install]&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: salmon&amp;quot; | No&lt;br /&gt;
| [https://github.com/nedwill/soundhax soundhax]&lt;br /&gt;
| From &#039;&#039;&#039;9.0.0-13&#039;&#039;&#039; up to and including &#039;&#039;&#039;11.3.0-36&#039;&#039;&#039;.&lt;br /&gt;
| A USA, EUR, JPN or KOR system.&lt;br /&gt;
| nedwill&lt;br /&gt;
| [http://soundhax.com Install]&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: lightgreen&amp;quot; | Yes&lt;br /&gt;
| [https://github.com/MrNbaYoh/doodlebomb doodlebomb]&lt;br /&gt;
| From &#039;&#039;&#039;9.0.0-X&#039;&#039;&#039;(?) up to and including &#039;&#039;&#039;11.6.0-X&#039;&#039;&#039;.&lt;br /&gt;
| An eShop-install of Swapdoodle (version 1.1.1 or lower). As of 2017-4-26, version 1.1.2 was released, blocking outdated app version from sending or receiving messages.&lt;br /&gt;
| MrNbaYoh&lt;br /&gt;
| [https://mrnbayoh.github.io/doodlebomb/ Install]&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: lightgreen&amp;quot; | Yes&lt;br /&gt;
| [https://github.com/MrNbaYoh/rpwng2 RPwnG 2]&lt;br /&gt;
| From &#039;&#039;&#039;1.1.7-X&#039;&#039;&#039;(?) up to and including &#039;&#039;&#039;11.9.0-X&#039;&#039;&#039;.&lt;br /&gt;
| A digital copy of RPG Maker Player (free) ver. 1.1.4 on EUR, ver. 1.1.2 on USA. A 3DS on firmware 11.7. &lt;br /&gt;
| MrNbaYoh&lt;br /&gt;
| [https://mrnbayoh.github.io/rpwng2/ Install]&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: darkorange&amp;quot; | Only if installed before August 28, 2017&lt;br /&gt;
| [https://twitter.com/MrNbaYoh/status/899394739543437313 RPwnG]&lt;br /&gt;
| From &#039;&#039;&#039;9.0.0-X&#039;&#039;&#039;(?) up to and including &#039;&#039;&#039;11.9.0-X&#039;&#039;&#039;.&lt;br /&gt;
| An  digital copy of RPG Maker Player (free) ver. 1.1.4 on EUR, ver. 1.1.2 on USA/JPN is required. As of August 28, 2017 the code is instantly removed after publishing.&lt;br /&gt;
| MrNbaYoh&lt;br /&gt;
| [https://mrnbayoh.github.io/rpwng/ Install]&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: salmon&amp;quot; | No&lt;br /&gt;
| [https://github.com/MrNbaYoh/notehax notehax]&lt;br /&gt;
|  From &#039;&#039;&#039;9.9.0-X&#039;&#039;&#039; up to and including &#039;&#039;&#039;11.5.0-X&#039;&#039;&#039;.&lt;br /&gt;
| A digital copy of Flipnote Studio 3D on ver 1.3.1 (JPN) and ver 1.0.0 for EUR/USA (not the latest)&lt;br /&gt;
| MrNbaYoh&lt;br /&gt;
| [https://mrnbayoh.github.io/notehax/ Install]&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: darkorange&amp;quot; | Only if you already purchased Blockfactory before it was removed from the eShop&lt;br /&gt;
| [https://github.com/Stary2001/haxfactory haxfactory]&lt;br /&gt;
| From &#039;&#039;&#039;9.0.0-X&#039;&#039;&#039;(?) up to and including &#039;&#039;&#039;11.9.0-X&#039;&#039;&#039;.&lt;br /&gt;
| A digital copy of &amp;quot;Blockfactory&amp;quot; (USA/EUR)&lt;br /&gt;
| Stary2001&lt;br /&gt;
| [https://github.com/Stary2001/haxfactory Install]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Secondary Exploits==&lt;br /&gt;
Installation of these exploits requires a previously exploited system to install. After installation, they can be used on their own. &#039;&#039;Please&#039;&#039; see the above Payload section regarding what &amp;quot;Supported firmwares&amp;quot; indicates &#039;&#039;exactly&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Works on latest fw&lt;br /&gt;
!  Name&lt;br /&gt;
!  Supported firmwares&lt;br /&gt;
!  Requirements&lt;br /&gt;
!  Author&lt;br /&gt;
!  Install&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: salmon&amp;quot; | No&lt;br /&gt;
| [[ironhax]]&lt;br /&gt;
| From &#039;&#039;&#039;9.5.0-X&#039;&#039;&#039; up to and including &#039;&#039;&#039;10.3.0-X&#039;&#039;&#039;, for &#039;&#039;&#039;X&#039;&#039;&#039; up to and including 28.&lt;br /&gt;
| A copy of &amp;quot;Ironfall: Invasion&amp;quot; downloaded from eShop before August 11th, 2015. Note the updated version that was released on October 13th, 2015 is not supported.&lt;br /&gt;
| smea&lt;br /&gt;
| [http://smealum.github.io/3ds/ Install]&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: lightgreen&amp;quot; | Yes&lt;br /&gt;
| [http://vegaroxas.github.io/ steelhax]&lt;br /&gt;
| From &#039;&#039;&#039;9.0.0-X&#039;&#039;&#039; up to and including &#039;&#039;&#039;11.9.0-X&#039;&#039;&#039;&lt;br /&gt;
| A copy of Steel Diver: Sub Wars&lt;br /&gt;
| Vegaroxas&lt;br /&gt;
| [https://github.com/VegaRoXas/vegaroxas.github.io/raw/master/files/steelhax-installer.zip Install]&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: lightgreen&amp;quot; | Yes&lt;br /&gt;
| [https://github.com/yellows8/oot3dhax oot3dhax]&lt;br /&gt;
| From &#039;&#039;&#039;9.0.0-X&#039;&#039;&#039; up to and including &#039;&#039;&#039;11.9.0-X&#039;&#039;&#039;, for &#039;&#039;&#039;X&#039;&#039;&#039; up to and including 39.&lt;br /&gt;
| A gamecard or eShop-install of Legend of Zelda: Ocarina of Time 3D. Besides using the installer app, writing raw saveimages with a save dongle for example is another option. Before compression was introduced in the 2016-7-18 release, the size of the *hax payload meant the exploit can&#039;t co-exist with regular saves on a physical version of the game.&lt;br /&gt;
| Yellows8 / smea et al.&lt;br /&gt;
| See [https://smealum.github.io/3ds/ here].&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: salmon&amp;quot; | No&lt;br /&gt;
| [[menuhax]]&lt;br /&gt;
| JPN/USA/EUR: From &#039;&#039;&#039;9.0.0-X&#039;&#039;&#039; up to and including &#039;&#039;&#039;11.2.0-X&#039;&#039;&#039;.&lt;br /&gt;
KOR: From &#039;&#039;&#039;9.6.0-X&#039;&#039;&#039; up to and including &#039;&#039;&#039;11.2.0-X&#039;&#039;&#039;.&lt;br /&gt;
| JPN/USA/EUR: Having created [[Home_Menu#Home_Menu_Theme_SD_ExtData|theme extdata]] through opening the official theme selector at least once.&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
| [https://github.com/yellows8/3ds_homemenuhax/releases Download]&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: lightgreen&amp;quot; | Yes&lt;br /&gt;
| [https://github.com/shinyquagsire23/supermysterychunkhax supermysterychunkhax]&lt;br /&gt;
| From &#039;&#039;&#039;9.9.0-X&#039;&#039;&#039; (USA/JPN) / &#039;&#039;&#039;10.2.0-X&#039;&#039;&#039; (EUR) up to &#039;&#039;&#039;11.9.0-X&#039;&#039;&#039;.&lt;br /&gt;
| A gamecard or eShop-install of Pokémon Super Mystery Dungeon.&lt;br /&gt;
| Shiny Quagsire / SALT team&lt;br /&gt;
| [https://smd.salthax.org/ Install].&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: salmon&amp;quot; | No&lt;br /&gt;
| [https://github.com/shinyquagsire23/v_hax (v*)hax]&lt;br /&gt;
| From &#039;&#039;&#039;9.0.0-X&#039;&#039;&#039; up to and including &#039;&#039;&#039;11.0.0-X&#039;&#039;&#039;, for &#039;&#039;&#039;X&#039;&#039;&#039; up to and including 33.&lt;br /&gt;
Note that &#039;&#039;&#039;9.0.0-X&#039;&#039;&#039; is only required for the Homebrew Launcher - the game itself only requires &#039;&#039;&#039;2.1.0-X&#039;&#039;&#039; for primitive userland code execution.&lt;br /&gt;
| A copy of VVVVVV downloaded after March 2012 (v1). v1.1 patches out the overflow vulnerability used by (v*)hax.&lt;br /&gt;
| Shiny Quagsire / SALT team&lt;br /&gt;
| [https://vvvvvv.salthax.org/ Install].&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: lightgreen&amp;quot; | Yes&lt;br /&gt;
| [https://github.com/Dazzozo/humblehax humblehax]&lt;br /&gt;
| From &#039;&#039;&#039;9.0.0-X&#039;&#039;&#039; (USA/EUR) up to and including &#039;&#039;&#039;11.9.0-X&#039;&#039;&#039;.&lt;br /&gt;
| An eShop-install of Citizens of Earth (either v1 or v2), featured in the Humble &amp;quot;Friends of Nintendo&amp;quot; Bundle.&lt;br /&gt;
| Dazzozo / SALT team&lt;br /&gt;
| [https://citizens.salthax.org/ Install].&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: salmon&amp;quot; | No&lt;br /&gt;
| [http://mrnbayoh.github.io/basehaxx/ basehaxx]&lt;br /&gt;
| From &#039;&#039;&#039;9.0.0-X&#039;&#039;&#039; up to and including &#039;&#039;&#039;11.9.0-X&#039;&#039;&#039;.&lt;br /&gt;
| A gamecard or eShop-install of Pokémon Omega Ruby / Alpha Sapphire.&lt;br /&gt;
| MrNbaYoh&lt;br /&gt;
| [http://mrnbayoh.github.io/basehaxx/ install]&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: lightgreen&amp;quot; | Yes&lt;br /&gt;
| [https://github.com/yellows8/stickerhax stickerhax]&lt;br /&gt;
| From &#039;&#039;&#039;9.0.0-X&#039;&#039;&#039; up to and including &#039;&#039;&#039;11.6.0-X&#039;&#039;&#039;.&lt;br /&gt;
| A gamecard or eShop-install of Paper Mario: Sticker Star.&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
| [https://github.com/yellows8/stickerhax Here]&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: lightgreen&amp;quot; | Yes&lt;br /&gt;
| [https://github.com/svanheulen/genhax genhax]&lt;br /&gt;
| (New 3DS only) From &#039;&#039;&#039;9.9.0-X&#039;&#039;&#039;(JPN) or &#039;&#039;&#039;10.3.0-X&#039;&#039;&#039;(EUR/USA) up to and including &#039;&#039;&#039;11.3.0-X&#039;&#039;&#039;.&lt;br /&gt;
| A gamecard or eShop-install of Monster Hunter Generations or Monster Hunter X (without the game updates installed), and an internet connection during installation.&lt;br /&gt;
| svanheulen&lt;br /&gt;
| [https://github.com/svanheulen/genhax_installer Install]&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: lightgreen&amp;quot; | Yes&lt;br /&gt;
| [https://github.com/MrNbaYoh/painthax painthax]&lt;br /&gt;
| From &#039;&#039;&#039;9.0.0-X&#039;&#039;&#039; up to and including &#039;&#039;&#039;11.6.0-X&#039;&#039;&#039;.&lt;br /&gt;
| An eShop-install of Pixel Paint.&lt;br /&gt;
| MrNbaYoh&lt;br /&gt;
| [https://github.com/MrNbaYoh/painthax/releases/latest install]&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: salmon&amp;quot; | No&lt;br /&gt;
| [https://github.com/yellows8/ctpkpwn ctpkpwn_tfh]&lt;br /&gt;
| From &#039;&#039;&#039;9.9.0-X&#039;&#039;&#039; up to and including &#039;&#039;&#039;11.3.0-X&#039;&#039;&#039;.&lt;br /&gt;
| A gamecard or eShop-install of &amp;quot;The Legend of Zelda: Tri Force Heroes&amp;quot;, and an Internet connection during installation. Unless you have &amp;quot;CFW&amp;quot;, ctr-httpwn &amp;gt;=v1.2 with the included bosshaxx on a compatible system-version is also required. If installing via ctr-httpwn, you can&#039;t do so on &amp;gt;=v11.4. Note that the exploit itself was not fixed.&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
| [https://github.com/yellows8/ctpkpwn/releases Install]&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: salmon&amp;quot; | No&lt;br /&gt;
| [https://github.com/MrNbaYoh/doodlebomb doodlebomb]&lt;br /&gt;
| From &#039;&#039;&#039;9.0.0-X&#039;&#039;&#039;(?) up to and including &#039;&#039;&#039;11.4.0-X&#039;&#039;&#039;.&lt;br /&gt;
| An eShop-install of Swapdoodle.&lt;br /&gt;
| MrNbaYoh&lt;br /&gt;
| [https://mrnbayoh.github.io/doodlebomb/ Install]&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: darkorange&amp;quot; | Only if installed before August 28, 2017&lt;br /&gt;
| [https://github.com/ChampionLeake/RPwnG3 RPwnG3]&lt;br /&gt;
| From &#039;&#039;&#039;9.0.0-X&#039;&#039;&#039;(?) up to and including &#039;&#039;&#039;11.12.0-X&#039;&#039;&#039;.&lt;br /&gt;
| A Digital/Physical copy of &amp;quot;RPGMaker Fes Player/RPGMaker Fes&amp;quot; (USA/JPN 1.1.2 or lower ; EUR 1.1.4 or lower).&lt;br /&gt;
| [[User:ChampionLeake|ChampionLeake]]&lt;br /&gt;
| [https://github.com/ChampionLeake/RPwnG3/releases Install]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Exploits without Homebrew Launcher==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;&#039;&#039;&#039;Warning:&#039;&#039;&#039;&amp;lt;/u&amp;gt; The following exploits can run code, but are missing a 3DSX launcher. They cannot launch any homebrew in the 3DSX format, but could still prove useful by chaining to exploits with higher privileges.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Works on latest fw&lt;br /&gt;
!  Name&lt;br /&gt;
!  Supported firmwares&lt;br /&gt;
!  Requirements&lt;br /&gt;
!  Author&lt;br /&gt;
!  Install&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: lime&amp;quot; | Yes&lt;br /&gt;
| [[bannerbomb3]] (System Settings)&lt;br /&gt;
| (Old3DS (2DS) (XL) / New3DS (XL)) &#039;&#039;&#039;11.5.0&#039;&#039;&#039; to &#039;&#039;&#039;11.13.0&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
(New2DS XL) &#039;&#039;&#039;(11.4.0)&#039;&#039;&#039; &#039;&#039;&#039;11.5.0&#039;&#039;&#039; to &#039;&#039;&#039;11.13.0&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
An exploit that uses a buffer overflow in a TWL export banner&#039;s title strings to gain rop execution.&lt;br /&gt;
|A USA, EUR, KOR, or JPN system with its movable.sed keyY extracted.&lt;br /&gt;
|[[User:zoogie|zoogie]]&lt;br /&gt;
|[[bannerbomb3|Install]]&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: salmon&amp;quot; | No&lt;br /&gt;
| [[browserhax]] (Without the loader in the 3ds_browserhax_common repo)&lt;br /&gt;
| (Old3DS) From &#039;&#039;&#039;5.0.0-2&#039;&#039;&#039; to &#039;&#039;&#039;11.0.0-33&#039;&#039;&#039; (Pre-v5.0 is supported for some versions if you manually modify the source)&lt;br /&gt;
&lt;br /&gt;
(New3DS) From &#039;&#039;&#039;9.0.0-20&#039;&#039;&#039; to &#039;&#039;&#039;11.0.0-33&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Note that the browser-version-check bypass is only usable prior to [[10.7.0-32]].&lt;br /&gt;
| An USA, EUR, or JPN system.&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
| [[browserhax|Install]]&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: salmon&amp;quot; | No&lt;br /&gt;
| Ninjhax (with specialized payloads)&lt;br /&gt;
| Up to &#039;&#039;&#039;9.2.0-20&#039;&#039;&#039;?&lt;br /&gt;
| &lt;br /&gt;
| smea + independent developers&lt;br /&gt;
| N/A&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Previous Exploits==&lt;br /&gt;
&amp;lt;u&amp;gt;&#039;&#039;&#039;Warning:&#039;&#039;&#039;&amp;lt;/u&amp;gt; These exploits &#039;&#039;&#039;do not work&#039;&#039;&#039;. They are exploits which no longer function at all, regardless of software or firmware revision.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Works on latest fw&lt;br /&gt;
! Name&lt;br /&gt;
! Supported firmwares&lt;br /&gt;
! Requirements&lt;br /&gt;
! Author&lt;br /&gt;
! Install&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: salmon&amp;quot; | No&lt;br /&gt;
| [[tubehax|Tubehax]]&lt;br /&gt;
| None. &#039;&#039;&#039;Was&#039;&#039;&#039;: From &#039;&#039;&#039;9.0.0-X&#039;&#039;&#039; up to and including &#039;&#039;&#039;10.1.0-X&#039;&#039;&#039;, for &#039;&#039;&#039;X&#039;&#039;&#039; up to and including 27.&lt;br /&gt;
| The YouTube application and an Internet connection. As of October 15, 2015, this is no longer usable due to an update being released which fixes the vuln used by tubehax + app update being forced (see [[YouTube|here]]).&lt;br /&gt;
| smea&lt;br /&gt;
| [http://smealum.github.io/3ds/ Install]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Other Homebrew Loaders==&lt;br /&gt;
The [https://github.com/yellows8/hblauncher_loader hblauncher_loader] title can be used when running under modded-FIRM which allows running unsigned titles, to boot the *hax payloads.&lt;br /&gt;
&lt;br /&gt;
[https://github.com/AuroraWright/Luma3DS Luma3DS], apart from providing signature patches for the installation and use of custom titles, includes the &amp;quot;Rosalina&amp;quot; system module, which among its features allows cleanly loading 3dsx applications as a native process with full ARM11 system permissions, by replacing an installed title&#039;s ExeFS and ExHeader during load time. It is currently the only option for running 3dsx applications on 11.4+ O3DSes; additionally, the *hax 2.x payload is incompatible with Rosalina and therefore so are homebrew applications requiring its target title system.&lt;br /&gt;
&lt;br /&gt;
==Sysmodule Exploits==&lt;br /&gt;
This section is for system-module exploits, which can be run from the *hax payloads.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Works on latest fw&lt;br /&gt;
! Name&lt;br /&gt;
! Supported firmwares&lt;br /&gt;
! Requirements&lt;br /&gt;
! Author&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: salmon&amp;quot; | No, still usable pre-v11.4.&lt;br /&gt;
| [https://github.com/yellows8/ctr-httpwn/releases ctr-httpwn]&lt;br /&gt;
| From &#039;&#039;&#039;9.6.0-X&#039;&#039;&#039; up to and including &#039;&#039;&#039;11.3.0-X&#039;&#039;&#039;. This includes bosshaxx.&lt;br /&gt;
| None&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==WebKit vuln testing==&lt;br /&gt;
See [https://github.com/yellows8/3ds_browserhax_common/issues/28 here].&lt;/div&gt;</summary>
		<author><name>EvilFlight</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=3DS_Userland_Flaws&amp;diff=21214</id>
		<title>3DS Userland Flaws</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=3DS_Userland_Flaws&amp;diff=21214"/>
		<updated>2020-05-01T10:05:36Z</updated>

		<summary type="html">&lt;p&gt;EvilFlight: /* Non-system applications */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page lists vulnerabilities / exploits for 3DS applications and applets. Exploiting these initially results in ROP, from that ROP one can then for example try exploiting [[3DS_System_Flaws|system]] flaw(s).&lt;br /&gt;
&lt;br /&gt;
=Non-system applications=&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Application name&lt;br /&gt;
!  Summary&lt;br /&gt;
!  Description&lt;br /&gt;
!  Fixed in app/system version&lt;br /&gt;
!  Last app/system version this flaw was checked for&lt;br /&gt;
!  Timeframe info related to this was added to wiki&lt;br /&gt;
!  Timeframe this vuln was discovered&lt;br /&gt;
!  Vuln discovered by&lt;br /&gt;
|-&lt;br /&gt;
| Cubic Ninja&lt;br /&gt;
| Map-data stack smash&lt;br /&gt;
| See [[Ninjhax|here]] regarding Ninjhax.&lt;br /&gt;
| None&lt;br /&gt;
| App: Initial version. System: [[10.4.0-29]].&lt;br /&gt;
| Ninjhax release&lt;br /&gt;
| July 2014&lt;br /&gt;
| [[User:smea|smea]]&lt;br /&gt;
|-&lt;br /&gt;
| The Legend of Zelda: Ocarina of Time 3D&lt;br /&gt;
| UTF-16 name string buffer overflow via unchecked u8 length field&lt;br /&gt;
| The u8 at offset 0x2C in the savefile is the character-length of the UTF-16 string at offset 0x1C. When copying this string, it&#039;s essentially a memory-copy with lenval*2, not a string-copy. This can be used to trigger buffer overflows at various locations depending on the string length.&lt;br /&gt;
* When value is &amp;gt;=0x6E it crashes when saving the saveslot, this causes a stack-smash however it normally crashes before it returns from the function which had the stack-frame overwritten.&lt;br /&gt;
* With value &amp;gt;=0x9A, it crashes via stack-smash in-game once any dialogs are opened(touching buttons on the touch-screen can trigger it too).&lt;br /&gt;
* Length value&amp;gt;=0xCD causes a crash while loading the saveslot, via a heap buffer overflow. This buf-overflow overwrites a heap memchunk following the allocated buffer. When the first 16-bits overwriting that heap memchunk is not the memchunk magic-number(0x7373), the mem-alloc code will just return a NULL ptr which later results in a crash. When the magic-number is valid, the mem-alloc code will continue to attempt to parse the memchunk, which may crash depending on the data which overwrote the memchunk. This heap code is separate from the CTRSDK heap code. Exploiting this doesn&#039;t seem to be possible: since the heap code actually verifies that the magic-number for the next/prev memchunk ptrs are correct(unlike CTRSDK), it&#039;s not possible to change those ptrs to useful arbitrary addresses outside of savedata(like with triggering a write to a c++ object ptr which later is used with a vtable func-call, this is what one would do with CTRSDK heap here).&lt;br /&gt;
&lt;br /&gt;
On March 11, 2015, an exploit using this vuln was released, that one was intended for warez/etc. The following exploit wasn&#039;t released before then mainly because doing so would (presumably) result in the vuln being fixed. The following old exploit was released on March 14, 2015: [https://github.com/yellows8/oot3dhax].&lt;br /&gt;
| None&lt;br /&gt;
| App: Initial version. System: [[10.6.0-31]].&lt;br /&gt;
| March 11, 2015&lt;br /&gt;
| Around October 22, 2012&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| Super Smash Bros 3DS&lt;br /&gt;
| Buffer overflow in local-multiplayer beacon handling.&lt;br /&gt;
| See [[smashbroshax|here]].&lt;br /&gt;
| App: v1.1.3&lt;br /&gt;
| See [[smashbroshax|here]]. System: [[10.3.0-28]].&lt;br /&gt;
| Time of exploit release.&lt;br /&gt;
| See [[smashbroshax|here]].&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| Pokemon Super Mystery Dungeon&lt;br /&gt;
| Heap overflow within linear memory via unchecked save file length&lt;br /&gt;
| Pokemon Super Mystery Dungeon uses zlib compression for most of its save files, possibly due to the save files being larger than its predecessor, Gates to Infinity. When a save file is being prepared to be loaded and read from, only a 0x32000 large buffer is allocated for file reading, and a 0x3e800-large buffer for decompression is also allocated before the file is read. However, the game does not limit the size of the file read to this allocation bound, allowing for the file to overflow into the linear memory heap and into the next allocation. Since Pokemon Super Mystery Dungeon stores allocation memchunks directly before the allocation, overwriting the next memchunk with a corrupted one allows for arbitrary writes of linear heap pointers when the next buffer is allocated or arbitrary writes of any pointer within writable memory when the corrupted buffer is freed.&lt;br /&gt;
| None&lt;br /&gt;
| O3DS: [[11.3.0-36]]. N3DS: [[11.4.0-37]].&lt;br /&gt;
| Time of exploit release.&lt;br /&gt;
| April 14, 2016&lt;br /&gt;
| [[User:Shinyquagsire23|Shiny Quagsire]]&lt;br /&gt;
|-&lt;br /&gt;
| VVVVVV&lt;br /&gt;
| Buffer overflow in XML save file array parsing&lt;br /&gt;
| VVVVVV utilizes several XML files (renamed with a .vvv extension) to store level save data, stats and settings. Within these XML files are several tags containing an array of data which, when parsed, is not properly checked to be of proper length for the tag being parsed from. This allows for an overflow of 16-bit array values from the location where the array is parsed. With unlock.vvv, XML data is parsed to the stack, and with level saves the heap. This allows for the pointer where the level save worldmap tag array should be parsed into to be overwritten with a stack address, allowing for ROP from within the XML array parsing function on the next level load.&lt;br /&gt;
| App: v1.1&lt;br /&gt;
| [[10.7.0-32]].&lt;br /&gt;
| Time of exploit release.&lt;br /&gt;
| April 25, 2016&lt;br /&gt;
| [[User:Shinyquagsire23|Shiny Quagsire]]&lt;br /&gt;
|-&lt;br /&gt;
| Citizens of Earth&lt;br /&gt;
| Save file read stack smash&lt;br /&gt;
| Citizens of Earth also uses &amp;quot;XML&amp;quot; files for saves, which are actually entirely binary data (not XML at all) with no checksums. These files are read from the filesystem on to a fixed size stack buffer which leads to an incredibly trivial stack smash. When using the autosave slot for this, the save is parsed when the user selects &amp;quot;continue&amp;quot;. When using one of the dedicated save slots (1-3), the save is parsed shortly after the company splash screens fade. Note that the save is read quite high (descending) on the stack - when exploiting this, one would likely need to move SP due to almost instantly overflowing the physical stack.&lt;br /&gt;
| None&lt;br /&gt;
| [[10.7.0-32]].&lt;br /&gt;
| Time of exploit release.&lt;br /&gt;
| May 5, 2016&lt;br /&gt;
| [[User:Dazzozo|Dazzozo]]&lt;br /&gt;
|-&lt;br /&gt;
| SmileBASIC 3.x&lt;br /&gt;
| Poor parameter validation on &amp;quot;BGSCREEN&amp;quot; command&lt;br /&gt;
| The SmileBASIC &amp;quot;BGSCREEN&amp;quot; command&#039;s second parameter is not properly validated as being within range.  As a result, one can set the screen size to an absurdly large value.  This means that the &amp;quot;BGGET&amp;quot; and &amp;quot;BGPUT&amp;quot; commands can then be used on out-of-range values to read and write a significant chunk of the interpreter&#039;s address space.&lt;br /&gt;
With a series of carefully-designed BGPUT commands, one can build a ROP chain and cause it to be executed.&lt;br /&gt;
| App: 3.3.2.&lt;br /&gt;
| System: [[11.0.0-33]].&lt;br /&gt;
| July 20, 2016&lt;br /&gt;
| Around June 26, 2016&lt;br /&gt;
| slackerSnail, 12Me12, incvoid&lt;br /&gt;
Exploited by MrNbaYoh and [[User:Plutooo|plutoo]].&lt;br /&gt;
|-&lt;br /&gt;
| SmileBASIC 3.x&lt;br /&gt;
| Subscripted TIME$/DATE$ allow write access to DATA/BSS&lt;br /&gt;
| Utf-16 characters can be assigned to subscripted TIME$/DATE$ interpreter sysvars which results in write-only access to all of DATA and some BSS in userland.&lt;br /&gt;
TIME$[0]/DATE$[0] actually point to somewhere in rodata, and an overly large subscript can be used to write well past it and into the aforementioned areas. Demo [https://github.com/zoogie/smilehax-IIe here.]&lt;br /&gt;
| App: 3.6.2 (3.6.0 latest for US/EU, JP appvers. can be downgraded)&lt;br /&gt;
| System: [[11.13.0-45]].&lt;br /&gt;
| April 2020&lt;br /&gt;
| February 2020&lt;br /&gt;
| bug publicly documented [https://translate.google.com/translate?sl=auto&amp;amp;tl=en&amp;amp;u=http%3A%2F%2Fsmilebasic.com%2Fdebug%2Farchive%2F here.]&lt;br /&gt;
Exploited by Zoogie&lt;br /&gt;
|-&lt;br /&gt;
| The Legend of Zelda: Tri Force Heroes&lt;br /&gt;
| [[3DS_System_Flaws#General.2FCTRSDK|CTRSDK]] CTPK buffer overflow combined with game&#039;s usage of SpotPass&lt;br /&gt;
| During the very first screen displayed by the game during boot(&amp;quot;Loading...&amp;quot;), just seconds after title launch, the game loads CTPK from the [[BOSS_Services|stored]] SpotPass content. Hence, this game could be exploited via the vulnerable CTRSDK CTPK code &#039;&#039;if&#039;&#039; one could get custom SpotPass data into extdata somehow(ctr-httpwn &amp;gt;=v1.2 with bosshaxx allows this).&lt;br /&gt;
&lt;br /&gt;
The code for this runs from a thread separate from the main-thread, with the stack in linearmem heap. This SpotPass handling triggers before the game ever opens the regular savedata archive. The extdata is opened at some point before this: it opens a file for checking if it exists, then immediately closes it.&lt;br /&gt;
&lt;br /&gt;
The two SpotPass URLs for this have always(?) returned HTTP 404 as of November 2016. It appears these were intended for use as textures for additional costumes(and never got used publicly), but this wasn&#039;t tested.&lt;br /&gt;
&lt;br /&gt;
This is used by [https://github.com/yellows8/ctpkpwn ctpkpwn_tfh].&lt;br /&gt;
| None&lt;br /&gt;
| App: v2.1.0&lt;br /&gt;
| November 18, 2016&lt;br /&gt;
| November 14, 2016&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| Pixel Paint&lt;br /&gt;
| Buffer overflow via unchecked extdata file length&lt;br /&gt;
| Pixel Paint loads pictures saved by the user from extdatas. The file is read to a fixed size buffer but the file length remains unchecked, so with a large enough file, one can overwrite pointers in memory and gain control of the execution flow.&lt;br /&gt;
| None&lt;br /&gt;
| App: Initial version. System: [[11.2.0-35]].&lt;br /&gt;
| December 27, 2016&lt;br /&gt;
| November 5, 2016&lt;br /&gt;
| [[User:Nba_Yoh|MrNbaYoh]]&lt;br /&gt;
|-&lt;br /&gt;
| Steel Diver : Sub Wars&lt;br /&gt;
| Heap overflow / arbitrary memcpy&lt;br /&gt;
| Savefile datas are stored as key/value pairs, a large enough string key makes the game overwrite a memcpy source/destination addresses and size arguments. So one can actually memcpy a rop on the stack and gain control of the execution flow.&lt;br /&gt;
| None&lt;br /&gt;
| System: [[11.2.0-35]].&lt;br /&gt;
| December 27, 2016&lt;br /&gt;
| Around July 15, 2016&lt;br /&gt;
| [[User:Nba_Yoh|MrNbaYoh]], Vegaroxas&lt;br /&gt;
|-&lt;br /&gt;
| 1001 Spikes&lt;br /&gt;
| Buffer overflow via unchecked array-indexes in XML savefile parsing&lt;br /&gt;
| The savefiles are stored as renamed .xml files, which contain several tags with attributes like &#039;array-index=&amp;quot;array-value&amp;quot;&#039;, where both of these are converted from ASCII strings to integers as signed-int32, and the array-value given blindly written to an array inside a structure using the (unchecked) index given. With several of these attributes, one can overwrite the stack starting from the stored lr of the function that does this parsing, and write a ROP chain there. Testing used the &amp;quot;LevelAttempts&amp;quot; tag which is the last such tag parsed in that function.&lt;br /&gt;
| None&lt;br /&gt;
| App: v1.2.0 (TMD v2096)&lt;br /&gt;
| December 27, 2016&lt;br /&gt;
| Around November 2, 2016&lt;br /&gt;
| [[User:Riley|Riley]]&lt;br /&gt;
|-&lt;br /&gt;
| Pokemon Omega Ruby/Alpha Sapphire&lt;br /&gt;
| Secret base team name heap overflow&lt;br /&gt;
| When the player wants to edit the team name, it is copied over the heap, however its length is not verified. So with a large enough team name one can overwrite some pointers and get two arbitrary jumps and then get control of the execution flow.&lt;br /&gt;
| None&lt;br /&gt;
| App: 1.4. System: [[11.2.0-35]].&lt;br /&gt;
| December 30, 2016&lt;br /&gt;
| June, 2016&lt;br /&gt;
| [[User:Nba_Yoh|MrNbaYoh]]&lt;br /&gt;
|-&lt;br /&gt;
| Swapdoodle&lt;br /&gt;
| Heap buffer overflow via unchecked size&lt;br /&gt;
| The letter file format used by doodlebomb is composed of multiple chunks. Each chunks is described in the header of the file where the name, size and CRC of each chunk are stored. Some chunks are meant to be headers, every header&#039;s size should be 0x80, however the length of the STAHED1 chunk remains unchecked and the game memcpy the chunk to a 0x80 byte buffer with the length provided in the file. This way one is able to overwrite some pointers and get control of the execution flow.&lt;br /&gt;
| App: &amp;gt; v1.1.1&lt;br /&gt;
| App: v1.1.1&lt;br /&gt;
| April 24, 2017&lt;br /&gt;
| February, 2017&lt;br /&gt;
| [[User:Nba_Yoh|MrNbaYoh]]&lt;br /&gt;
|-&lt;br /&gt;
| Pokemon Picross&lt;br /&gt;
| Arbitrary memcpy via unchecked size&lt;br /&gt;
| When reading the savefile, the game handles some lists of buffers that are copied to memory. These buffers should always be 0x14-bytes long but the game uses the size provided in the savefile to copy them. These buffers are copied in some structs and thus with a big enough length value, one can overwrite the next struct which contains a size and a destination address for a memcpy.&lt;br /&gt;
| None?&lt;br /&gt;
| App: ?&lt;br /&gt;
| May 29, 2017&lt;br /&gt;
| June, 2016&lt;br /&gt;
| [[User:Nba_Yoh|MrNbaYoh]]&lt;br /&gt;
|-&lt;br /&gt;
| RPG Maker Fes/Player&lt;br /&gt;
| Buffer overflow on .bss section&lt;br /&gt;
| When loading a project, the game copies multiple chunks over the BSS section. However the number of chunks to copy is not checked, thus a large amount of chunk result in a buffer overflow. There&#039;s multiple way to exploit this flaw to gain an arbitrary memcpy or an arbitrary jump.&lt;br /&gt;
| None?&lt;br /&gt;
| App: ?&lt;br /&gt;
| August 28, 2017&lt;br /&gt;
| August, 2017&lt;br /&gt;
| [[User:Nba_Yoh|MrNbaYoh]]&lt;br /&gt;
|-&lt;br /&gt;
| RPG Maker Fes/Player&lt;br /&gt;
| Buffer overflow via unchecked file size&lt;br /&gt;
| When loading a project, the game loads the file to a 0x200000 bytes long buffer. However the size remains unchecked, so with a big enough file one can overflow the buffer and overwrite a thread stack and then achieve ROP.&lt;br /&gt;
| None?&lt;br /&gt;
| App: ?&lt;br /&gt;
| August 29, 2017&lt;br /&gt;
| August, 2017&lt;br /&gt;
| [[User:Nba_Yoh|MrNbaYoh]], [[User: ChampionLeake|ChampionLeake]]&lt;br /&gt;
|-&lt;br /&gt;
| Pokemon Omega Ruby/Alpha Sapphire&lt;br /&gt;
| PSS data heap/stack overflow&lt;br /&gt;
| When launching the game, multiple chunks from the save file are parsed and copied to a large heap buffer. When parsing PSS data (acquaintances, passerby) the game copies each entry to the heap buffer, the number of entries to copy is read from the end of the multiple pss data chunks and is not checked, leading to an overflow. The &amp;quot;PSS data - friends&amp;quot; chunk is vulnerable too, but the overflow occurs on the stack and unfortunately this isn&#039;t exploitable because of a 4 bytes uncontrolled value (in each entry) that gets written on sensitive data.&lt;br /&gt;
| None&lt;br /&gt;
| App: 1.4. System: [[11.6.0]].&lt;br /&gt;
| October 1, 2017&lt;br /&gt;
| June, 2016&lt;br /&gt;
| [[User:Nba_Yoh|MrNbaYoh]]&lt;br /&gt;
|-&lt;br /&gt;
| RPG Maker Fes/Player&lt;br /&gt;
| OOB write&lt;br /&gt;
| When handling events in a map, the indices of &amp;quot;buttons&amp;quot; are not checked. This results in an out of bound bit write, one can thus write a rop directly on the stack (bit by bit).&lt;br /&gt;
| None?&lt;br /&gt;
| App: ?&lt;br /&gt;
| August 5, 2018&lt;br /&gt;
| &lt;br /&gt;
| [[User:Nba_Yoh|MrNbaYoh]]&lt;br /&gt;
|-&lt;br /&gt;
| Unholy Heights&lt;br /&gt;
| Buffer overflow via unchecked string size&lt;br /&gt;
| The game stores some utf-16 messages in the savefile. Right before the message is the length(u32) for the string, the game uses this size to memcpy the message from the savefile to the stack without checking the length. This allows one to overwrite some function addresses on the stack and form a rop chain.&lt;br /&gt;
| None&lt;br /&gt;
| App: Initial Version&lt;br /&gt;
| September 13, 2018&lt;br /&gt;
| August, 2018&lt;br /&gt;
| Kartik&lt;br /&gt;
|-&lt;br /&gt;
| Mononoke Forest&lt;br /&gt;
| String Buffer Overflow via unchecked string length&lt;br /&gt;
| The game stores plaintext profile names in the savefile. The profile names are strcpy/memcpy to different areas of the game&#039;s functions in the stack. Using a large extensive profile name, a user can overwrite some stack-registers and point to stack buffer addresses to eventually gain control of the stack to lead and form a rop-chain. &lt;br /&gt;
| None&lt;br /&gt;
| App: v1.0.0&lt;br /&gt;
| August 14, 2019&lt;br /&gt;
| February 8, 2019&lt;br /&gt;
| [[User: ChampionLeake|ChampionLeake]] and [[User: Kartik|Kartik]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Flipnote Studio 3D==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Summary&lt;br /&gt;
!  Description&lt;br /&gt;
!  Fixed in app/system version&lt;br /&gt;
!  Timeframe info related to this was added to wiki&lt;br /&gt;
!  Flaw discovered by&lt;br /&gt;
|-&lt;br /&gt;
| KFH frame count overflow&lt;br /&gt;
| The KFH frame count field should not be &amp;gt;= 0x3E8, but it wasn&#039;t checked and so uncontrolled data were written over pointers, causing an unexploitable crash.&lt;br /&gt;
| System: 11.6&lt;br /&gt;
| September 20, 2017&lt;br /&gt;
| [[User:Nba_Yoh|MrNbaYoh]]&lt;br /&gt;
|-&lt;br /&gt;
| KMI paper color overflow&lt;br /&gt;
| Paper color field (and similar color fields) in KMI chunks was not checked, a too high value caused a jump to an uncontrolled location.&lt;br /&gt;
| System: 11.6&lt;br /&gt;
| September 20, 2017&lt;br /&gt;
| [[User:Nba_Yoh|MrNbaYoh]]&lt;br /&gt;
|-&lt;br /&gt;
| KSN BGM data size overflow&lt;br /&gt;
| The size of the BGM data in the KSN chunk was not checked, it was used in a memcpy so with a big enough size one could overwrite a thread stack on linear mem and achieve ROP (notehax v1).&lt;br /&gt;
| System: 11.6&lt;br /&gt;
| September 20, 2017&lt;br /&gt;
| [[User:Nba_Yoh|MrNbaYoh]]&lt;br /&gt;
|-&lt;br /&gt;
| KMC chunk unchecked&lt;br /&gt;
| The KMC chunk was not verified at all, the CRC32 and the size were not checked. A big enough size caused an integer overflow and made the game read the file backward.&lt;br /&gt;
| System: 11.6&lt;br /&gt;
| September 20, 2017&lt;br /&gt;
| [[User:Nba_Yoh|MrNbaYoh]]&lt;br /&gt;
|-&lt;br /&gt;
| KMI layer size unchecked&lt;br /&gt;
| The 3 layer size fields in KMI chunks were not checked, leading to some crashes in the editor.&lt;br /&gt;
| System: 11.6&lt;br /&gt;
| September 20, 2017&lt;br /&gt;
| [[User:Nba_Yoh|MrNbaYoh]]&lt;br /&gt;
|-&lt;br /&gt;
| Bad &amp;quot;queue&amp;quot; implementation&lt;br /&gt;
| When a KWZ was parsed, frames were copied in a kind of queue, bounds were not checked obviously, so with the KMI layer size flaw one was able to fill completely the queue, then write past the buffer and overwrite a heap chunk header (notehax v2). This is not possible anymore, the queue cannot be filled because layer sizes are checked. Moreover each time an element is removed from the queue, the whole content is memmoved *facepalm*.&lt;br /&gt;
| System: 11.6&lt;br /&gt;
| September 20, 2017&lt;br /&gt;
| [[User:Nba_Yoh|MrNbaYoh]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Useless crashes / applications which were fuzzed==&lt;br /&gt;
* Pushmo (3DSWare), QR codes: level name is properly limited to 16 characters, game doesn&#039;t crash with a longer name. The only possible crashes are triggered by out-of-bounds array index values, these crashes are not exploitable due to the index value being 8bit.&lt;br /&gt;
&lt;br /&gt;
* [[Pyramids (3DSWare)]], QR codes: no strings. Only crashes are from out-of-bounds values (like background ID) and are not exploitable.&lt;br /&gt;
&lt;br /&gt;
* [[Pyramids 2 (3DSWare)]], QR codes: no strings. Only crashes are from out-of-bounds values (like background ID) and are not exploitable.&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/yellows8/mm3d_re The Legend of Zelda: Majora&#039;s Mask 3D]&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;The Legend of Zelda: A Link Between Worlds&amp;quot; and &amp;quot;The Legend of Zelda: Tri Force Heroes&amp;quot;: these games don&#039;t crash at all when the entire save-file(minus constant header data) is overwritten with /dev/random output / 0xFF-bytes. All of the CRC32s were updated for this of course.  Note that this refers to the regular save file: Tri Force Heroes can be exploited via BOSS extdata - see above.&lt;br /&gt;
&lt;br /&gt;
* Pokemon Mystery Dungeon: Gates to Infinity has the same unchecked file bounds as Pokemon Super Mystery Dungeon, however since save compression was introduced in Pokemon Super Mystery Dungeon, it only allocates one buffer within the application heap instead of several within the linear heap, resulting in nothing to corrupt or overwrite even if the file&#039;s length is extended past its allocation.&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;Kid Icarus: Uprising&amp;quot;: Overwriting the entire savedata results in various crashes, nothing useful.&lt;br /&gt;
&lt;br /&gt;
* Savedata/extdata for &amp;quot;Super Smash Bros 3DS&amp;quot;: Overwriting the various files stored under savedata/extdata results in useless crashes.&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;StarFox 64 3D&amp;quot;: Doesn&#039;t crash at all with the entire savedata overwritten.&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;Frogger 3D&amp;quot;: Overwriting a savefile with random-data results in *nothing* crashing.&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;Mutant Mudds&amp;quot;: Overwriting the savefile with random data results in a crash&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;Worcle Worlds&amp;quot;: Overwriting the savefile with 0xFF results in a crash due to an out of bound read&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;Animal Crossing: New Leaf&amp;quot;: Creating a QR code from random data results in a valid QR code and a random design. In some very rare cases(which aren&#039;t always reproducible?) a crash/etc may occur, but this isn&#039;t known to be useful.&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;Angry Birds Star Wars&amp;quot;: Strings in the savefile are preceded by their lengths. These strings are never stored on the stack and are memcpy&#039;d into heap memory. If the size is invalid the alloc will fail and thus the memcpy will operate on a nullptr resulting in a useless data abort.&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;Gem Smashers&amp;quot;: Overwriting the savefile with random bytes results in useless crashes.&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;Luxor:&amp;quot; Strings/plaintext in the savefile are present and these&#039;s no checks. Overwriting the whole save (excluding the header), with /dev/random cause a useless crash.&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;Luv Me Buddies Wonderland:&amp;quot; Doesn&#039;t crash at all with the entire savedata overwritten. Overwriting some areas, points to useless nulls&lt;br /&gt;
&lt;br /&gt;
==Crashes needing investigation==&lt;br /&gt;
* Disney Infinity crashes when all savedata overwritten with /dev/urandom. No checksums. 0xFF bytes don&#039;t cause a crash.&lt;br /&gt;
&lt;br /&gt;
* Football Up Online / Soccer Up Online and Football Up 3D / Soccer Up 3D crash when teamname(UTF-16) length = 0x48 AND 0x20 null bytes are removed after just the name or if teamname length is way longer than 0x48.&lt;br /&gt;
&lt;br /&gt;
=System applications=&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Summary&lt;br /&gt;
!  Description&lt;br /&gt;
!  Fixed in version&lt;br /&gt;
!  Last version this flaw was checked for&lt;br /&gt;
!  Timeframe this was discovered&lt;br /&gt;
!  Discovered by&lt;br /&gt;
|-&lt;br /&gt;
| 3DS [[System Settings]] DS profile string stack-smash&lt;br /&gt;
| Too long or corrupted strings (01Ah  2   Nickname length in characters     050h  2   Message length in characters) in the NVRAM DS user settings (System Settings-&amp;gt;Other Settings-&amp;gt;Profile-&amp;gt;Nintendo DS Profile) cause it to crash in 3DS-mode due to a stack-smash. The DSi is not vulnerable to this, DSi launcher(menu) and DSi System Settings will reset the NVRAM user-settings if the length field values are too long(same result as when the CRCs are invalid). TWL_FIRM also resets the NVRAM user-settings when the string-length(s) are too long.&lt;br /&gt;
| [[7.0.0-13]]&lt;br /&gt;
| [[7.0.0-13]]&lt;br /&gt;
| 2012&lt;br /&gt;
| [[User:Ichfly|Ichfly]]&lt;br /&gt;
|-&lt;br /&gt;
| 3DS [[System Settings]] stack smash via title strings in [[DSiWare_Exports]]&lt;br /&gt;
| DSiWare export banners contain 16 consecutive 0x100 byte, utf-16 game title strings for different languages. Nintendo correctly limits the string&#039;s max length by placing a NULL at str[127] before it&#039;s copied to the stack. However, they didn&#039;t allocate enough space for all 128 wchars (char/wchar type confusion?), so an attacker can craft a valid full-length string that will crash the stack at about str+0xEC. ROP execution can then be obtained from this crash in DSiWare Data Management as demonstrated [https://github.com/zoogie/Bannerbomb3 here].&lt;br /&gt;
&lt;br /&gt;
Interesting note: A line feed wchar (00 0A) at any point in the string before the crash offset will prevent the crash from occurring.&lt;br /&gt;
| None&lt;br /&gt;
| [[11.13.0-45]]&lt;br /&gt;
| Dec. 2018&lt;br /&gt;
| Zoogie&lt;br /&gt;
|-&lt;br /&gt;
| 3DS SAFE_MODE [https://www.3dbrew.org/wiki/System_Settings#System_Updater System Updater] stack smash from proxy-url string&lt;br /&gt;
| During [[Recovery Mode]] and after all 3 wifi slots fail to find an access point for sysupdate, a user is permitted to access the wifi settings mode to make changes. Here, if the proxy-url field string&#039;s NULL terminator had been altered beforehand, a stack smash can occur when the user selects Proxy Settings -&amp;gt; Detailed Setup and the corrupted url string is displayed.&lt;br /&gt;
&lt;br /&gt;
This is a difficult crash to control because the url string is converted from ascii to utf-16 between the slot and stack, effectively reducing the available gadgets to 0.4% of the normal amount. It&#039;s possible to improvise an &amp;quot;escape&amp;quot; using an eoreq pc w/shift gadget to combine registers and form a jump that can access 1/2 of all available gadgets.&lt;br /&gt;
&lt;br /&gt;
Because this exploit runs *under* SAFE_MODE, it&#039;s possible to run safehax with one&#039;s choice of k11 and arm9 hax. Prerequisite: a userland exploit with cfg:s/i access to modify the wifi slot. A demonstration can be viewed [https://github.com/zoogie/unSAFE_MODE here].&lt;br /&gt;
| None&lt;br /&gt;
| [[11.13.0-45]]&lt;br /&gt;
| Jan. 2020&lt;br /&gt;
| Zoogie&lt;br /&gt;
|-&lt;br /&gt;
| [[Nintendo 3DS Sound]]&lt;br /&gt;
| When a .m4a is loaded, the song name is copied to a 256 byte buffer. When the song name begins with a Unicode BOM marker, it memcpy&#039;s the tag using the user-provided length. This gives an arbitrary write which can be used to achieve ROP.&lt;br /&gt;
| [[11.4.0-37]]&lt;br /&gt;
| [[11.4.0-37]]&lt;br /&gt;
| June/July 2016&lt;br /&gt;
| [[User:nedwill|nedwill]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=System applets=&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Summary&lt;br /&gt;
!  Description&lt;br /&gt;
!  Fixed in version&lt;br /&gt;
!  Last version this flaw was checked for&lt;br /&gt;
!  Introduced with version&lt;br /&gt;
!  Timeframe info related to this was added to wiki&lt;br /&gt;
!  Timeframe this was discovered&lt;br /&gt;
!  Discovered by&lt;br /&gt;
|-&lt;br /&gt;
| Webkit/web-browser bugs&lt;br /&gt;
| spider has had at least three different code-execution exploits. Majority of them are use-after-free issues. See also [[browserhax|here]].&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| &lt;br /&gt;
| 2013?&lt;br /&gt;
|&lt;br /&gt;
| A lot of people.&lt;br /&gt;
|-&lt;br /&gt;
| Old3DS/New3DS [[Internet_Browser|Browser-version-check]] bypass&lt;br /&gt;
| When the browser-version-check code runs where the savedata for it was never initialized(such as when the user used the &amp;quot;Initialize savedata&amp;quot; option), it will use base_timestamp=0 instead of the timestamp loaded from savedata. This is then used with &amp;quot;if(cur_timestamp - base_timestamp &amp;gt;= &amp;lt;24h timestamp&amp;gt;){Run browser-version-check HTTPS request code}&amp;quot;.&lt;br /&gt;
Hence, if the savedata was just initialized, and if the system datetime is set to before January 2, 2000, the browser-version-check will be skipped. This includes January 1, 2000, 00:00, because that&#039;s the epoch(timestamp value 0x0) used with this timestamp.&lt;br /&gt;
&lt;br /&gt;
See [http://yls8.mtheall.com/3dsbrowserhax.php here] for bypass usage instructions.&lt;br /&gt;
&lt;br /&gt;
This was fixed with [[10.7.0-32|10.7.0-32]], see [[Internet_Browser|here]] for details.&lt;br /&gt;
| [[10.7.0-32|10.7.0-32]]&lt;br /&gt;
| &lt;br /&gt;
| [[9.9.0-26|9.9.0-26]]&lt;br /&gt;
| February 25, 2016&lt;br /&gt;
| November 2, 2015 (Exactly one week after the browser version pages were initially updated server-side)&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| Skater - Bookmark OOB write&lt;br /&gt;
| Each bookmark has an id that should not exceed 0x63 (99), however ids are not checked, this results in an OOB write on the stack, but only the value 0x01 can be written.&lt;br /&gt;
| &lt;br /&gt;
| [[11.6.0-39|11.6.0-39]]&lt;br /&gt;
| &lt;br /&gt;
| May 21, 2018&lt;br /&gt;
| May 20, 2018&lt;br /&gt;
| [[User:Nba_Yoh|MrNbaYoh]]&lt;br /&gt;
|-&lt;br /&gt;
| MicroSD Management - malformed security blob causes stack buffer overflow (mhax) &lt;br /&gt;
| The MicroSD Management application&#039;s parsing of Windows NTLM security blobs in the SMB/CIFS protocol doesn&#039;t verify that the client&#039;s specified NT domain name is less than 32 UTF-16 characters.  When it&#039;s longer, a stack buffer overrun occurs, leading to a ROP chain and complete control of the mcopy application.&lt;br /&gt;
&lt;br /&gt;
The malformed security blob can be sent by an attacker within the SMB_COM_SESSION_SETUP_ANDX (0x73) packet.&lt;br /&gt;
| [[11.8.0-41|11.8.0-41]]&lt;br /&gt;
| [[11.8.0-41|11.8.0-41]]&lt;br /&gt;
| [[9.0.0-20|9.0.0-20]]&lt;br /&gt;
| August 12, 2018&lt;br /&gt;
| 2018&lt;br /&gt;
| smea&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Home Menu==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Summary&lt;br /&gt;
!  Description&lt;br /&gt;
!  Fixed in version&lt;br /&gt;
!  Last version this flaw was checked for&lt;br /&gt;
!  Introduced with version&lt;br /&gt;
!  Timeframe info related to this was added to wiki&lt;br /&gt;
!  Timeframe this was discovered&lt;br /&gt;
!  Discovered by&lt;br /&gt;
|-&lt;br /&gt;
| bossbannerhax&lt;br /&gt;
| After successfully loading [[Extended_Banner|extended-banner]] data(done when selecting an icon), Home Menu attempts to load &amp;quot;[[CBMD]]&amp;quot; data into a 0x100000-byte heap buffer from the [[BOSS_Services|stored]] SpotPass content. When successful and the magic-number is CBMD, Home Menu then decompresses the exbanner sections into another fixed-size heap buffer, without checking the outsize at all. The main CBMD CGFX code with ExeFS checks the size, but this code doesn&#039;t(however this is exbanner &amp;quot;CBMD&amp;quot;, not a &amp;quot;normal&amp;quot; CBMD).&lt;br /&gt;
&lt;br /&gt;
Used with menuhax as of v3.2.&lt;br /&gt;
| [[11.3.0-36|11.3.0-X]]&lt;br /&gt;
| &lt;br /&gt;
| [[1.0.0-0|1.0.0-0]]&lt;br /&gt;
| November 18, 2016&lt;br /&gt;
| December 23, 2014&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| sdiconhax&lt;br /&gt;
| This is basically the same as nandiconhax, the vulnerable SD/NAND functions are &#039;&#039;identical&#039;&#039; minus the file-buffer offsets. Exploitation is different due to different heap-buffer location though. Unlike nandiconhax, the icon buffer for SD is located in linearmem(with recent Home Menu versions at least). This is used by [[menuhax]].&lt;br /&gt;
| [[11.1.0-34|11.1.0-X]]&lt;br /&gt;
| &lt;br /&gt;
| [[4.0.0-7|4.0.0-X]]&lt;br /&gt;
| July 27, 2016&lt;br /&gt;
| October 23, 2015&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| [[System_SaveData|NAND-savedata]] Launcher.dat icons (nandiconhax)&lt;br /&gt;
| The homemenu code processing the titleid list @ launcherdat+8 copies those titleIDs to another buffer, where the offset relative to that buffer is calculated using the corresponding s8/s16 entries. Those two values are not range checked at all. Hence, one can use this to write u64(s) with arbitrary values to before/after this allocated output buffer. See [[Home_Menu|here]] regarding Launcher.dat structure.&lt;br /&gt;
&lt;br /&gt;
This can be exploited(with Launcher.dat loading at startup at least) by using a s16 for the icon entry with value 0xFFEC(-20)(and perhaps more icons with similar s16 values to write multiple u64s). The result is that the u64 value is written to outbuf-0xA0, which overwrites object+0(vtable) and object+4(doesn&#039;t matter here) for an object that gets used a bit after the vulnerable function triggers. The low 32bits of the u64 can then be set to the address of controlled memory(either outbuf in regular heap or the entire launcherdat buffer in linearmem), for use as a fake vtable in order to get control of PC. From there one can begin ROP via vtable funcptrs to do a stack-pivot(r4=objectaddr at the time the above object gets used).&lt;br /&gt;
&lt;br /&gt;
Originally this vuln could only be triggered via Launcher.dat at Home Menu startup, right after Launcher.dat gets loaded + memory gets allocated, once the file-format version code is finished running. Starting with v9.6 this can be triggered when loading layouts from SD extdata as well. The vuln itself triggers before the layout data is written to Launcher.dat, but it doesn&#039;t seem to be possible to overwrite anything which actually gets used before the function which writes Launcher.dat into the layout gets called.&lt;br /&gt;
&lt;br /&gt;
Home Menu has some sort of fail-safe system(or at least on v9.7) when Home Menu crashes due to Launcher.dat(this also applies for other things with Home Menu): after crashing once, Home Menu resets Launcher.dat to a state where it no longer crashes anymore. However, note that any exploits using this which hang/etc without crashing will still brick the system. &#039;&#039;&#039;Hence, attempting anything with this on physnand without hw-nand-access isn&#039;t really recommended.&#039;&#039;&#039;&lt;br /&gt;
| [[11.1.0-34|11.1.0-X]]&lt;br /&gt;
| &lt;br /&gt;
| [[4.0.0-7|4.0.0-X]]&lt;br /&gt;
| &lt;br /&gt;
| May 14, 2015&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| Theme-data decompression buffer overflow ([[menuhax|themehax]])&lt;br /&gt;
| The only func-call size parameter used by the theme decompression function is one for the compressed size, none for the decompressed size. The decompressed-size value from the LZ header is used by this function to check when to stop decompressing, but this function itself has nothing to verify the decompressed_size with. The code calling this function does not check or even use the decompressed size from the header either.&lt;br /&gt;
&lt;br /&gt;
This function is separate from the rest of the Home Menu code: the function used for decompressing themes is *only* used for decompressing themes, nothing else. There&#039;s a separate decompression function in Home Menu used for decompressing everything else.&lt;br /&gt;
&lt;br /&gt;
That other decompression function in Home Menu handles decompression size properly(decompressed size check for max buffer size is done by code calling the other function, not in the function itself). Unlike the other function, the theme function supports multiple LZ algorithms, but the one which actually gets used in official themes is the same one supported by the other function anyway.&lt;br /&gt;
&lt;br /&gt;
See also [[menuhax|here]].&lt;br /&gt;
&lt;br /&gt;
With [[10.2.0-28|10.2.0-X]] Home Menu, the only code change was that the following was added right after theme-load and before actual decompression: &amp;quot;if(&amp;lt;get_lzheader_decompressed_size&amp;gt;(compressed_buf) &amp;gt; 0x150000)&amp;lt;exit&amp;gt;;&amp;quot;. This fixed the vuln.&lt;br /&gt;
| [[10.2.0-28|10.2.0-X]]&lt;br /&gt;
| [[10.2.0-28|10.2.0-X]]&lt;br /&gt;
| &amp;lt;Old3DS/New3DS version which added initial theme support&amp;gt;&lt;br /&gt;
| &lt;br /&gt;
| December 22, 2014&lt;br /&gt;
| [[User:Yellows8|Yellows8]], [[User:Myria|Myria]] independently (~spring 2015)&lt;br /&gt;
|-&lt;br /&gt;
| Shuffle body-data buffer overflow ([[menuhax|shufflehax]])&lt;br /&gt;
| See [[menuhax|here]].&lt;br /&gt;
| [[10.6.0-31|10.6.0-X]]&lt;br /&gt;
| [[10.6.0-31|10.6.0-X]]&lt;br /&gt;
| [[9.3.0-21|9.3.0-X]]&lt;br /&gt;
| &lt;br /&gt;
| January 3, 2015&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| Extdata file-data loading buffer overflow&lt;br /&gt;
| The extdata file-reading code allocates a fixed-size heap buffer for the expected filesize, then reads the filedata into this buffer using the actual FS filesize. Before v5.0 the filesize used here wasn&#039;t validated, hence if the filesize is larger than alloc_size a buffer overflow would occur. &#039;&#039;After&#039;&#039; doing the file-read it does validate that the actual_readsize matches the alloc_size, but at this point the buffer overflow has already occurred.&lt;br /&gt;
&lt;br /&gt;
This affected at least the following: SaveData.dat and Cache.dat.&lt;br /&gt;
&lt;br /&gt;
This can be triggered with SaveData.dat by installing a &amp;lt;v4.0 Home Menu version, with Home Menu extdata from &amp;gt;=v4.0 still on SD. When this is done with v2.0 Home Menu, a kernelpanic occurs when processing an AM command(it appears a buffer ptr which is then passed to a command was overwritten with 0x0 - of course other SaveData.dat filesizes may result in different behaviour).&lt;br /&gt;
| [[5.0.0-11|5.0.0-X]]&lt;br /&gt;
| &lt;br /&gt;
| [[2.0.0-2|2.0.0-X]]&lt;br /&gt;
| June 9, 2016&lt;br /&gt;
| June 9, 2016&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The icon data arrays used with {sd/nand}iconhax were added to SaveData.dat/Launcher.dat with [[4.0.0-7|4.0.0-X]], hence the vulnerable functions were added with that same version.&lt;br /&gt;
&lt;br /&gt;
With &amp;lt;=v4.0 the SaveData.dat buffer is located in the regular heap. It&#039;s unknown when exactly it was moved to linearmem, which is where it&#039;s located with recent versions. It&#039;s located in linearmem for KOR &amp;gt;=v9.6 for example.&lt;br /&gt;
&lt;br /&gt;
The SaveData.dat/Launcher.dat icon vulns were fixed by doing various unsigned &amp;gt;=60/&amp;gt;=360 checks on the loaded values. When these checks fail, it just skips over handling this icon entry. Hence, the original value can&#039;t be negative / out-of-bounds any more.&lt;br /&gt;
&lt;br /&gt;
==Useless crashes==&lt;br /&gt;
Old3DS system web-browser:&lt;br /&gt;
* 2^32 characters long string(&#039;&#039;finally&#039;&#039; fixed with v10.6): this is similar to the vulnerability fixed [http://git.chromium.org/gitweb/?p=external/Webkit.git;a=commitdiff;h=ec471f16fbd1f879cb631f9b022fd16acd75f4d4 here], concat-large-strings-crash2.html triggers a crash which is about the same as the one triggered by a 2^32 string. Most of the time this vulnerability will cause a memory page permissions fault, since the WebKit code attempts to copy the string text data to the output buffer located in read-only [[CRO0|CRO]] heap memory. The only difference between a crash triggered by a 2^32 string and the concat-large-strings-crash2.html crash is at the former copies the string data using the original string length(like 1 text character for &amp;quot;x&amp;quot;, 4 for &amp;quot;xxxx&amp;quot;) while the latter attempts to copy &amp;gt;12MB. In some &#039;&#039;very&#039;&#039; rare cases a thread separate from the string data-copy thread will crash, this might be exploitable. However, this is mostly useless since it rarely crashes this way.&lt;br /&gt;
&lt;br /&gt;
* Trying to directly load a page via the browser &amp;quot;URL&amp;quot; option with [https://github.com/yellows8/3ds_browserhax_common webkitdebug] setup, causes a crash to trigger in oss.cro due to an use-after-free being caught with webkitdebug. This is presumably some sort of realloc() issue in the libcurl version used by the &amp;lt;={v10.2-v10.3} browser. This happens with *every* *single* *page* one tries to load via the &amp;quot;URL&amp;quot; option, but not when loading links on the current page, hence this is probably useless. A different use-after-free with realloc triggers with loading any page at all regardless of method too(libcurl probably).&lt;br /&gt;
&lt;br /&gt;
* This WebKit build has &#039;&#039;a lot&#039;&#039; of crash-trigger bugs that only happen with [https://github.com/yellows8/3ds_browserhax_common webkitdebug] completely setup(addr accesses near 0x0), with &#039;&#039;just&#039;&#039; trying to load any page at all.&lt;/div&gt;</summary>
		<author><name>EvilFlight</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=3DS_Userland_Flaws&amp;diff=21175</id>
		<title>3DS Userland Flaws</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=3DS_Userland_Flaws&amp;diff=21175"/>
		<updated>2020-04-26T08:37:41Z</updated>

		<summary type="html">&lt;p&gt;EvilFlight: /* Non-system applications */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page lists vulnerabilities / exploits for 3DS applications and applets. Exploiting these initially results in ROP, from that ROP one can then for example try exploiting [[3DS_System_Flaws|system]] flaw(s).&lt;br /&gt;
&lt;br /&gt;
=Non-system applications=&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Application name&lt;br /&gt;
!  Summary&lt;br /&gt;
!  Description&lt;br /&gt;
!  Fixed in app/system version&lt;br /&gt;
!  Last app/system version this flaw was checked for&lt;br /&gt;
!  Timeframe info related to this was added to wiki&lt;br /&gt;
!  Timeframe this vuln was discovered&lt;br /&gt;
!  Vuln discovered by&lt;br /&gt;
|-&lt;br /&gt;
| Cubic Ninja&lt;br /&gt;
| Map-data stack smash&lt;br /&gt;
| See [[Ninjhax|here]] regarding Ninjhax.&lt;br /&gt;
| None&lt;br /&gt;
| App: Initial version. System: [[10.4.0-29]].&lt;br /&gt;
| Ninjhax release&lt;br /&gt;
| July 2014&lt;br /&gt;
| [[User:smea|smea]]&lt;br /&gt;
|-&lt;br /&gt;
| The Legend of Zelda: Ocarina of Time 3D&lt;br /&gt;
| UTF-16 name string buffer overflow via unchecked u8 length field&lt;br /&gt;
| The u8 at offset 0x2C in the savefile is the character-length of the UTF-16 string at offset 0x1C. When copying this string, it&#039;s essentially a memory-copy with lenval*2, not a string-copy. This can be used to trigger buffer overflows at various locations depending on the string length.&lt;br /&gt;
* When value is &amp;gt;=0x6E it crashes when saving the saveslot, this causes a stack-smash however it normally crashes before it returns from the function which had the stack-frame overwritten.&lt;br /&gt;
* With value &amp;gt;=0x9A, it crashes via stack-smash in-game once any dialogs are opened(touching buttons on the touch-screen can trigger it too).&lt;br /&gt;
* Length value&amp;gt;=0xCD causes a crash while loading the saveslot, via a heap buffer overflow. This buf-overflow overwrites a heap memchunk following the allocated buffer. When the first 16-bits overwriting that heap memchunk is not the memchunk magic-number(0x7373), the mem-alloc code will just return a NULL ptr which later results in a crash. When the magic-number is valid, the mem-alloc code will continue to attempt to parse the memchunk, which may crash depending on the data which overwrote the memchunk. This heap code is separate from the CTRSDK heap code. Exploiting this doesn&#039;t seem to be possible: since the heap code actually verifies that the magic-number for the next/prev memchunk ptrs are correct(unlike CTRSDK), it&#039;s not possible to change those ptrs to useful arbitrary addresses outside of savedata(like with triggering a write to a c++ object ptr which later is used with a vtable func-call, this is what one would do with CTRSDK heap here).&lt;br /&gt;
&lt;br /&gt;
On March 11, 2015, an exploit using this vuln was released, that one was intended for warez/etc. The following exploit wasn&#039;t released before then mainly because doing so would (presumably) result in the vuln being fixed. The following old exploit was released on March 14, 2015: [https://github.com/yellows8/oot3dhax].&lt;br /&gt;
| None&lt;br /&gt;
| App: Initial version. System: [[10.6.0-31]].&lt;br /&gt;
| March 11, 2015&lt;br /&gt;
| Around October 22, 2012&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| Super Smash Bros 3DS&lt;br /&gt;
| Buffer overflow in local-multiplayer beacon handling.&lt;br /&gt;
| See [[smashbroshax|here]].&lt;br /&gt;
| App: v1.1.3&lt;br /&gt;
| See [[smashbroshax|here]]. System: [[10.3.0-28]].&lt;br /&gt;
| Time of exploit release.&lt;br /&gt;
| See [[smashbroshax|here]].&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| Pokemon Super Mystery Dungeon&lt;br /&gt;
| Heap overflow within linear memory via unchecked save file length&lt;br /&gt;
| Pokemon Super Mystery Dungeon uses zlib compression for most of its save files, possibly due to the save files being larger than its predecessor, Gates to Infinity. When a save file is being prepared to be loaded and read from, only a 0x32000 large buffer is allocated for file reading, and a 0x3e800-large buffer for decompression is also allocated before the file is read. However, the game does not limit the size of the file read to this allocation bound, allowing for the file to overflow into the linear memory heap and into the next allocation. Since Pokemon Super Mystery Dungeon stores allocation memchunks directly before the allocation, overwriting the next memchunk with a corrupted one allows for arbitrary writes of linear heap pointers when the next buffer is allocated or arbitrary writes of any pointer within writable memory when the corrupted buffer is freed.&lt;br /&gt;
| None&lt;br /&gt;
| O3DS: [[11.3.0-36]]. N3DS: [[11.4.0-37]].&lt;br /&gt;
| Time of exploit release.&lt;br /&gt;
| April 14, 2016&lt;br /&gt;
| [[User:Shinyquagsire23|Shiny Quagsire]]&lt;br /&gt;
|-&lt;br /&gt;
| VVVVVV&lt;br /&gt;
| Buffer overflow in XML save file array parsing&lt;br /&gt;
| VVVVVV utilizes several XML files (renamed with a .vvv extension) to store level save data, stats and settings. Within these XML files are several tags containing an array of data which, when parsed, is not properly checked to be of proper length for the tag being parsed from. This allows for an overflow of 16-bit array values from the location where the array is parsed. With unlock.vvv, XML data is parsed to the stack, and with level saves the heap. This allows for the pointer where the level save worldmap tag array should be parsed into to be overwritten with a stack address, allowing for ROP from within the XML array parsing function on the next level load.&lt;br /&gt;
| App: v1.1&lt;br /&gt;
| [[10.7.0-32]].&lt;br /&gt;
| Time of exploit release.&lt;br /&gt;
| April 25, 2016&lt;br /&gt;
| [[User:Shinyquagsire23|Shiny Quagsire]]&lt;br /&gt;
|-&lt;br /&gt;
| Citizens of Earth&lt;br /&gt;
| Save file read stack smash&lt;br /&gt;
| Citizens of Earth also uses &amp;quot;XML&amp;quot; files for saves, which are actually entirely binary data (not XML at all) with no checksums. These files are read from the filesystem on to a fixed size stack buffer which leads to an incredibly trivial stack smash. When using the autosave slot for this, the save is parsed when the user selects &amp;quot;continue&amp;quot;. When using one of the dedicated save slots (1-3), the save is parsed shortly after the company splash screens fade. Note that the save is read quite high (descending) on the stack - when exploiting this, one would likely need to move SP due to almost instantly overflowing the physical stack.&lt;br /&gt;
| None&lt;br /&gt;
| [[10.7.0-32]].&lt;br /&gt;
| Time of exploit release.&lt;br /&gt;
| May 5, 2016&lt;br /&gt;
| [[User:Dazzozo|Dazzozo]]&lt;br /&gt;
|-&lt;br /&gt;
| SmileBASIC 3.x&lt;br /&gt;
| Poor parameter validation on &amp;quot;BGSCREEN&amp;quot; command&lt;br /&gt;
| The SmileBASIC &amp;quot;BGSCREEN&amp;quot; command&#039;s second parameter is not properly validated as being within range.  As a result, one can set the screen size to an absurdly large value.  This means that the &amp;quot;BGGET&amp;quot; and &amp;quot;BGPUT&amp;quot; commands can then be used on out-of-range values to read and write a significant chunk of the interpreter&#039;s address space.&lt;br /&gt;
With a series of carefully-designed BGPUT commands, one can build a ROP chain and cause it to be executed.&lt;br /&gt;
| App: 3.3.2.&lt;br /&gt;
| System: [[11.0.0-33]].&lt;br /&gt;
| July 20, 2016&lt;br /&gt;
| Around June 26, 2016&lt;br /&gt;
| slackerSnail, 12Me12, incvoid&lt;br /&gt;
Exploited by MrNbaYoh and [[User:Plutooo|plutoo]].&lt;br /&gt;
|-&lt;br /&gt;
| SmileBASIC 3.x&lt;br /&gt;
| Subscripted TIME$/DATE$ allow write access to DATA/BSS&lt;br /&gt;
| Utf-16 characters can be assigned to subscripted TIME$/DATE$ interpreter sysvars which results in write-only access to all of DATA and some BSS in userland.&lt;br /&gt;
TIME$[0]/DATE$[0] actually point to somewhere in rodata, and an overly large subscript can be used to write well past it and into the aforementioned areas.&lt;br /&gt;
| App: 3.6.2 (3.6.0 latest for US/EU, JP appvers. can be downgraded)&lt;br /&gt;
| System: [[11.13.0-45]].&lt;br /&gt;
| April 2020&lt;br /&gt;
| February 2020&lt;br /&gt;
| bug publicly documented [https://translate.google.com/translate?sl=auto&amp;amp;tl=en&amp;amp;u=http%3A%2F%2Fsmilebasic.com%2Fdebug%2Farchive%2F here]&lt;br /&gt;
Exploited by Zoogie&lt;br /&gt;
|-&lt;br /&gt;
| The Legend of Zelda: Tri Force Heroes&lt;br /&gt;
| [[3DS_System_Flaws#General.2FCTRSDK|CTRSDK]] CTPK buffer overflow combined with game&#039;s usage of SpotPass&lt;br /&gt;
| During the very first screen displayed by the game during boot(&amp;quot;Loading...&amp;quot;), just seconds after title launch, the game loads CTPK from the [[BOSS_Services|stored]] SpotPass content. Hence, this game could be exploited via the vulnerable CTRSDK CTPK code &#039;&#039;if&#039;&#039; one could get custom SpotPass data into extdata somehow(ctr-httpwn &amp;gt;=v1.2 with bosshaxx allows this).&lt;br /&gt;
&lt;br /&gt;
The code for this runs from a thread separate from the main-thread, with the stack in linearmem heap. This SpotPass handling triggers before the game ever opens the regular savedata archive. The extdata is opened at some point before this: it opens a file for checking if it exists, then immediately closes it.&lt;br /&gt;
&lt;br /&gt;
The two SpotPass URLs for this have always(?) returned HTTP 404 as of November 2016. It appears these were intended for use as textures for additional costumes(and never got used publicly), but this wasn&#039;t tested.&lt;br /&gt;
&lt;br /&gt;
This is used by [https://github.com/yellows8/ctpkpwn ctpkpwn_tfh].&lt;br /&gt;
| None&lt;br /&gt;
| App: v2.1.0&lt;br /&gt;
| November 18, 2016&lt;br /&gt;
| November 14, 2016&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| Pixel Paint&lt;br /&gt;
| Buffer overflow via unchecked extdata file length&lt;br /&gt;
| Pixel Paint loads pictures saved by the user from extdatas. The file is read to a fixed size buffer but the file length remains unchecked, so with a large enough file, one can overwrite pointers in memory and gain control of the execution flow.&lt;br /&gt;
| None&lt;br /&gt;
| App: Initial version. System: [[11.2.0-35]].&lt;br /&gt;
| December 27, 2016&lt;br /&gt;
| November 5, 2016&lt;br /&gt;
| [[User:Nba_Yoh|MrNbaYoh]]&lt;br /&gt;
|-&lt;br /&gt;
| Steel Diver : Sub Wars&lt;br /&gt;
| Heap overflow / arbitrary memcpy&lt;br /&gt;
| Savefile datas are stored as key/value pairs, a large enough string key makes the game overwrite a memcpy source/destination addresses and size arguments. So one can actually memcpy a rop on the stack and gain control of the execution flow.&lt;br /&gt;
| None&lt;br /&gt;
| System: [[11.2.0-35]].&lt;br /&gt;
| December 27, 2016&lt;br /&gt;
| Around July 15, 2016&lt;br /&gt;
| [[User:Nba_Yoh|MrNbaYoh]], Vegaroxas&lt;br /&gt;
|-&lt;br /&gt;
| 1001 Spikes&lt;br /&gt;
| Buffer overflow via unchecked array-indexes in XML savefile parsing&lt;br /&gt;
| The savefiles are stored as renamed .xml files, which contain several tags with attributes like &#039;array-index=&amp;quot;array-value&amp;quot;&#039;, where both of these are converted from ASCII strings to integers as signed-int32, and the array-value given blindly written to an array inside a structure using the (unchecked) index given. With several of these attributes, one can overwrite the stack starting from the stored lr of the function that does this parsing, and write a ROP chain there. Testing used the &amp;quot;LevelAttempts&amp;quot; tag which is the last such tag parsed in that function.&lt;br /&gt;
| None&lt;br /&gt;
| App: v1.2.0 (TMD v2096)&lt;br /&gt;
| December 27, 2016&lt;br /&gt;
| Around November 2, 2016&lt;br /&gt;
| [[User:Riley|Riley]]&lt;br /&gt;
|-&lt;br /&gt;
| Pokemon Omega Ruby/Alpha Sapphire&lt;br /&gt;
| Secret base team name heap overflow&lt;br /&gt;
| When the player wants to edit the team name, it is copied over the heap, however its length is not verified. So with a large enough team name one can overwrite some pointers and get two arbitrary jumps and then get control of the execution flow.&lt;br /&gt;
| None&lt;br /&gt;
| App: 1.4. System: [[11.2.0-35]].&lt;br /&gt;
| December 30, 2016&lt;br /&gt;
| June, 2016&lt;br /&gt;
| [[User:Nba_Yoh|MrNbaYoh]]&lt;br /&gt;
|-&lt;br /&gt;
| Swapdoodle&lt;br /&gt;
| Heap buffer overflow via unchecked size&lt;br /&gt;
| The letter file format used by doodlebomb is composed of multiple chunks. Each chunks is described in the header of the file where the name, size and CRC of each chunk are stored. Some chunks are meant to be headers, every header&#039;s size should be 0x80, however the length of the STAHED1 chunk remains unchecked and the game memcpy the chunk to a 0x80 byte buffer with the length provided in the file. This way one is able to overwrite some pointers and get control of the execution flow.&lt;br /&gt;
| App: &amp;gt; v1.1.1&lt;br /&gt;
| App: v1.1.1&lt;br /&gt;
| April 24, 2017&lt;br /&gt;
| February, 2017&lt;br /&gt;
| [[User:Nba_Yoh|MrNbaYoh]]&lt;br /&gt;
|-&lt;br /&gt;
| Pokemon Picross&lt;br /&gt;
| Arbitrary memcpy via unchecked size&lt;br /&gt;
| When reading the savefile, the game handles some lists of buffers that are copied to memory. These buffers should always be 0x14-bytes long but the game uses the size provided in the savefile to copy them. These buffers are copied in some structs and thus with a big enough length value, one can overwrite the next struct which contains a size and a destination address for a memcpy.&lt;br /&gt;
| None?&lt;br /&gt;
| App: ?&lt;br /&gt;
| May 29, 2017&lt;br /&gt;
| June, 2016&lt;br /&gt;
| [[User:Nba_Yoh|MrNbaYoh]]&lt;br /&gt;
|-&lt;br /&gt;
| RPG Maker Fes/Player&lt;br /&gt;
| Buffer overflow on .bss section&lt;br /&gt;
| When loading a project, the game copies multiple chunks over the BSS section. However the number of chunks to copy is not checked, thus a large amount of chunk result in a buffer overflow. There&#039;s multiple way to exploit this flaw to gain an arbitrary memcpy or an arbitrary jump.&lt;br /&gt;
| None?&lt;br /&gt;
| App: ?&lt;br /&gt;
| August 28, 2017&lt;br /&gt;
| August, 2017&lt;br /&gt;
| [[User:Nba_Yoh|MrNbaYoh]]&lt;br /&gt;
|-&lt;br /&gt;
| RPG Maker Fes/Player&lt;br /&gt;
| Buffer overflow via unchecked file size&lt;br /&gt;
| When loading a project, the game loads the file to a 0x200000 bytes long buffer. However the size remains unchecked, so with a big enough file one can overflow the buffer and overwrite a thread stack and then achieve ROP.&lt;br /&gt;
| None?&lt;br /&gt;
| App: ?&lt;br /&gt;
| August 29, 2017&lt;br /&gt;
| August, 2017&lt;br /&gt;
| [[User:Nba_Yoh|MrNbaYoh]], [[User: ChampionLeake|ChampionLeake]]&lt;br /&gt;
|-&lt;br /&gt;
| Pokemon Omega Ruby/Alpha Sapphire&lt;br /&gt;
| PSS data heap/stack overflow&lt;br /&gt;
| When launching the game, multiple chunks from the save file are parsed and copied to a large heap buffer. When parsing PSS data (acquaintances, passerby) the game copies each entry to the heap buffer, the number of entries to copy is read from the end of the multiple pss data chunks and is not checked, leading to an overflow. The &amp;quot;PSS data - friends&amp;quot; chunk is vulnerable too, but the overflow occurs on the stack and unfortunately this isn&#039;t exploitable because of a 4 bytes uncontrolled value (in each entry) that gets written on sensitive data.&lt;br /&gt;
| None&lt;br /&gt;
| App: 1.4. System: [[11.6.0]].&lt;br /&gt;
| October 1, 2017&lt;br /&gt;
| June, 2016&lt;br /&gt;
| [[User:Nba_Yoh|MrNbaYoh]]&lt;br /&gt;
|-&lt;br /&gt;
| RPG Maker Fes/Player&lt;br /&gt;
| OOB write&lt;br /&gt;
| When handling events in a map, the indices of &amp;quot;buttons&amp;quot; are not checked. This results in an out of bound bit write, one can thus write a rop directly on the stack (bit by bit).&lt;br /&gt;
| None?&lt;br /&gt;
| App: ?&lt;br /&gt;
| August 5, 2018&lt;br /&gt;
| &lt;br /&gt;
| [[User:Nba_Yoh|MrNbaYoh]]&lt;br /&gt;
|-&lt;br /&gt;
| Unholy Heights&lt;br /&gt;
| Buffer overflow via unchecked string size&lt;br /&gt;
| The game stores some utf-16 messages in the savefile. Right before the message is the length(u32) for the string, the game uses this size to memcpy the message from the savefile to the stack without checking the length. This allows one to overwrite some function addresses on the stack and form a rop chain.&lt;br /&gt;
| None&lt;br /&gt;
| App: Initial Version&lt;br /&gt;
| September 13, 2018&lt;br /&gt;
| August, 2018&lt;br /&gt;
| Kartik&lt;br /&gt;
|-&lt;br /&gt;
| Mononoke Forest&lt;br /&gt;
| String Buffer Overflow via unchecked string length&lt;br /&gt;
| The game stores plaintext profile names in the savefile. The profile names are strcpy/memcpy to different areas of the game&#039;s functions in the stack. Using a large extensive profile name, a user can overwrite some stack-registers and point to stack buffer addresses to eventually gain control of the stack to lead and form a rop-chain. &lt;br /&gt;
| None&lt;br /&gt;
| App: v1.0.0&lt;br /&gt;
| August 14, 2019&lt;br /&gt;
| February 8, 2019&lt;br /&gt;
| [[User: ChampionLeake|ChampionLeake]] and [[User: Kartik|Kartik]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Flipnote Studio 3D==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Summary&lt;br /&gt;
!  Description&lt;br /&gt;
!  Fixed in app/system version&lt;br /&gt;
!  Timeframe info related to this was added to wiki&lt;br /&gt;
!  Flaw discovered by&lt;br /&gt;
|-&lt;br /&gt;
| KFH frame count overflow&lt;br /&gt;
| The KFH frame count field should not be &amp;gt;= 0x3E8, but it wasn&#039;t checked and so uncontrolled data were written over pointers, causing an unexploitable crash.&lt;br /&gt;
| System: 11.6&lt;br /&gt;
| September 20, 2017&lt;br /&gt;
| [[User:Nba_Yoh|MrNbaYoh]]&lt;br /&gt;
|-&lt;br /&gt;
| KMI paper color overflow&lt;br /&gt;
| Paper color field (and similar color fields) in KMI chunks was not checked, a too high value caused a jump to an uncontrolled location.&lt;br /&gt;
| System: 11.6&lt;br /&gt;
| September 20, 2017&lt;br /&gt;
| [[User:Nba_Yoh|MrNbaYoh]]&lt;br /&gt;
|-&lt;br /&gt;
| KSN BGM data size overflow&lt;br /&gt;
| The size of the BGM data in the KSN chunk was not checked, it was used in a memcpy so with a big enough size one could overwrite a thread stack on linear mem and achieve ROP (notehax v1).&lt;br /&gt;
| System: 11.6&lt;br /&gt;
| September 20, 2017&lt;br /&gt;
| [[User:Nba_Yoh|MrNbaYoh]]&lt;br /&gt;
|-&lt;br /&gt;
| KMC chunk unchecked&lt;br /&gt;
| The KMC chunk was not verified at all, the CRC32 and the size were not checked. A big enough size caused an integer overflow and made the game read the file backward.&lt;br /&gt;
| System: 11.6&lt;br /&gt;
| September 20, 2017&lt;br /&gt;
| [[User:Nba_Yoh|MrNbaYoh]]&lt;br /&gt;
|-&lt;br /&gt;
| KMI layer size unchecked&lt;br /&gt;
| The 3 layer size fields in KMI chunks were not checked, leading to some crashes in the editor.&lt;br /&gt;
| System: 11.6&lt;br /&gt;
| September 20, 2017&lt;br /&gt;
| [[User:Nba_Yoh|MrNbaYoh]]&lt;br /&gt;
|-&lt;br /&gt;
| Bad &amp;quot;queue&amp;quot; implementation&lt;br /&gt;
| When a KWZ was parsed, frames were copied in a kind of queue, bounds were not checked obviously, so with the KMI layer size flaw one was able to fill completely the queue, then write past the buffer and overwrite a heap chunk header (notehax v2). This is not possible anymore, the queue cannot be filled because layer sizes are checked. Moreover each time an element is removed from the queue, the whole content is memmoved *facepalm*.&lt;br /&gt;
| System: 11.6&lt;br /&gt;
| September 20, 2017&lt;br /&gt;
| [[User:Nba_Yoh|MrNbaYoh]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Useless crashes / applications which were fuzzed==&lt;br /&gt;
* Pushmo (3DSWare), QR codes: level name is properly limited to 16 characters, game doesn&#039;t crash with a longer name. The only possible crashes are triggered by out-of-bounds array index values, these crashes are not exploitable due to the index value being 8bit.&lt;br /&gt;
&lt;br /&gt;
* [[Pyramids (3DSWare)]], QR codes: no strings. Only crashes are from out-of-bounds values (like background ID) and are not exploitable.&lt;br /&gt;
&lt;br /&gt;
* [[Pyramids 2 (3DSWare)]], QR codes: no strings. Only crashes are from out-of-bounds values (like background ID) and are not exploitable.&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/yellows8/mm3d_re The Legend of Zelda: Majora&#039;s Mask 3D]&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;The Legend of Zelda: A Link Between Worlds&amp;quot; and &amp;quot;The Legend of Zelda: Tri Force Heroes&amp;quot;: these games don&#039;t crash at all when the entire save-file(minus constant header data) is overwritten with /dev/random output / 0xFF-bytes. All of the CRC32s were updated for this of course.  Note that this refers to the regular save file: Tri Force Heroes can be exploited via BOSS extdata - see above.&lt;br /&gt;
&lt;br /&gt;
* Pokemon Mystery Dungeon: Gates to Infinity has the same unchecked file bounds as Pokemon Super Mystery Dungeon, however since save compression was introduced in Pokemon Super Mystery Dungeon, it only allocates one buffer within the application heap instead of several within the linear heap, resulting in nothing to corrupt or overwrite even if the file&#039;s length is extended past its allocation.&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;Kid Icarus: Uprising&amp;quot;: Overwriting the entire savedata results in various crashes, nothing useful.&lt;br /&gt;
&lt;br /&gt;
* Savedata/extdata for &amp;quot;Super Smash Bros 3DS&amp;quot;: Overwriting the various files stored under savedata/extdata results in useless crashes.&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;StarFox 64 3D&amp;quot;: Doesn&#039;t crash at all with the entire savedata overwritten.&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;Frogger 3D&amp;quot;: Overwriting a savefile with random-data results in *nothing* crashing.&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;Mutant Mudds&amp;quot;: Overwriting the savefile with random data results in a crash&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;Worcle Worlds&amp;quot;: Overwriting the savefile with 0xFF results in a crash due to an out of bound read&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;Animal Crossing: New Leaf&amp;quot;: Creating a QR code from random data results in a valid QR code and a random design. In some very rare cases(which aren&#039;t always reproducible?) a crash/etc may occur, but this isn&#039;t known to be useful.&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;Angry Birds Star Wars&amp;quot;: Strings in the savefile are preceded by their lengths. These strings are never stored on the stack and are memcpy&#039;d into heap memory. If the size is invalid the alloc will fail and thus the memcpy will operate on a nullptr resulting in a useless data abort.&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;Gem Smashers&amp;quot;: Overwriting the savefile with random bytes results in useless crashes.&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;Luxor:&amp;quot; Strings/plaintext in the savefile are present and these&#039;s no checks. Overwriting the whole save (excluding the header), with /dev/random cause a useless crash.&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;Luv Me Buddies Wonderland:&amp;quot; Doesn&#039;t crash at all with the entire savedata overwritten. Overwriting some areas, points to useless nulls&lt;br /&gt;
&lt;br /&gt;
==Crashes needing investigation==&lt;br /&gt;
* Disney Infinity crashes when all savedata overwritten with /dev/urandom. No checksums. 0xFF bytes don&#039;t cause a crash.&lt;br /&gt;
&lt;br /&gt;
* Football Up Online / Soccer Up Online and Football Up 3D / Soccer Up 3D crash when teamname(UTF-16) length = 0x48 AND 0x20 null bytes are removed after just the name or if teamname length is way longer than 0x48.&lt;br /&gt;
&lt;br /&gt;
=System applications=&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Summary&lt;br /&gt;
!  Description&lt;br /&gt;
!  Fixed in version&lt;br /&gt;
!  Last version this flaw was checked for&lt;br /&gt;
!  Timeframe this was discovered&lt;br /&gt;
!  Discovered by&lt;br /&gt;
|-&lt;br /&gt;
| 3DS [[System Settings]] DS profile string stack-smash&lt;br /&gt;
| Too long or corrupted strings (01Ah  2   Nickname length in characters     050h  2   Message length in characters) in the NVRAM DS user settings (System Settings-&amp;gt;Other Settings-&amp;gt;Profile-&amp;gt;Nintendo DS Profile) cause it to crash in 3DS-mode due to a stack-smash. The DSi is not vulnerable to this, DSi launcher(menu) and DSi System Settings will reset the NVRAM user-settings if the length field values are too long(same result as when the CRCs are invalid). TWL_FIRM also resets the NVRAM user-settings when the string-length(s) are too long.&lt;br /&gt;
| [[7.0.0-13]]&lt;br /&gt;
| [[7.0.0-13]]&lt;br /&gt;
| 2012&lt;br /&gt;
| [[User:Ichfly|Ichfly]]&lt;br /&gt;
|-&lt;br /&gt;
| 3DS [[System Settings]] stack smash via title strings in [[DSiWare_Exports]]&lt;br /&gt;
| DSiWare export banners contain 16 consecutive 0x100 byte, utf-16 game title strings for different languages. Nintendo correctly limits the string&#039;s max length by placing a NULL at str[127] before it&#039;s copied to the stack. However, they didn&#039;t allocate enough space for all 128 wchars (char/wchar type confusion?), so an attacker can craft a valid full-length string that will crash the stack at about str+0xEC. ROP execution can then be obtained from this crash in DSiWare Data Management as demonstrated [https://github.com/zoogie/Bannerbomb3 here].&lt;br /&gt;
&lt;br /&gt;
Interesting note: A line feed wchar (00 0A) at any point in the string before the crash offset will prevent the crash from occurring.&lt;br /&gt;
| None&lt;br /&gt;
| [[11.13.0-45]]&lt;br /&gt;
| Dec. 2018&lt;br /&gt;
| Zoogie&lt;br /&gt;
|-&lt;br /&gt;
| 3DS SAFE_MODE [https://www.3dbrew.org/wiki/System_Settings#System_Updater System Updater] stack smash from proxy-url string&lt;br /&gt;
| During [[Recovery Mode]] and after all 3 wifi slots fail to find an access point for sysupdate, a user is permitted to access the wifi settings mode to make changes. Here, if the proxy-url field string&#039;s NULL terminator had been altered beforehand, a stack smash can occur when the user selects Proxy Settings -&amp;gt; Detailed Setup and the corrupted url string is displayed.&lt;br /&gt;
&lt;br /&gt;
This is a difficult crash to control because the url string is converted from ascii to utf-16 between the slot and stack, effectively reducing the available gadgets to 0.4% of the normal amount. It&#039;s possible to improvise an &amp;quot;escape&amp;quot; using an eoreq pc w/shift gadget to combine registers and form a jump that can access 1/2 of all available gadgets.&lt;br /&gt;
&lt;br /&gt;
Because this exploit runs *under* SAFE_MODE, it&#039;s possible to run safehax with one&#039;s choice of k11 and arm9 hax. Prerequisite: a userland exploit with cfg:s/i access to modify the wifi slot. A demonstration can be viewed [https://github.com/zoogie/unSAFE_MODE here].&lt;br /&gt;
| None&lt;br /&gt;
| [[11.13.0-45]]&lt;br /&gt;
| Jan. 2020&lt;br /&gt;
| Zoogie&lt;br /&gt;
|-&lt;br /&gt;
| [[Nintendo 3DS Sound]]&lt;br /&gt;
| When a .m4a is loaded, the song name is copied to a 256 byte buffer. When the song name begins with a Unicode BOM marker, it memcpy&#039;s the tag using the user-provided length. This gives an arbitrary write which can be used to achieve ROP.&lt;br /&gt;
| [[11.4.0-37]]&lt;br /&gt;
| [[11.4.0-37]]&lt;br /&gt;
| June/July 2016&lt;br /&gt;
| [[User:nedwill|nedwill]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=System applets=&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Summary&lt;br /&gt;
!  Description&lt;br /&gt;
!  Fixed in version&lt;br /&gt;
!  Last version this flaw was checked for&lt;br /&gt;
!  Introduced with version&lt;br /&gt;
!  Timeframe info related to this was added to wiki&lt;br /&gt;
!  Timeframe this was discovered&lt;br /&gt;
!  Discovered by&lt;br /&gt;
|-&lt;br /&gt;
| Webkit/web-browser bugs&lt;br /&gt;
| spider has had at least three different code-execution exploits. Majority of them are use-after-free issues. See also [[browserhax|here]].&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| &lt;br /&gt;
| 2013?&lt;br /&gt;
|&lt;br /&gt;
| A lot of people.&lt;br /&gt;
|-&lt;br /&gt;
| Old3DS/New3DS [[Internet_Browser|Browser-version-check]] bypass&lt;br /&gt;
| When the browser-version-check code runs where the savedata for it was never initialized(such as when the user used the &amp;quot;Initialize savedata&amp;quot; option), it will use base_timestamp=0 instead of the timestamp loaded from savedata. This is then used with &amp;quot;if(cur_timestamp - base_timestamp &amp;gt;= &amp;lt;24h timestamp&amp;gt;){Run browser-version-check HTTPS request code}&amp;quot;.&lt;br /&gt;
Hence, if the savedata was just initialized, and if the system datetime is set to before January 2, 2000, the browser-version-check will be skipped. This includes January 1, 2000, 00:00, because that&#039;s the epoch(timestamp value 0x0) used with this timestamp.&lt;br /&gt;
&lt;br /&gt;
See [http://yls8.mtheall.com/3dsbrowserhax.php here] for bypass usage instructions.&lt;br /&gt;
&lt;br /&gt;
This was fixed with [[10.7.0-32|10.7.0-32]], see [[Internet_Browser|here]] for details.&lt;br /&gt;
| [[10.7.0-32|10.7.0-32]]&lt;br /&gt;
| &lt;br /&gt;
| [[9.9.0-26|9.9.0-26]]&lt;br /&gt;
| February 25, 2016&lt;br /&gt;
| November 2, 2015 (Exactly one week after the browser version pages were initially updated server-side)&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| Skater - Bookmark OOB write&lt;br /&gt;
| Each bookmark has an id that should not exceed 0x63 (99), however ids are not checked, this results in an OOB write on the stack, but only the value 0x01 can be written.&lt;br /&gt;
| &lt;br /&gt;
| [[11.6.0-39|11.6.0-39]]&lt;br /&gt;
| &lt;br /&gt;
| May 21, 2018&lt;br /&gt;
| May 20, 2018&lt;br /&gt;
| [[User:Nba_Yoh|MrNbaYoh]]&lt;br /&gt;
|-&lt;br /&gt;
| MicroSD Management - malformed security blob causes stack buffer overflow (mhax) &lt;br /&gt;
| The MicroSD Management application&#039;s parsing of Windows NTLM security blobs in the SMB/CIFS protocol doesn&#039;t verify that the client&#039;s specified NT domain name is less than 32 UTF-16 characters.  When it&#039;s longer, a stack buffer overrun occurs, leading to a ROP chain and complete control of the mcopy application.&lt;br /&gt;
&lt;br /&gt;
The malformed security blob can be sent by an attacker within the SMB_COM_SESSION_SETUP_ANDX (0x73) packet.&lt;br /&gt;
| [[11.8.0-41|11.8.0-41]]&lt;br /&gt;
| [[11.8.0-41|11.8.0-41]]&lt;br /&gt;
| [[9.0.0-20|9.0.0-20]]&lt;br /&gt;
| August 12, 2018&lt;br /&gt;
| 2018&lt;br /&gt;
| smea&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Home Menu==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Summary&lt;br /&gt;
!  Description&lt;br /&gt;
!  Fixed in version&lt;br /&gt;
!  Last version this flaw was checked for&lt;br /&gt;
!  Introduced with version&lt;br /&gt;
!  Timeframe info related to this was added to wiki&lt;br /&gt;
!  Timeframe this was discovered&lt;br /&gt;
!  Discovered by&lt;br /&gt;
|-&lt;br /&gt;
| bossbannerhax&lt;br /&gt;
| After successfully loading [[Extended_Banner|extended-banner]] data(done when selecting an icon), Home Menu attempts to load &amp;quot;[[CBMD]]&amp;quot; data into a 0x100000-byte heap buffer from the [[BOSS_Services|stored]] SpotPass content. When successful and the magic-number is CBMD, Home Menu then decompresses the exbanner sections into another fixed-size heap buffer, without checking the outsize at all. The main CBMD CGFX code with ExeFS checks the size, but this code doesn&#039;t(however this is exbanner &amp;quot;CBMD&amp;quot;, not a &amp;quot;normal&amp;quot; CBMD).&lt;br /&gt;
&lt;br /&gt;
Used with menuhax as of v3.2.&lt;br /&gt;
| [[11.3.0-36|11.3.0-X]]&lt;br /&gt;
| &lt;br /&gt;
| [[1.0.0-0|1.0.0-0]]&lt;br /&gt;
| November 18, 2016&lt;br /&gt;
| December 23, 2014&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| sdiconhax&lt;br /&gt;
| This is basically the same as nandiconhax, the vulnerable SD/NAND functions are &#039;&#039;identical&#039;&#039; minus the file-buffer offsets. Exploitation is different due to different heap-buffer location though. Unlike nandiconhax, the icon buffer for SD is located in linearmem(with recent Home Menu versions at least). This is used by [[menuhax]].&lt;br /&gt;
| [[11.1.0-34|11.1.0-X]]&lt;br /&gt;
| &lt;br /&gt;
| [[4.0.0-7|4.0.0-X]]&lt;br /&gt;
| July 27, 2016&lt;br /&gt;
| October 23, 2015&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| [[System_SaveData|NAND-savedata]] Launcher.dat icons (nandiconhax)&lt;br /&gt;
| The homemenu code processing the titleid list @ launcherdat+8 copies those titleIDs to another buffer, where the offset relative to that buffer is calculated using the corresponding s8/s16 entries. Those two values are not range checked at all. Hence, one can use this to write u64(s) with arbitrary values to before/after this allocated output buffer. See [[Home_Menu|here]] regarding Launcher.dat structure.&lt;br /&gt;
&lt;br /&gt;
This can be exploited(with Launcher.dat loading at startup at least) by using a s16 for the icon entry with value 0xFFEC(-20)(and perhaps more icons with similar s16 values to write multiple u64s). The result is that the u64 value is written to outbuf-0xA0, which overwrites object+0(vtable) and object+4(doesn&#039;t matter here) for an object that gets used a bit after the vulnerable function triggers. The low 32bits of the u64 can then be set to the address of controlled memory(either outbuf in regular heap or the entire launcherdat buffer in linearmem), for use as a fake vtable in order to get control of PC. From there one can begin ROP via vtable funcptrs to do a stack-pivot(r4=objectaddr at the time the above object gets used).&lt;br /&gt;
&lt;br /&gt;
Originally this vuln could only be triggered via Launcher.dat at Home Menu startup, right after Launcher.dat gets loaded + memory gets allocated, once the file-format version code is finished running. Starting with v9.6 this can be triggered when loading layouts from SD extdata as well. The vuln itself triggers before the layout data is written to Launcher.dat, but it doesn&#039;t seem to be possible to overwrite anything which actually gets used before the function which writes Launcher.dat into the layout gets called.&lt;br /&gt;
&lt;br /&gt;
Home Menu has some sort of fail-safe system(or at least on v9.7) when Home Menu crashes due to Launcher.dat(this also applies for other things with Home Menu): after crashing once, Home Menu resets Launcher.dat to a state where it no longer crashes anymore. However, note that any exploits using this which hang/etc without crashing will still brick the system. &#039;&#039;&#039;Hence, attempting anything with this on physnand without hw-nand-access isn&#039;t really recommended.&#039;&#039;&#039;&lt;br /&gt;
| [[11.1.0-34|11.1.0-X]]&lt;br /&gt;
| &lt;br /&gt;
| [[4.0.0-7|4.0.0-X]]&lt;br /&gt;
| &lt;br /&gt;
| May 14, 2015&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| Theme-data decompression buffer overflow ([[menuhax|themehax]])&lt;br /&gt;
| The only func-call size parameter used by the theme decompression function is one for the compressed size, none for the decompressed size. The decompressed-size value from the LZ header is used by this function to check when to stop decompressing, but this function itself has nothing to verify the decompressed_size with. The code calling this function does not check or even use the decompressed size from the header either.&lt;br /&gt;
&lt;br /&gt;
This function is separate from the rest of the Home Menu code: the function used for decompressing themes is *only* used for decompressing themes, nothing else. There&#039;s a separate decompression function in Home Menu used for decompressing everything else.&lt;br /&gt;
&lt;br /&gt;
That other decompression function in Home Menu handles decompression size properly(decompressed size check for max buffer size is done by code calling the other function, not in the function itself). Unlike the other function, the theme function supports multiple LZ algorithms, but the one which actually gets used in official themes is the same one supported by the other function anyway.&lt;br /&gt;
&lt;br /&gt;
See also [[menuhax|here]].&lt;br /&gt;
&lt;br /&gt;
With [[10.2.0-28|10.2.0-X]] Home Menu, the only code change was that the following was added right after theme-load and before actual decompression: &amp;quot;if(&amp;lt;get_lzheader_decompressed_size&amp;gt;(compressed_buf) &amp;gt; 0x150000)&amp;lt;exit&amp;gt;;&amp;quot;. This fixed the vuln.&lt;br /&gt;
| [[10.2.0-28|10.2.0-X]]&lt;br /&gt;
| [[10.2.0-28|10.2.0-X]]&lt;br /&gt;
| &amp;lt;Old3DS/New3DS version which added initial theme support&amp;gt;&lt;br /&gt;
| &lt;br /&gt;
| December 22, 2014&lt;br /&gt;
| [[User:Yellows8|Yellows8]], [[User:Myria|Myria]] independently (~spring 2015)&lt;br /&gt;
|-&lt;br /&gt;
| Shuffle body-data buffer overflow ([[menuhax|shufflehax]])&lt;br /&gt;
| See [[menuhax|here]].&lt;br /&gt;
| [[10.6.0-31|10.6.0-X]]&lt;br /&gt;
| [[10.6.0-31|10.6.0-X]]&lt;br /&gt;
| [[9.3.0-21|9.3.0-X]]&lt;br /&gt;
| &lt;br /&gt;
| January 3, 2015&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| Extdata file-data loading buffer overflow&lt;br /&gt;
| The extdata file-reading code allocates a fixed-size heap buffer for the expected filesize, then reads the filedata into this buffer using the actual FS filesize. Before v5.0 the filesize used here wasn&#039;t validated, hence if the filesize is larger than alloc_size a buffer overflow would occur. &#039;&#039;After&#039;&#039; doing the file-read it does validate that the actual_readsize matches the alloc_size, but at this point the buffer overflow has already occurred.&lt;br /&gt;
&lt;br /&gt;
This affected at least the following: SaveData.dat and Cache.dat.&lt;br /&gt;
&lt;br /&gt;
This can be triggered with SaveData.dat by installing a &amp;lt;v4.0 Home Menu version, with Home Menu extdata from &amp;gt;=v4.0 still on SD. When this is done with v2.0 Home Menu, a kernelpanic occurs when processing an AM command(it appears a buffer ptr which is then passed to a command was overwritten with 0x0 - of course other SaveData.dat filesizes may result in different behaviour).&lt;br /&gt;
| [[5.0.0-11|5.0.0-X]]&lt;br /&gt;
| &lt;br /&gt;
| [[2.0.0-2|2.0.0-X]]&lt;br /&gt;
| June 9, 2016&lt;br /&gt;
| June 9, 2016&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The icon data arrays used with {sd/nand}iconhax were added to SaveData.dat/Launcher.dat with [[4.0.0-7|4.0.0-X]], hence the vulnerable functions were added with that same version.&lt;br /&gt;
&lt;br /&gt;
With &amp;lt;=v4.0 the SaveData.dat buffer is located in the regular heap. It&#039;s unknown when exactly it was moved to linearmem, which is where it&#039;s located with recent versions. It&#039;s located in linearmem for KOR &amp;gt;=v9.6 for example.&lt;br /&gt;
&lt;br /&gt;
The SaveData.dat/Launcher.dat icon vulns were fixed by doing various unsigned &amp;gt;=60/&amp;gt;=360 checks on the loaded values. When these checks fail, it just skips over handling this icon entry. Hence, the original value can&#039;t be negative / out-of-bounds any more.&lt;br /&gt;
&lt;br /&gt;
==Useless crashes==&lt;br /&gt;
Old3DS system web-browser:&lt;br /&gt;
* 2^32 characters long string(&#039;&#039;finally&#039;&#039; fixed with v10.6): this is similar to the vulnerability fixed [http://git.chromium.org/gitweb/?p=external/Webkit.git;a=commitdiff;h=ec471f16fbd1f879cb631f9b022fd16acd75f4d4 here], concat-large-strings-crash2.html triggers a crash which is about the same as the one triggered by a 2^32 string. Most of the time this vulnerability will cause a memory page permissions fault, since the WebKit code attempts to copy the string text data to the output buffer located in read-only [[CRO0|CRO]] heap memory. The only difference between a crash triggered by a 2^32 string and the concat-large-strings-crash2.html crash is at the former copies the string data using the original string length(like 1 text character for &amp;quot;x&amp;quot;, 4 for &amp;quot;xxxx&amp;quot;) while the latter attempts to copy &amp;gt;12MB. In some &#039;&#039;very&#039;&#039; rare cases a thread separate from the string data-copy thread will crash, this might be exploitable. However, this is mostly useless since it rarely crashes this way.&lt;br /&gt;
&lt;br /&gt;
* Trying to directly load a page via the browser &amp;quot;URL&amp;quot; option with [https://github.com/yellows8/3ds_browserhax_common webkitdebug] setup, causes a crash to trigger in oss.cro due to an use-after-free being caught with webkitdebug. This is presumably some sort of realloc() issue in the libcurl version used by the &amp;lt;={v10.2-v10.3} browser. This happens with *every* *single* *page* one tries to load via the &amp;quot;URL&amp;quot; option, but not when loading links on the current page, hence this is probably useless. A different use-after-free with realloc triggers with loading any page at all regardless of method too(libcurl probably).&lt;br /&gt;
&lt;br /&gt;
* This WebKit build has &#039;&#039;a lot&#039;&#039; of crash-trigger bugs that only happen with [https://github.com/yellows8/3ds_browserhax_common webkitdebug] completely setup(addr accesses near 0x0), with &#039;&#039;just&#039;&#039; trying to load any page at all.&lt;/div&gt;</summary>
		<author><name>EvilFlight</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=FIRM&amp;diff=21174</id>
		<title>FIRM</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=FIRM&amp;diff=21174"/>
		<updated>2020-04-26T07:55:55Z</updated>

		<summary type="html">&lt;p&gt;EvilFlight: /* SAFE_MODE_FIRM */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page describes the file format for the [[Title list#00040138 - System Firmware|3DS&#039; Firmware]], it contains up to four &#039;sections&#039; of data comprising the ARM9 and ARM11 kernels, and some fundamental processes. The firmware sections are not encrypted. In a nutshell, a FIRM contains all the data required to set up the ARM9 and ARM11 kernels, and basic operating functionality.&lt;br /&gt;
&lt;br /&gt;
The ARM9 section contains the ARM9 kernel (and loader) and the Process9 NCCH (which is the only process run in user mode on the ARM9). The ARM11 sections contain the ARM11 kernel (and loader), and various ARM11 process NCCHs. For NATIVE_FIRM/SAFE_MODE_FIRM these ARM11 processes are sm, fs, pm, loader, and pxi. Normally the 4th section is not used. The code loaded from FIRM is constantly running on the system until another FIRM is launched. The ARM11 kernel is hard-coded to always decompress the ExeFS .code of embedded ARM11 NCCHs without checking the exheader compression bit.&lt;br /&gt;
&lt;br /&gt;
== FIRM Header ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  OFFSET&lt;br /&gt;
!  SIZE&lt;br /&gt;
!  DESCRIPTION&lt;br /&gt;
|-&lt;br /&gt;
|  0x000&lt;br /&gt;
|  4&lt;br /&gt;
|  Magic &#039;FIRM&#039;&lt;br /&gt;
|-&lt;br /&gt;
|  0x004&lt;br /&gt;
|  4&lt;br /&gt;
|  Boot priority (highest value = max prio), this is normally zero.&lt;br /&gt;
|-&lt;br /&gt;
|  0x008&lt;br /&gt;
|  4&lt;br /&gt;
|  ARM11 Entrypoint&lt;br /&gt;
|-&lt;br /&gt;
|  0x00C&lt;br /&gt;
|  4&lt;br /&gt;
|  ARM9 Entrypoint&lt;br /&gt;
|-&lt;br /&gt;
|  0x010&lt;br /&gt;
|  0x030&lt;br /&gt;
|  Reserved&lt;br /&gt;
|-&lt;br /&gt;
|  0x040&lt;br /&gt;
|  0x0C0 (0x030*4)&lt;br /&gt;
|  Firmware Section Headers&lt;br /&gt;
|-&lt;br /&gt;
|  0x100&lt;br /&gt;
|  0x100&lt;br /&gt;
|  RSA-2048 signature of the FIRM header&#039;s SHA-256 hash. The signature is checked when bootrom/Process9 are doing FIRM-launch (with the public key being hardcoded in each). The signature is not checked when installing FIRM to the NAND firm0/firm1 partitions.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Firmware Section Headers ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  OFFSET&lt;br /&gt;
!  SIZE&lt;br /&gt;
!  DESCRIPTION&lt;br /&gt;
|-&lt;br /&gt;
|  0x000&lt;br /&gt;
|  4&lt;br /&gt;
|  Byte offset&lt;br /&gt;
|-&lt;br /&gt;
|  0x004&lt;br /&gt;
|  4&lt;br /&gt;
|  Physical address where the section is loaded to.&lt;br /&gt;
|-&lt;br /&gt;
|  0x008&lt;br /&gt;
|  4&lt;br /&gt;
|  Byte-size.  While loading FIRM this is the field used to determine whether the section exists or not, by checking for value 0x0.&lt;br /&gt;
|-&lt;br /&gt;
|  0x00C&lt;br /&gt;
|  4&lt;br /&gt;
|  Copy-method (0 = NDMA, 1 = XDMA, 2 = CPU mem-copy), Process9 ignores this field. Boot9 doesn&#039;t immediately throw an error when this isn&#039;t 0..2. In that case it will jump over section-data-loading which then results in the hash verification with the below hash being done with the hash already stored in the SHA hardware.&lt;br /&gt;
|-&lt;br /&gt;
|  0x010&lt;br /&gt;
|  0x020&lt;br /&gt;
|  SHA-256 Hash of Firmware Section&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The contents of individual sections &#039;&#039;may&#039;&#039; be encrypted if the FIRM is not meant to be booted from NAND, i.e. if it is meant to be booted from SPI flash or NTR cartridge. If hash checks fail for all FIRM sections if treated as plaintext, it may be worth trying to check if the sections are encrypted. The encryption is detailed on [[Bootloader#Non-NAND_FIRM_boot|the bootloader page]].&lt;br /&gt;
&lt;br /&gt;
== [[New_3DS]] FIRM ==&lt;br /&gt;
For New3DS firmwares (NATIVE_FIRM, TWL_FIRM, ..), the ARM9 FIRM binary has an additional layer of crypto. At the end of each ARM9 binary, there&#039;s a plaintext loader. The format of the FIRM header is identical to regular 3DS FIRM(the RSA modulo is the same as regular 3DS too).&lt;br /&gt;
&lt;br /&gt;
Before checking [[CONFIG_Registers|CFG_SYSPROT9]] the loader main() does the following:&lt;br /&gt;
* On [[9.5.0-22|9.5.0-X]]: executes a nop instruction with r0=0 and r1=&amp;lt;address of arm9binhdr+0x50&amp;gt;.&lt;br /&gt;
* Clears bit6 in [[AES_Registers|REG_AESKEYCNT]].&lt;br /&gt;
&lt;br /&gt;
If [[CONFIG_Registers#CFG_SYSPROT9|CFG_SYSPROT9]] bit 1 is clear (which means the OTP area is unlocked and so it knows that this is a hard reboot), it does the following things:&lt;br /&gt;
* Clears 0x200-bytes on the stack, then reads [[Flash_Filesystem|NAND]] sector 0x96(NAND image offset 0x12C00), with size 0x200-bytes into that stack buffer.&lt;br /&gt;
* Checks [[CONFIG_Registers#CFG_SYSPROT9|CFG_SYSPROT9]] bit 1 again, if it&#039;s set then it executes a panic function(set r0-r2=0, execute nop instruction, then execute instruction &amp;quot;bkpt 0x99&amp;quot;).&lt;br /&gt;
* Hashes data from the OTP region [[IO_Registers|0x10012000-0x10012090]] using SHA256 via the [[SHA_Registers|SHA]] hardware.&lt;br /&gt;
* Clears bit6 in [[AES_Registers|REG_AESKEYCNT]]. Initializes AES keyslot 0x11 keyX, keyY to the lower and higher portion of the above hash, respectively. Due to the above hashed data, the keyX+keyY here are console-unique.&lt;br /&gt;
* Decrypts the first 0x10-byte block in the above read NAND sector with keyslot 0x11 using AES-ECB. [[9.6.0-24|9.6.0-X]]: Then it decrypts the 0x10-bytes at offset 0x10 in the sector with keyslot 0x11.&lt;br /&gt;
* Then the normalkey, keyX, and keyY, for keyslot 0x11 are cleared to zero. Runs the TWL key-init/etc code which was originally in the ARM9-kernel, then writes 0x2 to [[CONFIG_Registers|CFG_SYSPROT9]] to disable the OTP area.&lt;br /&gt;
* Then it uses the above decrypted block from sector+0 to set the normalkey for keyslot 0x11. Decrypts arm9_bin_buf+0 using keyslot 0x11 with AES-ECB, and initialises keyX for keyslot 0x15 with it.&lt;br /&gt;
* [[9.6.0-24|9.6.0-X]]: Then it uses the above decrypted block from sector+0 to set the normalkey for keyslot 0x11. Decrypts a 0x10-byte block from arm9loader .(ro)data using keyslot 0x11 with AES-ECB, and initializes keyX for keyslot 0x18 with it(same block as previous versions).&lt;br /&gt;
* [[9.6.0-24|9.6.0-X]]: Starting with this version keyslot 0x16 keyX init was moved here, see below for details on this. The code for this is same as  [[9.5.0-22|9.5.0-X]], except the decrypted normalkey from sector+0x10 is used for keyslot 0x11 instead.&lt;br /&gt;
* Initialises KeyX for keyslots 0x18..0x1F(0x19..0x1F with [[9.6.0-24|9.6.0-X]]) with the output of decrypting a 0x10-byte block with AES-ECB using keyslot 0x11. This block was changed to a new one separate from keyslot 0x18, starting with [[9.6.0-24|9.6.0-X]]. The last byte in this 0x10-byte input block is increased by 0x01 after initializing each keyslot. Before doing the crypto each time, the loader sets the normal-key for keyslot 0x11 to the plaintext normalkey from sector+0(+0x10 with [[9.6.0-24|9.6.0-X]]). These are New3DS-specific keys.&lt;br /&gt;
* [[9.5.0-22|9.5.0-X]](moved to above with [[9.6.0-24|9.6.0-X]]): Sets the normal-key for keyslot 0x11 to the same one already decrypted on the stack. Decrypts the 0x10-byte block at arm9binhdr+0x60 with AES-ECB using keyslot 0x11, then sets the keyX for keyslot 0x16 to the output data.&lt;br /&gt;
* [[9.5.0-22|9.5.0-X]]: The normalkey, keyX, and keyY, for keyslot 0x11 are then cleared to zero.&lt;br /&gt;
&lt;br /&gt;
When [[CONFIG_Registers#CFG_SYSPROT9|CFG_SYSPROT9]] bit 1 is set(which means this happens only when this loader runs again for firm-launch), the normalkey, keyX, and keyY, for keyslot 0x11 are cleared to zero.&lt;br /&gt;
&lt;br /&gt;
It sets KeyY for keyslot 0x15(0x16 with [[9.5.0-22|9.5.0-X]]) to arm9_bin_buf+16, the CTR to arm9_bin_buf+32 (both are unique for every version). It then proceeds to decrypt the binary with AES-CTR. When done, it sets the normal-key for the keyslot used for binary decryption to zeros. It then decrypts arm9_bin_buf+64 using an hardcoded keyY for keyslot 0x15([[9.5.0-22|9.5.0-X]]/[[9.6.0-24|9.6.0-X]] also uses keyslot 0x15), sets the normal-key for this keyslot to zeros again, then makes sure the output block is all zeroes. If it is, it does some cleanup then it jumps to the entrypoint for the decrypted binary. Otherwise it will clear the keyX, keyY, and normal-key for each of the keyslots initialized by this loader (on [[9.6.0-24|9.6.0-X]]+, on older versions this was bugged and cleared keys 0x00..0x07 instead of 0x18..0x1F), do cleanup(same cleanup as when the decrypted block is all-zero) then just loop forever.&lt;br /&gt;
&lt;br /&gt;
Thus, the ARM9 binary has the following header:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  OFFSET&lt;br /&gt;
!  SIZE&lt;br /&gt;
!  DESCRIPTION&lt;br /&gt;
|-&lt;br /&gt;
|  0x000&lt;br /&gt;
|  16&lt;br /&gt;
|  Encrypted KeyX (same for all FIRM&#039;s)&lt;br /&gt;
|-&lt;br /&gt;
|  0x010&lt;br /&gt;
|  16&lt;br /&gt;
|  KeyY&lt;br /&gt;
|-&lt;br /&gt;
|  0x020&lt;br /&gt;
|  16&lt;br /&gt;
|  CTR&lt;br /&gt;
|-&lt;br /&gt;
|  0x030&lt;br /&gt;
|  8&lt;br /&gt;
|  Size of encrypted binary, as ASCII text?&lt;br /&gt;
|-&lt;br /&gt;
|  0x038&lt;br /&gt;
|  8&lt;br /&gt;
|  ?&lt;br /&gt;
|-&lt;br /&gt;
|  0x040&lt;br /&gt;
|  16&lt;br /&gt;
|  Control block&lt;br /&gt;
|-&lt;br /&gt;
|  0x050&lt;br /&gt;
|  16&lt;br /&gt;
|  Added with [[9.5.0-22|9.5.0-X]]. Only used for hardware debugging: a nop instruction is executed with r0=0 and r1=&amp;lt;address of this data&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
|  0x060&lt;br /&gt;
|  16&lt;br /&gt;
|  Added with [[9.5.0-22|9.5.0-X]]. Encrypted keyX for keyslot 0x16.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Originally the padding after the header before offset 0x800(start of actual ARM9-binary) was 0xFF bytes, with [[9.5.0-22|9.5.0-X]] this was changed to 0x0.&lt;br /&gt;
&lt;br /&gt;
For the New3DS NATIVE_FIRM arm9-section header, the only difference between the [[8.1.0-0_New3DS]] version and the [[9.0.0-20]] version is that the keyY, CTR, and the block at 0x30 in the header were updated.&lt;br /&gt;
&lt;br /&gt;
===New3DS ARM9 binary loader versions===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  FIRM system version(s)&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| [[8.1.0-0_New3DS]] - [[9.3.0-21|9.3.0-X]]&lt;br /&gt;
| Initial version.&lt;br /&gt;
|-&lt;br /&gt;
| [[9.5.0-22|9.5.0-X]]&lt;br /&gt;
| Added keyX initialization for keyslot 0x16(see above), and added code for clearing keyslot 0x11 immediately after the code finishes using keyslot 0x11. The keyslot used for arm9bin decryption was changed from 0x15 to 0x16. Added code for clearing keyslot 0x16 when control-block decryption fails. Added code for using arm9bin_hdr+0x50 with a nop instruction, at the very beginning of the main arm9-loader function. Added two new 0x10-blocks to the arm9bin-hdr.&lt;br /&gt;
|-&lt;br /&gt;
| [[9.6.0-24|9.6.0-X]] - [[11.3.0-36|11.3.0-X]]&lt;br /&gt;
| See above and [[9.6.0-24|here]].&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===New3DS ARM9 kernel===&lt;br /&gt;
The only actual code-difference for the Old3DS/New3DS ARM9-kernels&#039; crt0, besides TWL AES / [[IO_Registers|0x10012000]] related code, is that the New3DS ARM9-kernel writes 0x1 to [[CONFIG_Registers|REG_EXTMEMCNT9]] in the crt0.&lt;br /&gt;
&lt;br /&gt;
===New3DS Process9===&lt;br /&gt;
The following is all of the differences for Old3DS/New3DS Process9 with [[9.3.0-21|9.3.0-X]]:&lt;br /&gt;
* The FIRM-launch code called at the end of the New3DS proc9 main() has different mem-range checks.&lt;br /&gt;
* In the New3DS proc9, the v6.0/v7.0 keyinit function at the very beginning(before the original code) had additional code added for setting [[Flash_Filesystem|CTRNAND]] [[AES_Registers|keyslot]] 0x5, with keydata from .data. After setting the keyY, the keyY in .data is cleared.&lt;br /&gt;
* In New3DS proc9, the functions for getting the gamecard crypto keyslots / NCCH keyslot can return New3DS keyslots when New3DS flags(NCSD/NCCH) are set.&lt;br /&gt;
* The code/data for the binary near the end of arm9mem is slightly different, because of memory-region sizes.&lt;br /&gt;
* The only difference in .data(besides the above code binary) is that the New3DS proc9 has an additional 0x10-byte block for the keyslot 0x5 keyY, see above.&lt;br /&gt;
&lt;br /&gt;
== Variations ==&lt;br /&gt;
There exists different official firmwares for the 3DS: The default one (NATIVE_FIRM) is used to run all 3DS content and boots by default, while backwards compatibility is handled by TWL_FIRM and AGB_FIRM. There furthermore is a rescue mode provided by SAFE_MODE_FIRM.&lt;br /&gt;
&lt;br /&gt;
=== NATIVE_FIRM ===&lt;br /&gt;
NATIVE_FIRM is the FIRM which is installed to the [[Flash_Filesystem|NAND]] firm partitions, which is loaded by bootrom.&lt;br /&gt;
&lt;br /&gt;
Version history:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  System version&lt;br /&gt;
!  old 3DS title version&lt;br /&gt;
!  old 3DS hex title contentID&lt;br /&gt;
!  Kernel/FIRM version (old 3DS/new 3DS)&lt;br /&gt;
!  FIRM ARM11-sysmodule Product Code&lt;br /&gt;
|-&lt;br /&gt;
| [[Factory_Setup|Factory]] FIRM (titleID 00040001-00000002)&lt;br /&gt;
| v0&lt;br /&gt;
| 00&lt;br /&gt;
| 2.3-0&lt;br /&gt;
|-&lt;br /&gt;
| Pre-1.0. Referenced in the v1.0 Home Menu NCCH plain-region.&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| 2.23-X&lt;br /&gt;
|-&lt;br /&gt;
| [[1.0.0-0|1.0.0]]&lt;br /&gt;
| v432&lt;br /&gt;
| 00&lt;br /&gt;
| 2.27-0&lt;br /&gt;
|-&lt;br /&gt;
| [[1.1.0-1|1.1.0]]&lt;br /&gt;
| v1472&lt;br /&gt;
| 02&lt;br /&gt;
| 2.28-0&lt;br /&gt;
|-&lt;br /&gt;
| [[2.0.0-2|2.0.0]]&lt;br /&gt;
| v2516&lt;br /&gt;
| 09&lt;br /&gt;
| 2.29-7&lt;br /&gt;
|-&lt;br /&gt;
| [[2.1.0-3|2.1.0]]&lt;br /&gt;
| v3553&lt;br /&gt;
| 0B&lt;br /&gt;
| 2.30-18&lt;br /&gt;
| 0608builder&lt;br /&gt;
|-&lt;br /&gt;
| [[2.2.0-X|2.2.0]]&lt;br /&gt;
| v4595&lt;br /&gt;
| 0F&lt;br /&gt;
| 2.31-40&lt;br /&gt;
| 0909builder&lt;br /&gt;
|-&lt;br /&gt;
| [[3.0.0-5|3.0.0]]&lt;br /&gt;
| v5647&lt;br /&gt;
| 18&lt;br /&gt;
| 2.32-15&lt;br /&gt;
| 1128builder&lt;br /&gt;
|-&lt;br /&gt;
| [[4.0.0-7|4.0.0]]&lt;br /&gt;
| v6677&lt;br /&gt;
| 1D&lt;br /&gt;
| 2.33-4&lt;br /&gt;
| 0406builder&lt;br /&gt;
|-&lt;br /&gt;
| [[4.1.0-8|4.1.0]]&lt;br /&gt;
| v7712&lt;br /&gt;
| 1F&lt;br /&gt;
| 2.34-0&lt;br /&gt;
| 0508builder&lt;br /&gt;
|-&lt;br /&gt;
| [[5.0.0-11|5.0.0]]&lt;br /&gt;
| v8758&lt;br /&gt;
| 25&lt;br /&gt;
| 2.35-6&lt;br /&gt;
| 0228builder&lt;br /&gt;
|-&lt;br /&gt;
| [[5.1.0-11|5.1.0]]&lt;br /&gt;
| v9792&lt;br /&gt;
| 26&lt;br /&gt;
| 2.36-0&lt;br /&gt;
| 0401builder&lt;br /&gt;
|-&lt;br /&gt;
| [[6.0.0-11|6.0.0]]&lt;br /&gt;
| v10833&lt;br /&gt;
| 29&lt;br /&gt;
| 2.37-0&lt;br /&gt;
| 0520builder&lt;br /&gt;
|-&lt;br /&gt;
| [[6.1.0-11|6.1.0]]&lt;br /&gt;
| v11872&lt;br /&gt;
| 2A&lt;br /&gt;
| 2.38-0&lt;br /&gt;
| 0625builder&lt;br /&gt;
|-&lt;br /&gt;
| [[7.0.0-13|7.0.0]]&lt;br /&gt;
| v12916&lt;br /&gt;
| 2E&lt;br /&gt;
| 2.39-4&lt;br /&gt;
| 1125builder&lt;br /&gt;
|-&lt;br /&gt;
| [[7.2.0-17|7.2.0]]&lt;br /&gt;
| v13956&lt;br /&gt;
| 30&lt;br /&gt;
| 2.40-0&lt;br /&gt;
| 0404builder&lt;br /&gt;
|-&lt;br /&gt;
| [[8.0.0-18|8.0.0]]&lt;br /&gt;
| v15047&lt;br /&gt;
| 37&lt;br /&gt;
| 2.44-6&lt;br /&gt;
| 0701builder&lt;br /&gt;
|-&lt;br /&gt;
| [[8.1.0-0_New3DS]]&lt;br /&gt;
|N/A&lt;br /&gt;
|N/A&lt;br /&gt;
| 2.45-5&lt;br /&gt;
|-&lt;br /&gt;
| [[9.0.0-20|9.0.0]]&lt;br /&gt;
| v17120&lt;br /&gt;
| 38&lt;br /&gt;
| 2.46-0&lt;br /&gt;
| 0828builder&lt;br /&gt;
|-&lt;br /&gt;
| [[9.3.0-21|9.3.0]]&lt;br /&gt;
| v18182&lt;br /&gt;
| 3F&lt;br /&gt;
| 2.48-3&lt;br /&gt;
| 1125builder&lt;br /&gt;
|-&lt;br /&gt;
| [[9.5.0-22|9.5.0]]&lt;br /&gt;
| v19216&lt;br /&gt;
| 40&lt;br /&gt;
| 2.49-0&lt;br /&gt;
| 0126builder&lt;br /&gt;
|-&lt;br /&gt;
| [[9.6.0-24|9.6.0]]&lt;br /&gt;
| v20262&lt;br /&gt;
| 49&lt;br /&gt;
| 2.50-1&lt;br /&gt;
| 0311builder&lt;br /&gt;
|-&lt;br /&gt;
| [[10.0.0-27|10.0.0]]&lt;br /&gt;
| v21288&lt;br /&gt;
| 4B&lt;br /&gt;
| 2.50-7&lt;br /&gt;
| 0812builder&lt;br /&gt;
|-&lt;br /&gt;
| [[10.2.0-28|10.2.0]]&lt;br /&gt;
| v22313&lt;br /&gt;
| 4C&lt;br /&gt;
| 2.50-9&lt;br /&gt;
| 1009builder&lt;br /&gt;
|-&lt;br /&gt;
| [[10.4.0-29|10.4.0]]&lt;br /&gt;
| v23341&lt;br /&gt;
| 50&lt;br /&gt;
| 2.50-11&lt;br /&gt;
| 1224builder&lt;br /&gt;
|-&lt;br /&gt;
| [[11.0.0-33|11.0.0]]&lt;br /&gt;
| v24368&lt;br /&gt;
| 52&lt;br /&gt;
| 2.51-0&lt;br /&gt;
| 0406builder&lt;br /&gt;
|-&lt;br /&gt;
| [[11.1.0-34|11.1.0]]&lt;br /&gt;
| v25396&lt;br /&gt;
| 56&lt;br /&gt;
| 2.51-2&lt;br /&gt;
| 0805builder&lt;br /&gt;
|-&lt;br /&gt;
| [[11.2.0-35|11.2.0]]&lt;br /&gt;
| v26432&lt;br /&gt;
| 58&lt;br /&gt;
| 2.52-0&lt;br /&gt;
| 1015builder&lt;br /&gt;
|-&lt;br /&gt;
| [[11.3.0-36|11.3.0]]&lt;br /&gt;
| v27476&lt;br /&gt;
| 5C&lt;br /&gt;
| 2.53-0&lt;br /&gt;
| 0126builder&lt;br /&gt;
|-&lt;br /&gt;
| [[11.4.0-37|11.4.0]]&lt;br /&gt;
| v28512&lt;br /&gt;
| 5E&lt;br /&gt;
| 2.54-0&lt;br /&gt;
| 0314builder&lt;br /&gt;
|-&lt;br /&gt;
| [[11.8.0-41|11.8.0]]&lt;br /&gt;
| v29557&lt;br /&gt;
| 64&lt;br /&gt;
| 2.55-0&lt;br /&gt;
| 0710pseg-ciuser&lt;br /&gt;
|-&lt;br /&gt;
| [[11.12.0-44|11.12.0]]&lt;br /&gt;
| v30593&lt;br /&gt;
| 66&lt;br /&gt;
| 2.56-0&lt;br /&gt;
| 1021pseg-ciuser&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The above kernel/FIRM versions are in the format: &amp;lt;KERNEL_VERSIONMAJOR&amp;gt;.&amp;lt;KERNEL_VERSIONMINOR&amp;gt;-&amp;lt;KERNEL_VERSIONREVISION&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== SAFE_MODE_FIRM ===&lt;br /&gt;
SAFE_MODE is used for running the [[System_Settings#System_Updater|System Updater]]. SAFE_MODE_FIRM and NATIVE_FIRM for the initial versions are exactly the same, except for the system core version fields. Kernel/FIRM versions for SAFE_MODE_FIRM are: (old3ds) v432 = 3.27-0, v5632 = 3.32-0, (new3ds) v16081 = 3.45-3.&lt;br /&gt;
&lt;br /&gt;
=== TWL_FIRM ===&lt;br /&gt;
TWL_FIRM handles DS(i) backwards compatibility.&lt;br /&gt;
&lt;br /&gt;
The 3DS-mode ARM9 core seems to switch into DSi-mode(for running DSi-mode ARM9 code) by writing to a [[PDN]] register(this changes the memory layout to DSi-mode / etc, therefore this register poke *must* be executed from ITCM). This is the final 3DS-mode register poke before the ARM9 switches into DSi-mode. DS(i)-mode ARM7 code is run on the internal [[ARM7]] core, which is started up during TWL_FIRM boot. Trying to read from the exception-vector region(address 0x0) under this DSi-mode ARM7 seems to only return 0x00/0xFF data. Also note that this DSi-mode ARM7 runs code(stored in TWL_FIRM) which pokes some DSi-mode registers that on the DSi were used for disabling access to the DSi bootROMs, however these registers do not affect the 3DS DSi-mode ARM9/ARM7 &amp;quot;bootrom&amp;quot; region(exceptionvector region + 0x8000) at all.&lt;br /&gt;
&lt;br /&gt;
For shutting down the system, TWL_FIRM writes u8 value 8 to [[I2C]] MCU register 0x20. For returning to 3DS-mode, TWL_FIRM writes value 4 to that MCU register to trigger a hardware system reboot.&lt;br /&gt;
&lt;br /&gt;
The TWL_FIRM ARM11-process includes a TWL bootloader, see [http://dsibrew.org/wiki/Bootloader here] and [[Memory_layout#Detailed_TWL_FIRM_ARM11_Memory|here]] for details.&lt;br /&gt;
&lt;br /&gt;
TWL_FIRM verifies all TWL RSA padding with the following. This is different from the DSi &amp;quot;BIOS&amp;quot; code.&lt;br /&gt;
* The first byte must be 0x0.&lt;br /&gt;
* The second byte must be 0x1 or 0x2.&lt;br /&gt;
* Executes a while(&amp;lt;value of byte at current pos in RSA message&amp;gt;). When the second_byte in the message is 0x1, the byte at curpos must be 0xFF(otherwise the non-zero value of the byte at curpos doesn&#039;t matter). This loop must find a zero byte before offset 0x7F in the message otherwise an error is returned.&lt;br /&gt;
* Returns an address for msg_curpos+1.&lt;br /&gt;
totalhashdatasize = rsasig_bytesize - above position in the message for the hashdata. The actual &amp;quot;totalhashdatasize&amp;quot; in the RSA message must be &amp;lt;= &amp;lt;expected hashdata_size&amp;gt;(0x74 for bootloader). The TWL_FIRM code copies the RSA &amp;quot;hashdata&amp;quot; to the output buffer, using the actual size of the RSA &amp;quot;hashdata&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== AGB_FIRM ===&lt;br /&gt;
AGB_FIRM handles running GBA VC titles. The ARM9 FIRM section for TWL_FIRM and AGB_FIRM are exactly the same (for TWL_FIRM and AGB_FIRM versions which were updated with the same system-update).&lt;br /&gt;
&lt;br /&gt;
== FIRM Launch Parameters ==&lt;br /&gt;
The FIRM-launch parameters structure is located at FCRAM+0, size 0x1000-bytes. The ARM11-kernel copies this structure elsewhere, then clears the 0x1000-bytes at FCRAM+0. It will not handle an existing structure at FCRAM+0 if [[CONFIG Registers#CFG_BOOTENV|CFG_BOOTENV]] is zero. The ARM9 kernel [[Configuration_Memory#0x1FF80016|writes some values]] about the boot environment to AXI WRAM during init to enable this.&lt;br /&gt;
&lt;br /&gt;
Note: it seems NATIVE_FIRM ARM11-kernel didn&#039;t parse this during boot until [[3.0.0-5|3.0.0-X]]?&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  OFFSET&lt;br /&gt;
!  SIZE&lt;br /&gt;
!  DESCRIPTION&lt;br /&gt;
|-&lt;br /&gt;
| 0x300&lt;br /&gt;
| 0x100&lt;br /&gt;
| &#039;TLNC&#039; block created by TWL applications, handled by NS for backwards-compatibility purposes. See [[NS#Auto-boot|here]] for more info.&lt;br /&gt;
|-&lt;br /&gt;
| 0x400&lt;br /&gt;
| 0x4&lt;br /&gt;
| Flags&lt;br /&gt;
|-&lt;br /&gt;
| 0x410&lt;br /&gt;
| 0xC&lt;br /&gt;
| This is used for overriding the FIRM_* fields in [[Configuration_Memory]], when the flag listed below is set, in the following order(basically just data-copy from here to 0x1FF80060): &amp;quot;FIRM_?&amp;quot;, FIRM_VERSIONREVISION, FIRM_VERSIONMINOR, FIRM_VERSIONMAJOR, FIRM_SYSCOREVER, and FIRM_CTRSDKVERSION.&lt;br /&gt;
|-&lt;br /&gt;
| 0x438&lt;br /&gt;
| 0x4&lt;br /&gt;
| The kernel checks this field for value 0xFFFF, if it matches the kernel uses the rest of these parameter fields, otherwise FIRM-launch parameters fields are ignored by the kernel.&lt;br /&gt;
|-&lt;br /&gt;
| 0x43C&lt;br /&gt;
| 0x4&lt;br /&gt;
| CRC32, this is calculated starting at FIRM-params offset 0x400, with size 0x140(with this field cleared to zero during calculation). When invalid the kernel clears the entire buffer used for storing the FIRM-params, therefore no actual FIRM-params are handled after that.&lt;br /&gt;
|-&lt;br /&gt;
| 0x440&lt;br /&gt;
| 0x10&lt;br /&gt;
| Titleinfo [[Filesystem_services#ProgramInfo|Program Info]], used by NS during NS startup, to launch the specified title when the below flag is set.&lt;br /&gt;
|-&lt;br /&gt;
| 0x450&lt;br /&gt;
| 0x10&lt;br /&gt;
| Titleinfo [[Filesystem_services#ProgramInfo|Program Info]]. This might be used for returning to the specified title, once the above launched title terminates?&lt;br /&gt;
|-&lt;br /&gt;
| 0x460&lt;br /&gt;
| 0x4&lt;br /&gt;
| Bit0: 0 = titleinfo structure isn&#039;t set, 1 = titleinfo structure is set.&lt;br /&gt;
|-&lt;br /&gt;
| 0x480&lt;br /&gt;
| 0x20&lt;br /&gt;
| This can be set via buf1 for [[APT:SendDeliverArg]]/[[APT:StartApplication]].&lt;br /&gt;
|-&lt;br /&gt;
| 0x4A0&lt;br /&gt;
| 0x10&lt;br /&gt;
| This can be set by [[NSS:SetWirelessRebootInfo]].&lt;br /&gt;
|-&lt;br /&gt;
| 0x4B0&lt;br /&gt;
| 0x14&lt;br /&gt;
| SHA1-HMAC of the banner for TWL/NTR titles. This can be set by [[NSS:SetTWLBannerHMAC]].&lt;br /&gt;
|-&lt;br /&gt;
| 0x500&lt;br /&gt;
| 0x40&lt;br /&gt;
| This is used by [[APT:LoadSysMenuArg]] and [[APT:StoreSysMenuArg]].&lt;br /&gt;
|-&lt;br /&gt;
| 0xD70&lt;br /&gt;
| 0x290&lt;br /&gt;
| [[Config Savegame|Config]] data struct for LGY FIRM.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Flags from offset 0x400:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  OFFSET&lt;br /&gt;
!  SIZE&lt;br /&gt;
!  DESCRIPTION&lt;br /&gt;
|-&lt;br /&gt;
| 0x0&lt;br /&gt;
| 0x1&lt;br /&gt;
| This can be used for overriding the default FCRAM [[Memory_layout|memory-regions]] allocation sizes(APPLICATION, SYSTEM, and BASE). The values for this is the same as [[Configuration_Memory#APPMEMTYPE|Configmem-APPMEMTYPE]]. Values 0-1 are handled the same way by the kernel. However for NS, 0=titleinfo structure for launching a title isn&#039;t set, while non-zero=titleinfo structure is set.&lt;br /&gt;
|-&lt;br /&gt;
| 0x1&lt;br /&gt;
| 0x3&lt;br /&gt;
| Setting bit0 here enables overriding the FIRM_* fields in [[Configuration_Memory]].&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[Config Savegame|Config]] struct for booting LGY FIRMs from offset 0xD70:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  OFFSET&lt;br /&gt;
!  SIZE&lt;br /&gt;
!  DESCRIPTION&lt;br /&gt;
|-&lt;br /&gt;
| 0x0&lt;br /&gt;
| 0x1&lt;br /&gt;
| Config block 0x30000.&lt;br /&gt;
|-&lt;br /&gt;
| 0x1&lt;br /&gt;
| 0x1&lt;br /&gt;
| Config block 0x70001.&lt;br /&gt;
|-&lt;br /&gt;
| 0x2&lt;br /&gt;
| 0x1&lt;br /&gt;
| System language (Config block 0xA0002).&lt;br /&gt;
|-&lt;br /&gt;
| 0x3&lt;br /&gt;
| 0x1&lt;br /&gt;
| [[Cfg:SecureInfoGetRegion|Region from SecureInfo]] (&amp;quot;pseudo-block&amp;quot; 0x140000 in LGY FIRM).&lt;br /&gt;
|-&lt;br /&gt;
| 0x4&lt;br /&gt;
| 0xF&lt;br /&gt;
| [[CfgS:SecureInfoGetSerialNo|Serial number from SecureInfo]] (&amp;quot;pseudo-block&amp;quot; 0x140001 in LGY FIRM).&lt;br /&gt;
|-&lt;br /&gt;
| 0x13&lt;br /&gt;
| 0x1&lt;br /&gt;
| Config block 0x100002.&lt;br /&gt;
|-&lt;br /&gt;
| 0x14&lt;br /&gt;
| 0x10&lt;br /&gt;
| Config block 0x100003.&lt;br /&gt;
|-&lt;br /&gt;
| 0x24&lt;br /&gt;
| 0x2&lt;br /&gt;
| Config block 0x100000.&lt;br /&gt;
|-&lt;br /&gt;
| 0x26&lt;br /&gt;
| 0x1&lt;br /&gt;
| Cleared to zero.&lt;br /&gt;
|-&lt;br /&gt;
| 0x27&lt;br /&gt;
| 0x1&lt;br /&gt;
| Cleared to zero.&lt;br /&gt;
|-&lt;br /&gt;
| 0x28&lt;br /&gt;
| 0x94&lt;br /&gt;
| Config block 0x100001.&lt;br /&gt;
|-&lt;br /&gt;
| 0xBC&lt;br /&gt;
| 0x2&lt;br /&gt;
| Config block 0x50000.&lt;br /&gt;
|-&lt;br /&gt;
| 0xBE&lt;br /&gt;
| 0x2&lt;br /&gt;
| Config block 0x50001.&lt;br /&gt;
|-&lt;br /&gt;
| 0xC0&lt;br /&gt;
| 0x38&lt;br /&gt;
| Config block 0x50002.&lt;br /&gt;
|-&lt;br /&gt;
| 0xF8&lt;br /&gt;
| 0x20&lt;br /&gt;
| Config block 0x50004.&lt;br /&gt;
|-&lt;br /&gt;
| 0x118&lt;br /&gt;
| 0x134&lt;br /&gt;
| Config block 0x20000.&lt;br /&gt;
|-&lt;br /&gt;
| 0x24C&lt;br /&gt;
| 0x10&lt;br /&gt;
| Config block 0x40000.&lt;br /&gt;
|-&lt;br /&gt;
| 0x25C&lt;br /&gt;
| 0x1C&lt;br /&gt;
| Config block 0x40001.&lt;br /&gt;
|-&lt;br /&gt;
| 0x278&lt;br /&gt;
| 0x4&lt;br /&gt;
| Cleared to zero.&lt;br /&gt;
|-&lt;br /&gt;
| 0x27C&lt;br /&gt;
| 0x4&lt;br /&gt;
| Cleared to zero.&lt;br /&gt;
|-&lt;br /&gt;
| 0x280&lt;br /&gt;
| 0x8&lt;br /&gt;
| Config block 0x30001.&lt;br /&gt;
|-&lt;br /&gt;
| 0x288&lt;br /&gt;
| 0x2&lt;br /&gt;
| CRC16 over the above fields from offset 0x0, size 0x288. If not valid, LGY FIRM uses dummy data from .(ro)data.&lt;br /&gt;
|-&lt;br /&gt;
| 0x28A&lt;br /&gt;
| 0x2&lt;br /&gt;
| If non-zero, the size (below) is hardcoded (currently) to value 0x288, otherwise the size field below is used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x28C&lt;br /&gt;
| 0x4&lt;br /&gt;
| Value 0x288 (size used for verifying the CRC16).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Cleared to zero&amp;quot; fields above are not read at all by LGY FIRM.&lt;/div&gt;</summary>
		<author><name>EvilFlight</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=3DS_Userland_Flaws&amp;diff=21173</id>
		<title>3DS Userland Flaws</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=3DS_Userland_Flaws&amp;diff=21173"/>
		<updated>2020-04-26T06:15:53Z</updated>

		<summary type="html">&lt;p&gt;EvilFlight: /* System applications */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page lists vulnerabilities / exploits for 3DS applications and applets. Exploiting these initially results in ROP, from that ROP one can then for example try exploiting [[3DS_System_Flaws|system]] flaw(s).&lt;br /&gt;
&lt;br /&gt;
=Non-system applications=&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Application name&lt;br /&gt;
!  Summary&lt;br /&gt;
!  Description&lt;br /&gt;
!  Fixed in app/system version&lt;br /&gt;
!  Last app/system version this flaw was checked for&lt;br /&gt;
!  Timeframe info related to this was added to wiki&lt;br /&gt;
!  Timeframe this vuln was discovered&lt;br /&gt;
!  Vuln discovered by&lt;br /&gt;
|-&lt;br /&gt;
| Cubic Ninja&lt;br /&gt;
| Map-data stack smash&lt;br /&gt;
| See [[Ninjhax|here]] regarding Ninjhax.&lt;br /&gt;
| None&lt;br /&gt;
| App: Initial version. System: [[10.4.0-29]].&lt;br /&gt;
| Ninjhax release&lt;br /&gt;
| July 2014&lt;br /&gt;
| [[User:smea|smea]]&lt;br /&gt;
|-&lt;br /&gt;
| The Legend of Zelda: Ocarina of Time 3D&lt;br /&gt;
| UTF-16 name string buffer overflow via unchecked u8 length field&lt;br /&gt;
| The u8 at offset 0x2C in the savefile is the character-length of the UTF-16 string at offset 0x1C. When copying this string, it&#039;s essentially a memory-copy with lenval*2, not a string-copy. This can be used to trigger buffer overflows at various locations depending on the string length.&lt;br /&gt;
* When value is &amp;gt;=0x6E it crashes when saving the saveslot, this causes a stack-smash however it normally crashes before it returns from the function which had the stack-frame overwritten.&lt;br /&gt;
* With value &amp;gt;=0x9A, it crashes via stack-smash in-game once any dialogs are opened(touching buttons on the touch-screen can trigger it too).&lt;br /&gt;
* Length value&amp;gt;=0xCD causes a crash while loading the saveslot, via a heap buffer overflow. This buf-overflow overwrites a heap memchunk following the allocated buffer. When the first 16-bits overwriting that heap memchunk is not the memchunk magic-number(0x7373), the mem-alloc code will just return a NULL ptr which later results in a crash. When the magic-number is valid, the mem-alloc code will continue to attempt to parse the memchunk, which may crash depending on the data which overwrote the memchunk. This heap code is separate from the CTRSDK heap code. Exploiting this doesn&#039;t seem to be possible: since the heap code actually verifies that the magic-number for the next/prev memchunk ptrs are correct(unlike CTRSDK), it&#039;s not possible to change those ptrs to useful arbitrary addresses outside of savedata(like with triggering a write to a c++ object ptr which later is used with a vtable func-call, this is what one would do with CTRSDK heap here).&lt;br /&gt;
&lt;br /&gt;
On March 11, 2015, an exploit using this vuln was released, that one was intended for warez/etc. The following exploit wasn&#039;t released before then mainly because doing so would (presumably) result in the vuln being fixed. The following old exploit was released on March 14, 2015: [https://github.com/yellows8/oot3dhax].&lt;br /&gt;
| None&lt;br /&gt;
| App: Initial version. System: [[10.6.0-31]].&lt;br /&gt;
| March 11, 2015&lt;br /&gt;
| Around October 22, 2012&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| Super Smash Bros 3DS&lt;br /&gt;
| Buffer overflow in local-multiplayer beacon handling.&lt;br /&gt;
| See [[smashbroshax|here]].&lt;br /&gt;
| App: v1.1.3&lt;br /&gt;
| See [[smashbroshax|here]]. System: [[10.3.0-28]].&lt;br /&gt;
| Time of exploit release.&lt;br /&gt;
| See [[smashbroshax|here]].&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| Pokemon Super Mystery Dungeon&lt;br /&gt;
| Heap overflow within linear memory via unchecked save file length&lt;br /&gt;
| Pokemon Super Mystery Dungeon uses zlib compression for most of its save files, possibly due to the save files being larger than its predecessor, Gates to Infinity. When a save file is being prepared to be loaded and read from, only a 0x32000 large buffer is allocated for file reading, and a 0x3e800-large buffer for decompression is also allocated before the file is read. However, the game does not limit the size of the file read to this allocation bound, allowing for the file to overflow into the linear memory heap and into the next allocation. Since Pokemon Super Mystery Dungeon stores allocation memchunks directly before the allocation, overwriting the next memchunk with a corrupted one allows for arbitrary writes of linear heap pointers when the next buffer is allocated or arbitrary writes of any pointer within writable memory when the corrupted buffer is freed.&lt;br /&gt;
| None&lt;br /&gt;
| O3DS: [[11.3.0-36]]. N3DS: [[11.4.0-37]].&lt;br /&gt;
| Time of exploit release.&lt;br /&gt;
| April 14, 2016&lt;br /&gt;
| [[User:Shinyquagsire23|Shiny Quagsire]]&lt;br /&gt;
|-&lt;br /&gt;
| VVVVVV&lt;br /&gt;
| Buffer overflow in XML save file array parsing&lt;br /&gt;
| VVVVVV utilizes several XML files (renamed with a .vvv extension) to store level save data, stats and settings. Within these XML files are several tags containing an array of data which, when parsed, is not properly checked to be of proper length for the tag being parsed from. This allows for an overflow of 16-bit array values from the location where the array is parsed. With unlock.vvv, XML data is parsed to the stack, and with level saves the heap. This allows for the pointer where the level save worldmap tag array should be parsed into to be overwritten with a stack address, allowing for ROP from within the XML array parsing function on the next level load.&lt;br /&gt;
| App: v1.1&lt;br /&gt;
| [[10.7.0-32]].&lt;br /&gt;
| Time of exploit release.&lt;br /&gt;
| April 25, 2016&lt;br /&gt;
| [[User:Shinyquagsire23|Shiny Quagsire]]&lt;br /&gt;
|-&lt;br /&gt;
| Citizens of Earth&lt;br /&gt;
| Save file read stack smash&lt;br /&gt;
| Citizens of Earth also uses &amp;quot;XML&amp;quot; files for saves, which are actually entirely binary data (not XML at all) with no checksums. These files are read from the filesystem on to a fixed size stack buffer which leads to an incredibly trivial stack smash. When using the autosave slot for this, the save is parsed when the user selects &amp;quot;continue&amp;quot;. When using one of the dedicated save slots (1-3), the save is parsed shortly after the company splash screens fade. Note that the save is read quite high (descending) on the stack - when exploiting this, one would likely need to move SP due to almost instantly overflowing the physical stack.&lt;br /&gt;
| None&lt;br /&gt;
| [[10.7.0-32]].&lt;br /&gt;
| Time of exploit release.&lt;br /&gt;
| May 5, 2016&lt;br /&gt;
| [[User:Dazzozo|Dazzozo]]&lt;br /&gt;
|-&lt;br /&gt;
| SmileBASIC 3.x&lt;br /&gt;
| Poor parameter validation on &amp;quot;BGSCREEN&amp;quot; command&lt;br /&gt;
| The SmileBASIC &amp;quot;BGSCREEN&amp;quot; command&#039;s second parameter is not properly validated as being within range.  As a result, one can set the screen size to an absurdly large value.  This means that the &amp;quot;BGGET&amp;quot; and &amp;quot;BGPUT&amp;quot; commands can then be used on out-of-range values to read and write a significant chunk of the interpreter&#039;s address space.&lt;br /&gt;
With a series of carefully-designed BGPUT commands, one can build a ROP chain and cause it to be executed.&lt;br /&gt;
| App: 3.3.2.&lt;br /&gt;
| System: [[11.0.0-33]].&lt;br /&gt;
| July 20, 2016&lt;br /&gt;
| Around June 26, 2016&lt;br /&gt;
| slackerSnail, 12Me12, incvoid&lt;br /&gt;
Exploited by MrNbaYoh and [[User:Plutooo|plutoo]].&lt;br /&gt;
|-&lt;br /&gt;
| The Legend of Zelda: Tri Force Heroes&lt;br /&gt;
| [[3DS_System_Flaws#General.2FCTRSDK|CTRSDK]] CTPK buffer overflow combined with game&#039;s usage of SpotPass&lt;br /&gt;
| During the very first screen displayed by the game during boot(&amp;quot;Loading...&amp;quot;), just seconds after title launch, the game loads CTPK from the [[BOSS_Services|stored]] SpotPass content. Hence, this game could be exploited via the vulnerable CTRSDK CTPK code &#039;&#039;if&#039;&#039; one could get custom SpotPass data into extdata somehow(ctr-httpwn &amp;gt;=v1.2 with bosshaxx allows this).&lt;br /&gt;
&lt;br /&gt;
The code for this runs from a thread separate from the main-thread, with the stack in linearmem heap. This SpotPass handling triggers before the game ever opens the regular savedata archive. The extdata is opened at some point before this: it opens a file for checking if it exists, then immediately closes it.&lt;br /&gt;
&lt;br /&gt;
The two SpotPass URLs for this have always(?) returned HTTP 404 as of November 2016. It appears these were intended for use as textures for additional costumes(and never got used publicly), but this wasn&#039;t tested.&lt;br /&gt;
&lt;br /&gt;
This is used by [https://github.com/yellows8/ctpkpwn ctpkpwn_tfh].&lt;br /&gt;
| None&lt;br /&gt;
| App: v2.1.0&lt;br /&gt;
| November 18, 2016&lt;br /&gt;
| November 14, 2016&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| Pixel Paint&lt;br /&gt;
| Buffer overflow via unchecked extdata file length&lt;br /&gt;
| Pixel Paint loads pictures saved by the user from extdatas. The file is read to a fixed size buffer but the file length remains unchecked, so with a large enough file, one can overwrite pointers in memory and gain control of the execution flow.&lt;br /&gt;
| None&lt;br /&gt;
| App: Initial version. System: [[11.2.0-35]].&lt;br /&gt;
| December 27, 2016&lt;br /&gt;
| November 5, 2016&lt;br /&gt;
| [[User:Nba_Yoh|MrNbaYoh]]&lt;br /&gt;
|-&lt;br /&gt;
| Steel Diver : Sub Wars&lt;br /&gt;
| Heap overflow / arbitrary memcpy&lt;br /&gt;
| Savefile datas are stored as key/value pairs, a large enough string key makes the game overwrite a memcpy source/destination addresses and size arguments. So one can actually memcpy a rop on the stack and gain control of the execution flow.&lt;br /&gt;
| None&lt;br /&gt;
| System: [[11.2.0-35]].&lt;br /&gt;
| December 27, 2016&lt;br /&gt;
| Around July 15, 2016&lt;br /&gt;
| [[User:Nba_Yoh|MrNbaYoh]], Vegaroxas&lt;br /&gt;
|-&lt;br /&gt;
| 1001 Spikes&lt;br /&gt;
| Buffer overflow via unchecked array-indexes in XML savefile parsing&lt;br /&gt;
| The savefiles are stored as renamed .xml files, which contain several tags with attributes like &#039;array-index=&amp;quot;array-value&amp;quot;&#039;, where both of these are converted from ASCII strings to integers as signed-int32, and the array-value given blindly written to an array inside a structure using the (unchecked) index given. With several of these attributes, one can overwrite the stack starting from the stored lr of the function that does this parsing, and write a ROP chain there. Testing used the &amp;quot;LevelAttempts&amp;quot; tag which is the last such tag parsed in that function.&lt;br /&gt;
| None&lt;br /&gt;
| App: v1.2.0 (TMD v2096)&lt;br /&gt;
| December 27, 2016&lt;br /&gt;
| Around November 2, 2016&lt;br /&gt;
| [[User:Riley|Riley]]&lt;br /&gt;
|-&lt;br /&gt;
| Pokemon Omega Ruby/Alpha Sapphire&lt;br /&gt;
| Secret base team name heap overflow&lt;br /&gt;
| When the player wants to edit the team name, it is copied over the heap, however its length is not verified. So with a large enough team name one can overwrite some pointers and get two arbitrary jumps and then get control of the execution flow.&lt;br /&gt;
| None&lt;br /&gt;
| App: 1.4. System: [[11.2.0-35]].&lt;br /&gt;
| December 30, 2016&lt;br /&gt;
| June, 2016&lt;br /&gt;
| [[User:Nba_Yoh|MrNbaYoh]]&lt;br /&gt;
|-&lt;br /&gt;
| Swapdoodle&lt;br /&gt;
| Heap buffer overflow via unchecked size&lt;br /&gt;
| The letter file format used by doodlebomb is composed of multiple chunks. Each chunks is described in the header of the file where the name, size and CRC of each chunk are stored. Some chunks are meant to be headers, every header&#039;s size should be 0x80, however the length of the STAHED1 chunk remains unchecked and the game memcpy the chunk to a 0x80 byte buffer with the length provided in the file. This way one is able to overwrite some pointers and get control of the execution flow.&lt;br /&gt;
| App: &amp;gt; v1.1.1&lt;br /&gt;
| App: v1.1.1&lt;br /&gt;
| April 24, 2017&lt;br /&gt;
| February, 2017&lt;br /&gt;
| [[User:Nba_Yoh|MrNbaYoh]]&lt;br /&gt;
|-&lt;br /&gt;
| Pokemon Picross&lt;br /&gt;
| Arbitrary memcpy via unchecked size&lt;br /&gt;
| When reading the savefile, the game handles some lists of buffers that are copied to memory. These buffers should always be 0x14-bytes long but the game uses the size provided in the savefile to copy them. These buffers are copied in some structs and thus with a big enough length value, one can overwrite the next struct which contains a size and a destination address for a memcpy.&lt;br /&gt;
| None?&lt;br /&gt;
| App: ?&lt;br /&gt;
| May 29, 2017&lt;br /&gt;
| June, 2016&lt;br /&gt;
| [[User:Nba_Yoh|MrNbaYoh]]&lt;br /&gt;
|-&lt;br /&gt;
| RPG Maker Fes/Player&lt;br /&gt;
| Buffer overflow on .bss section&lt;br /&gt;
| When loading a project, the game copies multiple chunks over the BSS section. However the number of chunks to copy is not checked, thus a large amount of chunk result in a buffer overflow. There&#039;s multiple way to exploit this flaw to gain an arbitrary memcpy or an arbitrary jump.&lt;br /&gt;
| None?&lt;br /&gt;
| App: ?&lt;br /&gt;
| August 28, 2017&lt;br /&gt;
| August, 2017&lt;br /&gt;
| [[User:Nba_Yoh|MrNbaYoh]]&lt;br /&gt;
|-&lt;br /&gt;
| RPG Maker Fes/Player&lt;br /&gt;
| Buffer overflow via unchecked file size&lt;br /&gt;
| When loading a project, the game loads the file to a 0x200000 bytes long buffer. However the size remains unchecked, so with a big enough file one can overflow the buffer and overwrite a thread stack and then achieve ROP.&lt;br /&gt;
| None?&lt;br /&gt;
| App: ?&lt;br /&gt;
| August 29, 2017&lt;br /&gt;
| August, 2017&lt;br /&gt;
| [[User:Nba_Yoh|MrNbaYoh]], [[User: ChampionLeake|ChampionLeake]]&lt;br /&gt;
|-&lt;br /&gt;
| Pokemon Omega Ruby/Alpha Sapphire&lt;br /&gt;
| PSS data heap/stack overflow&lt;br /&gt;
| When launching the game, multiple chunks from the save file are parsed and copied to a large heap buffer. When parsing PSS data (acquaintances, passerby) the game copies each entry to the heap buffer, the number of entries to copy is read from the end of the multiple pss data chunks and is not checked, leading to an overflow. The &amp;quot;PSS data - friends&amp;quot; chunk is vulnerable too, but the overflow occurs on the stack and unfortunately this isn&#039;t exploitable because of a 4 bytes uncontrolled value (in each entry) that gets written on sensitive data.&lt;br /&gt;
| None&lt;br /&gt;
| App: 1.4. System: [[11.6.0]].&lt;br /&gt;
| October 1, 2017&lt;br /&gt;
| June, 2016&lt;br /&gt;
| [[User:Nba_Yoh|MrNbaYoh]]&lt;br /&gt;
|-&lt;br /&gt;
| RPG Maker Fes/Player&lt;br /&gt;
| OOB write&lt;br /&gt;
| When handling events in a map, the indices of &amp;quot;buttons&amp;quot; are not checked. This results in an out of bound bit write, one can thus write a rop directly on the stack (bit by bit).&lt;br /&gt;
| None?&lt;br /&gt;
| App: ?&lt;br /&gt;
| August 5, 2018&lt;br /&gt;
| &lt;br /&gt;
| [[User:Nba_Yoh|MrNbaYoh]]&lt;br /&gt;
|-&lt;br /&gt;
| Unholy Heights&lt;br /&gt;
| Buffer overflow via unchecked string size&lt;br /&gt;
| The game stores some utf-16 messages in the savefile. Right before the message is the length(u32) for the string, the game uses this size to memcpy the message from the savefile to the stack without checking the length. This allows one to overwrite some function addresses on the stack and form a rop chain.&lt;br /&gt;
| None&lt;br /&gt;
| App: Initial Version&lt;br /&gt;
| September 13, 2018&lt;br /&gt;
| August, 2018&lt;br /&gt;
| Kartik&lt;br /&gt;
|-&lt;br /&gt;
| Mononoke Forest&lt;br /&gt;
| String Buffer Overflow via unchecked string length&lt;br /&gt;
| The game stores plaintext profile names in the savefile. The profile names are strcpy/memcpy to different areas of the game&#039;s functions in the stack. Using a large extensive profile name, a user can overwrite some stack-registers and point to stack buffer addresses to eventually gain control of the stack to lead and form a rop-chain. &lt;br /&gt;
| None&lt;br /&gt;
| App: v1.0.0&lt;br /&gt;
| August 14, 2019&lt;br /&gt;
| February 8, 2019&lt;br /&gt;
| [[User: ChampionLeake|ChampionLeake]] and [[User: Kartik|Kartik]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Flipnote Studio 3D==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Summary&lt;br /&gt;
!  Description&lt;br /&gt;
!  Fixed in app/system version&lt;br /&gt;
!  Timeframe info related to this was added to wiki&lt;br /&gt;
!  Flaw discovered by&lt;br /&gt;
|-&lt;br /&gt;
| KFH frame count overflow&lt;br /&gt;
| The KFH frame count field should not be &amp;gt;= 0x3E8, but it wasn&#039;t checked and so uncontrolled data were written over pointers, causing an unexploitable crash.&lt;br /&gt;
| System: 11.6&lt;br /&gt;
| September 20, 2017&lt;br /&gt;
| [[User:Nba_Yoh|MrNbaYoh]]&lt;br /&gt;
|-&lt;br /&gt;
| KMI paper color overflow&lt;br /&gt;
| Paper color field (and similar color fields) in KMI chunks was not checked, a too high value caused a jump to an uncontrolled location.&lt;br /&gt;
| System: 11.6&lt;br /&gt;
| September 20, 2017&lt;br /&gt;
| [[User:Nba_Yoh|MrNbaYoh]]&lt;br /&gt;
|-&lt;br /&gt;
| KSN BGM data size overflow&lt;br /&gt;
| The size of the BGM data in the KSN chunk was not checked, it was used in a memcpy so with a big enough size one could overwrite a thread stack on linear mem and achieve ROP (notehax v1).&lt;br /&gt;
| System: 11.6&lt;br /&gt;
| September 20, 2017&lt;br /&gt;
| [[User:Nba_Yoh|MrNbaYoh]]&lt;br /&gt;
|-&lt;br /&gt;
| KMC chunk unchecked&lt;br /&gt;
| The KMC chunk was not verified at all, the CRC32 and the size were not checked. A big enough size caused an integer overflow and made the game read the file backward.&lt;br /&gt;
| System: 11.6&lt;br /&gt;
| September 20, 2017&lt;br /&gt;
| [[User:Nba_Yoh|MrNbaYoh]]&lt;br /&gt;
|-&lt;br /&gt;
| KMI layer size unchecked&lt;br /&gt;
| The 3 layer size fields in KMI chunks were not checked, leading to some crashes in the editor.&lt;br /&gt;
| System: 11.6&lt;br /&gt;
| September 20, 2017&lt;br /&gt;
| [[User:Nba_Yoh|MrNbaYoh]]&lt;br /&gt;
|-&lt;br /&gt;
| Bad &amp;quot;queue&amp;quot; implementation&lt;br /&gt;
| When a KWZ was parsed, frames were copied in a kind of queue, bounds were not checked obviously, so with the KMI layer size flaw one was able to fill completely the queue, then write past the buffer and overwrite a heap chunk header (notehax v2). This is not possible anymore, the queue cannot be filled because layer sizes are checked. Moreover each time an element is removed from the queue, the whole content is memmoved *facepalm*.&lt;br /&gt;
| System: 11.6&lt;br /&gt;
| September 20, 2017&lt;br /&gt;
| [[User:Nba_Yoh|MrNbaYoh]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Useless crashes / applications which were fuzzed==&lt;br /&gt;
* Pushmo (3DSWare), QR codes: level name is properly limited to 16 characters, game doesn&#039;t crash with a longer name. The only possible crashes are triggered by out-of-bounds array index values, these crashes are not exploitable due to the index value being 8bit.&lt;br /&gt;
&lt;br /&gt;
* [[Pyramids (3DSWare)]], QR codes: no strings. Only crashes are from out-of-bounds values (like background ID) and are not exploitable.&lt;br /&gt;
&lt;br /&gt;
* [[Pyramids 2 (3DSWare)]], QR codes: no strings. Only crashes are from out-of-bounds values (like background ID) and are not exploitable.&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/yellows8/mm3d_re The Legend of Zelda: Majora&#039;s Mask 3D]&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;The Legend of Zelda: A Link Between Worlds&amp;quot; and &amp;quot;The Legend of Zelda: Tri Force Heroes&amp;quot;: these games don&#039;t crash at all when the entire save-file(minus constant header data) is overwritten with /dev/random output / 0xFF-bytes. All of the CRC32s were updated for this of course.  Note that this refers to the regular save file: Tri Force Heroes can be exploited via BOSS extdata - see above.&lt;br /&gt;
&lt;br /&gt;
* Pokemon Mystery Dungeon: Gates to Infinity has the same unchecked file bounds as Pokemon Super Mystery Dungeon, however since save compression was introduced in Pokemon Super Mystery Dungeon, it only allocates one buffer within the application heap instead of several within the linear heap, resulting in nothing to corrupt or overwrite even if the file&#039;s length is extended past its allocation.&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;Kid Icarus: Uprising&amp;quot;: Overwriting the entire savedata results in various crashes, nothing useful.&lt;br /&gt;
&lt;br /&gt;
* Savedata/extdata for &amp;quot;Super Smash Bros 3DS&amp;quot;: Overwriting the various files stored under savedata/extdata results in useless crashes.&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;StarFox 64 3D&amp;quot;: Doesn&#039;t crash at all with the entire savedata overwritten.&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;Frogger 3D&amp;quot;: Overwriting a savefile with random-data results in *nothing* crashing.&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;Mutant Mudds&amp;quot;: Overwriting the savefile with random data results in a crash&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;Worcle Worlds&amp;quot;: Overwriting the savefile with 0xFF results in a crash due to an out of bound read&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;Animal Crossing: New Leaf&amp;quot;: Creating a QR code from random data results in a valid QR code and a random design. In some very rare cases(which aren&#039;t always reproducible?) a crash/etc may occur, but this isn&#039;t known to be useful.&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;Angry Birds Star Wars&amp;quot;: Strings in the savefile are preceded by their lengths. These strings are never stored on the stack and are memcpy&#039;d into heap memory. If the size is invalid the alloc will fail and thus the memcpy will operate on a nullptr resulting in a useless data abort.&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;Gem Smashers&amp;quot;: Overwriting the savefile with random bytes results in useless crashes.&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;Luxor:&amp;quot; Strings/plaintext in the savefile are present and these&#039;s no checks. Overwriting the whole save (excluding the header), with /dev/random cause a useless crash.&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;Luv Me Buddies Wonderland:&amp;quot; Doesn&#039;t crash at all with the entire savedata overwritten. Overwriting some areas, points to useless nulls&lt;br /&gt;
&lt;br /&gt;
==Crashes needing investigation==&lt;br /&gt;
* Disney Infinity crashes when all savedata overwritten with /dev/urandom. No checksums. 0xFF bytes don&#039;t cause a crash.&lt;br /&gt;
&lt;br /&gt;
* Football Up Online / Soccer Up Online and Football Up 3D / Soccer Up 3D crash when teamname(UTF-16) length = 0x48 AND 0x20 null bytes are removed after just the name or if teamname length is way longer than 0x48.&lt;br /&gt;
&lt;br /&gt;
=System applications=&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Summary&lt;br /&gt;
!  Description&lt;br /&gt;
!  Fixed in version&lt;br /&gt;
!  Last version this flaw was checked for&lt;br /&gt;
!  Timeframe this was discovered&lt;br /&gt;
!  Discovered by&lt;br /&gt;
|-&lt;br /&gt;
| 3DS [[System Settings]] DS profile string stack-smash&lt;br /&gt;
| Too long or corrupted strings (01Ah  2   Nickname length in characters     050h  2   Message length in characters) in the NVRAM DS user settings (System Settings-&amp;gt;Other Settings-&amp;gt;Profile-&amp;gt;Nintendo DS Profile) cause it to crash in 3DS-mode due to a stack-smash. The DSi is not vulnerable to this, DSi launcher(menu) and DSi System Settings will reset the NVRAM user-settings if the length field values are too long(same result as when the CRCs are invalid). TWL_FIRM also resets the NVRAM user-settings when the string-length(s) are too long.&lt;br /&gt;
| [[7.0.0-13]]&lt;br /&gt;
| [[7.0.0-13]]&lt;br /&gt;
| 2012&lt;br /&gt;
| [[User:Ichfly|Ichfly]]&lt;br /&gt;
|-&lt;br /&gt;
| 3DS [[System Settings]] stack smash via title strings in [[DSiWare_Exports]]&lt;br /&gt;
| DSiWare export banners contain 16 consecutive 0x100 byte, utf-16 game title strings for different languages. Nintendo correctly limits the string&#039;s max length by placing a NULL at str[127] before it&#039;s copied to the stack. However, they didn&#039;t allocate enough space for all 128 wchars (char/wchar type confusion?), so an attacker can craft a valid full-length string that will crash the stack at about str+0xEC. ROP execution can then be obtained from this crash in DSiWare Data Management as demonstrated [https://github.com/zoogie/Bannerbomb3 here].&lt;br /&gt;
&lt;br /&gt;
Interesting note: A line feed wchar (00 0A) at any point in the string before the crash offset will prevent the crash from occurring.&lt;br /&gt;
| None&lt;br /&gt;
| [[11.13.0-45]]&lt;br /&gt;
| Dec. 2018&lt;br /&gt;
| Zoogie&lt;br /&gt;
|-&lt;br /&gt;
| 3DS SAFE_MODE [https://www.3dbrew.org/wiki/System_Settings#System_Updater System Updater] stack smash from proxy-url string&lt;br /&gt;
| During [[Recovery Mode]] and after all 3 wifi slots fail to find an access point for sysupdate, a user is permitted to access the wifi settings mode to make changes. Here, if the proxy-url field string&#039;s NULL terminator had been altered beforehand, a stack smash can occur when the user selects Proxy Settings -&amp;gt; Detailed Setup and the corrupted url string is displayed.&lt;br /&gt;
&lt;br /&gt;
This is a difficult crash to control because the url string is converted from ascii to utf-16 between the slot and stack, effectively reducing the available gadgets to 0.4% of the normal amount. It&#039;s possible to improvise an &amp;quot;escape&amp;quot; using an eoreq pc w/shift gadget to combine registers and form a jump that can access 1/2 of all available gadgets.&lt;br /&gt;
&lt;br /&gt;
Because this exploit runs *under* SAFE_MODE, it&#039;s possible to run safehax with one&#039;s choice of k11 and arm9 hax. Prerequisite: a userland exploit with cfg:s/i access to modify the wifi slot. A demonstration can be viewed [https://github.com/zoogie/unSAFE_MODE here].&lt;br /&gt;
| None&lt;br /&gt;
| [[11.13.0-45]]&lt;br /&gt;
| Jan. 2020&lt;br /&gt;
| Zoogie&lt;br /&gt;
|-&lt;br /&gt;
| [[Nintendo 3DS Sound]]&lt;br /&gt;
| When a .m4a is loaded, the song name is copied to a 256 byte buffer. When the song name begins with a Unicode BOM marker, it memcpy&#039;s the tag using the user-provided length. This gives an arbitrary write which can be used to achieve ROP.&lt;br /&gt;
| [[11.4.0-37]]&lt;br /&gt;
| [[11.4.0-37]]&lt;br /&gt;
| June/July 2016&lt;br /&gt;
| [[User:nedwill|nedwill]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=System applets=&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Summary&lt;br /&gt;
!  Description&lt;br /&gt;
!  Fixed in version&lt;br /&gt;
!  Last version this flaw was checked for&lt;br /&gt;
!  Introduced with version&lt;br /&gt;
!  Timeframe info related to this was added to wiki&lt;br /&gt;
!  Timeframe this was discovered&lt;br /&gt;
!  Discovered by&lt;br /&gt;
|-&lt;br /&gt;
| Webkit/web-browser bugs&lt;br /&gt;
| spider has had at least three different code-execution exploits. Majority of them are use-after-free issues. See also [[browserhax|here]].&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| &lt;br /&gt;
| 2013?&lt;br /&gt;
|&lt;br /&gt;
| A lot of people.&lt;br /&gt;
|-&lt;br /&gt;
| Old3DS/New3DS [[Internet_Browser|Browser-version-check]] bypass&lt;br /&gt;
| When the browser-version-check code runs where the savedata for it was never initialized(such as when the user used the &amp;quot;Initialize savedata&amp;quot; option), it will use base_timestamp=0 instead of the timestamp loaded from savedata. This is then used with &amp;quot;if(cur_timestamp - base_timestamp &amp;gt;= &amp;lt;24h timestamp&amp;gt;){Run browser-version-check HTTPS request code}&amp;quot;.&lt;br /&gt;
Hence, if the savedata was just initialized, and if the system datetime is set to before January 2, 2000, the browser-version-check will be skipped. This includes January 1, 2000, 00:00, because that&#039;s the epoch(timestamp value 0x0) used with this timestamp.&lt;br /&gt;
&lt;br /&gt;
See [http://yls8.mtheall.com/3dsbrowserhax.php here] for bypass usage instructions.&lt;br /&gt;
&lt;br /&gt;
This was fixed with [[10.7.0-32|10.7.0-32]], see [[Internet_Browser|here]] for details.&lt;br /&gt;
| [[10.7.0-32|10.7.0-32]]&lt;br /&gt;
| &lt;br /&gt;
| [[9.9.0-26|9.9.0-26]]&lt;br /&gt;
| February 25, 2016&lt;br /&gt;
| November 2, 2015 (Exactly one week after the browser version pages were initially updated server-side)&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| Skater - Bookmark OOB write&lt;br /&gt;
| Each bookmark has an id that should not exceed 0x63 (99), however ids are not checked, this results in an OOB write on the stack, but only the value 0x01 can be written.&lt;br /&gt;
| &lt;br /&gt;
| [[11.6.0-39|11.6.0-39]]&lt;br /&gt;
| &lt;br /&gt;
| May 21, 2018&lt;br /&gt;
| May 20, 2018&lt;br /&gt;
| [[User:Nba_Yoh|MrNbaYoh]]&lt;br /&gt;
|-&lt;br /&gt;
| MicroSD Management - malformed security blob causes stack buffer overflow (mhax) &lt;br /&gt;
| The MicroSD Management application&#039;s parsing of Windows NTLM security blobs in the SMB/CIFS protocol doesn&#039;t verify that the client&#039;s specified NT domain name is less than 32 UTF-16 characters.  When it&#039;s longer, a stack buffer overrun occurs, leading to a ROP chain and complete control of the mcopy application.&lt;br /&gt;
&lt;br /&gt;
The malformed security blob can be sent by an attacker within the SMB_COM_SESSION_SETUP_ANDX (0x73) packet.&lt;br /&gt;
| [[11.8.0-41|11.8.0-41]]&lt;br /&gt;
| [[11.8.0-41|11.8.0-41]]&lt;br /&gt;
| [[9.0.0-20|9.0.0-20]]&lt;br /&gt;
| August 12, 2018&lt;br /&gt;
| 2018&lt;br /&gt;
| smea&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Home Menu==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Summary&lt;br /&gt;
!  Description&lt;br /&gt;
!  Fixed in version&lt;br /&gt;
!  Last version this flaw was checked for&lt;br /&gt;
!  Introduced with version&lt;br /&gt;
!  Timeframe info related to this was added to wiki&lt;br /&gt;
!  Timeframe this was discovered&lt;br /&gt;
!  Discovered by&lt;br /&gt;
|-&lt;br /&gt;
| bossbannerhax&lt;br /&gt;
| After successfully loading [[Extended_Banner|extended-banner]] data(done when selecting an icon), Home Menu attempts to load &amp;quot;[[CBMD]]&amp;quot; data into a 0x100000-byte heap buffer from the [[BOSS_Services|stored]] SpotPass content. When successful and the magic-number is CBMD, Home Menu then decompresses the exbanner sections into another fixed-size heap buffer, without checking the outsize at all. The main CBMD CGFX code with ExeFS checks the size, but this code doesn&#039;t(however this is exbanner &amp;quot;CBMD&amp;quot;, not a &amp;quot;normal&amp;quot; CBMD).&lt;br /&gt;
&lt;br /&gt;
Used with menuhax as of v3.2.&lt;br /&gt;
| [[11.3.0-36|11.3.0-X]]&lt;br /&gt;
| &lt;br /&gt;
| [[1.0.0-0|1.0.0-0]]&lt;br /&gt;
| November 18, 2016&lt;br /&gt;
| December 23, 2014&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| sdiconhax&lt;br /&gt;
| This is basically the same as nandiconhax, the vulnerable SD/NAND functions are &#039;&#039;identical&#039;&#039; minus the file-buffer offsets. Exploitation is different due to different heap-buffer location though. Unlike nandiconhax, the icon buffer for SD is located in linearmem(with recent Home Menu versions at least). This is used by [[menuhax]].&lt;br /&gt;
| [[11.1.0-34|11.1.0-X]]&lt;br /&gt;
| &lt;br /&gt;
| [[4.0.0-7|4.0.0-X]]&lt;br /&gt;
| July 27, 2016&lt;br /&gt;
| October 23, 2015&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| [[System_SaveData|NAND-savedata]] Launcher.dat icons (nandiconhax)&lt;br /&gt;
| The homemenu code processing the titleid list @ launcherdat+8 copies those titleIDs to another buffer, where the offset relative to that buffer is calculated using the corresponding s8/s16 entries. Those two values are not range checked at all. Hence, one can use this to write u64(s) with arbitrary values to before/after this allocated output buffer. See [[Home_Menu|here]] regarding Launcher.dat structure.&lt;br /&gt;
&lt;br /&gt;
This can be exploited(with Launcher.dat loading at startup at least) by using a s16 for the icon entry with value 0xFFEC(-20)(and perhaps more icons with similar s16 values to write multiple u64s). The result is that the u64 value is written to outbuf-0xA0, which overwrites object+0(vtable) and object+4(doesn&#039;t matter here) for an object that gets used a bit after the vulnerable function triggers. The low 32bits of the u64 can then be set to the address of controlled memory(either outbuf in regular heap or the entire launcherdat buffer in linearmem), for use as a fake vtable in order to get control of PC. From there one can begin ROP via vtable funcptrs to do a stack-pivot(r4=objectaddr at the time the above object gets used).&lt;br /&gt;
&lt;br /&gt;
Originally this vuln could only be triggered via Launcher.dat at Home Menu startup, right after Launcher.dat gets loaded + memory gets allocated, once the file-format version code is finished running. Starting with v9.6 this can be triggered when loading layouts from SD extdata as well. The vuln itself triggers before the layout data is written to Launcher.dat, but it doesn&#039;t seem to be possible to overwrite anything which actually gets used before the function which writes Launcher.dat into the layout gets called.&lt;br /&gt;
&lt;br /&gt;
Home Menu has some sort of fail-safe system(or at least on v9.7) when Home Menu crashes due to Launcher.dat(this also applies for other things with Home Menu): after crashing once, Home Menu resets Launcher.dat to a state where it no longer crashes anymore. However, note that any exploits using this which hang/etc without crashing will still brick the system. &#039;&#039;&#039;Hence, attempting anything with this on physnand without hw-nand-access isn&#039;t really recommended.&#039;&#039;&#039;&lt;br /&gt;
| [[11.1.0-34|11.1.0-X]]&lt;br /&gt;
| &lt;br /&gt;
| [[4.0.0-7|4.0.0-X]]&lt;br /&gt;
| &lt;br /&gt;
| May 14, 2015&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| Theme-data decompression buffer overflow ([[menuhax|themehax]])&lt;br /&gt;
| The only func-call size parameter used by the theme decompression function is one for the compressed size, none for the decompressed size. The decompressed-size value from the LZ header is used by this function to check when to stop decompressing, but this function itself has nothing to verify the decompressed_size with. The code calling this function does not check or even use the decompressed size from the header either.&lt;br /&gt;
&lt;br /&gt;
This function is separate from the rest of the Home Menu code: the function used for decompressing themes is *only* used for decompressing themes, nothing else. There&#039;s a separate decompression function in Home Menu used for decompressing everything else.&lt;br /&gt;
&lt;br /&gt;
That other decompression function in Home Menu handles decompression size properly(decompressed size check for max buffer size is done by code calling the other function, not in the function itself). Unlike the other function, the theme function supports multiple LZ algorithms, but the one which actually gets used in official themes is the same one supported by the other function anyway.&lt;br /&gt;
&lt;br /&gt;
See also [[menuhax|here]].&lt;br /&gt;
&lt;br /&gt;
With [[10.2.0-28|10.2.0-X]] Home Menu, the only code change was that the following was added right after theme-load and before actual decompression: &amp;quot;if(&amp;lt;get_lzheader_decompressed_size&amp;gt;(compressed_buf) &amp;gt; 0x150000)&amp;lt;exit&amp;gt;;&amp;quot;. This fixed the vuln.&lt;br /&gt;
| [[10.2.0-28|10.2.0-X]]&lt;br /&gt;
| [[10.2.0-28|10.2.0-X]]&lt;br /&gt;
| &amp;lt;Old3DS/New3DS version which added initial theme support&amp;gt;&lt;br /&gt;
| &lt;br /&gt;
| December 22, 2014&lt;br /&gt;
| [[User:Yellows8|Yellows8]], [[User:Myria|Myria]] independently (~spring 2015)&lt;br /&gt;
|-&lt;br /&gt;
| Shuffle body-data buffer overflow ([[menuhax|shufflehax]])&lt;br /&gt;
| See [[menuhax|here]].&lt;br /&gt;
| [[10.6.0-31|10.6.0-X]]&lt;br /&gt;
| [[10.6.0-31|10.6.0-X]]&lt;br /&gt;
| [[9.3.0-21|9.3.0-X]]&lt;br /&gt;
| &lt;br /&gt;
| January 3, 2015&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| Extdata file-data loading buffer overflow&lt;br /&gt;
| The extdata file-reading code allocates a fixed-size heap buffer for the expected filesize, then reads the filedata into this buffer using the actual FS filesize. Before v5.0 the filesize used here wasn&#039;t validated, hence if the filesize is larger than alloc_size a buffer overflow would occur. &#039;&#039;After&#039;&#039; doing the file-read it does validate that the actual_readsize matches the alloc_size, but at this point the buffer overflow has already occurred.&lt;br /&gt;
&lt;br /&gt;
This affected at least the following: SaveData.dat and Cache.dat.&lt;br /&gt;
&lt;br /&gt;
This can be triggered with SaveData.dat by installing a &amp;lt;v4.0 Home Menu version, with Home Menu extdata from &amp;gt;=v4.0 still on SD. When this is done with v2.0 Home Menu, a kernelpanic occurs when processing an AM command(it appears a buffer ptr which is then passed to a command was overwritten with 0x0 - of course other SaveData.dat filesizes may result in different behaviour).&lt;br /&gt;
| [[5.0.0-11|5.0.0-X]]&lt;br /&gt;
| &lt;br /&gt;
| [[2.0.0-2|2.0.0-X]]&lt;br /&gt;
| June 9, 2016&lt;br /&gt;
| June 9, 2016&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The icon data arrays used with {sd/nand}iconhax were added to SaveData.dat/Launcher.dat with [[4.0.0-7|4.0.0-X]], hence the vulnerable functions were added with that same version.&lt;br /&gt;
&lt;br /&gt;
With &amp;lt;=v4.0 the SaveData.dat buffer is located in the regular heap. It&#039;s unknown when exactly it was moved to linearmem, which is where it&#039;s located with recent versions. It&#039;s located in linearmem for KOR &amp;gt;=v9.6 for example.&lt;br /&gt;
&lt;br /&gt;
The SaveData.dat/Launcher.dat icon vulns were fixed by doing various unsigned &amp;gt;=60/&amp;gt;=360 checks on the loaded values. When these checks fail, it just skips over handling this icon entry. Hence, the original value can&#039;t be negative / out-of-bounds any more.&lt;br /&gt;
&lt;br /&gt;
==Useless crashes==&lt;br /&gt;
Old3DS system web-browser:&lt;br /&gt;
* 2^32 characters long string(&#039;&#039;finally&#039;&#039; fixed with v10.6): this is similar to the vulnerability fixed [http://git.chromium.org/gitweb/?p=external/Webkit.git;a=commitdiff;h=ec471f16fbd1f879cb631f9b022fd16acd75f4d4 here], concat-large-strings-crash2.html triggers a crash which is about the same as the one triggered by a 2^32 string. Most of the time this vulnerability will cause a memory page permissions fault, since the WebKit code attempts to copy the string text data to the output buffer located in read-only [[CRO0|CRO]] heap memory. The only difference between a crash triggered by a 2^32 string and the concat-large-strings-crash2.html crash is at the former copies the string data using the original string length(like 1 text character for &amp;quot;x&amp;quot;, 4 for &amp;quot;xxxx&amp;quot;) while the latter attempts to copy &amp;gt;12MB. In some &#039;&#039;very&#039;&#039; rare cases a thread separate from the string data-copy thread will crash, this might be exploitable. However, this is mostly useless since it rarely crashes this way.&lt;br /&gt;
&lt;br /&gt;
* Trying to directly load a page via the browser &amp;quot;URL&amp;quot; option with [https://github.com/yellows8/3ds_browserhax_common webkitdebug] setup, causes a crash to trigger in oss.cro due to an use-after-free being caught with webkitdebug. This is presumably some sort of realloc() issue in the libcurl version used by the &amp;lt;={v10.2-v10.3} browser. This happens with *every* *single* *page* one tries to load via the &amp;quot;URL&amp;quot; option, but not when loading links on the current page, hence this is probably useless. A different use-after-free with realloc triggers with loading any page at all regardless of method too(libcurl probably).&lt;br /&gt;
&lt;br /&gt;
* This WebKit build has &#039;&#039;a lot&#039;&#039; of crash-trigger bugs that only happen with [https://github.com/yellows8/3ds_browserhax_common webkitdebug] completely setup(addr accesses near 0x0), with &#039;&#039;just&#039;&#039; trying to load any page at all.&lt;/div&gt;</summary>
		<author><name>EvilFlight</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=3DS_Userland_Flaws&amp;diff=21029</id>
		<title>3DS Userland Flaws</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=3DS_Userland_Flaws&amp;diff=21029"/>
		<updated>2019-07-25T20:48:27Z</updated>

		<summary type="html">&lt;p&gt;EvilFlight: /* System applications */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page lists vulnerabilities / exploits for 3DS applications and applets. Exploiting these initially results in ROP, from that ROP one can then for example try exploiting [[3DS_System_Flaws|system]] flaw(s).&lt;br /&gt;
&lt;br /&gt;
=Non-system applications=&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Application name&lt;br /&gt;
!  Summary&lt;br /&gt;
!  Description&lt;br /&gt;
!  Fixed in app/system version&lt;br /&gt;
!  Last app/system version this flaw was checked for&lt;br /&gt;
!  Timeframe info related to this was added to wiki&lt;br /&gt;
!  Timeframe this vuln was discovered&lt;br /&gt;
!  Vuln discovered by&lt;br /&gt;
|-&lt;br /&gt;
| Cubic Ninja&lt;br /&gt;
| Map-data stack smash&lt;br /&gt;
| See [[Ninjhax|here]] regarding Ninjhax.&lt;br /&gt;
| None&lt;br /&gt;
| App: Initial version. System: [[10.4.0-29]].&lt;br /&gt;
| Ninjhax release&lt;br /&gt;
| July 2014&lt;br /&gt;
| [[User:smea|smea]]&lt;br /&gt;
|-&lt;br /&gt;
| The Legend of Zelda: Ocarina of Time 3D&lt;br /&gt;
| UTF-16 name string buffer overflow via unchecked u8 length field&lt;br /&gt;
| The u8 at offset 0x2C in the savefile is the character-length of the UTF-16 string at offset 0x1C. When copying this string, it&#039;s essentially a memory-copy with lenval*2, not a string-copy. This can be used to trigger buffer overflows at various locations depending on the string length.&lt;br /&gt;
* When value is &amp;gt;=0x6E it crashes when saving the saveslot, this causes a stack-smash however it normally crashes before it returns from the function which had the stack-frame overwritten.&lt;br /&gt;
* With value &amp;gt;=0x9A, it crashes via stack-smash in-game once any dialogs are opened(touching buttons on the touch-screen can trigger it too).&lt;br /&gt;
* Length value&amp;gt;=0xCD causes a crash while loading the saveslot, via a heap buffer overflow. This buf-overflow overwrites a heap memchunk following the allocated buffer. When the first 16-bits overwriting that heap memchunk is not the memchunk magic-number(0x7373), the mem-alloc code will just return a NULL ptr which later results in a crash. When the magic-number is valid, the mem-alloc code will continue to attempt to parse the memchunk, which may crash depending on the data which overwrote the memchunk. This heap code is separate from the CTRSDK heap code. Exploiting this doesn&#039;t seem to be possible: since the heap code actually verifies that the magic-number for the next/prev memchunk ptrs are correct(unlike CTRSDK), it&#039;s not possible to change those ptrs to useful arbitrary addresses outside of savedata(like with triggering a write to a c++ object ptr which later is used with a vtable func-call, this is what one would do with CTRSDK heap here).&lt;br /&gt;
&lt;br /&gt;
On March 11, 2015, an exploit using this vuln was released, that one was intended for warez/etc. The following exploit wasn&#039;t released before then mainly because doing so would (presumably) result in the vuln being fixed. The following old exploit was released on March 14, 2015: [https://github.com/yellows8/oot3dhax].&lt;br /&gt;
| None&lt;br /&gt;
| App: Initial version. System: [[10.6.0-31]].&lt;br /&gt;
| March 11, 2015&lt;br /&gt;
| Around October 22, 2012&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| Super Smash Bros 3DS&lt;br /&gt;
| Buffer overflow in local-multiplayer beacon handling.&lt;br /&gt;
| See [[smashbroshax|here]].&lt;br /&gt;
| App: v1.1.3&lt;br /&gt;
| See [[smashbroshax|here]]. System: [[10.3.0-28]].&lt;br /&gt;
| Time of exploit release.&lt;br /&gt;
| See [[smashbroshax|here]].&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| Pokemon Super Mystery Dungeon&lt;br /&gt;
| Heap overflow within linear memory via unchecked save file length&lt;br /&gt;
| Pokemon Super Mystery Dungeon uses zlib compression for most of its save files, possibly due to the save files being larger than its predecessor, Gates to Infinity. When a save file is being prepared to be loaded and read from, only a 0x32000 large buffer is allocated for file reading, and a 0x3e800-large buffer for decompression is also allocated before the file is read. However, the game does not limit the size of the file read to this allocation bound, allowing for the file to overflow into the linear memory heap and into the next allocation. Since Pokemon Super Mystery Dungeon stores allocation memchunks directly before the allocation, overwriting the next memchunk with a corrupted one allows for arbitrary writes of linear heap pointers when the next buffer is allocated or arbitrary writes of any pointer within writable memory when the corrupted buffer is freed.&lt;br /&gt;
| None&lt;br /&gt;
| O3DS: [[11.3.0-36]]. N3DS: [[11.4.0-37]].&lt;br /&gt;
| Time of exploit release.&lt;br /&gt;
| April 14, 2016&lt;br /&gt;
| [[User:Shinyquagsire23|Shiny Quagsire]]&lt;br /&gt;
|-&lt;br /&gt;
| VVVVVV&lt;br /&gt;
| Buffer overflow in XML save file array parsing&lt;br /&gt;
| VVVVVV utilizes several XML files (renamed with a .vvv extension) to store level save data, stats and settings. Within these XML files are several tags containing an array of data which, when parsed, is not properly checked to be of proper length for the tag being parsed from. This allows for an overflow of 16-bit array values from the location where the array is parsed. With unlock.vvv, XML data is parsed to the stack, and with level saves the heap. This allows for the pointer where the level save worldmap tag array should be parsed into to be overwritten with a stack address, allowing for ROP from within the XML array parsing function on the next level load.&lt;br /&gt;
| App: v1.1&lt;br /&gt;
| [[10.7.0-32]].&lt;br /&gt;
| Time of exploit release.&lt;br /&gt;
| April 25, 2016&lt;br /&gt;
| [[User:Shinyquagsire23|Shiny Quagsire]]&lt;br /&gt;
|-&lt;br /&gt;
| Citizens of Earth&lt;br /&gt;
| Save file read stack smash&lt;br /&gt;
| Citizens of Earth also uses &amp;quot;XML&amp;quot; files for saves, which are actually entirely binary data (not XML at all) with no checksums. These files are read from the filesystem on to a fixed size stack buffer which leads to an incredibly trivial stack smash. When using the autosave slot for this, the save is parsed when the user selects &amp;quot;continue&amp;quot;. When using one of the dedicated save slots (1-3), the save is parsed shortly after the company splash screens fade. Note that the save is read quite high (descending) on the stack - when exploiting this, one would likely need to move SP due to almost instantly overflowing the physical stack.&lt;br /&gt;
| None&lt;br /&gt;
| [[10.7.0-32]].&lt;br /&gt;
| Time of exploit release.&lt;br /&gt;
| May 5, 2016&lt;br /&gt;
| [[User:Dazzozo|Dazzozo]]&lt;br /&gt;
|-&lt;br /&gt;
| SmileBASIC 3.x&lt;br /&gt;
| Poor parameter validation on &amp;quot;BGSCREEN&amp;quot; command&lt;br /&gt;
| The SmileBASIC &amp;quot;BGSCREEN&amp;quot; command&#039;s second parameter is not properly validated as being within range.  As a result, one can set the screen size to an absurdly large value.  This means that the &amp;quot;BGGET&amp;quot; and &amp;quot;BGPUT&amp;quot; commands can then be used on out-of-range values to read and write a significant chunk of the interpreter&#039;s address space.&lt;br /&gt;
With a series of carefully-designed BGPUT commands, one can build a ROP chain and cause it to be executed.&lt;br /&gt;
| App: 3.3.2.&lt;br /&gt;
| System: [[11.0.0-33]].&lt;br /&gt;
| July 20, 2016&lt;br /&gt;
| Around June 26, 2016&lt;br /&gt;
| slackerSnail, 12Me12, incvoid&lt;br /&gt;
Exploited by MrNbaYoh and [[User:Plutooo|plutoo]].&lt;br /&gt;
|-&lt;br /&gt;
| The Legend of Zelda: Tri Force Heroes&lt;br /&gt;
| [[3DS_System_Flaws#General.2FCTRSDK|CTRSDK]] CTPK buffer overflow combined with game&#039;s usage of SpotPass&lt;br /&gt;
| During the very first screen displayed by the game during boot(&amp;quot;Loading...&amp;quot;), just seconds after title launch, the game loads CTPK from the [[BOSS_Services|stored]] SpotPass content. Hence, this game could be exploited via the vulnerable CTRSDK CTPK code &#039;&#039;if&#039;&#039; one could get custom SpotPass data into extdata somehow(ctr-httpwn &amp;gt;=v1.2 with bosshaxx allows this).&lt;br /&gt;
&lt;br /&gt;
The code for this runs from a thread separate from the main-thread, with the stack in linearmem heap. This SpotPass handling triggers before the game ever opens the regular savedata archive. The extdata is opened at some point before this: it opens a file for checking if it exists, then immediately closes it.&lt;br /&gt;
&lt;br /&gt;
The two SpotPass URLs for this have always(?) returned HTTP 404 as of November 2016. It appears these were intended for use as textures for additional costumes(and never got used publicly), but this wasn&#039;t tested.&lt;br /&gt;
&lt;br /&gt;
This is used by [https://github.com/yellows8/ctpkpwn ctpkpwn_tfh].&lt;br /&gt;
| None&lt;br /&gt;
| App: v2.1.0&lt;br /&gt;
| November 18, 2016&lt;br /&gt;
| November 14, 2016&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| Pixel Paint&lt;br /&gt;
| Buffer overflow via unchecked extdata file length&lt;br /&gt;
| Pixel Paint loads pictures saved by the user from extdatas. The file is read to a fixed size buffer but the file length remains unchecked, so with a large enough file, one can overwrite pointers in memory and gain control of the execution flow.&lt;br /&gt;
| None&lt;br /&gt;
| App: Initial version. System: [[11.2.0-35]].&lt;br /&gt;
| December 27, 2016&lt;br /&gt;
| November 5, 2016&lt;br /&gt;
| [[User:Nba_Yoh|MrNbaYoh]]&lt;br /&gt;
|-&lt;br /&gt;
| Steel Diver : Sub Wars&lt;br /&gt;
| Heap overflow / arbitrary memcpy&lt;br /&gt;
| Savefile datas are stored as key/value pairs, a large enough string key makes the game overwrite a memcpy source/destination addresses and size arguments. So one can actually memcpy a rop on the stack and gain control of the execution flow.&lt;br /&gt;
| None&lt;br /&gt;
| System: [[11.2.0-35]].&lt;br /&gt;
| December 27, 2016&lt;br /&gt;
| Around July 15, 2016&lt;br /&gt;
| [[User:Nba_Yoh|MrNbaYoh]], Vegaroxas&lt;br /&gt;
|-&lt;br /&gt;
| 1001 Spikes&lt;br /&gt;
| Buffer overflow via unchecked array-indexes in XML savefile parsing&lt;br /&gt;
| The savefiles are stored as renamed .xml files, which contain several tags with attributes like &#039;array-index=&amp;quot;array-value&amp;quot;&#039;, where both of these are converted from ASCII strings to integers as signed-int32, and the array-value given blindly written to an array inside a structure using the (unchecked) index given. With several of these attributes, one can overwrite the stack starting from the stored lr of the function that does this parsing, and write a ROP chain there. Testing used the &amp;quot;LevelAttempts&amp;quot; tag which is the last such tag parsed in that function.&lt;br /&gt;
| None&lt;br /&gt;
| App: v1.2.0 (TMD v2096)&lt;br /&gt;
| December 27, 2016&lt;br /&gt;
| Around November 2, 2016&lt;br /&gt;
| [[User:Riley|Riley]]&lt;br /&gt;
|-&lt;br /&gt;
| Pokemon Omega Ruby/Alpha Sapphire&lt;br /&gt;
| Secret base team name heap overflow&lt;br /&gt;
| When the player wants to edit the team name, it is copied over the heap, however its length is not verified. So with a large enough team name one can overwrite some pointers and get two arbitrary jumps and then get control of the execution flow.&lt;br /&gt;
| None&lt;br /&gt;
| App: 1.4. System: [[11.2.0-35]].&lt;br /&gt;
| December 30, 2016&lt;br /&gt;
| June, 2016&lt;br /&gt;
| [[User:Nba_Yoh|MrNbaYoh]]&lt;br /&gt;
|-&lt;br /&gt;
| Swapdoodle&lt;br /&gt;
| Heap buffer overflow via unchecked size&lt;br /&gt;
| The letter file format used by doodlebomb is composed of multiple chunks. Each chunks is described in the header of the file where the name, size and CRC of each chunk are stored. Some chunks are meant to be headers, every header&#039;s size should be 0x80, however the length of the STAHED1 chunk remains unchecked and the game memcpy the chunk to a 0x80 byte buffer with the length provided in the file. This way one is able to overwrite some pointers and get control of the execution flow.&lt;br /&gt;
| App: &amp;gt; v1.1.1&lt;br /&gt;
| App: v1.1.1&lt;br /&gt;
| April 24, 2017&lt;br /&gt;
| February, 2017&lt;br /&gt;
| [[User:Nba_Yoh|MrNbaYoh]]&lt;br /&gt;
|-&lt;br /&gt;
| Pokemon Picross&lt;br /&gt;
| Arbitrary memcpy via unchecked size&lt;br /&gt;
| When reading the savefile, the game handles some lists of buffers that are copied to memory. These buffers should always be 0x14-bytes long but the game uses the size provided in the savefile to copy them. These buffers are copied in some structs and thus with a big enough length value, one can overwrite the next struct which contains a size and a destination address for a memcpy.&lt;br /&gt;
| None?&lt;br /&gt;
| App: ?&lt;br /&gt;
| May 29, 2017&lt;br /&gt;
| June, 2016&lt;br /&gt;
| [[User:Nba_Yoh|MrNbaYoh]]&lt;br /&gt;
|-&lt;br /&gt;
| RPG Maker Fes/Player&lt;br /&gt;
| Buffer overflow on .bss section&lt;br /&gt;
| When loading a project, the game copies multiple chunks over the BSS section. However the number of chunks to copy is not checked, thus a large amount of chunk result in a buffer overflow. There&#039;s multiple way to exploit this flaw to gain an arbitrary memcpy or an arbitrary jump.&lt;br /&gt;
| None?&lt;br /&gt;
| App: ?&lt;br /&gt;
| August 28, 2017&lt;br /&gt;
| August, 2017&lt;br /&gt;
| [[User:Nba_Yoh|MrNbaYoh]]&lt;br /&gt;
|-&lt;br /&gt;
| RPG Maker Fes/Player&lt;br /&gt;
| Buffer overflow via unchecked file size&lt;br /&gt;
| When loading a project, the game loads the file to a 0x200000 bytes long buffer. However the size remains unchecked, so with a big enough file one can overflow the buffer and overwrite a thread stack and then achieve ROP.&lt;br /&gt;
| None?&lt;br /&gt;
| App: ?&lt;br /&gt;
| August 29, 2017&lt;br /&gt;
| August, 2017&lt;br /&gt;
| [[User:Nba_Yoh|MrNbaYoh]]&lt;br /&gt;
|-&lt;br /&gt;
| Pokemon Omega Ruby/Alpha Sapphire&lt;br /&gt;
| PSS data heap/stack overflow&lt;br /&gt;
| When launching the game, multiple chunks from the save file are parsed and copied to a large heap buffer. When parsing PSS data (acquaintances, passerby) the game copies each entry to the heap buffer, the number of entries to copy is read from the end of the multiple pss data chunks and is not checked, leading to an overflow. The &amp;quot;PSS data - friends&amp;quot; chunk is vulnerable too, but the overflow occurs on the stack and unfortunately this isn&#039;t exploitable because of a 4 bytes uncontrolled value (in each entry) that gets written on sensitive data.&lt;br /&gt;
| None&lt;br /&gt;
| App: 1.4. System: [[11.6.0]].&lt;br /&gt;
| October 1, 2017&lt;br /&gt;
| June, 2016&lt;br /&gt;
| [[User:Nba_Yoh|MrNbaYoh]]&lt;br /&gt;
|-&lt;br /&gt;
| RPG Maker Fes/Player&lt;br /&gt;
| OOB write&lt;br /&gt;
| When handling events in a map, the indices of &amp;quot;buttons&amp;quot; are not checked. This results in an out of bound bit write, one can thus write a rop directly on the stack (bit by bit).&lt;br /&gt;
| None?&lt;br /&gt;
| App: ?&lt;br /&gt;
| August 5, 2018&lt;br /&gt;
| &lt;br /&gt;
| [[User:Nba_Yoh|MrNbaYoh]]&lt;br /&gt;
|-&lt;br /&gt;
| Unholy Heights&lt;br /&gt;
| Buffer overflow via unchecked string size&lt;br /&gt;
| The game stores some utf-16 messages in the savefile. Right before the message is the length(u32) for the string, the game uses this size to memcpy the message from the savefile to the stack without checking the length. This allows one to overwrite some function addresses on the stack and form a rop chain.&lt;br /&gt;
| None&lt;br /&gt;
| App: Initial Version&lt;br /&gt;
| September 13, 2018&lt;br /&gt;
| August, 2018&lt;br /&gt;
| Kartik&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Flipnote Studio 3D==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Summary&lt;br /&gt;
!  Description&lt;br /&gt;
!  Fixed in app/system version&lt;br /&gt;
!  Timeframe info related to this was added to wiki&lt;br /&gt;
!  Flaw discovered by&lt;br /&gt;
|-&lt;br /&gt;
| KFH frame count overflow&lt;br /&gt;
| The KFH frame count field should not be &amp;gt;= 0x3E8, but it wasn&#039;t checked and so uncontrolled data were written over pointers, causing an unexploitable crash.&lt;br /&gt;
| System: 11.6&lt;br /&gt;
| September 20, 2017&lt;br /&gt;
| [[User:Nba_Yoh|MrNbaYoh]]&lt;br /&gt;
|-&lt;br /&gt;
| KMI paper color overflow&lt;br /&gt;
| Paper color field (and similar color fields) in KMI chunks was not checked, a too high value caused a jump to an uncontrolled location.&lt;br /&gt;
| System: 11.6&lt;br /&gt;
| September 20, 2017&lt;br /&gt;
| [[User:Nba_Yoh|MrNbaYoh]]&lt;br /&gt;
|-&lt;br /&gt;
| KSN BGM data size overflow&lt;br /&gt;
| The size of the BGM data in the KSN chunk was not checked, it was used in a memcpy so with a big enough size one could overwrite a thread stack on linear mem and achieve ROP (notehax v1).&lt;br /&gt;
| System: 11.6&lt;br /&gt;
| September 20, 2017&lt;br /&gt;
| [[User:Nba_Yoh|MrNbaYoh]]&lt;br /&gt;
|-&lt;br /&gt;
| KMC chunk unchecked&lt;br /&gt;
| The KMC chunk was not verified at all, the CRC32 and the size were not checked. A big enough size caused an integer overflow and made the game read the file backward.&lt;br /&gt;
| System: 11.6&lt;br /&gt;
| September 20, 2017&lt;br /&gt;
| [[User:Nba_Yoh|MrNbaYoh]]&lt;br /&gt;
|-&lt;br /&gt;
| KMI layer size unchecked&lt;br /&gt;
| The 3 layer size fields in KMI chunks were not checked, leading to some crashes in the editor.&lt;br /&gt;
| System: 11.6&lt;br /&gt;
| September 20, 2017&lt;br /&gt;
| [[User:Nba_Yoh|MrNbaYoh]]&lt;br /&gt;
|-&lt;br /&gt;
| Bad &amp;quot;queue&amp;quot; implementation&lt;br /&gt;
| When a KWZ was parsed, frames were copied in a kind of queue, bounds were not checked obviously, so with the KMI layer size flaw one was able to fill completely the queue, then write past the buffer and overwrite a heap chunk header (notehax v2). This is not possible anymore, the queue cannot be filled because layer sizes are checked. Moreover each time an element is removed from the queue, the whole content is memmoved *facepalm*.&lt;br /&gt;
| System: 11.6&lt;br /&gt;
| September 20, 2017&lt;br /&gt;
| [[User:Nba_Yoh|MrNbaYoh]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Useless crashes / applications which were fuzzed==&lt;br /&gt;
* Pushmo (3DSWare), QR codes: level name is properly limited to 16 characters, game doesn&#039;t crash with a longer name. The only possible crashes are triggered by out-of-bounds array index values, these crashes are not exploitable due to the index value being 8bit.&lt;br /&gt;
&lt;br /&gt;
* [[Pyramids (3DSWare)]], QR codes: no strings. Only crashes are from out-of-bounds values (like background ID) and are not exploitable.&lt;br /&gt;
&lt;br /&gt;
* [[Pyramids 2 (3DSWare)]], QR codes: no strings. Only crashes are from out-of-bounds values (like background ID) and are not exploitable.&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/yellows8/mm3d_re The Legend of Zelda: Majora&#039;s Mask 3D]&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;The Legend of Zelda: A Link Between Worlds&amp;quot; and &amp;quot;The Legend of Zelda: Tri Force Heroes&amp;quot;: these games don&#039;t crash at all when the entire save-file(minus constant header data) is overwritten with /dev/random output / 0xFF-bytes. All of the CRC32s were updated for this of course.  Note that this refers to the regular save file: Tri Force Heroes can be exploited via BOSS extdata - see above.&lt;br /&gt;
&lt;br /&gt;
* Pokemon Mystery Dungeon: Gates to Infinity has the same unchecked file bounds as Pokemon Super Mystery Dungeon, however since save compression was introduced in Pokemon Super Mystery Dungeon, it only allocates one buffer within the application heap instead of several within the linear heap, resulting in nothing to corrupt or overwrite even if the file&#039;s length is extended past its allocation.&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;Kid Icarus: Uprising&amp;quot;: Overwriting the entire savedata results in various crashes, nothing useful.&lt;br /&gt;
&lt;br /&gt;
* Savedata/extdata for &amp;quot;Super Smash Bros 3DS&amp;quot;: Overwriting the various files stored under savedata/extdata results in useless crashes.&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;StarFox 64 3D&amp;quot;: Doesn&#039;t crash at all with the entire savedata overwritten.&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;Frogger 3D&amp;quot;: Overwriting a savefile with random-data results in *nothing* crashing.&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;Mutant Mudds&amp;quot;: Overwriting the savefile with random data results in a crash&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;Worcle Worlds&amp;quot;: Overwriting the savefile with 0xFF results in a crash due to an out of bound read&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;Animal Crossing: New Leaf&amp;quot;: Creating a QR code from random data results in a valid QR code and a random design. In some very rare cases(which aren&#039;t always reproducible?) a crash/etc may occur, but this isn&#039;t known to be useful.&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;Angry Birds Star Wars&amp;quot;: Strings in the savefile are preceded by their lengths. These strings are never stored on the stack and are memcpy&#039;d into heap memory. If the size is invalid the alloc will fail and thus the memcpy will operate on a nullptr resulting in a useless data abort.&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;Gem Smashers&amp;quot;: Overwriting the savefile with random bytes results in useless crashes.&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;Luxor:&amp;quot; Strings/plaintext in the savefile are present and these&#039;s no checks. Overwriting the whole save (excluding the header), with /dev/random cause a useless crash.&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;Luv Me Buddies Wonderland:&amp;quot; Doesn&#039;t crash at all with the entire savedata overwritten. Overwriting some areas, points to useless nulls&lt;br /&gt;
&lt;br /&gt;
==Crashes needing investigation==&lt;br /&gt;
* Disney Infinity crashes when all savedata overwritten with /dev/urandom. No checksums. 0xFF bytes don&#039;t cause a crash.&lt;br /&gt;
&lt;br /&gt;
* Football Up Online / Soccer Up Online and Football Up 3D / Soccer Up 3D crash when teamname(UTF-16) length = 0x48 AND 0x20 null bytes are removed after just the name or if teamname length is way longer than 0x48.&lt;br /&gt;
&lt;br /&gt;
=System applications=&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Summary&lt;br /&gt;
!  Description&lt;br /&gt;
!  Fixed in version&lt;br /&gt;
!  Last version this flaw was checked for&lt;br /&gt;
!  Timeframe this was discovered&lt;br /&gt;
!  Discovered by&lt;br /&gt;
|-&lt;br /&gt;
| 3DS [[System Settings]] DS profile string stack-smash&lt;br /&gt;
| Too long or corrupted strings (01Ah  2   Nickname length in characters     050h  2   Message length in characters) in the NVRAM DS user settings (System Settings-&amp;gt;Other Settings-&amp;gt;Profile-&amp;gt;Nintendo DS Profile) cause it to crash in 3DS-mode due to a stack-smash. The DSi is not vulnerable to this, DSi launcher(menu) and DSi System Settings will reset the NVRAM user-settings if the length field values are too long(same result as when the CRCs are invalid). TWL_FIRM also resets the NVRAM user-settings when the string-length(s) are too long.&lt;br /&gt;
| [[7.0.0-13]]&lt;br /&gt;
| [[7.0.0-13]]&lt;br /&gt;
| 2012&lt;br /&gt;
| [[User:Ichfly|Ichfly]]&lt;br /&gt;
|-&lt;br /&gt;
| 3DS [[System Settings]] stack smash via title strings in [[DSiWare_Exports]]&lt;br /&gt;
| DSiWare export banners contain 16 consecutive 0x100 byte, utf-16 game title strings for different languages. Nintendo correctly limits the string&#039;s max length by placing a NULL at str[127] before it&#039;s copied to the stack. However, they didn&#039;t allocate enough space for all 128 wchars (char/wchar type confusion?), so an attacker can craft a valid full-length string that will crash the stack at about str+0xEC. ROP execution can then be obtained from this crash in DSiWare Data Management as demonstrated [https://github.com/zoogie/Bannerbomb3 here].&lt;br /&gt;
&lt;br /&gt;
Interesting note: A line feed wchar (00 0A) at any point in the string before the crash offset will prevent the crash from occurring.&lt;br /&gt;
| None&lt;br /&gt;
| [[11.10.0-43]]&lt;br /&gt;
| Dec. 2018&lt;br /&gt;
| Zoogie&lt;br /&gt;
|-&lt;br /&gt;
| [[Nintendo 3DS Sound]]&lt;br /&gt;
| When a .m4a is loaded, the song name is copied to a 256 byte buffer. When the song name begins with a Unicode BOM marker, it memcpy&#039;s the tag using the user-provided length. This gives an arbitrary write which can be used to achieve ROP.&lt;br /&gt;
| [[11.4.0-37]]&lt;br /&gt;
| [[11.4.0-37]]&lt;br /&gt;
| June/July 2016&lt;br /&gt;
| [[User:nedwill|nedwill]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=System applets=&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Summary&lt;br /&gt;
!  Description&lt;br /&gt;
!  Fixed in version&lt;br /&gt;
!  Last version this flaw was checked for&lt;br /&gt;
!  Introduced with version&lt;br /&gt;
!  Timeframe info related to this was added to wiki&lt;br /&gt;
!  Timeframe this was discovered&lt;br /&gt;
!  Discovered by&lt;br /&gt;
|-&lt;br /&gt;
| Webkit/web-browser bugs&lt;br /&gt;
| spider has had at least three different code-execution exploits. Majority of them are use-after-free issues. See also [[browserhax|here]].&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| &lt;br /&gt;
| 2013?&lt;br /&gt;
|&lt;br /&gt;
| A lot of people.&lt;br /&gt;
|-&lt;br /&gt;
| Old3DS/New3DS [[Internet_Browser|Browser-version-check]] bypass&lt;br /&gt;
| When the browser-version-check code runs where the savedata for it was never initialized(such as when the user used the &amp;quot;Initialize savedata&amp;quot; option), it will use base_timestamp=0 instead of the timestamp loaded from savedata. This is then used with &amp;quot;if(cur_timestamp - base_timestamp &amp;gt;= &amp;lt;24h timestamp&amp;gt;){Run browser-version-check HTTPS request code}&amp;quot;.&lt;br /&gt;
Hence, if the savedata was just initialized, and if the system datetime is set to before January 2, 2000, the browser-version-check will be skipped. This includes January 1, 2000, 00:00, because that&#039;s the epoch(timestamp value 0x0) used with this timestamp.&lt;br /&gt;
&lt;br /&gt;
See [http://yls8.mtheall.com/3dsbrowserhax.php here] for bypass usage instructions.&lt;br /&gt;
&lt;br /&gt;
This was fixed with [[10.7.0-32|10.7.0-32]], see [[Internet_Browser|here]] for details.&lt;br /&gt;
| [[10.7.0-32|10.7.0-32]]&lt;br /&gt;
| &lt;br /&gt;
| [[9.9.0-26|9.9.0-26]]&lt;br /&gt;
| February 25, 2016&lt;br /&gt;
| November 2, 2015 (Exactly one week after the browser version pages were initially updated server-side)&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| Skater - Bookmark OOB write&lt;br /&gt;
| Each bookmark has an id that should not exceed 0x63 (99), however ids are not checked, this results in an OOB write on the stack, but only the value 0x01 can be written.&lt;br /&gt;
| &lt;br /&gt;
| [[11.6.0-39|11.6.0-39]]&lt;br /&gt;
| &lt;br /&gt;
| May 21, 2018&lt;br /&gt;
| May 20, 2018&lt;br /&gt;
| [[User:Nba_Yoh|MrNbaYoh]]&lt;br /&gt;
|-&lt;br /&gt;
| MicroSD Management - malformed security blob causes stack buffer overflow (mhax) &lt;br /&gt;
| The MicroSD Management application&#039;s parsing of Windows NTLM security blobs in the SMB/CIFS protocol doesn&#039;t verify that the client&#039;s specified NT domain name is less than 32 UTF-16 characters.  When it&#039;s longer, a stack buffer overrun occurs, leading to a ROP chain and complete control of the mcopy application.&lt;br /&gt;
&lt;br /&gt;
The malformed security blob can be sent by an attacker within the SMB_COM_SESSION_SETUP_ANDX (0x73) packet.&lt;br /&gt;
| [[11.8.0-41|11.8.0-41]]&lt;br /&gt;
| [[11.8.0-41|11.8.0-41]]&lt;br /&gt;
| [[9.0.0-20|9.0.0-20]]&lt;br /&gt;
| August 12, 2018&lt;br /&gt;
| 2018&lt;br /&gt;
| smea&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Home Menu==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Summary&lt;br /&gt;
!  Description&lt;br /&gt;
!  Fixed in version&lt;br /&gt;
!  Last version this flaw was checked for&lt;br /&gt;
!  Introduced with version&lt;br /&gt;
!  Timeframe info related to this was added to wiki&lt;br /&gt;
!  Timeframe this was discovered&lt;br /&gt;
!  Discovered by&lt;br /&gt;
|-&lt;br /&gt;
| bossbannerhax&lt;br /&gt;
| After successfully loading [[Extended_Banner|extended-banner]] data(done when selecting an icon), Home Menu attempts to load &amp;quot;[[CBMD]]&amp;quot; data into a 0x100000-byte heap buffer from the [[BOSS_Services|stored]] SpotPass content. When successful and the magic-number is CBMD, Home Menu then decompresses the exbanner sections into another fixed-size heap buffer, without checking the outsize at all. The main CBMD CGFX code with ExeFS checks the size, but this code doesn&#039;t(however this is exbanner &amp;quot;CBMD&amp;quot;, not a &amp;quot;normal&amp;quot; CBMD).&lt;br /&gt;
&lt;br /&gt;
Used with menuhax as of v3.2.&lt;br /&gt;
| [[11.3.0-36|11.3.0-X]]&lt;br /&gt;
| &lt;br /&gt;
| [[1.0.0-0|1.0.0-0]]&lt;br /&gt;
| November 18, 2016&lt;br /&gt;
| December 23, 2014&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| sdiconhax&lt;br /&gt;
| This is basically the same as nandiconhax, the vulnerable SD/NAND functions are &#039;&#039;identical&#039;&#039; minus the file-buffer offsets. Exploitation is different due to different heap-buffer location though. Unlike nandiconhax, the icon buffer for SD is located in linearmem(with recent Home Menu versions at least). This is used by [[menuhax]].&lt;br /&gt;
| [[11.1.0-34|11.1.0-X]]&lt;br /&gt;
| &lt;br /&gt;
| [[4.0.0-7|4.0.0-X]]&lt;br /&gt;
| July 27, 2016&lt;br /&gt;
| October 23, 2015&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| [[System_SaveData|NAND-savedata]] Launcher.dat icons (nandiconhax)&lt;br /&gt;
| The homemenu code processing the titleid list @ launcherdat+8 copies those titleIDs to another buffer, where the offset relative to that buffer is calculated using the corresponding s8/s16 entries. Those two values are not range checked at all. Hence, one can use this to write u64(s) with arbitrary values to before/after this allocated output buffer. See [[Home_Menu|here]] regarding Launcher.dat structure.&lt;br /&gt;
&lt;br /&gt;
This can be exploited(with Launcher.dat loading at startup at least) by using a s16 for the icon entry with value 0xFFEC(-20)(and perhaps more icons with similar s16 values to write multiple u64s). The result is that the u64 value is written to outbuf-0xA0, which overwrites object+0(vtable) and object+4(doesn&#039;t matter here) for an object that gets used a bit after the vulnerable function triggers. The low 32bits of the u64 can then be set to the address of controlled memory(either outbuf in regular heap or the entire launcherdat buffer in linearmem), for use as a fake vtable in order to get control of PC. From there one can begin ROP via vtable funcptrs to do a stack-pivot(r4=objectaddr at the time the above object gets used).&lt;br /&gt;
&lt;br /&gt;
Originally this vuln could only be triggered via Launcher.dat at Home Menu startup, right after Launcher.dat gets loaded + memory gets allocated, once the file-format version code is finished running. Starting with v9.6 this can be triggered when loading layouts from SD extdata as well. The vuln itself triggers before the layout data is written to Launcher.dat, but it doesn&#039;t seem to be possible to overwrite anything which actually gets used before the function which writes Launcher.dat into the layout gets called.&lt;br /&gt;
&lt;br /&gt;
Home Menu has some sort of fail-safe system(or at least on v9.7) when Home Menu crashes due to Launcher.dat(this also applies for other things with Home Menu): after crashing once, Home Menu resets Launcher.dat to a state where it no longer crashes anymore. However, note that any exploits using this which hang/etc without crashing will still brick the system. &#039;&#039;&#039;Hence, attempting anything with this on physnand without hw-nand-access isn&#039;t really recommended.&#039;&#039;&#039;&lt;br /&gt;
| [[11.1.0-34|11.1.0-X]]&lt;br /&gt;
| &lt;br /&gt;
| [[4.0.0-7|4.0.0-X]]&lt;br /&gt;
| &lt;br /&gt;
| May 14, 2015&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| Theme-data decompression buffer overflow ([[menuhax|themehax]])&lt;br /&gt;
| The only func-call size parameter used by the theme decompression function is one for the compressed size, none for the decompressed size. The decompressed-size value from the LZ header is used by this function to check when to stop decompressing, but this function itself has nothing to verify the decompressed_size with. The code calling this function does not check or even use the decompressed size from the header either.&lt;br /&gt;
&lt;br /&gt;
This function is separate from the rest of the Home Menu code: the function used for decompressing themes is *only* used for decompressing themes, nothing else. There&#039;s a separate decompression function in Home Menu used for decompressing everything else.&lt;br /&gt;
&lt;br /&gt;
That other decompression function in Home Menu handles decompression size properly(decompressed size check for max buffer size is done by code calling the other function, not in the function itself). Unlike the other function, the theme function supports multiple LZ algorithms, but the one which actually gets used in official themes is the same one supported by the other function anyway.&lt;br /&gt;
&lt;br /&gt;
See also [[menuhax|here]].&lt;br /&gt;
&lt;br /&gt;
With [[10.2.0-28|10.2.0-X]] Home Menu, the only code change was that the following was added right after theme-load and before actual decompression: &amp;quot;if(&amp;lt;get_lzheader_decompressed_size&amp;gt;(compressed_buf) &amp;gt; 0x150000)&amp;lt;exit&amp;gt;;&amp;quot;. This fixed the vuln.&lt;br /&gt;
| [[10.2.0-28|10.2.0-X]]&lt;br /&gt;
| [[10.2.0-28|10.2.0-X]]&lt;br /&gt;
| &amp;lt;Old3DS/New3DS version which added initial theme support&amp;gt;&lt;br /&gt;
| &lt;br /&gt;
| December 22, 2014&lt;br /&gt;
| [[User:Yellows8|Yellows8]], [[User:Myria|Myria]] independently (~spring 2015)&lt;br /&gt;
|-&lt;br /&gt;
| Shuffle body-data buffer overflow ([[menuhax|shufflehax]])&lt;br /&gt;
| See [[menuhax|here]].&lt;br /&gt;
| [[10.6.0-31|10.6.0-X]]&lt;br /&gt;
| [[10.6.0-31|10.6.0-X]]&lt;br /&gt;
| [[9.3.0-21|9.3.0-X]]&lt;br /&gt;
| &lt;br /&gt;
| January 3, 2015&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| Extdata file-data loading buffer overflow&lt;br /&gt;
| The extdata file-reading code allocates a fixed-size heap buffer for the expected filesize, then reads the filedata into this buffer using the actual FS filesize. Before v5.0 the filesize used here wasn&#039;t validated, hence if the filesize is larger than alloc_size a buffer overflow would occur. &#039;&#039;After&#039;&#039; doing the file-read it does validate that the actual_readsize matches the alloc_size, but at this point the buffer overflow has already occurred.&lt;br /&gt;
&lt;br /&gt;
This affected at least the following: SaveData.dat and Cache.dat.&lt;br /&gt;
&lt;br /&gt;
This can be triggered with SaveData.dat by installing a &amp;lt;v4.0 Home Menu version, with Home Menu extdata from &amp;gt;=v4.0 still on SD. When this is done with v2.0 Home Menu, a kernelpanic occurs when processing an AM command(it appears a buffer ptr which is then passed to a command was overwritten with 0x0 - of course other SaveData.dat filesizes may result in different behaviour).&lt;br /&gt;
| [[5.0.0-11|5.0.0-X]]&lt;br /&gt;
| &lt;br /&gt;
| [[2.0.0-2|2.0.0-X]]&lt;br /&gt;
| June 9, 2016&lt;br /&gt;
| June 9, 2016&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The icon data arrays used with {sd/nand}iconhax were added to SaveData.dat/Launcher.dat with [[4.0.0-7|4.0.0-X]], hence the vulnerable functions were added with that same version.&lt;br /&gt;
&lt;br /&gt;
With &amp;lt;=v4.0 the SaveData.dat buffer is located in the regular heap. It&#039;s unknown when exactly it was moved to linearmem, which is where it&#039;s located with recent versions. It&#039;s located in linearmem for KOR &amp;gt;=v9.6 for example.&lt;br /&gt;
&lt;br /&gt;
The SaveData.dat/Launcher.dat icon vulns were fixed by doing various unsigned &amp;gt;=60/&amp;gt;=360 checks on the loaded values. When these checks fail, it just skips over handling this icon entry. Hence, the original value can&#039;t be negative / out-of-bounds any more.&lt;br /&gt;
&lt;br /&gt;
==Useless crashes==&lt;br /&gt;
Old3DS system web-browser:&lt;br /&gt;
* 2^32 characters long string(&#039;&#039;finally&#039;&#039; fixed with v10.6): this is similar to the vulnerability fixed [http://git.chromium.org/gitweb/?p=external/Webkit.git;a=commitdiff;h=ec471f16fbd1f879cb631f9b022fd16acd75f4d4 here], concat-large-strings-crash2.html triggers a crash which is about the same as the one triggered by a 2^32 string. Most of the time this vulnerability will cause a memory page permissions fault, since the WebKit code attempts to copy the string text data to the output buffer located in read-only [[CRO0|CRO]] heap memory. The only difference between a crash triggered by a 2^32 string and the concat-large-strings-crash2.html crash is at the former copies the string data using the original string length(like 1 text character for &amp;quot;x&amp;quot;, 4 for &amp;quot;xxxx&amp;quot;) while the latter attempts to copy &amp;gt;12MB. In some &#039;&#039;very&#039;&#039; rare cases a thread separate from the string data-copy thread will crash, this might be exploitable. However, this is mostly useless since it rarely crashes this way.&lt;br /&gt;
&lt;br /&gt;
* Trying to directly load a page via the browser &amp;quot;URL&amp;quot; option with [https://github.com/yellows8/3ds_browserhax_common webkitdebug] setup, causes a crash to trigger in oss.cro due to an use-after-free being caught with webkitdebug. This is presumably some sort of realloc() issue in the libcurl version used by the &amp;lt;={v10.2-v10.3} browser. This happens with *every* *single* *page* one tries to load via the &amp;quot;URL&amp;quot; option, but not when loading links on the current page, hence this is probably useless. A different use-after-free with realloc triggers with loading any page at all regardless of method too(libcurl probably).&lt;br /&gt;
&lt;br /&gt;
* This WebKit build has &#039;&#039;a lot&#039;&#039; of crash-trigger bugs that only happen with [https://github.com/yellows8/3ds_browserhax_common webkitdebug] completely setup(addr accesses near 0x0), with &#039;&#039;just&#039;&#039; trying to load any page at all.&lt;/div&gt;</summary>
		<author><name>EvilFlight</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=3DS_System_Flaws&amp;diff=20882</id>
		<title>3DS System Flaws</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=3DS_System_Flaws&amp;diff=20882"/>
		<updated>2019-01-10T19:58:10Z</updated>

		<summary type="html">&lt;p&gt;EvilFlight: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Exploits are used to execute unofficial code (homebrew) on the Nintendo 3DS. This page is a list of publicly known system flaws, for userland applications/applets flaws see [[3DS_Userland_Flaws|here]].&lt;br /&gt;
&lt;br /&gt;
=Stale / Rejected Efforts=&lt;br /&gt;
* In the early days of 3DS hacking, Neimod was working on a RAM dumping setup for a while. He has de-soldered the 3DS&#039;s RAM chip and hooked it and the RAM pinouts on the 3DS&#039; PCB up to a custom RAM dumping setup. He &#039;&#039;has&#039;&#039; published photos showing his setup to be working quite well, with the 3DS successfully booting up, but however, his flickr stream is now private along with most of his work and this method has been unreleased. RAM dumping can be done through homebrew now, making this method obsolete regardless.&lt;br /&gt;
&lt;br /&gt;
==Tips and info==&lt;br /&gt;
The 3DS uses the XN feature of the ARM11 processor. There&#039;s no official way from applications to enable executable permission for memory containing arbitrary unsigned code(there&#039;s a [[SVC]] for this, but only [[RO_Services|RO-module]] has access to it). A usable userland exploit would still be useful: you could only do return-oriented-programming with it initially. From ROP one could then exploit system flaw(s), see below.&lt;br /&gt;
&lt;br /&gt;
SD card [[extdata]] and SD savegames can be attacked, for consoles where the console-unique [[Nand/private/movable.sed|movable.sed]] was dumped(accessing SD data is far easier by running code on the target 3DS however).&lt;br /&gt;
&lt;br /&gt;
=System flaws=&lt;br /&gt;
== Hardware ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Summary&lt;br /&gt;
!  Description&lt;br /&gt;
!  Fixed with hardware model/revision&lt;br /&gt;
!  Newest hardware model/revision this flaw was checked for&lt;br /&gt;
!  Timeframe this was discovered&lt;br /&gt;
!  Discovered by&lt;br /&gt;
|-&lt;br /&gt;
| ARM9/ARM11 bootrom vectors point at uninitialized RAM&lt;br /&gt;
| ARM9&#039;s and ARM11&#039;s exception vectors are hardcoded to point at the CPU&#039;s internal memory (0x08000000 region for ARM9, AXIWRAM for ARM11). While the bootrom does set them up to point to an endless loop at some point during boot, it does not do so immediately. As such, a carefully-timed fault injection (via hardware) to trigger an exception (such as an invalid instruction) will cause execution to fall into ARM9 RAM. &lt;br /&gt;
Since RAM isn&#039;t cleared on boot (see below), one can immediately start execution of their own code here to dump bootrom, OTP, etc.&lt;br /&gt;
The ARM9 bootrom does the following at reset:  reset vector branches to another instruction, then branches to bootrom+0x8000. Hence, there&#039;s no way to know for certain when exactly the ARM9 exception-vector data stored in memory gets initialized.&lt;br /&gt;
&lt;br /&gt;
This requires *very* *precise* timing for triggering the hardware fault.&lt;br /&gt;
&lt;br /&gt;
It has been exploited by derrek to dump the ARM9 bootrom as of Summer 2015.&lt;br /&gt;
| None: all available 3DS models at the time of writing have the exact same ARM9/ARM11 bootrom for the unprotected areas.&lt;br /&gt;
| New3DS&lt;br /&gt;
| End of February 2014&lt;br /&gt;
| [[User:Derrek|derrek]], WulfyStylez (May 2015) independently&lt;br /&gt;
|-&lt;br /&gt;
| Missing AES key clearing&lt;br /&gt;
| The hardware AES engine does not clear keys when doing a hard reset/reboot.&lt;br /&gt;
| None&lt;br /&gt;
| New3DS&lt;br /&gt;
| August 2014&lt;br /&gt;
| Mathieulh/Others&lt;br /&gt;
|-&lt;br /&gt;
| No RAM clearing on reboots&lt;br /&gt;
| On an MCU-triggered reboot all RAM including FCRAM/ARM9 memory/AXIWRAM/VRAM keeps its contents.&lt;br /&gt;
| None&lt;br /&gt;
| New3DS&lt;br /&gt;
| March 2014&lt;br /&gt;
| [[User:Derrek|derrek]]&lt;br /&gt;
|-&lt;br /&gt;
| 32bits of actual console-unique TWLNAND keydata&lt;br /&gt;
| On retail the 8-bytes at ARM9 address [[Memory_layout|0x01FFB808]] are XORed with hard-coded data, to generate the TWL console-unique keys, including TWLNAND. On Old3DS the high u32 is always 0x0, while on New3DS that u32 is always 0x2. On top of this, the lower u32&#039;s highest bit is always ORed. only 31 bits of the TWL console-unique keydata / TWL consoleID are actually console-unique.&lt;br /&gt;
This allows one to easily bruteforce the TWL console-unique keydata with *just* data from TWLNAND. On DSi the actual console-unique data for key generation is 8-bytes(all bytes actually set).&lt;br /&gt;
| None&lt;br /&gt;
| New3DS&lt;br /&gt;
| 2012?&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| DSi / 3DS-TWL key-generator&lt;br /&gt;
| After using the key generator to generate the normal-key, you could overwrite parts of the normal-key with your own data and then recover the key-generator output by comparing the new crypto output with the original crypto output. From the normal-key outputs, you could deduce the TWL key-generator function.&lt;br /&gt;
This applies to the keyX/keyY too.&lt;br /&gt;
&lt;br /&gt;
This attack does not work for the 3DS key-generator because keyslots 0-3 are only for TWL keys.&lt;br /&gt;
| None&lt;br /&gt;
| New3DS&lt;br /&gt;
| 2011&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| 3DS key-generator&lt;br /&gt;
| The algorithm for generating the normal-keys for keyslots is cryptographically weak.  As a result, it is easily susceptible to differential cryptanalysis if the normal-key corresponding to any scrambler-generated keyslot is discovered.&lt;br /&gt;
&lt;br /&gt;
Several such pairs of matching normal-keys and KeyY values were found, leading to deducing the key-generator function.&lt;br /&gt;
| None&lt;br /&gt;
| New3DS&lt;br /&gt;
| February 2015&lt;br /&gt;
| [[User:Yellows8|Yellows8]], [[User:Plutooo|plutoo]]&lt;br /&gt;
|-&lt;br /&gt;
| RSA keyslots don&#039;t clear exponent when setting modulus&lt;br /&gt;
| The [[RSA_Registers|RSA keyslots]] are set by boot ROM to have four private RSA keys.  The exponent value in the RSA registers is write-only and not readable.&lt;br /&gt;
&lt;br /&gt;
However, when setting a keyslot&#039;s modulus, the RSA hardware leaves the exponent alone.  This allows retrieving the exponent by doing a discrete logarithm of the output.&lt;br /&gt;
&lt;br /&gt;
By setting the modulus to a prime number whose modular multiplicative order is &amp;quot;smooth&amp;quot; (that is, p-1 is divisible by only small prime numbers), discrete logarithms can be calculated quickly using the [[wikipedia:Pohlig-Hellman algorithm|Pohlig-Hellman algorithm]].  If the prime chosen is greater than the modulus, but the same bit size, the discrete logarithm is the private exponent.&lt;br /&gt;
&lt;br /&gt;
This exploit&#039;s usefulness is limited: RSA keyslot 0 is only used in current firmware for deriving the 6.x save and 7.x NCCH keys, which were already known, and the other three keyslots are entirely unused.  Additionally, with a boot ROM dump, this exploit is moot; these private keys are located in the protected ARM9 boot ROM.&lt;br /&gt;
| None&lt;br /&gt;
| New3DS&lt;br /&gt;
| March 2016&lt;br /&gt;
| [[User:Myria|Myria]]&lt;br /&gt;
|-&lt;br /&gt;
| [[CONFIG11_Registers#CFG11_GPUPROT|CFG11_GPUPROT]] allowing acccess to AXIWRAM/FCRAM-BASE-memregion&lt;br /&gt;
| [[CONFIG11_Registers#CFG11_GPUPROT|CFG11_GPUPROT]] can be configured by anything with access to it to allow the GPU to access the entire AXIWRAM+FCRAM. For example, this is an issue for any sysmodule that gets exploited and has access to this register memory-page(include one that&#039;s listed below).&lt;br /&gt;
&lt;br /&gt;
See also &amp;quot;kernelhax via gspwn&amp;quot; below.&lt;br /&gt;
| None&lt;br /&gt;
| New3DS&lt;br /&gt;
| February 7, 2017&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Boot ROM ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Summary&lt;br /&gt;
!  Description&lt;br /&gt;
!  Fixed with hardware model/revision&lt;br /&gt;
!  Newest hardware model/revision this flaw was checked for&lt;br /&gt;
!  Timeframe this was discovered&lt;br /&gt;
!  Discovered by&lt;br /&gt;
|-&lt;br /&gt;
| FIRM partitions known-plaintext&lt;br /&gt;
| The [[Flash_Filesystem|FIRM partitions]] are encrypted with AES-CTR without a MAC. Since this works by XOR&#039;ing data with a static (per-console in this case) keystream, one can deduce the keystream of a portion of each FIRM partition if they have the actual FIRM binary stored in it.&lt;br /&gt;
&lt;br /&gt;
This can be paired with many exploits. For example, it allows minor FIRM downgrades (i.e. 10.4 to 9.6 or 9.5 to 9.4, but not 9.6 to 9.5).&lt;br /&gt;
However it is most commonly used to install arbitrary FIRMs (usually boot9strap), thanks to sighax.&lt;br /&gt;
&lt;br /&gt;
This can be somewhat addressed by having a FIRM header skip over previously used section offsets, but this would just air-gap newer FIRMs without fixing the core bug. This can also only be done a limited number of times due to the size of FIRM versus the size of the partitions.&lt;br /&gt;
| None&lt;br /&gt;
| New3DS&lt;br /&gt;
| &lt;br /&gt;
| Everyone&lt;br /&gt;
|-&lt;br /&gt;
| Boot9 AES keyinit function issues&lt;br /&gt;
| [[Bootloader|Boot9]] seems to have two bugs in the AES key-init function, see [[AES_Registers#AES_key-init|here]].&lt;br /&gt;
| None&lt;br /&gt;
| BootROM issue.&lt;br /&gt;
| 2015&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| New3DS has same boot ROM as Old3DS&lt;br /&gt;
| The New3DS has the exact same boot ROM as the Old3DS.  This means, among other things, that all the same boot ROM flaws are present.  Also, this meant that it is possible to boot Old3DS firmware on New3DS (see &amp;quot;CFG9_SYSPROT9 bit1 not set by Kernel9&amp;quot;).&lt;br /&gt;
| None&lt;br /&gt;
| New3DS&lt;br /&gt;
| October 2014&lt;br /&gt;
| Everyone&lt;br /&gt;
|-&lt;br /&gt;
| sighax: Boot9 improper validation of FIRM partition RSA signatures&lt;br /&gt;
| The [[Flash_Filesystem|FIRM partitions]] are signed with RSA-2048 using SHA-256 and PKCS #1 v1.5 padding.  Boot9, however, improperly validates the padding in three ways:&lt;br /&gt;
# Boot9 permits block type 02, meant for encrypted messages, to be used for signatures.  Only 01, for signatures, should have been permitted.  As a result, when using block type 02, a signature block is not required to have a long string of FF bytes as padding, but rather any nonzero random values suffice.&lt;br /&gt;
# Boot9 does not require that the length of the padding fill out the signature block completely.  As a result, there is considerable freedom in the layout of a signature.&lt;br /&gt;
# Boot9 fails to do bounds checking in its parsing of the DER-encoded hash algorithm type and hash value; the length values given in DER are permitted to point outside the signature block.&lt;br /&gt;
Flaw 3 allows the DER encoding to be such that boot9 believes that the signature&#039;s hash value is outside the range of the block itself, somewhere on the stack.  This can be pointed at the correct hash value it computes.  Boot9 then memcmp&#039;s the calculated hash against itself, and thinks that the hash is valid.&lt;br /&gt;
&lt;br /&gt;
As a result of the above, we estimate that one in 2&amp;lt;sup&amp;gt;43&amp;lt;/sup&amp;gt; (~8.8 trillion) random fake signatures will be considered by Boot9 to be valid.  This is well within the range of brute force, particularly with an optimized GPU implementation.  An Nvidia GTX 1080 Ti would take about one week to find a match.&lt;br /&gt;
| None&lt;br /&gt;
| New3DS&lt;br /&gt;
| July 2015&lt;br /&gt;
| [[User:Derrek|derrek]]&lt;br /&gt;
|-&lt;br /&gt;
| Boot9 FIRM loading doesn&#039;t blacklist memory-mapped I/O&lt;br /&gt;
| [[Bootloader|Boot9]]&#039;s FIRM loading blacklists Boot9 data regions, but forgets to do other important regions, including Memory-mapped I/O. Combined with sighax, by loading a malicious FIRM section to MMIO, one can get Boot9/Boot11 code execution. &lt;br /&gt;
| None&lt;br /&gt;
| New3DS&lt;br /&gt;
| 2015(?)&lt;br /&gt;
| [[User:Derrek|derrek]] (2015?), [[User:Normmatt|Normmatt]] and [[User:SciresM|SciresM]] independently (January 2017).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;superhax&amp;quot;: Boot9 FIRM loading blacklist check is flawed&lt;br /&gt;
| Boot9 only makes sure the &#039;&#039;&#039;start&#039;&#039;&#039; and &#039;&#039;&#039;end&#039;&#039;&#039; address of each section is not covered by a blacklisted region. Thus, it is possible to overwrite blacklisted regions (e.g. ARM9 Exception Vectors) by choosing a FIRM section range that encloses an entire blacklisted region. The vulnerable code looks like this: if(blRegions[i].start &amp;lt;= sectionStart &amp;amp;&amp;amp; blRegions[i].end &amp;gt; sectionStart &amp;lt;nowiki&amp;gt;||&amp;lt;/nowiki&amp;gt; blRegions[i].start &amp;lt;= sectionEnd &amp;amp;&amp;amp; blRegions[i].end &amp;gt; sectionEnd) return false; // failure&lt;br /&gt;
| None&lt;br /&gt;
| New3DS&lt;br /&gt;
| August 2015&lt;br /&gt;
| [[User:Plutoo|plutoo]], [[User:Yellows8|yellows8]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== ARM9 software ==&lt;br /&gt;
&lt;br /&gt;
=== arm9loader ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Summary&lt;br /&gt;
!  Description&lt;br /&gt;
!  Successful exploitation result&lt;br /&gt;
!  Fixed in [[FIRM]] system version&lt;br /&gt;
!  Last [[FIRM]] system version this flaw was checked for&lt;br /&gt;
!  Timeframe this was discovered&lt;br /&gt;
!  Public disclosure timeframe&lt;br /&gt;
!  Discovered by&lt;br /&gt;
|-&lt;br /&gt;
| Generating the keysector console-unique keys with ITCM+Boot9&lt;br /&gt;
| [[Bootloader|Boot9]] decrypts the 0x100-byte [[OTP_Registers|OTP]] using AES-CBC with keydata stored in Boot9. If hash verification is successful, the plaintext of the first 0x90-bytes are copied into [[Memory_layout|ITCM]]. This is the &#039;&#039;exact&#039;&#039; &#039;&#039;same&#039;&#039; region hashed by arm9loader when generating the console-unique keys for decrypting the keysector, except arm9loader uses the raw encrypted OTP.&lt;br /&gt;
&lt;br /&gt;
Therefore, with the OTP keydata+IV from Boot9 you can: encrypt the 0x90-bytes from ITCM, then hash the output to get the console-unique keys for the system&#039;s keysector. This can even be done for Old3DS which doesn&#039;t have the arm9loader keysector officially.&lt;br /&gt;
&lt;br /&gt;
It&#039;s unknown why arm9loader only used the first 0x90-bytes of OTP. Using more data from OTP would&#039;ve prevented this. Fixing this would require doing exactly that, but that would also mean updating the NAND keysector(which is dangerous).&lt;br /&gt;
| See description.&lt;br /&gt;
| None&lt;br /&gt;
| &lt;br /&gt;
| 2015&lt;br /&gt;
| January 6, 2017&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| Rearrangable keys in the NAND keystore&lt;br /&gt;
| Due to the keystore being encrypted with AES-ECB, one can rearrange blocks and still have the NAND keystore decrypt in a deterministic way. &lt;br /&gt;
&lt;br /&gt;
Using 10.0 FIRM it is possible to rearrange keys such that ARM9 memory is executed. As such using existing ARM9 execution 10.0 FIRM can be written to NAND and a payload written to memory, with the payload to be executed post-K9L using an MCU reboot.&lt;br /&gt;
| arm9loaderhax given existing ARM9 code execution&lt;br /&gt;
| None&lt;br /&gt;
| [[11.3.0-36|11.3.0-X]]&lt;br /&gt;
| Early 2016&lt;br /&gt;
| 27 September 2016&lt;br /&gt;
| Myria, [[User:Dark samus|dark_samus]]; mathieulh (independently); [[User:Plutooo|plutoo]] (independently) + others&lt;br /&gt;
|-&lt;br /&gt;
| Uncleared OTP hash keydata in console-unique 0x11 key-generation&lt;br /&gt;
| Kernel9Loader does not clear the [[SHA_Registers#SHA_HASH|SHA_HASH register]] after use. As a result, the data stored here as K9L hands over to Kernel9 is the hash of [[OTP_Registers|OTP data]] used to seed the [[FIRM#New_3DS_FIRM|console-unique NAND keystore decryption key]] set on keyslot 0x11.&lt;br /&gt;
&lt;br /&gt;
Retrieving this keydata and the [[Flash_Filesystem#0x12C00|NAND keystore]] of the same device allows calculating the decrypted New3DS NAND keystore (non-unique, common to all New3DS units), which contains AES normal keys, also set on keyslot 0x11, which are then used to derive all current [[AES_Registers#Keyslots|New3DS-only AES keyXs]] including the newer batch introduced in [[9.6.0-24#arm9loader|9.6.0-X]]. From there, it is trivial to perform the same key derivation in order to initialize those keys on any system version, and even on Old3DS.&lt;br /&gt;
&lt;br /&gt;
This can be performed by exploiting the &amp;quot;arm9loaderhax&amp;quot; vulnerability to obtain post-K9L code execution after an MCU reboot (the bootrom section-loading fail is not relevant here, this attack was performed without OTP data by brute-forcing keys), and using this to dump the SHA_HASH register. This attack works on any FIRM version shipping a vulnerable version of K9L, whereas OTP dumping required a boot of &amp;lt;[[3.0.0-6|3.0.0-X]].&lt;br /&gt;
&lt;br /&gt;
This attack results in obtaining the entire (0x200-bytes) NAND keystore - it was confirmed at a later date that this keystore is encrypted with the same key (by comparing the decrypted data from multiple units), and therefore using another key in this store will not remedy the issue as all keys are known (i.e. later, unused keys decrypt to the same 0x200-bytes constant with the same OTP hash). Later keys could have been encrypted differently but this is not the case. As a result of this, it is not possible for Nintendo to use K9L again in its current format for its intended purpose, though this was not news from the moment people dumped a New3DS OTP.&lt;br /&gt;
| Derivation of all New3DS keys generated via the NAND keystore (0x1B &amp;quot;Secure4&amp;quot; etc.)&lt;br /&gt;
| None&lt;br /&gt;
| [[11.3.0-36|11.3.0-X]]&lt;br /&gt;
| ~April 2015, implemented in May 2015&lt;br /&gt;
| 13 January 2016&lt;br /&gt;
| [[User:WulfyStylez|WulfyStylez]], [[User:Dazzozo|Dazzozo]], [[User:Shinyquagsire23|shinyquagsire23]] (complimentary + implemented), [[User:Plutooo|plutoo]], Normmatt (discovered independently)&lt;br /&gt;
|-&lt;br /&gt;
| enhanced-arm9loaderhax&lt;br /&gt;
| See the 32c3 3ds talk.&lt;br /&gt;
Since this is a combination of a trick with the arm9-bootrom + arm9loaderhax, and since you have to manually write FIRM to the firm0/firm1 NAND partitions, this can&#039;t be completely fixed. Any system with existing ARM9 code execution and an OTP/OTP hash dump can exploit this. Additionally, by using the FIRM partition known-plaintext bug and bruteforcing the second entry in the keystore, this can currently be exploited on all New3DS systems without any other prerequisite hacks.&lt;br /&gt;
| arm9loaderhax which automatically occurs at hard-boot.&lt;br /&gt;
| See arm9loaderhax / description.&lt;br /&gt;
| See arm9loaderhax / description.&lt;br /&gt;
| Theorized around mid July, 2015. Later implemented+tested by [[User:Plutooo|plutoo]] and [[User:Derrek|derrek]].&lt;br /&gt;
| 32c3 3ds talk (December 27, 2015)&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| arm9loaderhax: Missing verification block for the 9.6 keys&lt;br /&gt;
| Starting with [[9.6.0-24|9.6.0-X]] a new set of NAND-based keys were introduced. However, no verification block was added to verify that the new key read from NAND is correct. This was technically an issue from [[9.5.0-22|9.5.0-X]] with the original sector+0 keydata, however the below is only possible with [[9.6.0-24|9.6.0-X]] since keyslots 0x15 and 0x16 are generated from different 0x11 keyXs.&lt;br /&gt;
&lt;br /&gt;
Writing an incorrect key to NAND will cause arm9loader to decrypt the ARM9 kernel as garbage and then jump to it.&lt;br /&gt;
&lt;br /&gt;
This allows an hardware-based attack where you can boot into an older exploited firmware, fill all memory with NOP sleds/jump-instructions, and then reboot into executing garbage. By automating this process with various input keydata, eventually you&#039;ll find some garbage that jumps to your code.&lt;br /&gt;
&lt;br /&gt;
This gives very early ARM9 code execution (pre-ARM9 kernel). As such, it is possible to dump RSA keyslots with this and calculate the 6.x [[Savegames#6.0.0-11_Savegame_keyY|save]], and 7.x [[NCCH]] keys. This cannot be used to recover keys initialized by arm9loader itself. This is due to it wiping the area used for its stack during NAND sector decryption and keyslot init. &lt;br /&gt;
&lt;br /&gt;
Due to FIRMs on both Old and New 3DS using the same RSA data, this can be exploited on Old3DS as well, but only if one already has the actual plaintext normalkey from New3DS NAND sector 0x96 offset-0 and has dumped the OTP area of the Old3DS.&lt;br /&gt;
| Recovery of 6.x [[Savegames#6.0.0-11_Savegame_keyY|save key]]/7.x [[NCCH]] key, access to uncleared OTP hash keydata&lt;br /&gt;
| None&lt;br /&gt;
| [[11.3.0-36|11.3.0-X]]&lt;br /&gt;
| March 2015&lt;br /&gt;
| &lt;br /&gt;
| [[User:Plutooo|plutoo]]&lt;br /&gt;
|-&lt;br /&gt;
| arm9loader runs on Old3DS&lt;br /&gt;
| Despite being written only for New3DS, all of arm9loader runs fine on Old3DS.  It&#039;s not until booting Kernel9 that a New3DS FIRM partition would crash on an Old3DS.  As a result, if a bug exists in arm9loader to get control, it can be exploited on Old3DS by writing New3DS FIRM to the FIRM partitions.  Thus, arm9loaderhax works on both Old3DS and New3DS.&lt;br /&gt;
| arm9loader bugs also compromise Old3DS&lt;br /&gt;
| None&lt;br /&gt;
| [[11.3.0-36|11.3.0-X]]&lt;br /&gt;
| Sometime in 2015&lt;br /&gt;
| &lt;br /&gt;
| [[User:Plutooo|plutoo]] presumably&lt;br /&gt;
|-&lt;br /&gt;
| Uncleared New3DS keyslot 0x11&lt;br /&gt;
| Originally the New3DS [[FIRM]] arm9bin loader only cleared keyslot 0x11 when it gets executed at firmlaunch. This was fixed with [[9.5.0-22|9.5.0-X]] by completely clearing keyslot 0x11 immediately after the loader finishes using keyslot 0x11.&lt;br /&gt;
This means that any ARM9 code that can execute before the loader clears the keyslot at firmlaunch(including firmlaunch-hax) can get access to the uncleared keyslot 0x11, which then allows one to generate all &amp;lt;=v9.5 New3DS keyXs which are generated by keyslot 0x11.&lt;br /&gt;
&lt;br /&gt;
Therefore, to completely fix this the loader would have to generate more keys using different keyslot 0x11 keydata. This was done with [[9.6.0-24|9.6.0-X]].&lt;br /&gt;
| New3DS keyXs generation&lt;br /&gt;
| Mostly fixed with [[9.5.0-22|9.5.0-X]], completely fixed with new keys with [[9.6.0-24|9.6.0-X]].&lt;br /&gt;
| &lt;br /&gt;
| February 3, 2015 (one day after [[9.5.0-22|9.5.0-X]] release)&lt;br /&gt;
| &lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Process9 ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Summary&lt;br /&gt;
!  Description&lt;br /&gt;
!  Successful exploitation result&lt;br /&gt;
!  Fixed in [[FIRM]] system version&lt;br /&gt;
!  Last [[FIRM]] system version this flaw was checked for&lt;br /&gt;
!  Timeframe this was discovered&lt;br /&gt;
!  Public disclosure timeframe&lt;br /&gt;
!  Discovered by&lt;br /&gt;
|-&lt;br /&gt;
| Leak of normal-key matching a key-scrambler key&lt;br /&gt;
| New 3DS firmware versions [[8.1.0-0 New3DS|8.1.0]] through [[9.2.0-20|9.2.0]] set the encryption key for [[Amiibo]] data using a hardcoded normal-key in Process9.  In firmware [[9.3.0-21|9.3.0]], Nintendo &amp;quot;fixed&amp;quot; this by using the key scrambler instead, by calculating the keyY value for keyslot 0x39 that results in the same normal-key, then hardcoding that keyY into Process9.&lt;br /&gt;
&lt;br /&gt;
Nintendo&#039;s fix is actually the problem: Nintendo revealed the normal-key matching an unknown keyX and a known keyY.  Combined with the key scrambler using an insecure scrambling algorithm (see &amp;quot;Hardware&amp;quot; above), the key scrambler function could be deduced.&lt;br /&gt;
| Deducing the keyX for keyslot 0x39 and the key scrambler algorithm&lt;br /&gt;
| New 3DS [[9.3.0-21|9.3.0-X]], sort of&lt;br /&gt;
| [[10.0.0-27|10.0.0-X]]&lt;br /&gt;
| Sometime in 2015 after the hardware key-generator was broken.&lt;br /&gt;
| 32c3 3ds talk (December 27, 2015)&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| Leak of normal-key matching a key-generator key&lt;br /&gt;
| During the 3DS&#039; development (June/July 2010) Nintendo added support installing encrypted content ([[CIA]]). Common-key index1 was intended to be a [[AES|hardware generated key]]. However while they added code to generate the key in hardware, they forgot to remove the normal-key for index1 (used elsewhere, likely old debug code). Nintendo later removed the normal key sometime before the first non-prototype firmware release.&lt;br /&gt;
&lt;br /&gt;
Knowing the keyY and the normal-key for common-key index1, the devkit key-generator algorithm can be deduced (see &amp;quot;Hardware&amp;quot; above). Additionally the remaining devkit common-keys can be generated once the common-key keyX is recovered.&lt;br /&gt;
&lt;br /&gt;
Note that the devkit key-generator was discovered to be the same as the retail key-generator.&lt;br /&gt;
| Deducing the keyX for keyslot 0x3D and hardware key-generator algorithm. Generate remaining devkit common-keys.&lt;br /&gt;
| pre-[[1.0.0-0|1.0.0-X]]&lt;br /&gt;
| &lt;br /&gt;
| Shortly after the key-generator was revealed to be flawed at the 32c3 3ds talk&lt;br /&gt;
| January 20, 2016&lt;br /&gt;
| [[User:Jakcron|jakcron]]&lt;br /&gt;
|-&lt;br /&gt;
| Factory firmware is vulnerable to sighax&lt;br /&gt;
| During the 3DS&#039;s development, presumably boot9 was written (including the sighax vulnerability). This vulnerability is also present in factory firmware (and earlier, including 0.11). This was fixed in version 1.0.0-0.&lt;br /&gt;
| Deducing the mechanics of the sighax vulnerability in boot9 without having a dump of protected boot9. ARM9 code execution on factory/earlier firmware.&lt;br /&gt;
| [[1.0.0-0|1.0.0-X]]&lt;br /&gt;
| [[1.0.0-0|1.0.0-X]]&lt;br /&gt;
| May 9, 2017&lt;br /&gt;
| May 19, 2017&lt;br /&gt;
| [[User:SciresM|SciresM]], [[User:Myria|Myria]]&lt;br /&gt;
|-&lt;br /&gt;
| twlhax: Corrupted SRL header leads to memory overwrite&lt;br /&gt;
| During TWL_FIRM boot, the ARM11 process TwlBg puts launcher.srl, the DSi bootloader, into FCRAM.  TWL_FIRM Process9 then parses the [http://dsibrew.org/wiki/NDS_Format SRL header] to place launcher.srl&#039;s code where DSi mode can execute it.&lt;br /&gt;
&lt;br /&gt;
DSi-mode memory is in FCRAM, but interleaved.  Each byte of DSi-mode memory also exists at some address in 3DS FCRAM space.&lt;br /&gt;
&lt;br /&gt;
Process9 does not validate the RSA signature on launcher.srl, unlike SRLs loaded from cartridge or NAND (DSiWare).  A compromised ARM11 can, in a manner similar to firmlaunchhax, send a launcher.srl with a modified SRL header.  By setting the SRL header&#039;s ARM7/ARM9 load addresses and sizes carefully, accounting for the different memory map and for DSi mode&#039;s interleaved memory, it is possible to overwrite part of Process9&#039;s stack and take control with a ROP chain.&lt;br /&gt;
&lt;br /&gt;
Fixed in 11.8.0-X by... (fill me in)&lt;br /&gt;
| ARM9 code execution (whilst still in 3DS mode)&lt;br /&gt;
| [[11.8.0-41|11.8.0-X]]&lt;br /&gt;
| [[11.8.0-41|11.8.0-X]]&lt;br /&gt;
|&lt;br /&gt;
| August 11, 2018&lt;br /&gt;
| smea&lt;br /&gt;
|-&lt;br /&gt;
| safefirmhax&lt;br /&gt;
| SAFE_MODE_FIRM is almost never updated(even when NATIVE_FIRM is updated for vuln fixes), this can be noticed by &#039;&#039;just&#039;&#039; checking 3dbrew/ninupdates title-listings.&lt;br /&gt;
&lt;br /&gt;
The fix for firmlaunch-hax was only applied to NATIVE_FIRM in [[9.5.0-22|9.5.0-X]], leaving SAFE_FIRM exploitable. With ARM11-kernel execution, one can trigger FIRM-launch in to SAFE_FIRM, do Kernel9 &amp;lt;=&amp;gt; Kernel11 sync, PXI sync and then repeat the original attack on SAFE_FIRM instead.&lt;br /&gt;
| ARM9 code execution&lt;br /&gt;
| [[11.3.0-36|11.3.0-X]]&lt;br /&gt;
| &lt;br /&gt;
| 2012-2013?&lt;br /&gt;
| Wiki: January 2, 2017&lt;br /&gt;
| Everyone&lt;br /&gt;
|-&lt;br /&gt;
| safefirmhax 1.1&lt;br /&gt;
| Nintendo&#039;s original safefirmhax fix was flawed -- they added a global boolean that got set to true whenever a non-sysmodule title got launched (except for a hardcoded repair title id), and panic()&#039;d if that boolean was true to prevent launching safefirm after hax was active. However, because the boolean was initially false after firmlaunch -- With ARM11-kernel execution, one could FIRM-launch into NATIVE_FIRM, and then immediately FIRM-launch again into SAFE_FIRM early in NATIVE_FIRM boot before the boolean got set to true to repeat the safehax attack.&lt;br /&gt;
&lt;br /&gt;
This was fixed by adding additional CFG9_BOOTENV checks to firmlaunch code in 11.4.&lt;br /&gt;
| ARM9 code execution&lt;br /&gt;
| [[11.4.0-37|11.4.0-X]]&lt;br /&gt;
| &lt;br /&gt;
| safefirmhax fix&lt;br /&gt;
| Wiki: April 10, 2017&lt;br /&gt;
| Everyone&lt;br /&gt;
|-&lt;br /&gt;
| ntrcardhax&lt;br /&gt;
| When reading the banner of a NTR title, Process9 relies on a hardware register to know when the banner was fully read.&lt;br /&gt;
However that register is shared between the ARM9 and the ARM11.&lt;br /&gt;
An attacker with k11 control can so make Process9 believe the banner continues forever and so trigger a buffer overflow.&lt;br /&gt;
With a custom banner for a NTR flashcart, this leads to code execution in Process9.&lt;br /&gt;
&lt;br /&gt;
This was fixed by adding bound checks on the read data.&lt;br /&gt;
| ARM9 code execution&lt;br /&gt;
| [[10.4.0-29|10.4.0-X]]&lt;br /&gt;
| &lt;br /&gt;
| March 2015&lt;br /&gt;
| 32c3 3ds talk (December 27, 2015)&lt;br /&gt;
| [[User:Plutooo|plutoo]]&lt;br /&gt;
|-&lt;br /&gt;
| Title downgrading via [[Application_Manager_Services|AM]]([[Application_Manager_Services_PXI|PXI]])&lt;br /&gt;
| When a title is *already* installed, Process9 will compare the installed title-version with the title-version being installed. When the one being installed is older, Process9 would return an error.&lt;br /&gt;
&lt;br /&gt;
However, this can be bypassed by just deleting the title first via the service command(s) for that: with the title removed from the [[Title_Database]], Process9 can&#039;t compare the input title-version with anything. Hence, titles can be downgraded this way.&lt;br /&gt;
&lt;br /&gt;
[[11.0.0-33|11.0.0-X]] fixed this for key system titles (MSET, Home Menu, spider, ErrDisp, SKATER, NATIVE_FIRM, and every retail system module), by checking the version of the title to install against a hard-coded list of (titleID, minimumVersionRequired) pairs.&lt;br /&gt;
| Bypassing title version check at installation, which then allows downgrading any title.&lt;br /&gt;
| [[11.0.0-33|11.0.0-X]], for key system titles.&lt;br /&gt;
| NATIVE_FIRM / AM-sysmodule [[11.0.0-33|11.0.0-X]]&lt;br /&gt;
| ?&lt;br /&gt;
| &lt;br /&gt;
| ?&lt;br /&gt;
|-&lt;br /&gt;
| Anti-downgrade list did not include all system titles initially&lt;br /&gt;
| The anti-downgrade list did not include legacy FIRMs until [[11.8.0-41|11.8.0-X]]. Therefore, legacy FIRMs could still be downgraded.&lt;br /&gt;
| Downgrading legacy FIRMs; allowing to exploit bugs in older legacy FIRMs (of which at least one exists, see below).&lt;br /&gt;
| [[11.8.0-33|11.8.0]]&lt;br /&gt;
| [[11.8.0-33|11.8.0]]&lt;br /&gt;
| ?&lt;br /&gt;
| Wiki: August 5, 2018&lt;br /&gt;
| Everyone&lt;br /&gt;
|-&lt;br /&gt;
| TWL_FIRM cmd-9 unchecked offset&lt;br /&gt;
| In [[1.0.0-0|1.0.0-X]]&#039;s TWL_FIRM, cmds 8 and 9 were not stubbed (whereas in the corresponding NATIVE_FIRM, they were).&lt;br /&gt;
Command 8 does the Process9 initialisation for NTR carts if an NTR cart is inserted (NTR, not TWL, judged by chipid).&lt;br /&gt;
&lt;br /&gt;
Command 9 takes (u32 offset_read, u32 offset_write, u32 offset_read_end), and basically just copies (offset_read_end - offset_read) bytes starting at (offset_read) of [NTR cart header in arm9mem, NTR secure area in fcram, TWL secure area in fcram], to 0x18001000 + offset_write + offset_read.&lt;br /&gt;
&lt;br /&gt;
offset_write is not checked at all, thus this leads to ARM9 code execution as long as any NTR cart, including flashcarts that would normally be blocked by TWL_FIRM, is inserted.&lt;br /&gt;
&lt;br /&gt;
In [[2.0.0-2|2.0.0-X]] TWL_FIRM, those commands were stubbed out.&lt;br /&gt;
| ARM9 code execution&lt;br /&gt;
| [[2.0.0-2|2.0.0-X]]&lt;br /&gt;
| [[2.0.0-2|2.0.0-X]]&lt;br /&gt;
| January 2018&lt;br /&gt;
| Wiki: August 5, 2018&lt;br /&gt;
| [[User:Riley|Riley]]&lt;br /&gt;
|-&lt;br /&gt;
| FIRM launch doesn&#039;t check target FIRM version&lt;br /&gt;
| When executing a FIRM launch, Process9 doesn&#039;t validate that the target FIRM isn&#039;t an old version.  This allows booting an exploitable FIRM from a newer FIRM, if you can get the exploitable FIRM installed.  ([[11.0.0-33|11.0.0-X]] now prevents installing old versions of system titles, but this doesn&#039;t affect titles already installed.)&lt;br /&gt;
&lt;br /&gt;
This had a use after [[9.6.0-24|9.6.0-X]]: on a compromised 3DS running 9.2.0, you could install the 9.6.0 NATIVE_FIRM to FIRM0/FIRM1, but avoid putting it into the NATIVE_FIRM title.  This would boot the 9.2.0 system software but with the 9.6.0 Process9 and Kernel11.  With a user-mode exploit in a sufficiently-privileged application (e.g. mset), you could trigger a FIRM launch back to NATIVE_FIRM, which would load the 9.2.0 Process9 and Kernel11.&lt;br /&gt;
&lt;br /&gt;
9.6.0&#039;s keyslots 0x15 and 0x16 are unknown to 9.2.0, so 9.2.0 would not clear them.  You then could do firmlaunchhax against 9.2.0 to get ARM9 access with keyslots 0x15 and 0x16 set to their proper 9.6.0 values, allowing decrypting 9.6.0&#039;s encrypted titles.  Once the New3DS keystore was dumped, this became moot.&lt;br /&gt;
| Decrypting 9.6.0 NCCH files without dumping New3DS keystore&lt;br /&gt;
| None (but now moot)&lt;br /&gt;
| [[9.6.0-24|9.6.0-X]]&lt;br /&gt;
| March 2015&lt;br /&gt;
| August 12, 2018&lt;br /&gt;
| [[User:Yellows8|Yellows8]], [[User:Myria|Myria]]&lt;br /&gt;
|-&lt;br /&gt;
| FAT FS code null-deref&lt;br /&gt;
| When FSFile:Read is used with a file which is corrupted on a FAT filesystem(in particular SD), Process9 can crash. This particular crash is caused by a function returning NULL instead of an actual ptr due to an error. The caller of that function doesn&#039;t check for NULL which then triggers a read based at NULL.&lt;br /&gt;
&lt;br /&gt;
Sample &amp;quot;fsck.vfat -n -v -V &amp;lt;fat image backup&amp;gt;&amp;quot; output for the above crash:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;...&lt;br /&gt;
Starting check/repair pass.&lt;br /&gt;
&amp;lt;FilePath0&amp;gt; and&lt;br /&gt;
&amp;lt;FilePath1&amp;gt;&lt;br /&gt;
 share clusters.&lt;br /&gt;
 Truncating second to 3375104 bytes.&lt;br /&gt;
&amp;lt;FilePath1&amp;gt;&lt;br /&gt;
 File size is 2787392 bytes, cluster chain length is 16384 bytes.&lt;br /&gt;
 Truncating file to 16384 bytes.&lt;br /&gt;
Checking for unused clusters.&lt;br /&gt;
Reclaimed 1 unused cluster (16384 bytes).&lt;br /&gt;
Checking free cluster summary.&lt;br /&gt;
Free cluster summary wrong (1404490 vs. really 1404491)&lt;br /&gt;
 Auto-correcting.&lt;br /&gt;
Starting verification pass.&lt;br /&gt;
Checking for unused clusters.&lt;br /&gt;
Leaving filesystem unchanged.&amp;lt;/pre&amp;gt;&lt;br /&gt;
| Useless null-based-read&lt;br /&gt;
| None&lt;br /&gt;
| [[9.6.0-24|9.6.0-X]]&lt;br /&gt;
| July 8-9, 2015&lt;br /&gt;
| &lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| RSA signature padding checks&lt;br /&gt;
| The TWL_FIRM RSA sig padding check code used for all TWL RSA sig-checks has issues, see [[FIRM|here]].&lt;br /&gt;
The main 3DS RSA padding check code(non-certificate, including NATIVE_FIRM) uses the function used with the above to extract more padding + the actual hash from the additional padding. This isn&#039;t really a problem here because there&#039;s proper padding check code which is executed prior to this.&lt;br /&gt;
| &lt;br /&gt;
| None&lt;br /&gt;
| [[9.5.0-22|9.5.0-X]]&lt;br /&gt;
| March 2015&lt;br /&gt;
| &lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| [[AMPXI:ValidateDSiWareSectionMAC]] [[AES_Registers|AES]] keyslot reuse&lt;br /&gt;
| When the input DSiWare section index is higher than &amp;lt;max number of DSiWare sections supported by this FIRM&amp;gt;, Process9 uses keyid 0x40 for calculating the AESMAC, which translates to keyslot 0x40. The result is that the keyslot is left at whatever was already selected before, since the AES selectkeyslot code will immediately  return when keyslot is &amp;gt;=0x40. However, actually exploiting this is difficult: the calculated AESMAC is never returned, this command just compares the calculated AESMAC with the input AESMAC(result-code depends on whether the AESMACs match). It&#039;s unknown whether a timing attack would work with this.&lt;br /&gt;
This is basically a different form of the pxips9 keyslot vuln, except with AESMAC etc.&lt;br /&gt;
| See description.&lt;br /&gt;
| None&lt;br /&gt;
| [[11.3.0-36|11.3.0-X]]&lt;br /&gt;
| March 15, 2015&lt;br /&gt;
| December 29, 2015&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| pxips9 [[AES_Registers|AES]] keyslot reuse&lt;br /&gt;
| This requires access to the [[Process_Services|ps:ps]]/pxi:ps9 services. One way to get access to this would be snshax on system-version &amp;lt;=10.1.0-X(see 32c3 3ds talk).&lt;br /&gt;
When an invalid key-type value is passed to any of the PS commands, Process9 will try to select keyslot 0x40. That aesengine_setkeyslot() code will then immediately return due to the invalid keyslot value. Since that function doesn&#039;t return any errors, Process9 will just continue to do crypto with whatever AES keyslot was selected before the PS command was sent.&lt;br /&gt;
| Reusing the previously used keyslot, for crypto with PS.&lt;br /&gt;
| None&lt;br /&gt;
| [[11.3.0-36|11.3.0-X]]&lt;br /&gt;
| Roughly the same time(same day?) as firmlaunch-hax.&lt;br /&gt;
| December 29, 2015&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| firmlaunch-hax: FIRM header ToCToU&lt;br /&gt;
| This can&#039;t be exploited from ARM11 userland.&lt;br /&gt;
During [[FIRM]] launch, the only FIRM header the ARM9 uses at all is stored in FCRAM, this is 0x200-bytes(the actual used FIRM RSA signature is read to the Process9 stack however). The ARM9 doesn&#039;t expect &amp;quot;anything&amp;quot; besides the ARM9 to access this data.&lt;br /&gt;
With [[9.5.0-22]] the address of this FIRM header was changed from a FCRAM address, to ARM9-only address 0x01fffc00.&lt;br /&gt;
| ARM9 code execution&lt;br /&gt;
| [[9.5.0-22]]&lt;br /&gt;
| &lt;br /&gt;
| 2012, 3 days after [[User:Yellows8|Yellows8]] started Process9 code RE.&lt;br /&gt;
| &lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| Uninitialized data output for (PXI) command replies&lt;br /&gt;
| PXI commands for various services(including some [[Filesystem_services_PXI|here]] and many others) can write uninitialized data (like from ARM registers) to the command reply. This happens with stubbed commands, but this can also occur with certain commands when returning an error.&lt;br /&gt;
Certain ARM11 service commands have this same issue as well.&lt;br /&gt;
| &lt;br /&gt;
| None&lt;br /&gt;
| [[9.3.0-21|9.3.0-X]]&lt;br /&gt;
| ?&lt;br /&gt;
| &lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| [[Filesystem_services_PXI|FSPXI]] OpenArchive SD permissions&lt;br /&gt;
| Process9 does not use the exheader ARM9 access-mount permission flag for SD at all.&lt;br /&gt;
This would mean ARM11-kernelmode code / fs-module itself could directly use FSPXI to access SD card without ARM9 checking for SD access, but this is rather useless since a process is usually running with SD access(Home Menu for example) anyway.&lt;br /&gt;
| &lt;br /&gt;
| None&lt;br /&gt;
| [[9.3.0-21|9.3.0-X]]&lt;br /&gt;
| 2012&lt;br /&gt;
| &lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| [[AMPXI:ExportDSiWare]] export path&lt;br /&gt;
| Process9 allocates memory on Process9 heap for the export path then verifies that the actual allocated size matches the input size. Then Process9 copies the input path from FCRAM to this buffer, and uses it with the Process9 FS openfile code, which use paths in the form of &amp;quot;&amp;lt;mountpoint&amp;gt;:/&amp;lt;path&amp;gt;&amp;quot;.&lt;br /&gt;
Process9 does not check the contents of this path at all before passing it to the FS code, besides writing a NUL-terminator to the end of the buffer.&lt;br /&gt;
| Exporting of DSiWare to arbitrary Process9 file-paths, such as &amp;quot;nand:/&amp;lt;path&amp;gt;&amp;quot; etc. This isn&#039;t really useful since the data which gets written can&#039;t be controlled.&lt;br /&gt;
| None&lt;br /&gt;
| [[9.5.0-22]]&lt;br /&gt;
| April 2013&lt;br /&gt;
| &lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| [[DSiWare_Exports]] [[CTCert]] verification&lt;br /&gt;
| Just like DSi originally did, 3DS verifies the APCert for DSiWare on SD with the CTCert also in the DSiWare .bin. On DSi this was fixed with with system-version 1.4.2 by verifying with the actual console-unique cert instead(stored in NAND), while on 3DS it&#039;s still not(?) fixed.&lt;br /&gt;
On 3DS however this is useless, unless one can obtain the console-unique movable.sed keyY which encrypts the entire DSiWare .bin.&lt;br /&gt;
| When the movable.sed keyY for the target 3DS is known and the target 3DS CTCert private-key is unknown, importing of modified DSiWare SD .bin files.&lt;br /&gt;
| None.&lt;br /&gt;
| 11.8.0-X&lt;br /&gt;
| April 2013&lt;br /&gt;
| &lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| seedminer: movable.sed keyY vulnerable to brute-force&lt;br /&gt;
| Half of the movable.sed keyY&#039;s 128 bits are leaked through the [[Nandrw/sys/LocalFriendCodeSeed_B|LFCS]], which is available in userland and below. The LFCS itself also leaks almost half of the remaining bits by following the ratio: u32 keyY[3]=1/5(LFCS). The remaining keyY[3] uncertainty of about ±2000 can be greatly reduced by plotting expected error margins with several keyYs. This results in a final uncertainty of about 2^40, easily within practical brute force range of an average modern PC.&lt;br /&gt;
| Knowing the keyY of a given 3ds allows for modification of DSiWare export contents, and chained with several other public vulns, ultimately arm9 execution.&lt;br /&gt;
| None.&lt;br /&gt;
| 11.8.0-X&lt;br /&gt;
| December 2017&lt;br /&gt;
| January 2018&lt;br /&gt;
| zoogie&lt;br /&gt;
|-&lt;br /&gt;
| Improper validation of DSiWare title SRLs&lt;br /&gt;
| The 3DS does not verify if the actual SRL embedded in the title&#039;s directory matches the titleID in the TMD before launching it or importing it from an sd DSiWare export. &lt;br /&gt;
| This allows embedding older, exploitable DSiWare titles in completely different, unexploitable DSiWare titles. Since DSiWare has raw NAND RW, this can result in arm9 control through FIRM known-plaintext and sighax attacks.&lt;br /&gt;
| None.&lt;br /&gt;
| 11.8.0-X&lt;br /&gt;
| 2015?&lt;br /&gt;
| December 2016&lt;br /&gt;
| Everyone&lt;br /&gt;
|-&lt;br /&gt;
| DSiWare import/export functions allow TWL system titles as arguments&lt;br /&gt;
| AM ImportTwlBackup/ExportTwlBackup unnecessarily allow TWL system titles such as DS Download Play to import/export from userland and System Settings -&amp;gt; Data Management (only am:sys is needed for userland). This is difficult to abuse for dsihax injection because no TWL system title has a save file, and any import with a save included will result in FS err C8804464. However, there is at least one dsihax primary that can load a payload from a non-NAND source, and not error if it can&#039;t access its public.sav (JPN Flipnote Studio v0).&lt;br /&gt;
| When combined with other public vulns, arm9 code execution.&lt;br /&gt;
| None.&lt;br /&gt;
| 11.8.0-X&lt;br /&gt;
| May 2018&lt;br /&gt;
| Sept 2018&lt;br /&gt;
| zoogie&lt;br /&gt;
|-&lt;br /&gt;
| [[Gamecard_Services_PXI]] unchecked REG_CTRCARDCNT transfer-size&lt;br /&gt;
| The u8 REG_CTRCARDCNT transfer-size parameter for the [[Gamecard_Services_PXI]] read/write CTRCARD commands is used as an index for an array of u16 values. Before [[5.0.0-11|5.0.0-X]] this u8 value wasn&#039;t checked, thus out-of-bounds reads could be triggered(which is rather useless in this case).&lt;br /&gt;
| Out-of-bounds read for a value which gets written to a register.&lt;br /&gt;
| [[5.0.0-11|5.0.0-X]]&lt;br /&gt;
| &lt;br /&gt;
| 2013?&lt;br /&gt;
| &lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| [[PXI_Registers|PXI]] cmdbuf buffer overrun&lt;br /&gt;
| The Process9 code responsible [[PXI_Registers|PXI]] communications didn&#039;t verify the size of the incoming command before writing it to a C++ member variable. &lt;br /&gt;
| Probably ARM9 code execution&lt;br /&gt;
| [[5.0.0-11|5.0.0-11]]&lt;br /&gt;
| &lt;br /&gt;
| March 2015, original timeframe if any unknown&lt;br /&gt;
| &lt;br /&gt;
| [[User:Plutooo|plutoo]]/[[User:Yellows8|Yellows8]]/maybe others(?)&lt;br /&gt;
|-&lt;br /&gt;
| [[Application_Manager_Services_PXI|PXIAM]] command 0x003D0108(See also [[Application_Manager_Services|this]])&lt;br /&gt;
| When handling this command, Process9 allocates a 0x2800-byte heap buffer, then copies the 4 FCRAM input buffers to this heap buffer without checking the sizes at all(only the buffers with non-zero sizes are copied). Starting with [[5.0.0-11|5.0.0-X]], the total combined size of the input data must be &amp;lt;=0x2800.&lt;br /&gt;
| ARM9 code execution&lt;br /&gt;
| [[5.0.0-11|5.0.0-X]]&lt;br /&gt;
| &lt;br /&gt;
| May 2013&lt;br /&gt;
| &lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| [[Process_Services_PXI|PS RSA]] commands buffer overflows&lt;br /&gt;
| pxips9 cmd1(not accessible via ps:ps) and VerifyRsaSha256: unchecked copy to a buffer in Process9&#039;s .bss, from the input FCRAM buffer. The buffer is located before the pxi cmdhandler threads&#039; stacks. SignRsaSha256 also has a buf overflow, but this isn&#039;t exploitable.&lt;br /&gt;
The buffer for this is the buffer for the signature data. With v5.0, the signature buffer was moved to stack, with a check for the signature data size. When the signature data size is too large, Process9 uses [[SVC|svcBreak]].&lt;br /&gt;
| ARM9 code execution&lt;br /&gt;
| [[5.0.0-11|5.0.0-X]]&lt;br /&gt;
| &lt;br /&gt;
| 2012&lt;br /&gt;
| &lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| [[PXI_Registers|PXI]] pxi_id bad check&lt;br /&gt;
| The Process9 code responsible for [[PXI_Registers|PXI]] communications read pxi_id as a signed char. There were two flaws:&lt;br /&gt;
* They used it as index to a lookup-table without checking the value at all.&lt;br /&gt;
* Another function verified that pxi_id &amp;lt; 7, allowing negative values to pass the check. This would also cause an out-of-range table-lookup.&lt;br /&gt;
| Maybe ARM9 code execution&lt;br /&gt;
| [[3.0.0-5|3.0.0-5]]&lt;br /&gt;
|&lt;br /&gt;
| March 2015, originally 2012 for the first issue at least&lt;br /&gt;
| &lt;br /&gt;
| [[User:Plutooo|plutoo]], [[User:Yellows8|Yellows8]], maybe others(?)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Kernel9 ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Summary&lt;br /&gt;
!  Description&lt;br /&gt;
!  Successful exploitation result&lt;br /&gt;
!  Fixed in [[FIRM]] system version&lt;br /&gt;
!  Last [[FIRM]] system version this flaw was checked for&lt;br /&gt;
!  Timeframe this was discovered&lt;br /&gt;
!  Discovered by&lt;br /&gt;
|-&lt;br /&gt;
| [[CONFIG Registers#CFG9_SYSPROT9|CFG9_SYSPROT9]] bit1 not set by Kernel9&lt;br /&gt;
| Old versions of Kernel9 never set bit1 of [[CONFIG Registers#CFG9_SYSPROT9|CFG9_SYSPROT9]]. This leaves the [[OTP Registers|0x10012000]]-region unprotected (this region should be locked early during boot!). Since it&#039;s never locked, you can dump it once you get ARM9 code execution.&lt;br /&gt;
&lt;br /&gt;
From [[3.0.0-5|3.0.0-X]] this was fixed by setting the bit in Kernel9 after poking some registers in that region. On New3DS arm9loader sets this bit instead of Kernel9, which is exploitable through a hardware + software vulnerability (see arm9loaderhax / description).&lt;br /&gt;
&lt;br /&gt;
This flaw resurged when it gained a new practical use: retrieving the OTP data for a New3DS console in order to decrypt the key data used in arm9loader (see enhanced-arm9loaderhax / description). This was performed by downgrading to a vulnerable system version. By accounting for differences in CTR-NAND crypto (0x05 -&amp;gt; 0x04, see partition encryption types [[Flash_Filesystem#NAND_structure|here]]) and using an Old3DS [[NCSD#NCSD_header|NCSD Header]], it is possible to boot a New3DS using Old3DS firmware 1.0-2.x to retrieve the required OTP data using this flaw.&lt;br /&gt;
| Dumping the [[OTP Registers|OTP]] area.&lt;br /&gt;
Decrypting New3DS sector 0x96 keyblock.&lt;br /&gt;
| [[3.0.0-5|3.0.0-X]]&lt;br /&gt;
|&lt;br /&gt;
| February 2015&lt;br /&gt;
| [[User:Plutooo|plutoo]], Normmatt independently&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== ARM11 software ==&lt;br /&gt;
=== Kernel11 ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Summary&lt;br /&gt;
!  Description&lt;br /&gt;
!  Successful exploitation result&lt;br /&gt;
!  Fixed in [[FIRM]] system version&lt;br /&gt;
!  Last [[FIRM]] system version this flaw was checked for&lt;br /&gt;
!  Timeframe this was discovered&lt;br /&gt;
!  Discovered by&lt;br /&gt;
|-&lt;br /&gt;
| [[SVC|svcSetProcessIdealProcessor]] reference count overflow and therefore use-after-free.&lt;br /&gt;
| The SVC receive two arguments: handle and idealprocessor. The handle is used to get the KProcess object and the KProcess-&amp;gt;refCnt gets incremented,later the function check if the KProcess-&amp;gt;mem_type != BASE and if yes, it checks for idealprocessor == 2 or idealprocessor != 3. The problem here is that if you pass the idealprocessor = 3 it won&#039;t meet any condition and return the error 0xD9001BEA without decrement the reference count. &lt;br /&gt;
It can be abused to overflow the KProcess reference count that will lead to an Use-after-free. &lt;br /&gt;
| Before [[11.2.0-35|11.2.0-X]]: reference count overflow and therefore use-after-free.&lt;br /&gt;
| &lt;br /&gt;
| [[11.6.0-39|11.6.0-X]]&lt;br /&gt;
| November 2, 2017&lt;br /&gt;
| [[User:st4rk|st4rk]]&lt;br /&gt;
|-&lt;br /&gt;
| [[SVC|svcGetThreadList]] process reference leak&lt;br /&gt;
| When given a valid process handle (including &amp;lt;code&amp;gt;0xFFFF8001&amp;lt;/code&amp;gt;), svcGetThreadList forgets to decrement the reference count of the underlying [[KProcess]] instance, after having finished using it.&lt;br /&gt;
| Before [[11.2.0-35|11.2.0-X]]: reference count overflow and therefore use-after-free, but this UAF was most likely not exploitable&lt;br /&gt;
| &lt;br /&gt;
| [[11.3.0-36|11.3.0-X]]&lt;br /&gt;
| April 3, 2017&lt;br /&gt;
| [[User:TuxSH|TuxSH]]&lt;br /&gt;
|-&lt;br /&gt;
| kernelhax via gspwn&lt;br /&gt;
| Originally the kernel didn&#039;t initialize [[CONFIG11_Registers#CFG11_GPUPROT|CFG11_GPUPROT]]. Since it&#039;s 0 at hard-boot, this allowed the GPU to access the entire FCRAM + AXIWRAM.&lt;br /&gt;
| Entire FCRAM+AXIWRAM R/W.&lt;br /&gt;
| [[3.0.0-5|3.0.0-X]]&lt;br /&gt;
| &lt;br /&gt;
| February 7, 2017&lt;br /&gt;
| [[User:Plutooo|plutoo]], [[User:Yellows8|Yellows8]] partly&lt;br /&gt;
|-&lt;br /&gt;
| fasthax&lt;br /&gt;
| When a KTimer is created in pulse mode, the kernel calls a virtual function to reset the timer each time it pulses. The scheduler is locked for that core to avoid race conditions, but another core can call CloseHandle on the timer and free it, leading to a UAF vtable call.&lt;br /&gt;
| See description.&lt;br /&gt;
| [[11.3.0-36|11.3.0-X]]&lt;br /&gt;
| [[11.3.0-36|11.3.0-X]]&lt;br /&gt;
| May 2016&lt;br /&gt;
| nedwill&lt;br /&gt;
|-&lt;br /&gt;
| ipctakeover&lt;br /&gt;
| When sending cmdreplies, it does not validate that the src_addr and src_size match the equivalent dst_addr and dst_size. With a modified addr/size specified in a cmdreply for an output buffer, the data-copy for the first/last pages could be used to overwrite data outside of the buffer specified by the original process.&lt;br /&gt;
&lt;br /&gt;
Used by ctr-httpwn as of v1.2, for &amp;quot;ipctakeover/bosshaxx&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
This can be used to takeover processes where the process is using your service session. Like HTTPC -&amp;gt; BOSS, for bosshaxx above. NIM takeover can be done too(actual stack buffer overflow can trigger), etc.&lt;br /&gt;
| See description.&lt;br /&gt;
| None&lt;br /&gt;
| [[11.3.0-36|11.3.0-X]]&lt;br /&gt;
| November 26, 2016&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| Using IPC input buffers as output buffers&lt;br /&gt;
| When sending cmdreplies, it does not validate that the cmdreply descriptor type matches the equivalent cmdreq descriptor type. This could be used by an exploited sysmodule to use what was intended as an input-buffer as an output-buffer, and also combine other IPC vuln(s) with this.&lt;br /&gt;
&lt;br /&gt;
Used by ctr-httpwn as of v1.2, for &amp;quot;ipctakeover/bosshaxx&amp;quot;.&lt;br /&gt;
| See description.&lt;br /&gt;
| None&lt;br /&gt;
| [[11.3.0-36|11.3.0-X]]&lt;br /&gt;
| November 2016&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
|  [[SVC]] table too small&lt;br /&gt;
|  The table of function pointers for SVC&#039;s only contains entries up to 0x7D, but the biggest allowed SVC for the table is 0x7F. Thus, executing SVC7E or SVC7F would make the SVC-handler read after the buffer, and interpret some ARM instructions as function pointers.&lt;br /&gt;
&lt;br /&gt;
However, this would require patching the kernel .text or modifying SVC-access-control. Even if you could get these to execute, they would still jump to memory that isn&#039;t mapped as executable.&lt;br /&gt;
| &lt;br /&gt;
|  None&lt;br /&gt;
| [[11.3.0-36|11.3.0-X]]&lt;br /&gt;
| 2012&lt;br /&gt;
| Everyone&lt;br /&gt;
|-&lt;br /&gt;
|  [[SVC|svcBackdoor (0x7B)]]&lt;br /&gt;
|  This backdoor allows executing SVC-mode code at the user-specified code-address. This is used by Process9, using this on the ARM11 (with NATIVE_FIRM) required patching the kernel .text or modifying SVC-access-control.&lt;br /&gt;
| See description&lt;br /&gt;
| [[11.0.0-33|11.0.0-X]] (deleted)&lt;br /&gt;
| &lt;br /&gt;
|&lt;br /&gt;
| Everyone&lt;br /&gt;
|-&lt;br /&gt;
| veryslowpidhax&lt;br /&gt;
| &#039;&#039;&#039;This is completely different from the kernelmode-code-execution vuln described in the below separate entry.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
When updating the kernel global PID counter under [[SVC|svcCreateProcess]] the kernel does not check for wraparound to 0x0(the PID for the very first process). This only matters because [[Services|SM-module]] allows processes with PID value less than &amp;lt;total ARM11 FIRM modules&amp;gt; to access &#039;&#039;all&#039;&#039; services, without checking exheader service-access-control; and because Kernel11 checks for the PID to be 1 (loader) to use the input mem-region value on ControlMemory. This alone does not affect access the [[SVC|SVCs]] access table at all.&lt;br /&gt;
&lt;br /&gt;
Inlined ldrex+strex code is used for updating the above counter. [[11.2.0-35|11.2.0-X]] had changes for similar code, but it was only for dedicated ldrex+strex functions(mainly for kernel objects) and hence this PID code was not affected.&lt;br /&gt;
&lt;br /&gt;
With launching+terminating a sysmodule repeatedly with this via ns:s, it would take weeks to finish(if not at least about a month?).&lt;br /&gt;
| Access to all [[Services_API|services]], ControlMemory on any given mem-region.&lt;br /&gt;
| None&lt;br /&gt;
| [[11.3.0-36|11.3.0-X]]&lt;br /&gt;
| 2012 maybe?&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
|  slowhax/waithax&lt;br /&gt;
|  svcWaitSynchronizationN does not decrement the references to valid handles in an array before returning an error when it encounters an invalid handle. This allows one to (slowly) overflow the reference count for a handle object to zero.&lt;br /&gt;
| ARM11 kernel-mode code execution&lt;br /&gt;
| [[11.2.0-35|11.2.0-X]]&lt;br /&gt;
| [[11.2.0-35|11.2.0-X]]&lt;br /&gt;
| 2016&lt;br /&gt;
| nedwill, [[User:Derrek|derrek]]&lt;br /&gt;
|-&lt;br /&gt;
| [[Memory_layout#ARM11_Detailed_virtual_memory_map|0xEFF00000]] / 0xDFF00000 ARM11 kernel virtual-memory&lt;br /&gt;
| The ARM11 kernel-mode 0xEFF00000/0xDFF00000 virtual-memory(size 0x100000) is mapped to phys-mem 0x1FF00000(entire DSP-mem + entire AXIWRAM), with permissions RW-. This is used during ARM11 kernel startup for loading the FIRM-modules from the FIRM section located in DSP-mem, this never seems to be used after that, however. This is never unmapped either.&lt;br /&gt;
| &lt;br /&gt;
| None&lt;br /&gt;
| [[11.3.0-36|11.3.0-X]]&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| memchunkhax2.1&lt;br /&gt;
| Nintendo&#039;s fix for memchunkhax2 in [[10.4.0-29|10.4.0-X]] did not fix the GPU case: one may cause the requisite ToCToU race using gspwn, bypassing the new validation.&lt;br /&gt;
derrek&#039;s original 32c3 presentation for memchunkhax2 commented that a GPU-based attack was possible, but would be difficult.  However, memchunkhax2.1 showed that it was possible to do fairly reliably.&lt;br /&gt;
| ARM11 kernel code execution&lt;br /&gt;
| [[11.0.0-33|11.0.0-X]], via the new [[Memory_Management#MemoryBlockHeader|memchunkhdr]] MAC which prevents modifying memchunkhdr data with DMA.&lt;br /&gt;
| [[11.0.0-33|11.0.0-X]]&lt;br /&gt;
|&lt;br /&gt;
| [[User:Derrek|derrek]], aliaspider&lt;br /&gt;
|-&lt;br /&gt;
| memchunkhax2&lt;br /&gt;
| When allocating a block of memory, the &amp;quot;next&amp;quot; pointer of the [[Memory_Management#MemoryBlockHeader|memchunkhdr]] is accessed without being checked after being mapped to userland.&lt;br /&gt;
This allows a race condition, where the process can change the next pointer just before it&#039;s accessed. By pointing the next pointer to a crafted memchunckhdr in the kernel SlabHeap, some of the SlabHeap is allocated to the calling process, allowing to change vtables of kernel objects. &lt;br /&gt;
| ARM11 kernel code execution&lt;br /&gt;
| [[10.4.0-29|10.4.0-X]] (partially, see memchunkhax2.1)&lt;br /&gt;
| [[10.4.0-29|10.4.0-X]]&lt;br /&gt;
|&lt;br /&gt;
| [[User:Derrek|derrek]]&lt;br /&gt;
|-&lt;br /&gt;
| heaphax&lt;br /&gt;
| Can change the size of free memchunk structures stored in FCRAM using DMA, which leads to the ability to allocate memory chunks over already-allocated memory. This can be used in the SYSTEM region to allocate RW memory over any part of the NS system module, which is enough to take it over.&lt;br /&gt;
| Code execution with access to all of NS&#039;s privileges. (including downgrading) Code execution within any applet.&lt;br /&gt;
| [[11.0.0-33|11.0.0-X]], via the new [[Memory_Management#MemoryBlockHeader|memchunkhdr]] MAC which prevents modifying memchunkhdr data with DMA.&lt;br /&gt;
| [[11.0.0-33|11.0.0-X]]&lt;br /&gt;
| April 2015 ?&lt;br /&gt;
| smea&lt;br /&gt;
|-&lt;br /&gt;
| snshax&lt;br /&gt;
| Can force creation of Safe NS process into gspwn-able memory, allowing for takeover.&lt;br /&gt;
| Code execution with access to all of NS&#039;s privileges. (including downgrading)&lt;br /&gt;
| [[10.1.0-27|10.1.0-X]]&lt;br /&gt;
| [[10.1.0-27|10.1.0-X]]&lt;br /&gt;
| April 2015 ?&lt;br /&gt;
| smea&lt;br /&gt;
|-&lt;br /&gt;
|  AffinityMask/processorid validation&lt;br /&gt;
|  With [[10.0.0-27|10.0.0-X]] the following functions were updated: svcGetThreadAffinityMask, svcGetProcessAffinityMask, svcSetProcessAffinityMask, and svcCreateThread. The code changes for all but svcCreateThread are identical.&lt;br /&gt;
The original code with the first 3 did the following: &lt;br /&gt;
* if(u32_processorcount &amp;gt; ~0x80000001)return 0xe0e01bfd;&lt;br /&gt;
* if(s32_processorcount &amp;gt; &amp;lt;total_cores&amp;gt;)return 0xd8e007fd;&lt;br /&gt;
The following code replaced the above:&lt;br /&gt;
* if(u32_processorcount &amp;gt;= &amp;lt;total_cores+1&amp;gt;)return 0xd8e007fd;&lt;br /&gt;
In theory the latter should catch everything that the former did, so it&#039;s unknown if this was really a security issue.&lt;br /&gt;
&lt;br /&gt;
The svcCreateThread changes with [[10.0.0-27|10.0.0-X]] definitely did fix a security issue.&lt;br /&gt;
* Original code: &amp;quot;if(s32_processorid &amp;gt; &amp;lt;total_cores&amp;gt;)return 0xd8e007fd;&amp;quot;&lt;br /&gt;
* New code: &amp;quot;if(s32_processorid &amp;gt;= &amp;lt;total_cores&amp;gt; || s32_processorid &amp;lt;= -4)return 0xd8e007fd;&amp;quot;&lt;br /&gt;
This fixed an off-by-one issue: if one would use processorid=total_cores, which isn&#039;t actually a valid value, svcCreateThread would accept that value on &amp;lt;[[10.0.0-27|10.0.0-X]]. This results in data being written out-of-bounds(baseaddr = arrayaddr + entrysize*processorid), which has the following result:&lt;br /&gt;
* Old3DS: Useless kernel-mode crash due to accessing unmapped memory.&lt;br /&gt;
* New3DS: uncontrolled data write into a kernel-mode L1 MMU-table. This isn&#039;t really useful: the data can&#039;t be controlled, and the data which gets overwritten is all-zero anyway(this isn&#039;t anywhere near MMU L1 entries for actually mapped memory).&lt;br /&gt;
The previous version also allowed large negative s32_processorid values(negative processorid values are special values not actual procids), but it appears using values like that won&#039;t actually do anything(meaning no crash) besides the thread not running / thread not running for a while(besides triggering a kernelpanic with certain s32_processorid value(s)).&lt;br /&gt;
| Nothing useful&lt;br /&gt;
|  [[10.0.0-27|10.0.0-X]]&lt;br /&gt;
| [[10.0.0-27|10.0.0-X]]&lt;br /&gt;
| svcCreateThread issue: May 31, 2015. The rest: September 8, 2015, via v9.6-&amp;gt;v10.0 ARM11-kernel code-diff.&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| memchunkhax&lt;br /&gt;
| The kernel originally did not validate the data stored in the FCRAM kernel heap [[Memchunkhdr|memchunk-headers]] for free-memory at all. Exploiting this requires raw R/W access to these memchunk-headers, like physical-memory access with gspwn.&lt;br /&gt;
&lt;br /&gt;
There are &#039;&#039;multiple&#039;&#039; ways to exploit this, but the end-result for most of these is the same: overwrite code in AXIWRAM via the 0xEFF00000/0xDFF00000 kernel virtual-memory mapping.&lt;br /&gt;
&lt;br /&gt;
This was fixed in [[9.3.0-21|9.3.0-X]] by checking that the memchunk(including size, next, and prev ptrs) is located within the currently used heap memory. The kernel may also check that the next/prev ptrs are valid compared to other memchunk-headers basically. When any of these checks fail, kernelpanic() is called.&lt;br /&gt;
| When combined with other flaws: ARM11-kernelmode code execution&lt;br /&gt;
| [[9.3.0-21|9.3.0-21]]&lt;br /&gt;
| &lt;br /&gt;
| February 2014&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| Multiple [[KLinkedListNode|KLinkedListNode]] SlabHeap use after free bugs&lt;br /&gt;
| The ARM11-kernel did access the &#039;key&#039; field of [[KLinkedListNode|KLinkedListNode]] objects, which are located on the SlabHeap, after freeing them. Thus, triggering an allocation of a new [[KLinkedListNode|KLinkedListNode]] object at the right time could result in a type-confusion. Pseudo-code:&lt;br /&gt;
SlabHeap_free(KLinkedListNode);&lt;br /&gt;
KObject *obj = KLinkedListNode-&amp;gt;key;  // the object there might have changed!&lt;br /&gt;
This bug appeared all over the place.&lt;br /&gt;
| ARM11-kernelmode code exec maybe&lt;br /&gt;
| [[8.0.0-18|8.0.0-18]]&lt;br /&gt;
| &lt;br /&gt;
| April 2015&lt;br /&gt;
| [[User:Derrek|derrek]]&lt;br /&gt;
|-&lt;br /&gt;
| PXI [[RPC_Command_Structure|Command]] input/output buffer permissions&lt;br /&gt;
| Originally the ARM11-kernel didn&#039;t check permissions for PXI input/output buffers for commands. Starting with [[6.0.0-11|6.0.0]] PXI input/output buffers must have RW permissions, otherwise kernelpanic is triggered.&lt;br /&gt;
| &lt;br /&gt;
| [[6.0.0-11|6.0.0-11]]&lt;br /&gt;
| &lt;br /&gt;
| 2012&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| [[SVC|svcStartInterProcessDma]]&lt;br /&gt;
| For svcStartInterProcessDma, the kernel code had the following flaws:&lt;br /&gt;
&lt;br /&gt;
* Originally the ARM11-kernel read the input DmaConfig structure directly in kernel-mode(ldr(b/h) instructions), without checking whether the DmaConfig address is readable under userland. This was fixed by copying that structure to the SVC-mode stack, using the ldrbt instruction.&lt;br /&gt;
&lt;br /&gt;
* Integer overflows for srcaddr+size and dstaddr+size are now checked(with [[6.0.0-11]]), which were not checked before.&lt;br /&gt;
&lt;br /&gt;
* The kernel now also checks whether the srcaddr/dstaddr (+size) is within userland memory (0x20000000), the kernel now (with [[6.0.0-11]]) returns an error when the address is beyond userland memory. Using an address &amp;gt;=0x20000000 would result in the kernel reading from the process L1 MMU table, beyond the memory allocated for that MMU table(for vaddr-&amp;gt;physaddr conversion). &lt;br /&gt;
| &lt;br /&gt;
| [[6.0.0-11]]&lt;br /&gt;
| &lt;br /&gt;
| DmaConfig issue: unknown. The rest: 2014&lt;br /&gt;
| [[User:Plutooo|plutoo]], [[User:Yellows8|Yellows8]] independently&lt;br /&gt;
|-&lt;br /&gt;
| [[SVC|svcControlMemory]] Parameter checks&lt;br /&gt;
| For svcControlMemory the parameter check had these two flaws:&lt;br /&gt;
&lt;br /&gt;
* The allowed range for addr0, addr1, size parameters depends on which MemoryOperation is being specified. The limitation for GSP heap was only checked if op=(u32)0x10003. By setting a random bit in op that has no meaning (like bit17?), op would instead be (u32)0x30003, and the range-check would be less strict and not accurate. However, the kernel doesn&#039;t actually use the input address for LINEAR memory-mapping at all besides the range-checks, so this isn&#039;t actually useful. This was fixed in the kernel by just checking for the LINEAR bit, instead of comparing the entire MemoryOperation value with 0x10003.&lt;br /&gt;
&lt;br /&gt;
* Integer overflows on (addr0+size) are now checked that previously weren&#039;t (this also applies to most other address checks elsewhere in the kernel).&lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
| [[5.0.0-11]]&lt;br /&gt;
| &lt;br /&gt;
|&lt;br /&gt;
| [[User:Plutooo|plutoo]]&lt;br /&gt;
|-&lt;br /&gt;
| [[RPC_Command_Structure|Command]] request/response buffer overflow&lt;br /&gt;
| Originally the kernel did not check the word-values from the command-header. Starting with [[5.0.0-11]], the kernel will trigger a kernelpanic() when the total word-size of the entire command(including the cmd-header) is larger than 0x40-words (0x100-bytes). This allows overwriting threadlocalstorage+0x180 in the destination thread. However, since the data written there would be translate parameters (such as header-words + buffer addresses), exploiting this would likely be very difficult, if possible at all.&lt;br /&gt;
&lt;br /&gt;
If the two words at threadlocalstorage+0x180 could be overwritten with controlled data this way, one could then use a command with a buffer-header of &amp;lt;nowiki&amp;gt;((size&amp;lt;&amp;lt;14) | 2)&amp;lt;/nowiki&amp;gt; to write arbitrary memory to any RW userland memory in the destination process.&lt;br /&gt;
| &lt;br /&gt;
| [[5.0.0-11]]&lt;br /&gt;
| &lt;br /&gt;
| v4.1 FIRM -&amp;gt; v5.0 code diff&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| [[SVC|SVC stack allocation overflows]]&lt;br /&gt;
| &lt;br /&gt;
* Syscalls that allocate a variable-length array on stack, only checked bit31 before multiplying by 4/16 (when calculating how much memory to allocate). If a large integer was passed as input to one of these syscalls, an integer overflow would occur, and too little memory would have been allocated on stack resulting in a buffer overrun. &lt;br /&gt;
* The alignment (size+7)&amp;amp;~7 calculation before allocation was not checked for integer overflow.&lt;br /&gt;
&lt;br /&gt;
This might allow for ARM11 kernel code-execution.&lt;br /&gt;
&lt;br /&gt;
(Applies to svcSetResourceLimitValues, svcGetThreadList, svcGetProcessList, svcReplyAndReceive, svcWaitSynchronizationN.)&lt;br /&gt;
| &lt;br /&gt;
| [[5.0.0-11]]&lt;br /&gt;
| &lt;br /&gt;
| v4.1 FIRM -&amp;gt; v5.0 code diff&lt;br /&gt;
| [[User:Plutooo|plutoo]], [[User:Yellows8|Yellows8]] complementary&lt;br /&gt;
|-&lt;br /&gt;
| [[SVC|svcControlMemory]] MemoryOperation MAP memory-permissions&lt;br /&gt;
| svcControlMemory with MemoryOperation=MAP allows mapping the already-mapped process virtual-mem at addr1, to addr0. The lowest address permitted for addr1 is 0x00100000. Originally the ARM11 kernel didn&#039;t check memory permissions for addr1. Therefore .text as addr1 could be mapped elsewhere as RW- memory, which allowed ARM11 userland code-execution.&lt;br /&gt;
| &lt;br /&gt;
| [[4.1.0-8]]&lt;br /&gt;
| &lt;br /&gt;
| 2012&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| [[RPC_Command_Structure|Command]] input/output buffer permissions&lt;br /&gt;
| Originally the ARM11 kernel didn&#039;t check memory permissions for the input/output buffers for commands. Starting with [[4.0.0-7]] the ARM11 kernel will trigger a kernelpanic() if the input/output buffers don&#039;t have the required memory permissions. For example, this allowed a FSUSER file-read to .text, which therefore allowed ARM11-userland code execution.&lt;br /&gt;
| &lt;br /&gt;
| [[4.0.0-7]]&lt;br /&gt;
| &lt;br /&gt;
| 2012&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| [[SVC|svcReadProcessMemory/svcWriteProcessMemory memory]] permissions&lt;br /&gt;
| Originally the kernel only checked the first page(0x1000-bytes) of the src/dst buffers, for svcReadProcessMemory and svcWriteProcessMemory. There is no known retail processes which have access to these SVCs.&lt;br /&gt;
| &lt;br /&gt;
| [[4.0.0-7]]&lt;br /&gt;
| &lt;br /&gt;
| 2012?&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== [[FIRM]] Sysmodules ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Summary&lt;br /&gt;
!  Description&lt;br /&gt;
!  Successful exploitation result&lt;br /&gt;
!  Fixed in [[FIRM]] system version&lt;br /&gt;
!  Last [[FIRM]] system version this flaw was checked for&lt;br /&gt;
!  Timeframe this was discovered&lt;br /&gt;
!  Discovered by&lt;br /&gt;
|-&lt;br /&gt;
| [[Services|&amp;quot;srv:pm&amp;quot;]] process registration&lt;br /&gt;
| Originally any process had access to the port &amp;quot;srv:pm&amp;quot;. The PID&#039;s used for the (un)registration commands are not checked either. This allowed any process to re-register itself with &amp;quot;srv:pm&amp;quot;, and therefore allowed the process to give itself access to any service, bypassing the exheader service-access-control list.&lt;br /&gt;
&lt;br /&gt;
This was fixed in [[7.0.0-13]]: starting with [[7.0.0-13]] &amp;quot;srv:pm&amp;quot; is now a service instead of a globally accessible port. Only processes with PID&#039;s less than 6 (in other words: fs, ldr, sm, pm, pxi modules) have access to it. With [[7.0.0-13]] there can only be one session for &amp;quot;srv:pm&amp;quot; open at a time(this is used by pm module), svcBreak will be executed if more sessions are opened by the processes which can access this.&lt;br /&gt;
&lt;br /&gt;
This flaw was needed for exploiting the &amp;lt;=v4.x Process9 PXI vulnerabilities from ARM11 userland ROP, since most applications don&#039;t have access to those service(s).&lt;br /&gt;
| Access to arbitrary services&lt;br /&gt;
| [[7.0.0-13]]&lt;br /&gt;
| &lt;br /&gt;
| 2012&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| FSDIR null-deref&lt;br /&gt;
| [[Filesystem_services|FS]]-module may crash in some cases when handling directory reading. The trigger seems to be due to using [[FSDir:Close]] without closing the dir-handle afterwards?(Perhaps this is caused by out-of-memory?) This seems to be useless since it&#039;s just a null-deref.&lt;br /&gt;
| &lt;br /&gt;
| None&lt;br /&gt;
| [[9.6.0-24|9.6.0-X]]&lt;br /&gt;
| May 19(?)-20, 2015&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| [[SM]] out-of-bounds BSS write (table 1 entry too small)&lt;br /&gt;
| After accepting a new session, [[SM]] writes a (handler ID (0 for srv: sessions (max. 64), 1 for the srv:pm one), pointer to session context structure in BSS) pair in a global array. However that array is only 64-entry-big instead of 65 (as it ought to be), and no bound check is done in that regard.&lt;br /&gt;
&lt;br /&gt;
Unfortunately, as of [[11.4.0-37]], the overwritten fields are totally unused after their initialization by &amp;lt;code&amp;gt;__libc_init_array&amp;lt;/code&amp;gt;.&lt;br /&gt;
| Not currently exploitable&lt;br /&gt;
| None&lt;br /&gt;
| [[11.4.0-37]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Standalone Sysmodules ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Summary&lt;br /&gt;
!  Description&lt;br /&gt;
!  Successful exploitation result&lt;br /&gt;
!  Fixed in system-module system-version&lt;br /&gt;
!  Last system-module system-version this flaw was checked for&lt;br /&gt;
!  Timeframe this was discovered&lt;br /&gt;
!  Timeframe this was added to wiki&lt;br /&gt;
!  Discovered by&lt;br /&gt;
|-&lt;br /&gt;
| [[Config_Services|CFG]]:CreateConfigInfoBlk integer underflow&lt;br /&gt;
| When creating a new block it checks the size of the block is &amp;lt;= 0x8000, but it doesn&#039;t check that the block size is less than the remaining space. This induces an integer underflow (remaining_space-block_size), the result is then used for another check (buf_start+current_offset+constant &amp;lt;= remaining_space-block_size) and then in a mempcy call (dest = buf_start+(u16)(remaining_space-block_size), size =block_size). This allow for writing past the buffer, however because of the u16 cast in the memcpy call memory has to be mapped from buf_start to buf_start+0x10000 (cannot write backward).&lt;br /&gt;
| Theoritically ROP under CFG services, but BSS section is to small (size &amp;lt;= 0x10000) so it only results in a crash.&lt;br /&gt;
| None&lt;br /&gt;
| [[11.8.0-41]]&lt;br /&gt;
| November, 2018&lt;br /&gt;
| November 24, 2018&lt;br /&gt;
| [[User:Nba_Yoh|MrNbaYoh]]&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
| [[MP:SendDataFrame]] missing input array index validation&lt;br /&gt;
| [[MP:SendDataFrame]] doesn&#039;t validate the input index at cmdreq[1], unless the function for flag=non-zero is executed. This is used to calculate the following, without validating the index at all: someptr = stateptr + (index*0x924) + somestateoffset.&lt;br /&gt;
&lt;br /&gt;
After validating some flags from someptr, when input_flag=0 the input buffer data is copied to someptr+someotheroffset+0x14 with the u16 size loaded from someptr+someotheroffset.&lt;br /&gt;
&lt;br /&gt;
With a large input index someptr could be setup to be at a &amp;lt;target address&amp;gt;, for overwriting memory.&lt;br /&gt;
&lt;br /&gt;
This is probably difficult to exploit.&lt;br /&gt;
| &lt;br /&gt;
| None&lt;br /&gt;
| [[8.0.0-18]](MP-sysmodule v2048)&lt;br /&gt;
| January 22, 2017&lt;br /&gt;
| January 22, 2017&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| [[MP_Services|MP]] cmd1 out-of-bounds handle read&lt;br /&gt;
| MP-sysmodule handles the input parameter for cmd1 as a s32. It checks for &amp;gt;=16, but not &amp;lt;0. With &amp;lt;16 it basically does the following(array of entries 4-bytes each): *outhandle = ((Handle*)(stateptr+offsetinstate))[inputindex].&lt;br /&gt;
&lt;br /&gt;
Hence, this can be used to load any handle in MP-sysmodule memory. MP doesn&#039;t really have any service handles of interest however(can be obtained from elsewhere too).&lt;br /&gt;
| Reading any handle in MP-sysmodule memory.&lt;br /&gt;
| None&lt;br /&gt;
| [[8.0.0-18]](MP-sysmodule v2048)&lt;br /&gt;
| January 21, 2017&lt;br /&gt;
| January 22, 2017&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| AM stack/.bss infoleak via [[AM:ReadTwlBackupInfo]]([[AM:ReadTwlBackupInfoEx|Ex]])&lt;br /&gt;
| After writing the output-info structure to stack, it then copies that structure to the output buffer ptr using the size from the command. The size is not checked. This could be used to read data from the AM-service-thread stack handling the command + .bss.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;This was not tested on hardware.&#039;&#039;&#039;&lt;br /&gt;
| Stack/.bss reading&lt;br /&gt;
| None&lt;br /&gt;
| [[10.0.0-27]](AM v9217)&lt;br /&gt;
| Roughly October 17, 2016&lt;br /&gt;
| October 25, 2016&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| [[MVD_Services|MVD]]: Stack buffer overflow with [[MVDSTD:SetupOutputBuffers]].&lt;br /&gt;
| The input total_entries is not validated when initially processing the input entry-list. This fixed-size input entry-list is copied to stack from the command request. The loop for processing this initializes a global table, the converted linearmem-&amp;gt;physaddrs used there are also copied to stack(0x8-bytes of physaddrs per entry).&lt;br /&gt;
&lt;br /&gt;
If total_entries is too large, MVD-sysmodule will crash due to reading unmapped memory following the stack(0x10000000). Afterwards if the out-of-bounds total_entries is smaller than that, it will crash due accessing address 0x0, hence this useless.&lt;br /&gt;
| MVD-sysmodule crash.&lt;br /&gt;
| None&lt;br /&gt;
| [[9.0.0-20]]&lt;br /&gt;
| April 22, 2016 (Tested on the 25th)&lt;br /&gt;
| April 25, 2016&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| [[NWM_Services|NWM]]: Using CTRSDK heap with UDS sharedmem from the user-process.&lt;br /&gt;
| See the HTTP-sysmodule section below.&lt;br /&gt;
&lt;br /&gt;
CTRSDK heap is used with the sharedmem from [[NWMUDS:InitializeWithVersion]]. Buffers are allocated/freed under this heap using [[NWMUDS:Bind]] and [[NWMUDS:Unbind]].&lt;br /&gt;
&lt;br /&gt;
Hence, overwriting sharedmem with gspwn then using [[NWMUDS:Unbind]] results in the usual controlled CTRSDK memchunk-header write, similar to HTTP-sysmodule.&lt;br /&gt;
&lt;br /&gt;
This could be done by creating an UDS network, without any other nodes on the network.&lt;br /&gt;
&lt;br /&gt;
Besides CTRSDK memchunk-headers, there are no addresses stored under this sharedmem.&lt;br /&gt;
| ROP under NWM-module.&lt;br /&gt;
| [[11.4.0-37|11.4.0-X]]&lt;br /&gt;
| [[9.0.0-20|9.0.0-X]]&lt;br /&gt;
| April 10, 2016&lt;br /&gt;
| April 16, 2016&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| [[DLP_Services|DLP]]: Out-of-bounds memory access during spectator [[Download_Play|data-frame]] checksum calculation&lt;br /&gt;
| DLP doesn&#039;t validate the frame_size when receiving spectator data-frames at all, unlike non-spectator data-frames. The actual spectator data-frame parsing code doesn&#039;t use that field either. However, the data-frame checksum calculation code called during checksum verification does use the frame_size for loading the size of the framebuf.&lt;br /&gt;
&lt;br /&gt;
Hence, using a large frame_size like 0xFFFF will result in the checksum calculation code reading data out-of-bounds. This isn&#039;t really useful, you could trigger a remote local-WLAN DLP-sysmodule crash while a 3DS system is scanning for DLP networks(due to accessing unmapped memory), but that&#039;s about all(trying to infoleak with this likely isn&#039;t useful either).&lt;br /&gt;
| DLP-sysmodule crash, handled by dlplay system-application by a &amp;quot;connection interrupted&amp;quot; error eventually then a fatal-error via ErrDisp.&lt;br /&gt;
| None&lt;br /&gt;
| [[10.0.0-27|10.0.0-X]]&lt;br /&gt;
| April 8, 2016 (Tested on the 10th)&lt;br /&gt;
| April 10, 2016&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| [[DLP_Services|DLP]]: Out-of-bounds output data writing during spectator sysupdate titlelist [[Download_Play|data-frame]] handling&lt;br /&gt;
| The total_entries and out_entryindex fields for the titlelist DLP spectator data-frames are not validated. This is parsed during DLP network scanning. Hence, the specified titlelist data can be written out-of-bounds using the specified out_entryindex and total_entries. A crash will occur while reading the input data-frame titlelist if total_entries is larger than 0x27A, due to accessing unmapped memory.&lt;br /&gt;
&lt;br /&gt;
There&#039;s not much non-zero data to overwrite following the output buffer(located in sharedmem), any ptrs are located in sharedmem. Overwriting certain ptr(s) are only known to cause a crash when attempting to use the DLP-client shutdown service-command.&lt;br /&gt;
&lt;br /&gt;
There&#039;s no known way to exploit the above crash, since the linked-list code involves writes zeros(with a controlled start ptr).&lt;br /&gt;
| &lt;br /&gt;
| None&lt;br /&gt;
| [[10.0.0-27|10.0.0-X]]&lt;br /&gt;
| April 8-9, 2016&lt;br /&gt;
| April 10, 2016&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| [[IR_Services|IR]]: Stack buffer overflow with custom hardware&lt;br /&gt;
| Originally IR sysmodule used the read value from the I2C-IR registers TXLVL and RXLVL without validating them at all. See [[10.6.0-31|here]] for the fix. This is the size used for reading the data-recv FIFO, etc. The output buffer for reading is located on the stack.&lt;br /&gt;
&lt;br /&gt;
This should be exploitable if one could successfully setup the custom hardware for this and if the entire intended sizes actually get read from I2C.&lt;br /&gt;
| ROP under IR sysmodule.&lt;br /&gt;
| [[10.6.0-31|10.6.0-31]]&lt;br /&gt;
| &lt;br /&gt;
| February 23, 2016 (Unknown if it was noticed before then)&lt;br /&gt;
| February 23, 2016&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| [[HTTP_Services|HTTP]]: Using CTRSDK heap with sharedmem from the user-process.&lt;br /&gt;
| The data from httpcAddPostDataAscii and other commands is stored under a CTRSDK heap. That heap is the sharedmem specified by the user-process via the HTTPC Initialize command.&lt;br /&gt;
Normally this sharedmem isn&#039;t accessible to the user-process once the sysmodule maps it, hence using it is supposed to be &amp;quot;safe&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
This isn&#039;t the case due to gspwn however. Since CTRSDK heap code is so insecure in general, one can use gspwn to locate the HTTPC sharedmem + read/write it, then trigger a mem-write under the sysmodule. This can then be used to get ROP going under HTTP-sysmodule.&lt;br /&gt;
&lt;br /&gt;
This is exploited by [https://github.com/yellows8/ctr-httpwn/ctr-httpwn ctr-httpwn].&lt;br /&gt;
| ROP under HTTP sysmdule.&lt;br /&gt;
| [[11.4.0-37|11.4.0-X]]&lt;br /&gt;
| [[9.6.0-24|9.6.0-X]] (Latest sysmodule version as of [[10.7.0-32|10.7.0-32]])&lt;br /&gt;
| Late 2015&lt;br /&gt;
| March 22, 2016&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| [[NIM_Services|NIM]]: Downloading old title-versions from eShop&lt;br /&gt;
| Multiple NIM service commands(such as [[NIMS:StartDownload]]) use a title-version value specified by the user-process, NIM does not validate that this input version matches the latest version available via SOAP. Therefore, when combined with AM(PXI) [[#Process9|title-downgrading]] via deleting the target eShop title with System Settings Data Management(if the title was already installed), this allows downloading+installing any title-version from eShop &#039;&#039;if&#039;&#039; it&#039;s still available from CDN.&lt;br /&gt;
The easiest way to exploit this is to just patch the eShop system-application code using these NIM commands(ideally the code which loads the title-version).&lt;br /&gt;
&lt;br /&gt;
Originally this was tested with a debugging-system via modded-FIRM, eventually smea implemented it in HANS for the 32c3 release.&lt;br /&gt;
| Downloading old title-versions from eShop&lt;br /&gt;
| None&lt;br /&gt;
| [[10.0.0-27|10.0.0-X]]&lt;br /&gt;
| October 24, 2015 (Unknown when exactly the first eShop title downgrade was actually tested, maybe November)&lt;br /&gt;
| January 7, 2016 (Same day Ironfall v1.0 was removed from CDN via the main-CXI files)&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| [[SPI_Services|SPI]] service out-of-bounds write&lt;br /&gt;
| cmd1 has out-of-bounds write allowing overwrite of some static variables in .data.&lt;br /&gt;
| &lt;br /&gt;
| None&lt;br /&gt;
| [[9.5.0-22]]&lt;br /&gt;
| March 2015&lt;br /&gt;
| &lt;br /&gt;
| [[User:Plutooo|plutoo]]&lt;br /&gt;
|-&lt;br /&gt;
| [[NFC_Services|NFC]] module service command buf-overflows&lt;br /&gt;
| NFC module copies data with certain commands, from command input buffers to stack without checking the size. These commands include the following, it&#039;s unknown if there&#039;s more commands with similar issues: &amp;quot;nfc:dev&amp;quot; &amp;lt;0x000C....&amp;gt; and &amp;quot;nfc:s&amp;quot; &amp;lt;0x0037....&amp;gt;.&lt;br /&gt;
Since both of these commands are stubbed in the Old3DS NFC module from the very first version(those just return an error), these issues only affect the New3DS NFC module.&lt;br /&gt;
&lt;br /&gt;
There&#039;s no known retail titles which have access to either of these services.&lt;br /&gt;
| ROP under NFC module.&lt;br /&gt;
| New3DS: None&lt;br /&gt;
| New3DS: [[9.5.0-22]]&lt;br /&gt;
| December 2014?&lt;br /&gt;
| &lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| [[News_Services|NEWSS]] service command notificationID validation failure&lt;br /&gt;
| This module does not validate the input notificationID for &amp;lt;nowiki&amp;gt;&amp;quot;news:s&amp;quot;&amp;lt;/nowiki&amp;gt; service commands. This is an out-of-bounds array index bug. For example, [[NEWSS:SetNotificationHeader]] could be used to exploit news module: this copies the input data(size is properly checked) to: out = newsdb_savedata+0x10 + (someu32array[notificationID]*0x70).&lt;br /&gt;
| ROP under news module.&lt;br /&gt;
| None&lt;br /&gt;
| [[9.7.0-25|9.7.0-X]]&lt;br /&gt;
| December 2014&lt;br /&gt;
| &lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| [[NWMUDS:DecryptBeaconData]] heap buffer overflow&lt;br /&gt;
| input_size = 0x1E * &amp;lt;value the u8 from input_[[NWM_Services|networkstruct]]+0x1D&amp;gt;. Then input_tag0 is copied to a heap buffer. When input_size is larger than 0xFA-bytes, it will then copy input_tag1 to &amp;lt;end_address_of_previous_outbuf&amp;gt;, with size=input_size-0xFA.&lt;br /&gt;
&lt;br /&gt;
This can be triggered by either using this command directly, or by boadcasting a wifi beacon which triggers it while a 3DS system running the target process is in range, when the process is scanning for hosts to connect to. Processes will only pass tag data to this command when the wlancommID and other thing(s) match the values for the process.&lt;br /&gt;
&lt;br /&gt;
There&#039;s no known way to actually exploit this for getting ROP under NWM-module, at the time of originally adding this to the wiki. This is because the data which gets copied out-of-bounds *and* actually causes crash(es), can&#039;t be controlled it seems(with just broadcasting a beacon at least). It&#039;s unknown whether this could be exploited from just using NWMUDS service-cmd(s) directly.&lt;br /&gt;
| Without any actual way to exploit this: NWM-module DoS, resulting in process termination(process crash). This breaks *everything* involving wifi comms, a reboot is required to recover from this.&lt;br /&gt;
| None&lt;br /&gt;
| [[9.0.0-20]]&lt;br /&gt;
| ~September 23, 2014(see the [[NWMUDS:DecryptBeaconData]] page history)&lt;br /&gt;
| August 3, 2015&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| [[HID_Services|HID]] module shared-mem&lt;br /&gt;
| HID module does not validate the index values in [[HID_Shared_Memory|sharedmem]](just changes index to 0 when index == maxval when updating), therefore large values will result in HID module writing HID data to arbitrary addresses.&lt;br /&gt;
| ROP under HID module, but this is *very* unlikely to be exploitable since the data written is HID data.&lt;br /&gt;
| None&lt;br /&gt;
| [[9.3.0-21]]&lt;br /&gt;
| 2014?&lt;br /&gt;
| &lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| gspwn&lt;br /&gt;
| GSP module does not validate addresses given to the GPU. This allows a user-mode application/applet to read/write to a large part of physical FCRAM using GPU DMA. From this, you can overwrite the .text segment of the application you&#039;re running under, and gain real code-execution from a ROP-chain. Normally applets&#039; .text([[Home Menu]], [[Internet Browser]], etc) is located beyond the area accessible by the GPU, except for [[RO_Services|CROs]] used by applets([[Internet Browser]] for example).&lt;br /&gt;
&lt;br /&gt;
FCRAM is gpu-accessible up to physaddr 0x26800000 on Old3DS, and 0x2D800000 on New3DS. This is BASE_memregion_start(aka SYSTEM_memregion_end)-0x400000 (0x800000 with New3DS) with the default memory-layout on Old3DS/New3DS. With [[11.3.0-36|11.3.0-X]] the cutoff now varies due to the new [[SVC]] 0x59. The New3DS &amp;quot;normal&amp;quot;(non-APPLICATION) cutoff was changed to 0x2D000000 due to the new [[SVC]] 0x59.&lt;br /&gt;
| User-mode code execution.&lt;br /&gt;
| None&lt;br /&gt;
| [[9.6.0-24|9.6.0-X]]&lt;br /&gt;
| Early 2014&lt;br /&gt;
| &lt;br /&gt;
| smea, [[User:Yellows8|Yellows8]]/others before then&lt;br /&gt;
|-&lt;br /&gt;
| rohax&lt;br /&gt;
| Using gspwn, it is possible to overwrite a loaded [[CRO0]]/[[CRR0]] after its RSA-signature has been validated. Badly validated [[CRO0]] header leads to arbitrary read/write of memory in the ro-process. This gives code-execution in the ro module, who has access to [[SVC|syscalls]] 0x70-0x72, 0x7D.&lt;br /&gt;
&lt;br /&gt;
This was fixed after [[ninjhax]] release by adding checks on [[CRO0]]-based pointers before writing to them.&lt;br /&gt;
| Memory-mapping syscalls.&lt;br /&gt;
| [[9.3.0-21]]&lt;br /&gt;
| [[9.4.0-21]]&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| smea, [[User:Plutooo|plutoo]] joint effort&lt;br /&gt;
|-&lt;br /&gt;
| Region free&lt;br /&gt;
| Only [[Home Menu]] itself checks gamecards&#039; region when launching them. Therefore, any application launch that is done directly with [[NS]] without signaling Home Menu to launch the app, will result in region checks being bypassed.&lt;br /&gt;
This essentially means launching the gamecard with the [[NS_and_APT_Services|&amp;quot;ns:s&amp;quot;]] service. The main way to exploit this is to trigger a FIRM launch with an application specified, either with a normal FIRM launch or a hardware [[NSS:RebootSystem|reboot]].&lt;br /&gt;
| Launching gamecards from any region + bypassing Home Menu gamecard-sysupdate installation&lt;br /&gt;
| None&lt;br /&gt;
| Last tested with [[10.1.0-27|10.1.0-X]].&lt;br /&gt;
| June(?) 2014&lt;br /&gt;
| &lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| [[NWM_Services|NWM]] service-cmd state null-ptr deref&lt;br /&gt;
| The NWMUDS service command code loads a ptr from .data, adds an offset to that, then passes that as the state address for the actual command-handler function. The value of the ptr loaded from .data is not checked, therefore this will cause crashes due to that being 0x0 when NWMUDS was not properly initialized.&lt;br /&gt;
It&#039;s unknown whether any NWM services besides NWMUDS have this issue.&lt;br /&gt;
| This is rather useless since it&#039;s only a crash caused by a state ptr based at 0x0.&lt;br /&gt;
| None&lt;br /&gt;
| [[9.0.0-20]]&lt;br /&gt;
| 2013?&lt;br /&gt;
| &lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== General/CTRSDK ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Summary&lt;br /&gt;
!  Description&lt;br /&gt;
!  Successful exploitation result&lt;br /&gt;
!  Fixed in version&lt;br /&gt;
!  Last version this flaw was checked for&lt;br /&gt;
!  Timeframe this was discovered&lt;br /&gt;
!  Discovered by&lt;br /&gt;
|-&lt;br /&gt;
| [[NWM_Services|UDS]] beacon additional-data buffer overflow&lt;br /&gt;
| Originally CTRSDK did not validate the UDS additional-data size before using that size to copy the additional-data to a [[NWM_Services|networkstruct]]. This was eventually fixed.&lt;br /&gt;
This was discovered while doing code RE with an old dlp-module version. It&#039;s unknown in what specific CTRSDK version this was fixed, or even what system-version updated titles with a fixed version.&lt;br /&gt;
&lt;br /&gt;
It&#039;s unknown if there&#039;s any titles using a vulnerable CTRSDK version which are also exploitable with this(dlp module can&#039;t be exploited with this).&lt;br /&gt;
&lt;br /&gt;
The maximum number of bytes that can be written beyond the end of the outbuf is 0x37-bytes, with additionaldata_size=0xFF.&lt;br /&gt;
| Perhaps ROP, very difficult if possible with anything at all&lt;br /&gt;
| ?&lt;br /&gt;
| &lt;br /&gt;
| September(?) 2014&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| CTPK buffer overflow&lt;br /&gt;
| At offset 0x20 in CTPK is an array for each texture, each entry is 0x20-bytes. This contains a wordindex(entry+0x18) for some srcdata relative to CTPK+0, and an u8 wordsize(entry+0x14) for this data. The CTRSDK function handling this doesn&#039;t validate the size, when copying srcdata using this size to the output buffer. Applications usually have the output buffer on the stack, hence stack buffer overflow.&lt;br /&gt;
&lt;br /&gt;
While CTPK(*.ctpk) are normally only loaded from RomFS, some application(s) load from elsewhere too.&lt;br /&gt;
| ROP under the target application.&lt;br /&gt;
| None?&lt;br /&gt;
| &amp;quot;[SDK+NINTENDO:CTR_SDK-11_4_0_200_none]&amp;quot;&lt;br /&gt;
| November 14, 2016&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>EvilFlight</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=FirmwareNews&amp;diff=20880</id>
		<title>FirmwareNews</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=FirmwareNews&amp;diff=20880"/>
		<updated>2019-01-04T05:37:05Z</updated>

		<summary type="html">&lt;p&gt;EvilFlight: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;As of this writing, the latest firmware is &#039;&#039;&#039;[[11.9.0-42]]&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
See [[Homebrew Exploits|here]] regarding running homebrew.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Software-based full system control exploits are known and publicly available for system versions up to and including 11.9.0-42, while [[Bootloader#Non-NAND_FIRM_boot|ntrboothax]] allows for ARM9 arbitrary code execution on any 3DS-family console regardless of system firmware version (or even its presence at all).&lt;/div&gt;</summary>
		<author><name>EvilFlight</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=FirmwareNews&amp;diff=20878</id>
		<title>FirmwareNews</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=FirmwareNews&amp;diff=20878"/>
		<updated>2019-01-02T02:05:55Z</updated>

		<summary type="html">&lt;p&gt;EvilFlight: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;As of this writing, the latest firmware is &#039;&#039;&#039;[[11.9.0-42]]&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
See [[Homebrew Exploits|here]] regarding running homebrew.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Software-based full system control exploits are known and [https://3ds.hacks.guide publicly available] for system versions up to and including the latest firmware shown above, while [[Bootloader#Non-NAND_FIRM_boot|ntrboothax]] allows for ARM9 arbitrary code execution on any 3DS-family console regardless of system firmware version (or even its presence at all).&lt;/div&gt;</summary>
		<author><name>EvilFlight</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=FirmwareNews&amp;diff=20835</id>
		<title>FirmwareNews</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=FirmwareNews&amp;diff=20835"/>
		<updated>2018-10-05T16:45:48Z</updated>

		<summary type="html">&lt;p&gt;EvilFlight: Seedminer/Frogminer acknowledgment&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;As of this writing, the latest firmware is &#039;&#039;&#039;[[11.8.0-41]]&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
See [[Homebrew Exploits|here]] regarding running homebrew.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Software-based full system control exploits are known and publicly available for system versions up to and including 11.8.0-41, while [[Bootloader#Non-NAND_FIRM_boot|ntrboothax]] allows for ARM9 arbitrary code execution on any 3DS-family console regardless of system firmware version (or even its presence at all).&lt;/div&gt;</summary>
		<author><name>EvilFlight</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=3DS_System_Flaws&amp;diff=20831</id>
		<title>3DS System Flaws</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=3DS_System_Flaws&amp;diff=20831"/>
		<updated>2018-09-29T02:56:26Z</updated>

		<summary type="html">&lt;p&gt;EvilFlight: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Exploits are used to execute unofficial code (homebrew) on the Nintendo 3DS. This page is a list of publicly known system flaws, for userland applications/applets flaws see [[3DS_Userland_Flaws|here]].&lt;br /&gt;
&lt;br /&gt;
=Stale / Rejected Efforts=&lt;br /&gt;
* Neimod has been working on a RAM dumping setup for a little while now. He&#039;s de-soldered the 3DS&#039;s RAM chip and hooked it and the RAM pinouts on the 3DS&#039; PCB up to a custom RAM dumping setup. A while ago he published photos showing his setup to be working quite well, with the 3DS successfully booting up. However, his flickr stream is now private along with most of his work.&lt;br /&gt;
&lt;br /&gt;
* Someone (who will remain unnamed) has released CFW and CIA installers, all of which is copied from the work of others, or copyrighted material.&lt;br /&gt;
&lt;br /&gt;
==Tips and info==&lt;br /&gt;
The 3DS uses the XN feature of the ARM11 processor. There&#039;s no official way from applications to enable executable permission for memory containing arbitrary unsigned code(there&#039;s a [[SVC]] for this, but only [[RO_Services|RO-module]] has access to it). A usable userland exploit would still be useful: you could only do return-oriented-programming with it initially. From ROP one could then exploit system flaw(s), see below.&lt;br /&gt;
&lt;br /&gt;
SD card [[extdata]] and SD savegames can be attacked, for consoles where the console-unique [[Nand/private/movable.sed|movable.sed]] was dumped(accessing SD data is far easier by running code on the target 3DS however).&lt;br /&gt;
&lt;br /&gt;
=System flaws=&lt;br /&gt;
== Hardware ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Summary&lt;br /&gt;
!  Description&lt;br /&gt;
!  Fixed with hardware model/revision&lt;br /&gt;
!  Newest hardware model/revision this flaw was checked for&lt;br /&gt;
!  Timeframe this was discovered&lt;br /&gt;
!  Discovered by&lt;br /&gt;
|-&lt;br /&gt;
| ARM9/ARM11 bootrom vectors point at uninitialized RAM&lt;br /&gt;
| ARM9&#039;s and ARM11&#039;s exception vectors are hardcoded to point at the CPU&#039;s internal memory (0x08000000 region for ARM9, AXIWRAM for ARM11). While the bootrom does set them up to point to an endless loop at some point during boot, it does not do so immediately. As such, a carefully-timed fault injection (via hardware) to trigger an exception (such as an invalid instruction) will cause execution to fall into ARM9 RAM. &lt;br /&gt;
Since RAM isn&#039;t cleared on boot (see below), one can immediately start execution of their own code here to dump bootrom, OTP, etc.&lt;br /&gt;
The ARM9 bootrom does the following at reset:  reset vector branches to another instruction, then branches to bootrom+0x8000. Hence, there&#039;s no way to know for certain when exactly the ARM9 exception-vector data stored in memory gets initialized.&lt;br /&gt;
&lt;br /&gt;
This requires *very* *precise* timing for triggering the hardware fault.&lt;br /&gt;
&lt;br /&gt;
It has been exploited by derrek to dump the ARM9 bootrom as of Summer 2015.&lt;br /&gt;
| None: all available 3DS models at the time of writing have the exact same ARM9/ARM11 bootrom for the unprotected areas.&lt;br /&gt;
| New3DS&lt;br /&gt;
| End of February 2014&lt;br /&gt;
| [[User:Derrek|derrek]], WulfyStylez (May 2015) independently&lt;br /&gt;
|-&lt;br /&gt;
| Missing AES key clearing&lt;br /&gt;
| The hardware AES engine does not clear keys when doing a hard reset/reboot.&lt;br /&gt;
| None&lt;br /&gt;
| New3DS&lt;br /&gt;
| August 2014&lt;br /&gt;
| Mathieulh/Others&lt;br /&gt;
|-&lt;br /&gt;
| No RAM clearing on reboots&lt;br /&gt;
| On an MCU-triggered reboot all RAM including FCRAM/ARM9 memory/AXIWRAM/VRAM keeps its contents.&lt;br /&gt;
| None&lt;br /&gt;
| New3DS&lt;br /&gt;
| March 2014&lt;br /&gt;
| [[User:Derrek|derrek]]&lt;br /&gt;
|-&lt;br /&gt;
| 32bits of actual console-unique TWLNAND keydata&lt;br /&gt;
| On retail the 8-bytes at ARM9 address [[Memory_layout|0x01FFB808]] are XORed with hard-coded data, to generate the TWL console-unique keys, including TWLNAND. On Old3DS the high u32 is always 0x0, while on New3DS that u32 is always 0x2. On top of this, the lower u32&#039;s highest bit is always ORed. only 31 bits of the TWL console-unique keydata / TWL consoleID are actually console-unique.&lt;br /&gt;
This allows one to easily bruteforce the TWL console-unique keydata with *just* data from TWLNAND. On DSi the actual console-unique data for key generation is 8-bytes(all bytes actually set).&lt;br /&gt;
| None&lt;br /&gt;
| New3DS&lt;br /&gt;
| 2012?&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| DSi / 3DS-TWL key-generator&lt;br /&gt;
| After using the key generator to generate the normal-key, you could overwrite parts of the normal-key with your own data and then recover the key-generator output by comparing the new crypto output with the original crypto output. From the normal-key outputs, you could deduce the TWL key-generator function.&lt;br /&gt;
This applies to the keyX/keyY too.&lt;br /&gt;
&lt;br /&gt;
This attack does not work for the 3DS key-generator because keyslots 0-3 are only for TWL keys.&lt;br /&gt;
| None&lt;br /&gt;
| New3DS&lt;br /&gt;
| 2011&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| 3DS key-generator&lt;br /&gt;
| The algorithm for generating the normal-keys for keyslots is cryptographically weak.  As a result, it is easily susceptible to differential cryptanalysis if the normal-key corresponding to any scrambler-generated keyslot is discovered.&lt;br /&gt;
&lt;br /&gt;
Several such pairs of matching normal-keys and KeyY values were found, leading to deducing the key-generator function.&lt;br /&gt;
| None&lt;br /&gt;
| New3DS&lt;br /&gt;
| February 2015&lt;br /&gt;
| [[User:Yellows8|Yellows8]], [[User:Plutooo|plutoo]]&lt;br /&gt;
|-&lt;br /&gt;
| RSA keyslots don&#039;t clear exponent when setting modulus&lt;br /&gt;
| The [[RSA_Registers|RSA keyslots]] are set by boot ROM to have four private RSA keys.  The exponent value in the RSA registers is write-only and not readable.&lt;br /&gt;
&lt;br /&gt;
However, when setting a keyslot&#039;s modulus, the RSA hardware leaves the exponent alone.  This allows retrieving the exponent by doing a discrete logarithm of the output.&lt;br /&gt;
&lt;br /&gt;
By setting the modulus to a prime number whose modular multiplicative order is &amp;quot;smooth&amp;quot; (that is, p-1 is divisible by only small prime numbers), discrete logarithms can be calculated quickly using the [[wikipedia:Pohlig-Hellman algorithm|Pohlig-Hellman algorithm]].  If the prime chosen is greater than the modulus, but the same bit size, the discrete logarithm is the private exponent.&lt;br /&gt;
&lt;br /&gt;
This exploit&#039;s usefulness is limited: RSA keyslot 0 is only used in current firmware for deriving the 6.x save and 7.x NCCH keys, which were already known, and the other three keyslots are entirely unused.  Additionally, with a boot ROM dump, this exploit is moot; these private keys are located in the protected ARM9 boot ROM.&lt;br /&gt;
| None&lt;br /&gt;
| New3DS&lt;br /&gt;
| March 2016&lt;br /&gt;
| [[User:Myria|Myria]]&lt;br /&gt;
|-&lt;br /&gt;
| [[CONFIG11_Registers#CFG11_GPUPROT|CFG11_GPUPROT]] allowing acccess to AXIWRAM/FCRAM-BASE-memregion&lt;br /&gt;
| [[CONFIG11_Registers#CFG11_GPUPROT|CFG11_GPUPROT]] can be configured by anything with access to it to allow the GPU to access the entire AXIWRAM+FCRAM. For example, this is an issue for any sysmodule that gets exploited and has access to this register memory-page(include one that&#039;s listed below).&lt;br /&gt;
&lt;br /&gt;
See also &amp;quot;kernelhax via gspwn&amp;quot; below.&lt;br /&gt;
| None&lt;br /&gt;
| New3DS&lt;br /&gt;
| February 7, 2017&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Boot ROM ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Summary&lt;br /&gt;
!  Description&lt;br /&gt;
!  Fixed with hardware model/revision&lt;br /&gt;
!  Newest hardware model/revision this flaw was checked for&lt;br /&gt;
!  Timeframe this was discovered&lt;br /&gt;
!  Discovered by&lt;br /&gt;
|-&lt;br /&gt;
| FIRM partitions known-plaintext&lt;br /&gt;
| The [[Flash_Filesystem|FIRM partitions]] are encrypted with AES-CTR without a MAC. Since this works by XOR&#039;ing data with a static (per-console in this case) keystream, one can deduce the keystream of a portion of each FIRM partition if they have the actual FIRM binary stored in it.&lt;br /&gt;
&lt;br /&gt;
This can be paired with many exploits. For example, it allows minor FIRM downgrades (i.e. 10.4 to 9.6 or 9.5 to 9.4, but not 9.6 to 9.5).&lt;br /&gt;
However it is most commonly used to install arbitrary FIRMs (usually boot9strap), thanks to sighax.&lt;br /&gt;
&lt;br /&gt;
This can be somewhat addressed by having a FIRM header skip over previously used section offsets, but this would just air-gap newer FIRMs without fixing the core bug. This can also only be done a limited number of times due to the size of FIRM versus the size of the partitions.&lt;br /&gt;
| None&lt;br /&gt;
| New3DS&lt;br /&gt;
| &lt;br /&gt;
| Everyone&lt;br /&gt;
|-&lt;br /&gt;
| Boot9 AES keyinit function issues&lt;br /&gt;
| [[Bootloader|Boot9]] seems to have two bugs in the AES key-init function, see [[AES_Registers#AES_key-init|here]].&lt;br /&gt;
| None&lt;br /&gt;
| BootROM issue.&lt;br /&gt;
| 2015&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| New3DS has same boot ROM as Old3DS&lt;br /&gt;
| The New3DS has the exact same boot ROM as the Old3DS.  This means, among other things, that all the same boot ROM flaws are present.  Also, this meant that it is possible to boot Old3DS firmware on New3DS (see &amp;quot;CFG9_SYSPROT9 bit1 not set by Kernel9&amp;quot;).&lt;br /&gt;
| None&lt;br /&gt;
| New3DS&lt;br /&gt;
| October 2014&lt;br /&gt;
| Everyone&lt;br /&gt;
|-&lt;br /&gt;
| sighax: Boot9 improper validation of FIRM partition RSA signatures&lt;br /&gt;
| The [[Flash_Filesystem|FIRM partitions]] are signed with RSA-2048 using SHA-256 and PKCS #1 v1.5 padding.  Boot9, however, improperly validates the padding in three ways:&lt;br /&gt;
# Boot9 permits block type 02, meant for encrypted messages, to be used for signatures.  Only 01, for signatures, should have been permitted.  As a result, when using block type 02, a signature block is not required to have a long string of FF bytes as padding, but rather any nonzero random values suffice.&lt;br /&gt;
# Boot9 does not require that the length of the padding fill out the signature block completely.  As a result, there is considerable freedom in the layout of a signature.&lt;br /&gt;
# Boot9 fails to do bounds checking in its parsing of the DER-encoded hash algorithm type and hash value; the length values given in DER are permitted to point outside the signature block.&lt;br /&gt;
Flaw 3 allows the DER encoding to be such that boot9 believes that the signature&#039;s hash value is outside the range of the block itself, somewhere on the stack.  This can be pointed at the correct hash value it computes.  Boot9 then memcmp&#039;s the calculated hash against itself, and thinks that the hash is valid.&lt;br /&gt;
&lt;br /&gt;
As a result of the above, we estimate that one in 2&amp;lt;sup&amp;gt;43&amp;lt;/sup&amp;gt; (~8.8 trillion) random fake signatures will be considered by Boot9 to be valid.  This is well within the range of brute force, particularly with an optimized GPU implementation.  An Nvidia GTX 1080 Ti would take about one week to find a match.&lt;br /&gt;
| None&lt;br /&gt;
| New3DS&lt;br /&gt;
| July 2015&lt;br /&gt;
| [[User:Derrek|derrek]]&lt;br /&gt;
|-&lt;br /&gt;
| Boot9 FIRM loading doesn&#039;t blacklist memory-mapped I/O&lt;br /&gt;
| [[Bootloader|Boot9]]&#039;s FIRM loading blacklists Boot9 data regions, but forgets to do other important regions, including Memory-mapped I/O. Combined with sighax, by loading a malicious FIRM section to MMIO, one can get Boot9/Boot11 code execution. &lt;br /&gt;
| None&lt;br /&gt;
| New3DS&lt;br /&gt;
| 2015(?)&lt;br /&gt;
| [[User:Derrek|derrek]] (2015?), [[User:Normmatt|Normmatt]] and [[User:SciresM|SciresM]] independently (January 2017).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;superhax&amp;quot;: Boot9 FIRM loading blacklist check is flawed&lt;br /&gt;
| Boot9 only makes sure the &#039;&#039;&#039;start&#039;&#039;&#039; and &#039;&#039;&#039;end&#039;&#039;&#039; address of each section is not covered by a blacklisted region. Thus, it is possible to overwrite blacklisted regions (e.g. ARM9 Exception Vectors) by choosing a FIRM section range that encloses an entire blacklisted region. The vulnerable code looks like this: if(blRegions[i].start &amp;lt;= sectionStart &amp;amp;&amp;amp; blRegions[i].end &amp;gt; sectionStart &amp;lt;nowiki&amp;gt;||&amp;lt;/nowiki&amp;gt; blRegions[i].start &amp;lt;= sectionEnd &amp;amp;&amp;amp; blRegions[i].end &amp;gt; sectionEnd) return false; // failure&lt;br /&gt;
| None&lt;br /&gt;
| New3DS&lt;br /&gt;
| August 2015&lt;br /&gt;
| [[User:Plutoo|plutoo]], [[User:Yellows8|yellows8]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== ARM9 software ==&lt;br /&gt;
&lt;br /&gt;
=== arm9loader ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Summary&lt;br /&gt;
!  Description&lt;br /&gt;
!  Successful exploitation result&lt;br /&gt;
!  Fixed in [[FIRM]] system version&lt;br /&gt;
!  Last [[FIRM]] system version this flaw was checked for&lt;br /&gt;
!  Timeframe this was discovered&lt;br /&gt;
!  Public disclosure timeframe&lt;br /&gt;
!  Discovered by&lt;br /&gt;
|-&lt;br /&gt;
| Generating the keysector console-unique keys with ITCM+Boot9&lt;br /&gt;
| [[Bootloader|Boot9]] decrypts the 0x100-byte [[OTP_Registers|OTP]] using AES-CBC with keydata stored in Boot9. If hash verification is successful, the plaintext of the first 0x90-bytes are copied into [[Memory_layout|ITCM]]. This is the &#039;&#039;exact&#039;&#039; &#039;&#039;same&#039;&#039; region hashed by arm9loader when generating the console-unique keys for decrypting the keysector, except arm9loader uses the raw encrypted OTP.&lt;br /&gt;
&lt;br /&gt;
Therefore, with the OTP keydata+IV from Boot9 you can: encrypt the 0x90-bytes from ITCM, then hash the output to get the console-unique keys for the system&#039;s keysector. This can even be done for Old3DS which doesn&#039;t have the arm9loader keysector officially.&lt;br /&gt;
&lt;br /&gt;
It&#039;s unknown why arm9loader only used the first 0x90-bytes of OTP. Using more data from OTP would&#039;ve prevented this. Fixing this would require doing exactly that, but that would also mean updating the NAND keysector(which is dangerous).&lt;br /&gt;
| See description.&lt;br /&gt;
| None&lt;br /&gt;
| &lt;br /&gt;
| 2015&lt;br /&gt;
| January 6, 2017&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| Rearrangable keys in the NAND keystore&lt;br /&gt;
| Due to the keystore being encrypted with AES-ECB, one can rearrange blocks and still have the NAND keystore decrypt in a deterministic way. &lt;br /&gt;
&lt;br /&gt;
Using 10.0 FIRM it is possible to rearrange keys such that ARM9 memory is executed. As such using existing ARM9 execution 10.0 FIRM can be written to NAND and a payload written to memory, with the payload to be executed post-K9L using an MCU reboot.&lt;br /&gt;
| arm9loaderhax given existing ARM9 code execution&lt;br /&gt;
| None&lt;br /&gt;
| [[11.3.0-36|11.3.0-X]]&lt;br /&gt;
| Early 2016&lt;br /&gt;
| 27 September 2016&lt;br /&gt;
| Myria, [[User:Dark samus|dark_samus]]; mathieulh (independently); [[User:Plutooo|plutoo]] (independently) + others&lt;br /&gt;
|-&lt;br /&gt;
| Uncleared OTP hash keydata in console-unique 0x11 key-generation&lt;br /&gt;
| Kernel9Loader does not clear the [[SHA_Registers#SHA_HASH|SHA_HASH register]] after use. As a result, the data stored here as K9L hands over to Kernel9 is the hash of [[OTP_Registers|OTP data]] used to seed the [[FIRM#New_3DS_FIRM|console-unique NAND keystore decryption key]] set on keyslot 0x11.&lt;br /&gt;
&lt;br /&gt;
Retrieving this keydata and the [[Flash_Filesystem#0x12C00|NAND keystore]] of the same device allows calculating the decrypted New3DS NAND keystore (non-unique, common to all New3DS units), which contains AES normal keys, also set on keyslot 0x11, which are then used to derive all current [[AES_Registers#Keyslots|New3DS-only AES keyXs]] including the newer batch introduced in [[9.6.0-24#arm9loader|9.6.0-X]]. From there, it is trivial to perform the same key derivation in order to initialize those keys on any system version, and even on Old3DS.&lt;br /&gt;
&lt;br /&gt;
This can be performed by exploiting the &amp;quot;arm9loaderhax&amp;quot; vulnerability to obtain post-K9L code execution after an MCU reboot (the bootrom section-loading fail is not relevant here, this attack was performed without OTP data by brute-forcing keys), and using this to dump the SHA_HASH register. This attack works on any FIRM version shipping a vulnerable version of K9L, whereas OTP dumping required a boot of &amp;lt;[[3.0.0-6|3.0.0-X]].&lt;br /&gt;
&lt;br /&gt;
This attack results in obtaining the entire (0x200-bytes) NAND keystore - it was confirmed at a later date that this keystore is encrypted with the same key (by comparing the decrypted data from multiple units), and therefore using another key in this store will not remedy the issue as all keys are known (i.e. later, unused keys decrypt to the same 0x200-bytes constant with the same OTP hash). Later keys could have been encrypted differently but this is not the case. As a result of this, it is not possible for Nintendo to use K9L again in its current format for its intended purpose, though this was not news from the moment people dumped a New3DS OTP.&lt;br /&gt;
| Derivation of all New3DS keys generated via the NAND keystore (0x1B &amp;quot;Secure4&amp;quot; etc.)&lt;br /&gt;
| None&lt;br /&gt;
| [[11.3.0-36|11.3.0-X]]&lt;br /&gt;
| ~April 2015, implemented in May 2015&lt;br /&gt;
| 13 January 2016&lt;br /&gt;
| [[User:WulfyStylez|WulfyStylez]], [[User:Dazzozo|Dazzozo]], [[User:Shinyquagsire23|shinyquagsire23]] (complimentary + implemented), [[User:Plutooo|plutoo]], Normmatt (discovered independently)&lt;br /&gt;
|-&lt;br /&gt;
| enhanced-arm9loaderhax&lt;br /&gt;
| See the 32c3 3ds talk.&lt;br /&gt;
Since this is a combination of a trick with the arm9-bootrom + arm9loaderhax, and since you have to manually write FIRM to the firm0/firm1 NAND partitions, this can&#039;t be completely fixed. Any system with existing ARM9 code execution and an OTP/OTP hash dump can exploit this. Additionally, by using the FIRM partition known-plaintext bug and bruteforcing the second entry in the keystore, this can currently be exploited on all New3DS systems without any other prerequisite hacks.&lt;br /&gt;
| arm9loaderhax which automatically occurs at hard-boot.&lt;br /&gt;
| See arm9loaderhax / description.&lt;br /&gt;
| See arm9loaderhax / description.&lt;br /&gt;
| Theorized around mid July, 2015. Later implemented+tested by [[User:Plutooo|plutoo]] and [[User:Derrek|derrek]].&lt;br /&gt;
| 32c3 3ds talk (December 27, 2015)&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| arm9loaderhax: Missing verification block for the 9.6 keys&lt;br /&gt;
| Starting with [[9.6.0-24|9.6.0-X]] a new set of NAND-based keys were introduced. However, no verification block was added to verify that the new key read from NAND is correct. This was technically an issue from [[9.5.0-22|9.5.0-X]] with the original sector+0 keydata, however the below is only possible with [[9.6.0-24|9.6.0-X]] since keyslots 0x15 and 0x16 are generated from different 0x11 keyXs.&lt;br /&gt;
&lt;br /&gt;
Writing an incorrect key to NAND will cause arm9loader to decrypt the ARM9 kernel as garbage and then jump to it.&lt;br /&gt;
&lt;br /&gt;
This allows an hardware-based attack where you can boot into an older exploited firmware, fill all memory with NOP sleds/jump-instructions, and then reboot into executing garbage. By automating this process with various input keydata, eventually you&#039;ll find some garbage that jumps to your code.&lt;br /&gt;
&lt;br /&gt;
This gives very early ARM9 code execution (pre-ARM9 kernel). As such, it is possible to dump RSA keyslots with this and calculate the 6.x [[Savegames#6.0.0-11_Savegame_keyY|save]], and 7.x [[NCCH]] keys. This cannot be used to recover keys initialized by arm9loader itself. This is due to it wiping the area used for its stack during NAND sector decryption and keyslot init. &lt;br /&gt;
&lt;br /&gt;
Due to FIRMs on both Old and New 3DS using the same RSA data, this can be exploited on Old3DS as well, but only if one already has the actual plaintext normalkey from New3DS NAND sector 0x96 offset-0 and has dumped the OTP area of the Old3DS.&lt;br /&gt;
| Recovery of 6.x [[Savegames#6.0.0-11_Savegame_keyY|save key]]/7.x [[NCCH]] key, access to uncleared OTP hash keydata&lt;br /&gt;
| None&lt;br /&gt;
| [[11.3.0-36|11.3.0-X]]&lt;br /&gt;
| March 2015&lt;br /&gt;
| &lt;br /&gt;
| [[User:Plutooo|plutoo]]&lt;br /&gt;
|-&lt;br /&gt;
| arm9loader runs on Old3DS&lt;br /&gt;
| Despite being written only for New3DS, all of arm9loader runs fine on Old3DS.  It&#039;s not until booting Kernel9 that a New3DS FIRM partition would crash on an Old3DS.  As a result, if a bug exists in arm9loader to get control, it can be exploited on Old3DS by writing New3DS FIRM to the FIRM partitions.  Thus, arm9loaderhax works on both Old3DS and New3DS.&lt;br /&gt;
| arm9loader bugs also compromise Old3DS&lt;br /&gt;
| None&lt;br /&gt;
| [[11.3.0-36|11.3.0-X]]&lt;br /&gt;
| Sometime in 2015&lt;br /&gt;
| &lt;br /&gt;
| [[User:Plutooo|plutoo]] presumably&lt;br /&gt;
|-&lt;br /&gt;
| Uncleared New3DS keyslot 0x11&lt;br /&gt;
| Originally the New3DS [[FIRM]] arm9bin loader only cleared keyslot 0x11 when it gets executed at firmlaunch. This was fixed with [[9.5.0-22|9.5.0-X]] by completely clearing keyslot 0x11 immediately after the loader finishes using keyslot 0x11.&lt;br /&gt;
This means that any ARM9 code that can execute before the loader clears the keyslot at firmlaunch(including firmlaunch-hax) can get access to the uncleared keyslot 0x11, which then allows one to generate all &amp;lt;=v9.5 New3DS keyXs which are generated by keyslot 0x11.&lt;br /&gt;
&lt;br /&gt;
Therefore, to completely fix this the loader would have to generate more keys using different keyslot 0x11 keydata. This was done with [[9.6.0-24|9.6.0-X]].&lt;br /&gt;
| New3DS keyXs generation&lt;br /&gt;
| Mostly fixed with [[9.5.0-22|9.5.0-X]], completely fixed with new keys with [[9.6.0-24|9.6.0-X]].&lt;br /&gt;
| &lt;br /&gt;
| February 3, 2015 (one day after [[9.5.0-22|9.5.0-X]] release)&lt;br /&gt;
| &lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Process9 ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Summary&lt;br /&gt;
!  Description&lt;br /&gt;
!  Successful exploitation result&lt;br /&gt;
!  Fixed in [[FIRM]] system version&lt;br /&gt;
!  Last [[FIRM]] system version this flaw was checked for&lt;br /&gt;
!  Timeframe this was discovered&lt;br /&gt;
!  Public disclosure timeframe&lt;br /&gt;
!  Discovered by&lt;br /&gt;
|-&lt;br /&gt;
| Leak of normal-key matching a key-scrambler key&lt;br /&gt;
| New 3DS firmware versions [[8.1.0-0 New3DS|8.1.0]] through [[9.2.0-20|9.2.0]] set the encryption key for [[Amiibo]] data using a hardcoded normal-key in Process9.  In firmware [[9.3.0-21|9.3.0]], Nintendo &amp;quot;fixed&amp;quot; this by using the key scrambler instead, by calculating the keyY value for keyslot 0x39 that results in the same normal-key, then hardcoding that keyY into Process9.&lt;br /&gt;
&lt;br /&gt;
Nintendo&#039;s fix is actually the problem: Nintendo revealed the normal-key matching an unknown keyX and a known keyY.  Combined with the key scrambler using an insecure scrambling algorithm (see &amp;quot;Hardware&amp;quot; above), the key scrambler function could be deduced.&lt;br /&gt;
| Deducing the keyX for keyslot 0x39 and the key scrambler algorithm&lt;br /&gt;
| New 3DS [[9.3.0-21|9.3.0-X]], sort of&lt;br /&gt;
| [[10.0.0-27|10.0.0-X]]&lt;br /&gt;
| Sometime in 2015 after the hardware key-generator was broken.&lt;br /&gt;
| 32c3 3ds talk (December 27, 2015)&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| Leak of normal-key matching a key-generator key&lt;br /&gt;
| During the 3DS&#039; development (June/July 2010) Nintendo added support installing encrypted content ([[CIA]]). Common-key index1 was intended to be a [[AES|hardware generated key]]. However while they added code to generate the key in hardware, they forgot to remove the normal-key for index1 (used elsewhere, likely old debug code). Nintendo later removed the normal key sometime before the first non-prototype firmware release.&lt;br /&gt;
&lt;br /&gt;
Knowing the keyY and the normal-key for common-key index1, the devkit key-generator algorithm can be deduced (see &amp;quot;Hardware&amp;quot; above). Additionally the remaining devkit common-keys can be generated once the common-key keyX is recovered.&lt;br /&gt;
&lt;br /&gt;
Note that the devkit key-generator was discovered to be the same as the retail key-generator.&lt;br /&gt;
| Deducing the keyX for keyslot 0x3D and hardware key-generator algorithm. Generate remaining devkit common-keys.&lt;br /&gt;
| pre-[[1.0.0-0|1.0.0-X]]&lt;br /&gt;
| &lt;br /&gt;
| Shortly after the key-generator was revealed to be flawed at the 32c3 3ds talk&lt;br /&gt;
| January 20, 2016&lt;br /&gt;
| [[User:Jakcron|jakcron]]&lt;br /&gt;
|-&lt;br /&gt;
| Factory firmware is vulnerable to sighax&lt;br /&gt;
| During the 3DS&#039;s development, presumably boot9 was written (including the sighax vulnerability). This vulnerability is also present in factory firmware (and earlier, including 0.11). This was fixed in version 1.0.0-0.&lt;br /&gt;
| Deducing the mechanics of the sighax vulnerability in boot9 without having a dump of protected boot9. ARM9 code execution on factory/earlier firmware.&lt;br /&gt;
| [[1.0.0-0|1.0.0-X]]&lt;br /&gt;
| [[1.0.0-0|1.0.0-X]]&lt;br /&gt;
| May 9, 2017&lt;br /&gt;
| May 19, 2017&lt;br /&gt;
| [[User:SciresM|SciresM]], [[User:Myria|Myria]]&lt;br /&gt;
|-&lt;br /&gt;
| twlhax: Corrupted SRL header leads to memory overwrite&lt;br /&gt;
| During TWL_FIRM boot, the ARM11 process TwlBg puts launcher.srl, the DSi bootloader, into FCRAM.  TWL_FIRM Process9 then parses the [http://dsibrew.org/wiki/NDS_Format SRL header] to place launcher.srl&#039;s code where DSi mode can execute it.&lt;br /&gt;
&lt;br /&gt;
DSi-mode memory is in FCRAM, but interleaved.  Each byte of DSi-mode memory also exists at some address in 3DS FCRAM space.&lt;br /&gt;
&lt;br /&gt;
Process9 does not validate the RSA signature on launcher.srl, unlike SRLs loaded from cartridge or NAND (DSiWare).  A compromised ARM11 can, in a manner similar to firmlaunchhax, send a launcher.srl with a modified SRL header.  By setting the SRL header&#039;s ARM7/ARM9 load addresses and sizes carefully, accounting for the different memory map and for DSi mode&#039;s interleaved memory, it is possible to overwrite part of Process9&#039;s stack and take control with a ROP chain.&lt;br /&gt;
&lt;br /&gt;
Fixed in 11.8.0-X by... (fill me in)&lt;br /&gt;
| ARM9 code execution (whilst still in 3DS mode)&lt;br /&gt;
| [[11.8.0-41|11.8.0-X]]&lt;br /&gt;
| [[11.8.0-41|11.8.0-X]]&lt;br /&gt;
|&lt;br /&gt;
| August 11, 2018&lt;br /&gt;
| smea&lt;br /&gt;
|-&lt;br /&gt;
| safefirmhax&lt;br /&gt;
| SAFE_MODE_FIRM is almost never updated(even when NATIVE_FIRM is updated for vuln fixes), this can be noticed by &#039;&#039;just&#039;&#039; checking 3dbrew/ninupdates title-listings.&lt;br /&gt;
&lt;br /&gt;
The fix for firmlaunch-hax was only applied to NATIVE_FIRM in [[9.5.0-22|9.5.0-X]], leaving SAFE_FIRM exploitable. With ARM11-kernel execution, one can trigger FIRM-launch in to SAFE_FIRM, do Kernel9 &amp;lt;=&amp;gt; Kernel11 sync, PXI sync and then repeat the original attack on SAFE_FIRM instead.&lt;br /&gt;
| ARM9 code execution&lt;br /&gt;
| [[11.3.0-36|11.3.0-X]]&lt;br /&gt;
| &lt;br /&gt;
| 2012-2013?&lt;br /&gt;
| Wiki: January 2, 2017&lt;br /&gt;
| Everyone&lt;br /&gt;
|-&lt;br /&gt;
| safefirmhax 1.1&lt;br /&gt;
| Nintendo&#039;s original safefirmhax fix was flawed -- they added a global boolean that got set to true whenever a non-sysmodule title got launched (except for a hardcoded repair title id), and panic()&#039;d if that boolean was true to prevent launching safefirm after hax was active. However, because the boolean was initially false after firmlaunch -- With ARM11-kernel execution, one could FIRM-launch into NATIVE_FIRM, and then immediately FIRM-launch again into SAFE_FIRM early in NATIVE_FIRM boot before the boolean got set to true to repeat the safehax attack.&lt;br /&gt;
&lt;br /&gt;
This was fixed by adding additional CFG9_BOOTENV checks to firmlaunch code in 11.4.&lt;br /&gt;
| ARM9 code execution&lt;br /&gt;
| [[11.4.0-37|11.4.0-X]]&lt;br /&gt;
| &lt;br /&gt;
| safefirmhax fix&lt;br /&gt;
| Wiki: April 10, 2017&lt;br /&gt;
| Everyone&lt;br /&gt;
|-&lt;br /&gt;
| ntrcardhax&lt;br /&gt;
| When reading the banner of a NTR title, Process9 relies on a hardware register to know when the banner was fully read.&lt;br /&gt;
However that register is shared between the ARM9 and the ARM11.&lt;br /&gt;
An attacker with k11 control can so make Process9 believe the banner continues forever and so trigger a buffer overflow.&lt;br /&gt;
With a custom banner for a NTR flashcart, this leads to code execution in Process9.&lt;br /&gt;
&lt;br /&gt;
This was fixed by adding bound checks on the read data.&lt;br /&gt;
| ARM9 code execution&lt;br /&gt;
| [[10.4.0-29|10.4.0-X]]&lt;br /&gt;
| &lt;br /&gt;
| March 2015&lt;br /&gt;
| 32c3 3ds talk (December 27, 2015)&lt;br /&gt;
| [[User:Plutooo|plutoo]]&lt;br /&gt;
|-&lt;br /&gt;
| Title downgrading via [[Application_Manager_Services|AM]]([[Application_Manager_Services_PXI|PXI]])&lt;br /&gt;
| When a title is *already* installed, Process9 will compare the installed title-version with the title-version being installed. When the one being installed is older, Process9 would return an error.&lt;br /&gt;
&lt;br /&gt;
However, this can be bypassed by just deleting the title first via the service command(s) for that: with the title removed from the [[Title_Database]], Process9 can&#039;t compare the input title-version with anything. Hence, titles can be downgraded this way.&lt;br /&gt;
&lt;br /&gt;
[[11.0.0-33|11.0.0-X]] fixed this for key system titles (MSET, Home Menu, spider, ErrDisp, SKATER, NATIVE_FIRM, and every retail system module), by checking the version of the title to install against a hard-coded list of (titleID, minimumVersionRequired) pairs.&lt;br /&gt;
| Bypassing title version check at installation, which then allows downgrading any title.&lt;br /&gt;
| [[11.0.0-33|11.0.0-X]], for key system titles.&lt;br /&gt;
| NATIVE_FIRM / AM-sysmodule [[11.0.0-33|11.0.0-X]]&lt;br /&gt;
| ?&lt;br /&gt;
| &lt;br /&gt;
| ?&lt;br /&gt;
|-&lt;br /&gt;
| Anti-downgrade list did not include all system titles initially&lt;br /&gt;
| The anti-downgrade list did not include legacy FIRMs until [[11.8.0-41|11.8.0-X]]. Therefore, legacy FIRMs could still be downgraded.&lt;br /&gt;
| Downgrading legacy FIRMs; allowing to exploit bugs in older legacy FIRMs (of which at least one exists, see below).&lt;br /&gt;
| [[11.8.0-33|11.8.0]]&lt;br /&gt;
| [[11.8.0-33|11.8.0]]&lt;br /&gt;
| ?&lt;br /&gt;
| Wiki: August 5, 2018&lt;br /&gt;
| Everyone&lt;br /&gt;
|-&lt;br /&gt;
| TWL_FIRM cmd-9 unchecked offset&lt;br /&gt;
| In [[1.0.0-0|1.0.0-X]]&#039;s TWL_FIRM, cmds 8 and 9 were not stubbed (whereas in the corresponding NATIVE_FIRM, they were).&lt;br /&gt;
Command 8 does the Process9 initialisation for NTR carts if an NTR cart is inserted (NTR, not TWL, judged by chipid).&lt;br /&gt;
&lt;br /&gt;
Command 9 takes (u32 offset_read, u32 offset_write, u32 offset_read_end), and basically just copies (offset_read_end - offset_read) bytes starting at (offset_read) of [NTR cart header in arm9mem, NTR secure area in fcram, TWL secure area in fcram], to 0x18001000 + offset_write + offset_read.&lt;br /&gt;
&lt;br /&gt;
offset_write is not checked at all, thus this leads to ARM9 code execution as long as any NTR cart, including flashcarts that would normally be blocked by TWL_FIRM, is inserted.&lt;br /&gt;
&lt;br /&gt;
In [[2.0.0-2|2.0.0-X]] TWL_FIRM, those commands were stubbed out.&lt;br /&gt;
| ARM9 code execution&lt;br /&gt;
| [[2.0.0-2|2.0.0-X]]&lt;br /&gt;
| [[2.0.0-2|2.0.0-X]]&lt;br /&gt;
| January 2018&lt;br /&gt;
| Wiki: August 5, 2018&lt;br /&gt;
| [[User:Riley|Riley]]&lt;br /&gt;
|-&lt;br /&gt;
| FIRM launch doesn&#039;t check target FIRM version&lt;br /&gt;
| When executing a FIRM launch, Process9 doesn&#039;t validate that the target FIRM isn&#039;t an old version.  This allows booting an exploitable FIRM from a newer FIRM, if you can get the exploitable FIRM installed.  ([[11.0.0-33|11.0.0-X]] now prevents installing old versions of system titles, but this doesn&#039;t affect titles already installed.)&lt;br /&gt;
&lt;br /&gt;
This had a use after [[9.6.0-24|9.6.0-X]]: on a compromised 3DS running 9.2.0, you could install the 9.6.0 NATIVE_FIRM to FIRM0/FIRM1, but avoid putting it into the NATIVE_FIRM title.  This would boot the 9.2.0 system software but with the 9.6.0 Process9 and Kernel11.  With a user-mode exploit in a sufficiently-privileged application (e.g. mset), you could trigger a FIRM launch back to NATIVE_FIRM, which would load the 9.2.0 Process9 and Kernel11.&lt;br /&gt;
&lt;br /&gt;
9.6.0&#039;s keyslots 0x15 and 0x16 are unknown to 9.2.0, so 9.2.0 would not clear them.  You then could do firmlaunchhax against 9.2.0 to get ARM9 access with keyslots 0x15 and 0x16 set to their proper 9.6.0 values, allowing decrypting 9.6.0&#039;s encrypted titles.  Once the New3DS keystore was dumped, this became moot.&lt;br /&gt;
| Decrypting 9.6.0 NCCH files without dumping New3DS keystore&lt;br /&gt;
| None (but now moot)&lt;br /&gt;
| [[9.6.0-24|9.6.0-X]]&lt;br /&gt;
| March 2015&lt;br /&gt;
| August 12, 2018&lt;br /&gt;
| [[User:Yellows8|Yellows8]], [[User:Myria|Myria]]&lt;br /&gt;
|-&lt;br /&gt;
| FAT FS code null-deref&lt;br /&gt;
| When FSFile:Read is used with a file which is corrupted on a FAT filesystem(in particular SD), Process9 can crash. This particular crash is caused by a function returning NULL instead of an actual ptr due to an error. The caller of that function doesn&#039;t check for NULL which then triggers a read based at NULL.&lt;br /&gt;
&lt;br /&gt;
Sample &amp;quot;fsck.vfat -n -v -V &amp;lt;fat image backup&amp;gt;&amp;quot; output for the above crash:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;...&lt;br /&gt;
Starting check/repair pass.&lt;br /&gt;
&amp;lt;FilePath0&amp;gt; and&lt;br /&gt;
&amp;lt;FilePath1&amp;gt;&lt;br /&gt;
 share clusters.&lt;br /&gt;
 Truncating second to 3375104 bytes.&lt;br /&gt;
&amp;lt;FilePath1&amp;gt;&lt;br /&gt;
 File size is 2787392 bytes, cluster chain length is 16384 bytes.&lt;br /&gt;
 Truncating file to 16384 bytes.&lt;br /&gt;
Checking for unused clusters.&lt;br /&gt;
Reclaimed 1 unused cluster (16384 bytes).&lt;br /&gt;
Checking free cluster summary.&lt;br /&gt;
Free cluster summary wrong (1404490 vs. really 1404491)&lt;br /&gt;
 Auto-correcting.&lt;br /&gt;
Starting verification pass.&lt;br /&gt;
Checking for unused clusters.&lt;br /&gt;
Leaving filesystem unchanged.&amp;lt;/pre&amp;gt;&lt;br /&gt;
| Useless null-based-read&lt;br /&gt;
| None&lt;br /&gt;
| [[9.6.0-24|9.6.0-X]]&lt;br /&gt;
| July 8-9, 2015&lt;br /&gt;
| &lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| RSA signature padding checks&lt;br /&gt;
| The TWL_FIRM RSA sig padding check code used for all TWL RSA sig-checks has issues, see [[FIRM|here]].&lt;br /&gt;
The main 3DS RSA padding check code(non-certificate, including NATIVE_FIRM) uses the function used with the above to extract more padding + the actual hash from the additional padding. This isn&#039;t really a problem here because there&#039;s proper padding check code which is executed prior to this.&lt;br /&gt;
| &lt;br /&gt;
| None&lt;br /&gt;
| [[9.5.0-22|9.5.0-X]]&lt;br /&gt;
| March 2015&lt;br /&gt;
| &lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| [[AMPXI:ValidateDSiWareSectionMAC]] [[AES_Registers|AES]] keyslot reuse&lt;br /&gt;
| When the input DSiWare section index is higher than &amp;lt;max number of DSiWare sections supported by this FIRM&amp;gt;, Process9 uses keyid 0x40 for calculating the AESMAC, which translates to keyslot 0x40. The result is that the keyslot is left at whatever was already selected before, since the AES selectkeyslot code will immediately  return when keyslot is &amp;gt;=0x40. However, actually exploiting this is difficult: the calculated AESMAC is never returned, this command just compares the calculated AESMAC with the input AESMAC(result-code depends on whether the AESMACs match). It&#039;s unknown whether a timing attack would work with this.&lt;br /&gt;
This is basically a different form of the pxips9 keyslot vuln, except with AESMAC etc.&lt;br /&gt;
| See description.&lt;br /&gt;
| None&lt;br /&gt;
| [[11.3.0-36|11.3.0-X]]&lt;br /&gt;
| March 15, 2015&lt;br /&gt;
| December 29, 2015&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| pxips9 [[AES_Registers|AES]] keyslot reuse&lt;br /&gt;
| This requires access to the [[Process_Services|ps:ps]]/pxi:ps9 services. One way to get access to this would be snshax on system-version &amp;lt;=10.1.0-X(see 32c3 3ds talk).&lt;br /&gt;
When an invalid key-type value is passed to any of the PS commands, Process9 will try to select keyslot 0x40. That aesengine_setkeyslot() code will then immediately return due to the invalid keyslot value. Since that function doesn&#039;t return any errors, Process9 will just continue to do crypto with whatever AES keyslot was selected before the PS command was sent.&lt;br /&gt;
| Reusing the previously used keyslot, for crypto with PS.&lt;br /&gt;
| None&lt;br /&gt;
| [[11.3.0-36|11.3.0-X]]&lt;br /&gt;
| Roughly the same time(same day?) as firmlaunch-hax.&lt;br /&gt;
| December 29, 2015&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| firmlaunch-hax: FIRM header ToCToU&lt;br /&gt;
| This can&#039;t be exploited from ARM11 userland.&lt;br /&gt;
During [[FIRM]] launch, the only FIRM header the ARM9 uses at all is stored in FCRAM, this is 0x200-bytes(the actual used FIRM RSA signature is read to the Process9 stack however). The ARM9 doesn&#039;t expect &amp;quot;anything&amp;quot; besides the ARM9 to access this data.&lt;br /&gt;
With [[9.5.0-22]] the address of this FIRM header was changed from a FCRAM address, to ARM9-only address 0x01fffc00.&lt;br /&gt;
| ARM9 code execution&lt;br /&gt;
| [[9.5.0-22]]&lt;br /&gt;
| &lt;br /&gt;
| 2012, 3 days after [[User:Yellows8|Yellows8]] started Process9 code RE.&lt;br /&gt;
| &lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| Uninitialized data output for (PXI) command replies&lt;br /&gt;
| PXI commands for various services(including some [[Filesystem_services_PXI|here]] and many others) can write uninitialized data (like from ARM registers) to the command reply. This happens with stubbed commands, but this can also occur with certain commands when returning an error.&lt;br /&gt;
Certain ARM11 service commands have this same issue as well.&lt;br /&gt;
| &lt;br /&gt;
| None&lt;br /&gt;
| [[9.3.0-21|9.3.0-X]]&lt;br /&gt;
| ?&lt;br /&gt;
| &lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| [[Filesystem_services_PXI|FSPXI]] OpenArchive SD permissions&lt;br /&gt;
| Process9 does not use the exheader ARM9 access-mount permission flag for SD at all.&lt;br /&gt;
This would mean ARM11-kernelmode code / fs-module itself could directly use FSPXI to access SD card without ARM9 checking for SD access, but this is rather useless since a process is usually running with SD access(Home Menu for example) anyway.&lt;br /&gt;
| &lt;br /&gt;
| None&lt;br /&gt;
| [[9.3.0-21|9.3.0-X]]&lt;br /&gt;
| 2012&lt;br /&gt;
| &lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| [[AMPXI:ExportDSiWare]] export path&lt;br /&gt;
| Process9 allocates memory on Process9 heap for the export path then verifies that the actual allocated size matches the input size. Then Process9 copies the input path from FCRAM to this buffer, and uses it with the Process9 FS openfile code, which use paths in the form of &amp;quot;&amp;lt;mountpoint&amp;gt;:/&amp;lt;path&amp;gt;&amp;quot;.&lt;br /&gt;
Process9 does not check the contents of this path at all before passing it to the FS code, besides writing a NUL-terminator to the end of the buffer.&lt;br /&gt;
| Exporting of DSiWare to arbitrary Process9 file-paths, such as &amp;quot;nand:/&amp;lt;path&amp;gt;&amp;quot; etc. This isn&#039;t really useful since the data which gets written can&#039;t be controlled.&lt;br /&gt;
| None&lt;br /&gt;
| [[9.5.0-22]]&lt;br /&gt;
| April 2013&lt;br /&gt;
| &lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| [[DSiWare_Exports]] [[CTCert]] verification&lt;br /&gt;
| Just like DSi originally did, 3DS verifies the APCert for DSiWare on SD with the CTCert also in the DSiWare .bin. On DSi this was fixed with with system-version 1.4.2 by verifying with the actual console-unique cert instead(stored in NAND), while on 3DS it&#039;s still not(?) fixed.&lt;br /&gt;
On 3DS however this is useless, unless one can obtain the console-unique movable.sed keyY which encrypts the entire DSiWare .bin.&lt;br /&gt;
| When the movable.sed keyY for the target 3DS is known and the target 3DS CTCert private-key is unknown, importing of modified DSiWare SD .bin files.&lt;br /&gt;
| None.&lt;br /&gt;
| 11.8.0-X&lt;br /&gt;
| April 2013&lt;br /&gt;
| &lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| seedminer: movable.sed keyY vulnerable to brute-force&lt;br /&gt;
| Half of the movable.sed keyY&#039;s 128 bits are leaked through the [[Nandrw/sys/LocalFriendCodeSeed_B|LFCS]], which is available in userland and below. The LFCS itself also leaks almost half of the remaining bits by following the ratio: u32 keyY[3]=1/5(LFCS). The remaining keyY[3] uncertainty of about ±2000 can be greatly reduced by plotting expected error margins with several keyYs. This results in a final uncertainty of about 2^40, easily within practical brute force range of an average modern PC.&lt;br /&gt;
| Knowing the keyY of a given 3ds allows for modification of DSiWare export contents, and chained with several other public vulns, ultimately arm9 execution.&lt;br /&gt;
| None.&lt;br /&gt;
| 11.8.0-X&lt;br /&gt;
| December 2017&lt;br /&gt;
| January 2018&lt;br /&gt;
| zoogie&lt;br /&gt;
|-&lt;br /&gt;
| Improper validation of DSiWare title SRLs&lt;br /&gt;
| The 3DS does not verify if the actual SRL embedded in the title&#039;s directory matches the titleID in the TMD before launching it or importing it from an sd DSiWare export. &lt;br /&gt;
| This allows embedding older, exploitable DSiWare titles in completely different, unexploitable DSiWare titles. Since DSiWare has raw NAND RW, this can result in arm9 control through FIRM known-plaintext and sighax attacks.&lt;br /&gt;
| None.&lt;br /&gt;
| 11.8.0-X&lt;br /&gt;
| 2015?&lt;br /&gt;
| December 2016&lt;br /&gt;
| Everyone&lt;br /&gt;
|-&lt;br /&gt;
| DSiWare import/export functions allow TWL system titles as arguments&lt;br /&gt;
| AM ImportTwlBackup/ExportTwlBackup unnecessarily allow TWL system titles such as DS Download Play to import/export from userland (only am:sys is needed). This is difficult to abuse for dsihax injection because no TWL system title has a save file, and any import with a save included will result in FS err C8804464. However, there is at least one dsihax primary that can load a payload from a non-NAND source, and not error if it can&#039;t access its public.sav (JPN Flipnote Studio v0).&lt;br /&gt;
| When combined with other public vulns, arm9 code execution.&lt;br /&gt;
| None.&lt;br /&gt;
| 11.8.0-X&lt;br /&gt;
| May 2018&lt;br /&gt;
| Sept 2018&lt;br /&gt;
| zoogie&lt;br /&gt;
|-&lt;br /&gt;
| [[Gamecard_Services_PXI]] unchecked REG_CTRCARDCNT transfer-size&lt;br /&gt;
| The u8 REG_CTRCARDCNT transfer-size parameter for the [[Gamecard_Services_PXI]] read/write CTRCARD commands is used as an index for an array of u16 values. Before [[5.0.0-11|5.0.0-X]] this u8 value wasn&#039;t checked, thus out-of-bounds reads could be triggered(which is rather useless in this case).&lt;br /&gt;
| Out-of-bounds read for a value which gets written to a register.&lt;br /&gt;
| [[5.0.0-11|5.0.0-X]]&lt;br /&gt;
| &lt;br /&gt;
| 2013?&lt;br /&gt;
| &lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| [[PXI_Registers|PXI]] cmdbuf buffer overrun&lt;br /&gt;
| The Process9 code responsible [[PXI_Registers|PXI]] communications didn&#039;t verify the size of the incoming command before writing it to a C++ member variable. &lt;br /&gt;
| Probably ARM9 code execution&lt;br /&gt;
| [[5.0.0-11|5.0.0-11]]&lt;br /&gt;
| &lt;br /&gt;
| March 2015, original timeframe if any unknown&lt;br /&gt;
| &lt;br /&gt;
| [[User:Plutooo|plutoo]]/[[User:Yellows8|Yellows8]]/maybe others(?)&lt;br /&gt;
|-&lt;br /&gt;
| [[Application_Manager_Services_PXI|PXIAM]] command 0x003D0108(See also [[Application_Manager_Services|this]])&lt;br /&gt;
| When handling this command, Process9 allocates a 0x2800-byte heap buffer, then copies the 4 FCRAM input buffers to this heap buffer without checking the sizes at all(only the buffers with non-zero sizes are copied). Starting with [[5.0.0-11|5.0.0-X]], the total combined size of the input data must be &amp;lt;=0x2800.&lt;br /&gt;
| ARM9 code execution&lt;br /&gt;
| [[5.0.0-11|5.0.0-X]]&lt;br /&gt;
| &lt;br /&gt;
| May 2013&lt;br /&gt;
| &lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| [[Process_Services_PXI|PS RSA]] commands buffer overflows&lt;br /&gt;
| pxips9 cmd1(not accessible via ps:ps) and VerifyRsaSha256: unchecked copy to a buffer in Process9&#039;s .bss, from the input FCRAM buffer. The buffer is located before the pxi cmdhandler threads&#039; stacks. SignRsaSha256 also has a buf overflow, but this isn&#039;t exploitable.&lt;br /&gt;
The buffer for this is the buffer for the signature data. With v5.0, the signature buffer was moved to stack, with a check for the signature data size. When the signature data size is too large, Process9 uses [[SVC|svcBreak]].&lt;br /&gt;
| ARM9 code execution&lt;br /&gt;
| [[5.0.0-11|5.0.0-X]]&lt;br /&gt;
| &lt;br /&gt;
| 2012&lt;br /&gt;
| &lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| [[PXI_Registers|PXI]] pxi_id bad check&lt;br /&gt;
| The Process9 code responsible for [[PXI_Registers|PXI]] communications read pxi_id as a signed char. There were two flaws:&lt;br /&gt;
* They used it as index to a lookup-table without checking the value at all.&lt;br /&gt;
* Another function verified that pxi_id &amp;lt; 7, allowing negative values to pass the check. This would also cause an out-of-range table-lookup.&lt;br /&gt;
| Maybe ARM9 code execution&lt;br /&gt;
| [[3.0.0-5|3.0.0-5]]&lt;br /&gt;
|&lt;br /&gt;
| March 2015, originally 2012 for the first issue at least&lt;br /&gt;
| &lt;br /&gt;
| [[User:Plutooo|plutoo]], [[User:Yellows8|Yellows8]], maybe others(?)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Kernel9 ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Summary&lt;br /&gt;
!  Description&lt;br /&gt;
!  Successful exploitation result&lt;br /&gt;
!  Fixed in [[FIRM]] system version&lt;br /&gt;
!  Last [[FIRM]] system version this flaw was checked for&lt;br /&gt;
!  Timeframe this was discovered&lt;br /&gt;
!  Discovered by&lt;br /&gt;
|-&lt;br /&gt;
| [[CONFIG Registers#CFG9_SYSPROT9|CFG9_SYSPROT9]] bit1 not set by Kernel9&lt;br /&gt;
| Old versions of Kernel9 never set bit1 of [[CONFIG Registers#CFG9_SYSPROT9|CFG9_SYSPROT9]]. This leaves the [[OTP Registers|0x10012000]]-region unprotected (this region should be locked early during boot!). Since it&#039;s never locked, you can dump it once you get ARM9 code execution.&lt;br /&gt;
&lt;br /&gt;
From [[3.0.0-5|3.0.0-X]] this was fixed by setting the bit in Kernel9 after poking some registers in that region. On New3DS arm9loader sets this bit instead of Kernel9, which is exploitable through a hardware + software vulnerability (see arm9loaderhax / description).&lt;br /&gt;
&lt;br /&gt;
This flaw resurged when it gained a new practical use: retrieving the OTP data for a New3DS console in order to decrypt the key data used in arm9loader (see enhanced-arm9loaderhax / description). This was performed by downgrading to a vulnerable system version. By accounting for differences in CTR-NAND crypto (0x05 -&amp;gt; 0x04, see partition encryption types [[Flash_Filesystem#NAND_structure|here]]) and using an Old3DS [[NCSD#NCSD_header|NCSD Header]], it is possible to boot a New3DS using Old3DS firmware 1.0-2.x to retrieve the required OTP data using this flaw.&lt;br /&gt;
| Dumping the [[OTP Registers|OTP]] area.&lt;br /&gt;
Decrypting New3DS sector 0x96 keyblock.&lt;br /&gt;
| [[3.0.0-5|3.0.0-X]]&lt;br /&gt;
|&lt;br /&gt;
| February 2015&lt;br /&gt;
| [[User:Plutooo|plutoo]], Normmatt independently&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== ARM11 software ==&lt;br /&gt;
=== Kernel11 ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Summary&lt;br /&gt;
!  Description&lt;br /&gt;
!  Successful exploitation result&lt;br /&gt;
!  Fixed in [[FIRM]] system version&lt;br /&gt;
!  Last [[FIRM]] system version this flaw was checked for&lt;br /&gt;
!  Timeframe this was discovered&lt;br /&gt;
!  Discovered by&lt;br /&gt;
|-&lt;br /&gt;
| [[SVC|svcSetProcessIdealProcessor]] reference count overflow and therefore use-after-free.&lt;br /&gt;
| The SVC receive two arguments: handle and idealprocessor. The handle is used to get the KProcess object and the KProcess-&amp;gt;refCnt gets incremented,later the function check if the KProcess-&amp;gt;mem_type != BASE and if yes, it checks for idealprocessor == 2 or idealprocessor != 3. The problem here is that if you pass the idealprocessor = 3 it won&#039;t meet any condition and return the error 0xD9001BEA without decrement the reference count. &lt;br /&gt;
It can be abused to overflow the KProcess reference count that will lead to an Use-after-free. &lt;br /&gt;
| Before [[11.2.0-35|11.2.0-X]]: reference count overflow and therefore use-after-free.&lt;br /&gt;
| &lt;br /&gt;
| [[11.6.0-39|11.6.0-X]]&lt;br /&gt;
| November 2, 2017&lt;br /&gt;
| [[User:st4rk|st4rk]]&lt;br /&gt;
|-&lt;br /&gt;
| [[SVC|svcGetThreadList]] process reference leak&lt;br /&gt;
| When given a valid process handle (including &amp;lt;code&amp;gt;0xFFFF8001&amp;lt;/code&amp;gt;), svcGetThreadList forgets to decrement the reference count of the underlying [[KProcess]] instance, after having finished using it.&lt;br /&gt;
| Before [[11.2.0-35|11.2.0-X]]: reference count overflow and therefore use-after-free, but this UAF was most likely not exploitable&lt;br /&gt;
| &lt;br /&gt;
| [[11.3.0-36|11.3.0-X]]&lt;br /&gt;
| April 3, 2017&lt;br /&gt;
| [[User:TuxSH|TuxSH]]&lt;br /&gt;
|-&lt;br /&gt;
| kernelhax via gspwn&lt;br /&gt;
| Originally the kernel didn&#039;t initialize [[CONFIG11_Registers#CFG11_GPUPROT|CFG11_GPUPROT]]. Since it&#039;s 0 at hard-boot, this allowed the GPU to access the entire FCRAM + AXIWRAM.&lt;br /&gt;
| Entire FCRAM+AXIWRAM R/W.&lt;br /&gt;
| [[3.0.0-5|3.0.0-X]]&lt;br /&gt;
| &lt;br /&gt;
| February 7, 2017&lt;br /&gt;
| [[User:Plutooo|plutoo]], [[User:Yellows8|Yellows8]] partly&lt;br /&gt;
|-&lt;br /&gt;
| fasthax&lt;br /&gt;
| When a KTimer is created in pulse mode, the kernel calls a virtual function to reset the timer each time it pulses. The scheduler is locked for that core to avoid race conditions, but another core can call CloseHandle on the timer and free it, leading to a UAF vtable call.&lt;br /&gt;
| See description.&lt;br /&gt;
| [[11.3.0-36|11.3.0-X]]&lt;br /&gt;
| [[11.3.0-36|11.3.0-X]]&lt;br /&gt;
| May 2016&lt;br /&gt;
| nedwill&lt;br /&gt;
|-&lt;br /&gt;
| ipctakeover&lt;br /&gt;
| When sending cmdreplies, it does not validate that the src_addr and src_size match the equivalent dst_addr and dst_size. With a modified addr/size specified in a cmdreply for an output buffer, the data-copy for the first/last pages could be used to overwrite data outside of the buffer specified by the original process.&lt;br /&gt;
&lt;br /&gt;
Used by ctr-httpwn as of v1.2, for &amp;quot;ipctakeover/bosshaxx&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
This can be used to takeover processes where the process is using your service session. Like HTTPC -&amp;gt; BOSS, for bosshaxx above. NIM takeover can be done too(actual stack buffer overflow can trigger), etc.&lt;br /&gt;
| See description.&lt;br /&gt;
| None&lt;br /&gt;
| [[11.3.0-36|11.3.0-X]]&lt;br /&gt;
| November 26, 2016&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| Using IPC input buffers as output buffers&lt;br /&gt;
| When sending cmdreplies, it does not validate that the cmdreply descriptor type matches the equivalent cmdreq descriptor type. This could be used by an exploited sysmodule to use what was intended as an input-buffer as an output-buffer, and also combine other IPC vuln(s) with this.&lt;br /&gt;
&lt;br /&gt;
Used by ctr-httpwn as of v1.2, for &amp;quot;ipctakeover/bosshaxx&amp;quot;.&lt;br /&gt;
| See description.&lt;br /&gt;
| None&lt;br /&gt;
| [[11.3.0-36|11.3.0-X]]&lt;br /&gt;
| November 2016&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
|  [[SVC]] table too small&lt;br /&gt;
|  The table of function pointers for SVC&#039;s only contains entries up to 0x7D, but the biggest allowed SVC for the table is 0x7F. Thus, executing SVC7E or SVC7F would make the SVC-handler read after the buffer, and interpret some ARM instructions as function pointers.&lt;br /&gt;
&lt;br /&gt;
However, this would require patching the kernel .text or modifying SVC-access-control. Even if you could get these to execute, they would still jump to memory that isn&#039;t mapped as executable.&lt;br /&gt;
| &lt;br /&gt;
|  None&lt;br /&gt;
| [[11.3.0-36|11.3.0-X]]&lt;br /&gt;
| 2012&lt;br /&gt;
| Everyone&lt;br /&gt;
|-&lt;br /&gt;
|  [[SVC|svcBackdoor (0x7B)]]&lt;br /&gt;
|  This backdoor allows executing SVC-mode code at the user-specified code-address. This is used by Process9, using this on the ARM11 (with NATIVE_FIRM) required patching the kernel .text or modifying SVC-access-control.&lt;br /&gt;
| See description&lt;br /&gt;
| [[11.0.0-33|11.0.0-X]] (deleted)&lt;br /&gt;
| &lt;br /&gt;
|&lt;br /&gt;
| Everyone&lt;br /&gt;
|-&lt;br /&gt;
| veryslowpidhax&lt;br /&gt;
| &#039;&#039;&#039;This is completely different from the kernelmode-code-execution vuln described in the below separate entry.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
When updating the kernel global PID counter under [[SVC|svcCreateProcess]] the kernel does not check for wraparound to 0x0(the PID for the very first process). This only matters because [[Services|SM-module]] allows processes with PID value less than &amp;lt;total ARM11 FIRM modules&amp;gt; to access &#039;&#039;all&#039;&#039; services, without checking exheader service-access-control; and because Kernel11 checks for the PID to be 1 (loader) to use the input mem-region value on ControlMemory. This alone does not affect access the [[SVC|SVCs]] access table at all.&lt;br /&gt;
&lt;br /&gt;
Inlined ldrex+strex code is used for updating the above counter. [[11.2.0-35|11.2.0-X]] had changes for similar code, but it was only for dedicated ldrex+strex functions(mainly for kernel objects) and hence this PID code was not affected.&lt;br /&gt;
&lt;br /&gt;
With launching+terminating a sysmodule repeatedly with this via ns:s, it would take weeks to finish(if not at least about a month?).&lt;br /&gt;
| Access to all [[Services_API|services]], ControlMemory on any given mem-region.&lt;br /&gt;
| None&lt;br /&gt;
| [[11.3.0-36|11.3.0-X]]&lt;br /&gt;
| 2012 maybe?&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
|  slowhax/waithax&lt;br /&gt;
|  svcWaitSynchronizationN does not decrement the references to valid handles in an array before returning an error when it encounters an invalid handle. This allows one to (slowly) overflow the reference count for a handle object to zero.&lt;br /&gt;
| ARM11 kernel-mode code execution&lt;br /&gt;
| [[11.2.0-35|11.2.0-X]]&lt;br /&gt;
| [[11.2.0-35|11.2.0-X]]&lt;br /&gt;
| 2016&lt;br /&gt;
| nedwill, [[User:Derrek|derrek]]&lt;br /&gt;
|-&lt;br /&gt;
| [[Memory_layout#ARM11_Detailed_virtual_memory_map|0xEFF00000]] / 0xDFF00000 ARM11 kernel virtual-memory&lt;br /&gt;
| The ARM11 kernel-mode 0xEFF00000/0xDFF00000 virtual-memory(size 0x100000) is mapped to phys-mem 0x1FF00000(entire DSP-mem + entire AXIWRAM), with permissions RW-. This is used during ARM11 kernel startup for loading the FIRM-modules from the FIRM section located in DSP-mem, this never seems to be used after that, however. This is never unmapped either.&lt;br /&gt;
| &lt;br /&gt;
| None&lt;br /&gt;
| [[11.3.0-36|11.3.0-X]]&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| memchunkhax2.1&lt;br /&gt;
| Nintendo&#039;s fix for memchunkhax2 in [[10.4.0-29|10.4.0-X]] did not fix the GPU case: one may cause the requisite ToCToU race using gspwn, bypassing the new validation.&lt;br /&gt;
derrek&#039;s original 32c3 presentation for memchunkhax2 commented that a GPU-based attack was possible, but would be difficult.  However, memchunkhax2.1 showed that it was possible to do fairly reliably.&lt;br /&gt;
| ARM11 kernel code execution&lt;br /&gt;
| [[11.0.0-33|11.0.0-X]], via the new [[Memory_Management#MemoryBlockHeader|memchunkhdr]] MAC which prevents modifying memchunkhdr data with DMA.&lt;br /&gt;
| [[11.0.0-33|11.0.0-X]]&lt;br /&gt;
|&lt;br /&gt;
| [[User:Derrek|derrek]], aliaspider&lt;br /&gt;
|-&lt;br /&gt;
| memchunkhax2&lt;br /&gt;
| When allocating a block of memory, the &amp;quot;next&amp;quot; pointer of the [[Memory_Management#MemoryBlockHeader|memchunkhdr]] is accessed without being checked after being mapped to userland.&lt;br /&gt;
This allows a race condition, where the process can change the next pointer just before it&#039;s accessed. By pointing the next pointer to a crafted memchunckhdr in the kernel SlabHeap, some of the SlabHeap is allocated to the calling process, allowing to change vtables of kernel objects. &lt;br /&gt;
| ARM11 kernel code execution&lt;br /&gt;
| [[10.4.0-29|10.4.0-X]] (partially, see memchunkhax2.1)&lt;br /&gt;
| [[10.4.0-29|10.4.0-X]]&lt;br /&gt;
|&lt;br /&gt;
| [[User:Derrek|derrek]]&lt;br /&gt;
|-&lt;br /&gt;
| heaphax&lt;br /&gt;
| Can change the size of free memchunk structures stored in FCRAM using DMA, which leads to the ability to allocate memory chunks over already-allocated memory. This can be used in the SYSTEM region to allocate RW memory over any part of the NS system module, which is enough to take it over.&lt;br /&gt;
| Code execution with access to all of NS&#039;s privileges. (including downgrading) Code execution within any applet.&lt;br /&gt;
| [[11.0.0-33|11.0.0-X]], via the new [[Memory_Management#MemoryBlockHeader|memchunkhdr]] MAC which prevents modifying memchunkhdr data with DMA.&lt;br /&gt;
| [[11.0.0-33|11.0.0-X]]&lt;br /&gt;
| April 2015 ?&lt;br /&gt;
| smea&lt;br /&gt;
|-&lt;br /&gt;
| snshax&lt;br /&gt;
| Can force creation of Safe NS process into gspwn-able memory, allowing for takeover.&lt;br /&gt;
| Code execution with access to all of NS&#039;s privileges. (including downgrading)&lt;br /&gt;
| [[10.1.0-27|10.1.0-X]]&lt;br /&gt;
| [[10.1.0-27|10.1.0-X]]&lt;br /&gt;
| April 2015 ?&lt;br /&gt;
| smea&lt;br /&gt;
|-&lt;br /&gt;
|  AffinityMask/processorid validation&lt;br /&gt;
|  With [[10.0.0-27|10.0.0-X]] the following functions were updated: svcGetThreadAffinityMask, svcGetProcessAffinityMask, svcSetProcessAffinityMask, and svcCreateThread. The code changes for all but svcCreateThread are identical.&lt;br /&gt;
The original code with the first 3 did the following: &lt;br /&gt;
* if(u32_processorcount &amp;gt; ~0x80000001)return 0xe0e01bfd;&lt;br /&gt;
* if(s32_processorcount &amp;gt; &amp;lt;total_cores&amp;gt;)return 0xd8e007fd;&lt;br /&gt;
The following code replaced the above:&lt;br /&gt;
* if(u32_processorcount &amp;gt;= &amp;lt;total_cores+1&amp;gt;)return 0xd8e007fd;&lt;br /&gt;
In theory the latter should catch everything that the former did, so it&#039;s unknown if this was really a security issue.&lt;br /&gt;
&lt;br /&gt;
The svcCreateThread changes with [[10.0.0-27|10.0.0-X]] definitely did fix a security issue.&lt;br /&gt;
* Original code: &amp;quot;if(s32_processorid &amp;gt; &amp;lt;total_cores&amp;gt;)return 0xd8e007fd;&amp;quot;&lt;br /&gt;
* New code: &amp;quot;if(s32_processorid &amp;gt;= &amp;lt;total_cores&amp;gt; || s32_processorid &amp;lt;= -4)return 0xd8e007fd;&amp;quot;&lt;br /&gt;
This fixed an off-by-one issue: if one would use processorid=total_cores, which isn&#039;t actually a valid value, svcCreateThread would accept that value on &amp;lt;[[10.0.0-27|10.0.0-X]]. This results in data being written out-of-bounds(baseaddr = arrayaddr + entrysize*processorid), which has the following result:&lt;br /&gt;
* Old3DS: Useless kernel-mode crash due to accessing unmapped memory.&lt;br /&gt;
* New3DS: uncontrolled data write into a kernel-mode L1 MMU-table. This isn&#039;t really useful: the data can&#039;t be controlled, and the data which gets overwritten is all-zero anyway(this isn&#039;t anywhere near MMU L1 entries for actually mapped memory).&lt;br /&gt;
The previous version also allowed large negative s32_processorid values(negative processorid values are special values not actual procids), but it appears using values like that won&#039;t actually do anything(meaning no crash) besides the thread not running / thread not running for a while(besides triggering a kernelpanic with certain s32_processorid value(s)).&lt;br /&gt;
| Nothing useful&lt;br /&gt;
|  [[10.0.0-27|10.0.0-X]]&lt;br /&gt;
| [[10.0.0-27|10.0.0-X]]&lt;br /&gt;
| svcCreateThread issue: May 31, 2015. The rest: September 8, 2015, via v9.6-&amp;gt;v10.0 ARM11-kernel code-diff.&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| memchunkhax&lt;br /&gt;
| The kernel originally did not validate the data stored in the FCRAM kernel heap [[Memchunkhdr|memchunk-headers]] for free-memory at all. Exploiting this requires raw R/W access to these memchunk-headers, like physical-memory access with gspwn.&lt;br /&gt;
&lt;br /&gt;
There are &#039;&#039;multiple&#039;&#039; ways to exploit this, but the end-result for most of these is the same: overwrite code in AXIWRAM via the 0xEFF00000/0xDFF00000 kernel virtual-memory mapping.&lt;br /&gt;
&lt;br /&gt;
This was fixed in [[9.3.0-21|9.3.0-X]] by checking that the memchunk(including size, next, and prev ptrs) is located within the currently used heap memory. The kernel may also check that the next/prev ptrs are valid compared to other memchunk-headers basically. When any of these checks fail, kernelpanic() is called.&lt;br /&gt;
| When combined with other flaws: ARM11-kernelmode code execution&lt;br /&gt;
| [[9.3.0-21|9.3.0-21]]&lt;br /&gt;
| &lt;br /&gt;
| February 2014&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| Multiple [[KLinkedListNode|KLinkedListNode]] SlabHeap use after free bugs&lt;br /&gt;
| The ARM11-kernel did access the &#039;key&#039; field of [[KLinkedListNode|KLinkedListNode]] objects, which are located on the SlabHeap, after freeing them. Thus, triggering an allocation of a new [[KLinkedListNode|KLinkedListNode]] object at the right time could result in a type-confusion. Pseudo-code:&lt;br /&gt;
SlabHeap_free(KLinkedListNode);&lt;br /&gt;
KObject *obj = KLinkedListNode-&amp;gt;key;  // the object there might have changed!&lt;br /&gt;
This bug appeared all over the place.&lt;br /&gt;
| ARM11-kernelmode code exec maybe&lt;br /&gt;
| [[8.0.0-18|8.0.0-18]]&lt;br /&gt;
| &lt;br /&gt;
| April 2015&lt;br /&gt;
| [[User:Derrek|derrek]]&lt;br /&gt;
|-&lt;br /&gt;
| PXI [[RPC_Command_Structure|Command]] input/output buffer permissions&lt;br /&gt;
| Originally the ARM11-kernel didn&#039;t check permissions for PXI input/output buffers for commands. Starting with [[6.0.0-11|6.0.0]] PXI input/output buffers must have RW permissions, otherwise kernelpanic is triggered.&lt;br /&gt;
| &lt;br /&gt;
| [[6.0.0-11|6.0.0-11]]&lt;br /&gt;
| &lt;br /&gt;
| 2012&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| [[SVC|svcStartInterProcessDma]]&lt;br /&gt;
| For svcStartInterProcessDma, the kernel code had the following flaws:&lt;br /&gt;
&lt;br /&gt;
* Originally the ARM11-kernel read the input DmaConfig structure directly in kernel-mode(ldr(b/h) instructions), without checking whether the DmaConfig address is readable under userland. This was fixed by copying that structure to the SVC-mode stack, using the ldrbt instruction.&lt;br /&gt;
&lt;br /&gt;
* Integer overflows for srcaddr+size and dstaddr+size are now checked(with [[6.0.0-11]]), which were not checked before.&lt;br /&gt;
&lt;br /&gt;
* The kernel now also checks whether the srcaddr/dstaddr (+size) is within userland memory (0x20000000), the kernel now (with [[6.0.0-11]]) returns an error when the address is beyond userland memory. Using an address &amp;gt;=0x20000000 would result in the kernel reading from the process L1 MMU table, beyond the memory allocated for that MMU table(for vaddr-&amp;gt;physaddr conversion). &lt;br /&gt;
| &lt;br /&gt;
| [[6.0.0-11]]&lt;br /&gt;
| &lt;br /&gt;
| DmaConfig issue: unknown. The rest: 2014&lt;br /&gt;
| [[User:Plutooo|plutoo]], [[User:Yellows8|Yellows8]] independently&lt;br /&gt;
|-&lt;br /&gt;
| [[SVC|svcControlMemory]] Parameter checks&lt;br /&gt;
| For svcControlMemory the parameter check had these two flaws:&lt;br /&gt;
&lt;br /&gt;
* The allowed range for addr0, addr1, size parameters depends on which MemoryOperation is being specified. The limitation for GSP heap was only checked if op=(u32)0x10003. By setting a random bit in op that has no meaning (like bit17?), op would instead be (u32)0x30003, and the range-check would be less strict and not accurate. However, the kernel doesn&#039;t actually use the input address for LINEAR memory-mapping at all besides the range-checks, so this isn&#039;t actually useful. This was fixed in the kernel by just checking for the LINEAR bit, instead of comparing the entire MemoryOperation value with 0x10003.&lt;br /&gt;
&lt;br /&gt;
* Integer overflows on (addr0+size) are now checked that previously weren&#039;t (this also applies to most other address checks elsewhere in the kernel).&lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
| [[5.0.0-11]]&lt;br /&gt;
| &lt;br /&gt;
|&lt;br /&gt;
| [[User:Plutooo|plutoo]]&lt;br /&gt;
|-&lt;br /&gt;
| [[RPC_Command_Structure|Command]] request/response buffer overflow&lt;br /&gt;
| Originally the kernel did not check the word-values from the command-header. Starting with [[5.0.0-11]], the kernel will trigger a kernelpanic() when the total word-size of the entire command(including the cmd-header) is larger than 0x40-words (0x100-bytes). This allows overwriting threadlocalstorage+0x180 in the destination thread. However, since the data written there would be translate parameters (such as header-words + buffer addresses), exploiting this would likely be very difficult, if possible at all.&lt;br /&gt;
&lt;br /&gt;
If the two words at threadlocalstorage+0x180 could be overwritten with controlled data this way, one could then use a command with a buffer-header of &amp;lt;nowiki&amp;gt;((size&amp;lt;&amp;lt;14) | 2)&amp;lt;/nowiki&amp;gt; to write arbitrary memory to any RW userland memory in the destination process.&lt;br /&gt;
| &lt;br /&gt;
| [[5.0.0-11]]&lt;br /&gt;
| &lt;br /&gt;
| v4.1 FIRM -&amp;gt; v5.0 code diff&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| [[SVC|SVC stack allocation overflows]]&lt;br /&gt;
| &lt;br /&gt;
* Syscalls that allocate a variable-length array on stack, only checked bit31 before multiplying by 4/16 (when calculating how much memory to allocate). If a large integer was passed as input to one of these syscalls, an integer overflow would occur, and too little memory would have been allocated on stack resulting in a buffer overrun. &lt;br /&gt;
* The alignment (size+7)&amp;amp;~7 calculation before allocation was not checked for integer overflow.&lt;br /&gt;
&lt;br /&gt;
This might allow for ARM11 kernel code-execution.&lt;br /&gt;
&lt;br /&gt;
(Applies to svcSetResourceLimitValues, svcGetThreadList, svcGetProcessList, svcReplyAndReceive, svcWaitSynchronizationN.)&lt;br /&gt;
| &lt;br /&gt;
| [[5.0.0-11]]&lt;br /&gt;
| &lt;br /&gt;
| v4.1 FIRM -&amp;gt; v5.0 code diff&lt;br /&gt;
| [[User:Plutooo|plutoo]], [[User:Yellows8|Yellows8]] complementary&lt;br /&gt;
|-&lt;br /&gt;
| [[SVC|svcControlMemory]] MemoryOperation MAP memory-permissions&lt;br /&gt;
| svcControlMemory with MemoryOperation=MAP allows mapping the already-mapped process virtual-mem at addr1, to addr0. The lowest address permitted for addr1 is 0x00100000. Originally the ARM11 kernel didn&#039;t check memory permissions for addr1. Therefore .text as addr1 could be mapped elsewhere as RW- memory, which allowed ARM11 userland code-execution.&lt;br /&gt;
| &lt;br /&gt;
| [[4.1.0-8]]&lt;br /&gt;
| &lt;br /&gt;
| 2012&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| [[RPC_Command_Structure|Command]] input/output buffer permissions&lt;br /&gt;
| Originally the ARM11 kernel didn&#039;t check memory permissions for the input/output buffers for commands. Starting with [[4.0.0-7]] the ARM11 kernel will trigger a kernelpanic() if the input/output buffers don&#039;t have the required memory permissions. For example, this allowed a FSUSER file-read to .text, which therefore allowed ARM11-userland code execution.&lt;br /&gt;
| &lt;br /&gt;
| [[4.0.0-7]]&lt;br /&gt;
| &lt;br /&gt;
| 2012&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| [[SVC|svcReadProcessMemory/svcWriteProcessMemory memory]] permissions&lt;br /&gt;
| Originally the kernel only checked the first page(0x1000-bytes) of the src/dst buffers, for svcReadProcessMemory and svcWriteProcessMemory. There is no known retail processes which have access to these SVCs.&lt;br /&gt;
| &lt;br /&gt;
| [[4.0.0-7]]&lt;br /&gt;
| &lt;br /&gt;
| 2012?&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== [[FIRM]] Sysmodules ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Summary&lt;br /&gt;
!  Description&lt;br /&gt;
!  Successful exploitation result&lt;br /&gt;
!  Fixed in [[FIRM]] system version&lt;br /&gt;
!  Last [[FIRM]] system version this flaw was checked for&lt;br /&gt;
!  Timeframe this was discovered&lt;br /&gt;
!  Discovered by&lt;br /&gt;
|-&lt;br /&gt;
| [[Services|&amp;quot;srv:pm&amp;quot;]] process registration&lt;br /&gt;
| Originally any process had access to the port &amp;quot;srv:pm&amp;quot;. The PID&#039;s used for the (un)registration commands are not checked either. This allowed any process to re-register itself with &amp;quot;srv:pm&amp;quot;, and therefore allowed the process to give itself access to any service, bypassing the exheader service-access-control list.&lt;br /&gt;
&lt;br /&gt;
This was fixed in [[7.0.0-13]]: starting with [[7.0.0-13]] &amp;quot;srv:pm&amp;quot; is now a service instead of a globally accessible port. Only processes with PID&#039;s less than 6 (in other words: fs, ldr, sm, pm, pxi modules) have access to it. With [[7.0.0-13]] there can only be one session for &amp;quot;srv:pm&amp;quot; open at a time(this is used by pm module), svcBreak will be executed if more sessions are opened by the processes which can access this.&lt;br /&gt;
&lt;br /&gt;
This flaw was needed for exploiting the &amp;lt;=v4.x Process9 PXI vulnerabilities from ARM11 userland ROP, since most applications don&#039;t have access to those service(s).&lt;br /&gt;
| Access to arbitrary services&lt;br /&gt;
| [[7.0.0-13]]&lt;br /&gt;
| &lt;br /&gt;
| 2012&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| FSDIR null-deref&lt;br /&gt;
| [[Filesystem_services|FS]]-module may crash in some cases when handling directory reading. The trigger seems to be due to using [[FSDir:Close]] without closing the dir-handle afterwards?(Perhaps this is caused by out-of-memory?) This seems to be useless since it&#039;s just a null-deref.&lt;br /&gt;
| &lt;br /&gt;
| None&lt;br /&gt;
| [[9.6.0-24|9.6.0-X]]&lt;br /&gt;
| May 19(?)-20, 2015&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| [[SM]] out-of-bounds BSS write (table 1 entry too small)&lt;br /&gt;
| After accepting a new session, [[SM]] writes a (handler ID (0 for srv: sessions (max. 64), 1 for the srv:pm one), pointer to session context structure in BSS) pair in a global array. However that array is only 64-entry-big instead of 65 (as it ought to be), and no bound check is done in that regard.&lt;br /&gt;
&lt;br /&gt;
Unfortunately, as of [[11.4.0-37]], the overwritten fields are totally unused after their initialization by &amp;lt;code&amp;gt;__libc_init_array&amp;lt;/code&amp;gt;.&lt;br /&gt;
| Not currently exploitable&lt;br /&gt;
| None&lt;br /&gt;
| [[11.4.0-37]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Standalone Sysmodules ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Summary&lt;br /&gt;
!  Description&lt;br /&gt;
!  Successful exploitation result&lt;br /&gt;
!  Fixed in system-module system-version&lt;br /&gt;
!  Last system-module system-version this flaw was checked for&lt;br /&gt;
!  Timeframe this was discovered&lt;br /&gt;
!  Timeframe this was added to wiki&lt;br /&gt;
!  Discovered by&lt;br /&gt;
|-&lt;br /&gt;
| [[MP:SendDataFrame]] missing input array index validation&lt;br /&gt;
| [[MP:SendDataFrame]] doesn&#039;t validate the input index at cmdreq[1], unless the function for flag=non-zero is executed. This is used to calculate the following, without validating the index at all: someptr = stateptr + (index*0x924) + somestateoffset.&lt;br /&gt;
&lt;br /&gt;
After validating some flags from someptr, when input_flag=0 the input buffer data is copied to someptr+someotheroffset+0x14 with the u16 size loaded from someptr+someotheroffset.&lt;br /&gt;
&lt;br /&gt;
With a large input index someptr could be setup to be at a &amp;lt;target address&amp;gt;, for overwriting memory.&lt;br /&gt;
&lt;br /&gt;
This is probably difficult to exploit.&lt;br /&gt;
| &lt;br /&gt;
| None&lt;br /&gt;
| [[8.0.0-18]](MP-sysmodule v2048)&lt;br /&gt;
| January 22, 2017&lt;br /&gt;
| January 22, 2017&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| [[MP_Services|MP]] cmd1 out-of-bounds handle read&lt;br /&gt;
| MP-sysmodule handles the input parameter for cmd1 as a s32. It checks for &amp;gt;=16, but not &amp;lt;0. With &amp;lt;16 it basically does the following(array of entries 4-bytes each): *outhandle = ((Handle*)(stateptr+offsetinstate))[inputindex].&lt;br /&gt;
&lt;br /&gt;
Hence, this can be used to load any handle in MP-sysmodule memory. MP doesn&#039;t really have any service handles of interest however(can be obtained from elsewhere too).&lt;br /&gt;
| Reading any handle in MP-sysmodule memory.&lt;br /&gt;
| None&lt;br /&gt;
| [[8.0.0-18]](MP-sysmodule v2048)&lt;br /&gt;
| January 21, 2017&lt;br /&gt;
| January 22, 2017&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| AM stack/.bss infoleak via [[AM:ReadTwlBackupInfo]]([[AM:ReadTwlBackupInfoEx|Ex]])&lt;br /&gt;
| After writing the output-info structure to stack, it then copies that structure to the output buffer ptr using the size from the command. The size is not checked. This could be used to read data from the AM-service-thread stack handling the command + .bss.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;This was not tested on hardware.&#039;&#039;&#039;&lt;br /&gt;
| Stack/.bss reading&lt;br /&gt;
| None&lt;br /&gt;
| [[10.0.0-27]](AM v9217)&lt;br /&gt;
| Roughly October 17, 2016&lt;br /&gt;
| October 25, 2016&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| [[MVD_Services|MVD]]: Stack buffer overflow with [[MVDSTD:SetupOutputBuffers]].&lt;br /&gt;
| The input total_entries is not validated when initially processing the input entry-list. This fixed-size input entry-list is copied to stack from the command request. The loop for processing this initializes a global table, the converted linearmem-&amp;gt;physaddrs used there are also copied to stack(0x8-bytes of physaddrs per entry).&lt;br /&gt;
&lt;br /&gt;
If total_entries is too large, MVD-sysmodule will crash due to reading unmapped memory following the stack(0x10000000). Afterwards if the out-of-bounds total_entries is smaller than that, it will crash due accessing address 0x0, hence this useless.&lt;br /&gt;
| MVD-sysmodule crash.&lt;br /&gt;
| None&lt;br /&gt;
| [[9.0.0-20]]&lt;br /&gt;
| April 22, 2016 (Tested on the 25th)&lt;br /&gt;
| April 25, 2016&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| [[NWM_Services|NWM]]: Using CTRSDK heap with UDS sharedmem from the user-process.&lt;br /&gt;
| See the HTTP-sysmodule section below.&lt;br /&gt;
&lt;br /&gt;
CTRSDK heap is used with the sharedmem from [[NWMUDS:InitializeWithVersion]]. Buffers are allocated/freed under this heap using [[NWMUDS:Bind]] and [[NWMUDS:Unbind]].&lt;br /&gt;
&lt;br /&gt;
Hence, overwriting sharedmem with gspwn then using [[NWMUDS:Unbind]] results in the usual controlled CTRSDK memchunk-header write, similar to HTTP-sysmodule.&lt;br /&gt;
&lt;br /&gt;
This could be done by creating an UDS network, without any other nodes on the network.&lt;br /&gt;
&lt;br /&gt;
Besides CTRSDK memchunk-headers, there are no addresses stored under this sharedmem.&lt;br /&gt;
| ROP under NWM-module.&lt;br /&gt;
| [[11.4.0-37|11.4.0-X]]&lt;br /&gt;
| [[9.0.0-20|9.0.0-X]]&lt;br /&gt;
| April 10, 2016&lt;br /&gt;
| April 16, 2016&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| [[DLP_Services|DLP]]: Out-of-bounds memory access during spectator [[Download_Play|data-frame]] checksum calculation&lt;br /&gt;
| DLP doesn&#039;t validate the frame_size when receiving spectator data-frames at all, unlike non-spectator data-frames. The actual spectator data-frame parsing code doesn&#039;t use that field either. However, the data-frame checksum calculation code called during checksum verification does use the frame_size for loading the size of the framebuf.&lt;br /&gt;
&lt;br /&gt;
Hence, using a large frame_size like 0xFFFF will result in the checksum calculation code reading data out-of-bounds. This isn&#039;t really useful, you could trigger a remote local-WLAN DLP-sysmodule crash while a 3DS system is scanning for DLP networks(due to accessing unmapped memory), but that&#039;s about all(trying to infoleak with this likely isn&#039;t useful either).&lt;br /&gt;
| DLP-sysmodule crash, handled by dlplay system-application by a &amp;quot;connection interrupted&amp;quot; error eventually then a fatal-error via ErrDisp.&lt;br /&gt;
| None&lt;br /&gt;
| [[10.0.0-27|10.0.0-X]]&lt;br /&gt;
| April 8, 2016 (Tested on the 10th)&lt;br /&gt;
| April 10, 2016&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| [[DLP_Services|DLP]]: Out-of-bounds output data writing during spectator sysupdate titlelist [[Download_Play|data-frame]] handling&lt;br /&gt;
| The total_entries and out_entryindex fields for the titlelist DLP spectator data-frames are not validated. This is parsed during DLP network scanning. Hence, the specified titlelist data can be written out-of-bounds using the specified out_entryindex and total_entries. A crash will occur while reading the input data-frame titlelist if total_entries is larger than 0x27A, due to accessing unmapped memory.&lt;br /&gt;
&lt;br /&gt;
There&#039;s not much non-zero data to overwrite following the output buffer(located in sharedmem), any ptrs are located in sharedmem. Overwriting certain ptr(s) are only known to cause a crash when attempting to use the DLP-client shutdown service-command.&lt;br /&gt;
&lt;br /&gt;
There&#039;s no known way to exploit the above crash, since the linked-list code involves writes zeros(with a controlled start ptr).&lt;br /&gt;
| &lt;br /&gt;
| None&lt;br /&gt;
| [[10.0.0-27|10.0.0-X]]&lt;br /&gt;
| April 8-9, 2016&lt;br /&gt;
| April 10, 2016&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| [[IR_Services|IR]]: Stack buffer overflow with custom hardware&lt;br /&gt;
| Originally IR sysmodule used the read value from the I2C-IR registers TXLVL and RXLVL without validating them at all. See [[10.6.0-31|here]] for the fix. This is the size used for reading the data-recv FIFO, etc. The output buffer for reading is located on the stack.&lt;br /&gt;
&lt;br /&gt;
This should be exploitable if one could successfully setup the custom hardware for this and if the entire intended sizes actually get read from I2C.&lt;br /&gt;
| ROP under IR sysmodule.&lt;br /&gt;
| [[10.6.0-31|10.6.0-31]]&lt;br /&gt;
| &lt;br /&gt;
| February 23, 2016 (Unknown if it was noticed before then)&lt;br /&gt;
| February 23, 2016&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| [[HTTP_Services|HTTP]]: Using CTRSDK heap with sharedmem from the user-process.&lt;br /&gt;
| The data from httpcAddPostDataAscii and other commands is stored under a CTRSDK heap. That heap is the sharedmem specified by the user-process via the HTTPC Initialize command.&lt;br /&gt;
Normally this sharedmem isn&#039;t accessible to the user-process once the sysmodule maps it, hence using it is supposed to be &amp;quot;safe&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
This isn&#039;t the case due to gspwn however. Since CTRSDK heap code is so insecure in general, one can use gspwn to locate the HTTPC sharedmem + read/write it, then trigger a mem-write under the sysmodule. This can then be used to get ROP going under HTTP-sysmodule.&lt;br /&gt;
&lt;br /&gt;
This is exploited by [https://github.com/yellows8/ctr-httpwn/ctr-httpwn ctr-httpwn].&lt;br /&gt;
| ROP under HTTP sysmdule.&lt;br /&gt;
| [[11.4.0-37|11.4.0-X]]&lt;br /&gt;
| [[9.6.0-24|9.6.0-X]] (Latest sysmodule version as of [[10.7.0-32|10.7.0-32]])&lt;br /&gt;
| Late 2015&lt;br /&gt;
| March 22, 2016&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| [[NIM_Services|NIM]]: Downloading old title-versions from eShop&lt;br /&gt;
| Multiple NIM service commands(such as [[NIMS:StartDownload]]) use a title-version value specified by the user-process, NIM does not validate that this input version matches the latest version available via SOAP. Therefore, when combined with AM(PXI) [[#Process9|title-downgrading]] via deleting the target eShop title with System Settings Data Management(if the title was already installed), this allows downloading+installing any title-version from eShop &#039;&#039;if&#039;&#039; it&#039;s still available from CDN.&lt;br /&gt;
The easiest way to exploit this is to just patch the eShop system-application code using these NIM commands(ideally the code which loads the title-version).&lt;br /&gt;
&lt;br /&gt;
Originally this was tested with a debugging-system via modded-FIRM, eventually smea implemented it in HANS for the 32c3 release.&lt;br /&gt;
| Downloading old title-versions from eShop&lt;br /&gt;
| None&lt;br /&gt;
| [[10.0.0-27|10.0.0-X]]&lt;br /&gt;
| October 24, 2015 (Unknown when exactly the first eShop title downgrade was actually tested, maybe November)&lt;br /&gt;
| January 7, 2016 (Same day Ironfall v1.0 was removed from CDN via the main-CXI files)&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| [[SPI_Services|SPI]] service out-of-bounds write&lt;br /&gt;
| cmd1 has out-of-bounds write allowing overwrite of some static variables in .data.&lt;br /&gt;
| &lt;br /&gt;
| None&lt;br /&gt;
| [[9.5.0-22]]&lt;br /&gt;
| March 2015&lt;br /&gt;
| &lt;br /&gt;
| [[User:Plutooo|plutoo]]&lt;br /&gt;
|-&lt;br /&gt;
| [[NFC_Services|NFC]] module service command buf-overflows&lt;br /&gt;
| NFC module copies data with certain commands, from command input buffers to stack without checking the size. These commands include the following, it&#039;s unknown if there&#039;s more commands with similar issues: &amp;quot;nfc:dev&amp;quot; &amp;lt;0x000C....&amp;gt; and &amp;quot;nfc:s&amp;quot; &amp;lt;0x0037....&amp;gt;.&lt;br /&gt;
Since both of these commands are stubbed in the Old3DS NFC module from the very first version(those just return an error), these issues only affect the New3DS NFC module.&lt;br /&gt;
&lt;br /&gt;
There&#039;s no known retail titles which have access to either of these services.&lt;br /&gt;
| ROP under NFC module.&lt;br /&gt;
| New3DS: None&lt;br /&gt;
| New3DS: [[9.5.0-22]]&lt;br /&gt;
| December 2014?&lt;br /&gt;
| &lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| [[News_Services|NEWSS]] service command notificationID validation failure&lt;br /&gt;
| This module does not validate the input notificationID for &amp;lt;nowiki&amp;gt;&amp;quot;news:s&amp;quot;&amp;lt;/nowiki&amp;gt; service commands. This is an out-of-bounds array index bug. For example, [[NEWSS:SetNotificationHeader]] could be used to exploit news module: this copies the input data(size is properly checked) to: out = newsdb_savedata+0x10 + (someu32array[notificationID]*0x70).&lt;br /&gt;
| ROP under news module.&lt;br /&gt;
| None&lt;br /&gt;
| [[9.7.0-25|9.7.0-X]]&lt;br /&gt;
| December 2014&lt;br /&gt;
| &lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| [[NWMUDS:DecryptBeaconData]] heap buffer overflow&lt;br /&gt;
| input_size = 0x1E * &amp;lt;value the u8 from input_[[NWM_Services|networkstruct]]+0x1D&amp;gt;. Then input_tag0 is copied to a heap buffer. When input_size is larger than 0xFA-bytes, it will then copy input_tag1 to &amp;lt;end_address_of_previous_outbuf&amp;gt;, with size=input_size-0xFA.&lt;br /&gt;
&lt;br /&gt;
This can be triggered by either using this command directly, or by boadcasting a wifi beacon which triggers it while a 3DS system running the target process is in range, when the process is scanning for hosts to connect to. Processes will only pass tag data to this command when the wlancommID and other thing(s) match the values for the process.&lt;br /&gt;
&lt;br /&gt;
There&#039;s no known way to actually exploit this for getting ROP under NWM-module, at the time of originally adding this to the wiki. This is because the data which gets copied out-of-bounds *and* actually causes crash(es), can&#039;t be controlled it seems(with just broadcasting a beacon at least). It&#039;s unknown whether this could be exploited from just using NWMUDS service-cmd(s) directly.&lt;br /&gt;
| Without any actual way to exploit this: NWM-module DoS, resulting in process termination(process crash). This breaks *everything* involving wifi comms, a reboot is required to recover from this.&lt;br /&gt;
| None&lt;br /&gt;
| [[9.0.0-20]]&lt;br /&gt;
| ~September 23, 2014(see the [[NWMUDS:DecryptBeaconData]] page history)&lt;br /&gt;
| August 3, 2015&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| [[HID_Services|HID]] module shared-mem&lt;br /&gt;
| HID module does not validate the index values in [[HID_Shared_Memory|sharedmem]](just changes index to 0 when index == maxval when updating), therefore large values will result in HID module writing HID data to arbitrary addresses.&lt;br /&gt;
| ROP under HID module, but this is *very* unlikely to be exploitable since the data written is HID data.&lt;br /&gt;
| None&lt;br /&gt;
| [[9.3.0-21]]&lt;br /&gt;
| 2014?&lt;br /&gt;
| &lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| gspwn&lt;br /&gt;
| GSP module does not validate addresses given to the GPU. This allows a user-mode application/applet to read/write to a large part of physical FCRAM using GPU DMA. From this, you can overwrite the .text segment of the application you&#039;re running under, and gain real code-execution from a ROP-chain. Normally applets&#039; .text([[Home Menu]], [[Internet Browser]], etc) is located beyond the area accessible by the GPU, except for [[RO_Services|CROs]] used by applets([[Internet Browser]] for example).&lt;br /&gt;
&lt;br /&gt;
FCRAM is gpu-accessible up to physaddr 0x26800000 on Old3DS, and 0x2D800000 on New3DS. This is BASE_memregion_start(aka SYSTEM_memregion_end)-0x400000 (0x800000 with New3DS) with the default memory-layout on Old3DS/New3DS. With [[11.3.0-36|11.3.0-X]] the cutoff now varies due to the new [[SVC]] 0x59. The New3DS &amp;quot;normal&amp;quot;(non-APPLICATION) cutoff was changed to 0x2D000000 due to the new [[SVC]] 0x59.&lt;br /&gt;
| User-mode code execution.&lt;br /&gt;
| None&lt;br /&gt;
| [[9.6.0-24|9.6.0-X]]&lt;br /&gt;
| Early 2014&lt;br /&gt;
| &lt;br /&gt;
| smea, [[User:Yellows8|Yellows8]]/others before then&lt;br /&gt;
|-&lt;br /&gt;
| rohax&lt;br /&gt;
| Using gspwn, it is possible to overwrite a loaded [[CRO0]]/[[CRR0]] after its RSA-signature has been validated. Badly validated [[CRO0]] header leads to arbitrary read/write of memory in the ro-process. This gives code-execution in the ro module, who has access to [[SVC|syscalls]] 0x70-0x72, 0x7D.&lt;br /&gt;
&lt;br /&gt;
This was fixed after [[ninjhax]] release by adding checks on [[CRO0]]-based pointers before writing to them.&lt;br /&gt;
| Memory-mapping syscalls.&lt;br /&gt;
| [[9.3.0-21]]&lt;br /&gt;
| [[9.4.0-21]]&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| smea, [[User:Plutooo|plutoo]] joint effort&lt;br /&gt;
|-&lt;br /&gt;
| Region free&lt;br /&gt;
| Only [[Home Menu]] itself checks gamecards&#039; region when launching them. Therefore, any application launch that is done directly with [[NS]] without signaling Home Menu to launch the app, will result in region checks being bypassed.&lt;br /&gt;
This essentially means launching the gamecard with the [[NS_and_APT_Services|&amp;quot;ns:s&amp;quot;]] service. The main way to exploit this is to trigger a FIRM launch with an application specified, either with a normal FIRM launch or a hardware [[NSS:RebootSystem|reboot]].&lt;br /&gt;
| Launching gamecards from any region + bypassing Home Menu gamecard-sysupdate installation&lt;br /&gt;
| None&lt;br /&gt;
| Last tested with [[10.1.0-27|10.1.0-X]].&lt;br /&gt;
| June(?) 2014&lt;br /&gt;
| &lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| [[NWM_Services|NWM]] service-cmd state null-ptr deref&lt;br /&gt;
| The NWMUDS service command code loads a ptr from .data, adds an offset to that, then passes that as the state address for the actual command-handler function. The value of the ptr loaded from .data is not checked, therefore this will cause crashes due to that being 0x0 when NWMUDS was not properly initialized.&lt;br /&gt;
It&#039;s unknown whether any NWM services besides NWMUDS have this issue.&lt;br /&gt;
| This is rather useless since it&#039;s only a crash caused by a state ptr based at 0x0.&lt;br /&gt;
| None&lt;br /&gt;
| [[9.0.0-20]]&lt;br /&gt;
| 2013?&lt;br /&gt;
| &lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== General/CTRSDK ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Summary&lt;br /&gt;
!  Description&lt;br /&gt;
!  Successful exploitation result&lt;br /&gt;
!  Fixed in version&lt;br /&gt;
!  Last version this flaw was checked for&lt;br /&gt;
!  Timeframe this was discovered&lt;br /&gt;
!  Discovered by&lt;br /&gt;
|-&lt;br /&gt;
| [[NWM_Services|UDS]] beacon additional-data buffer overflow&lt;br /&gt;
| Originally CTRSDK did not validate the UDS additional-data size before using that size to copy the additional-data to a [[NWM_Services|networkstruct]]. This was eventually fixed.&lt;br /&gt;
This was discovered while doing code RE with an old dlp-module version. It&#039;s unknown in what specific CTRSDK version this was fixed, or even what system-version updated titles with a fixed version.&lt;br /&gt;
&lt;br /&gt;
It&#039;s unknown if there&#039;s any titles using a vulnerable CTRSDK version which are also exploitable with this(dlp module can&#039;t be exploited with this).&lt;br /&gt;
&lt;br /&gt;
The maximum number of bytes that can be written beyond the end of the outbuf is 0x37-bytes, with additionaldata_size=0xFF.&lt;br /&gt;
| Perhaps ROP, very difficult if possible with anything at all&lt;br /&gt;
| ?&lt;br /&gt;
| &lt;br /&gt;
| September(?) 2014&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| CTPK buffer overflow&lt;br /&gt;
| At offset 0x20 in CTPK is an array for each texture, each entry is 0x20-bytes. This contains a wordindex(entry+0x18) for some srcdata relative to CTPK+0, and an u8 wordsize(entry+0x14) for this data. The CTRSDK function handling this doesn&#039;t validate the size, when copying srcdata using this size to the output buffer. Applications usually have the output buffer on the stack, hence stack buffer overflow.&lt;br /&gt;
&lt;br /&gt;
While CTPK(*.ctpk) are normally only loaded from RomFS, some application(s) load from elsewhere too.&lt;br /&gt;
| ROP under the target application.&lt;br /&gt;
| None?&lt;br /&gt;
| &amp;quot;[SDK+NINTENDO:CTR_SDK-11_4_0_200_none]&amp;quot;&lt;br /&gt;
| November 14, 2016&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>EvilFlight</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=Mysteries&amp;diff=20674</id>
		<title>Mysteries</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=Mysteries&amp;diff=20674"/>
		<updated>2018-04-17T00:16:52Z</updated>

		<summary type="html">&lt;p&gt;EvilFlight: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The following is a list of mysteries.&lt;br /&gt;
&lt;br /&gt;
== General ==&lt;br /&gt;
* What is the CTR abbreviation?&lt;br /&gt;
: C may stand for Chiheisen (&amp;quot;horizon&amp;quot; in Japanese, the O3DS&#039;s codename being &amp;quot;Project Horizon&amp;quot;).&lt;br /&gt;
:: Not true, Horizon refers to the OS.&lt;br /&gt;
&lt;br /&gt;
== Hardware ==&lt;br /&gt;
=== Why are there two CTRCARD controllers? ===&lt;br /&gt;
&#039;&#039;&#039;Background:&#039;&#039;&#039; Also [http://problemkaputt.de/twl-core.jpg DSi SoC pinout] shows evidence of dual NTRCARD controllers on the final DSi SoC. (This was a [http://i.imgur.com/0kJlbEw.png planned feature] of the DSi before being axed later in development)&lt;br /&gt;
&lt;br /&gt;
=== Why are there two EMMC controllers? ===&lt;br /&gt;
&#039;&#039;&#039;Theory:&#039;&#039;&#039; At some point during 3DS hardware development there was an idea to split up CTR and TWL nand into two different chips.&lt;br /&gt;
=== Is there a JTAG? ===&lt;br /&gt;
=== Is there more than one revision of the bootrom? ===&lt;br /&gt;
&#039;&#039;&#039;Background:&#039;&#039;&#039; Bootrom visible portion has been dumped on the entire 3DS Family (3DS, 3DSXL, 2DS, New3DS, New3DSXL, New2DSXL), and even a prototype board from April(?) 2010. All matching exactly.&lt;br /&gt;
&lt;br /&gt;
=== What is the EMMC controller @ 0x10100000 doing? ===&lt;br /&gt;
&#039;&#039;&#039;Background:&#039;&#039;&#039; There&#039;s dead code in NWM referencing it.&lt;br /&gt;
=== Why did they put NTRCARD accessible from ARM11? ===&lt;br /&gt;
&#039;&#039;&#039;Theory:&#039;&#039;&#039; At some point during 3DS hardware development there was a concept where ARM11 ran a menu with DS(i) icons while ARM9 was in TWL mode.&lt;br /&gt;
&lt;br /&gt;
=== Is there a secret message embedded in the 3DS keyscrambler constant? ===&lt;br /&gt;
&#039;&#039;&#039;Background:&#039;&#039;&#039; TWL key scrambler constant was &amp;quot;Nintendo Co., Ltd&amp;quot; in Japanese (&amp;quot;任天堂株式会社&amp;quot;), UTF-16LE encoded, with byte order mark.  The 3DS key scrambler constant, by comparison, is random-looking.&lt;br /&gt;
&lt;br /&gt;
=== What is the PDN abbreviation? ===&lt;br /&gt;
: Power distribution network&lt;br /&gt;
&lt;br /&gt;
=== How does Nintendo reflash bricked systems? ===&lt;br /&gt;
Before trying to boot from NAND, the bootrom checks to see if a key combination (Start + Select + X) is being held, and whether the shell is closed. If so, it tries to boot from an inserted NTR (Nintendo DS) cartridge.&lt;br /&gt;
This allows to execute a FIRM that is probably used by Nintendo to reflash the system.&lt;br /&gt;
&lt;br /&gt;
== Software ==&lt;br /&gt;
=== What was the problem in &amp;quot;initial program loader&amp;quot; that was mentioned in an FCC filing by Nintendo for 2DS? ===&lt;br /&gt;
&#039;&#039;&#039;Background:&#039;&#039;&#039; http://www.neogaf.com/forum/showthread.php?t=814624&amp;amp;page=1&lt;br /&gt;
=== What did SVC 0x74 in the ARM11 kernel do before it got stubbed? ===&lt;br /&gt;
=== What is the PTM abbreviation? ===&lt;br /&gt;
: Power/time management&lt;br /&gt;
&lt;br /&gt;
=== Why is the DTCM not used anywhere except bootrom? ===&lt;br /&gt;
&#039;&#039;&#039;Background:&#039;&#039;&#039; Bootrom is known to use part of DTCM as state, memsetting it to 0 when it&#039;s done. After that, it is never used again.&lt;br /&gt;
=== How is CTRAging launched during factory setup? ===&lt;br /&gt;
&#039;&#039;&#039;Background:&#039;&#039;&#039; No TestMenu version is capable of launching CTRAging directly: O3DS factory TestMenu can only launch DevMenu installed on NAND, the inserted cartridge and the TWL/AGB test apps; N3DS factory TestMenu can only launch DevMenu installed on NAND, the inserted cartridge and System Settings. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Theory:&#039;&#039;&#039; NtrBoot another time &lt;br /&gt;
=== Why are there 4 stubbed syscalls named SendSyncRequest1-4? ===&lt;br /&gt;
=== Is there a deterministic formula for calculating the Movable.sed KeyY high u64? ===&lt;br /&gt;
&#039;&#039;&#039;Background:&#039;&#039;&#039; We know now that the high 4 bytes of KeyY can be reliably estimated to be 1/5th of the LocalFriendCodeSeed (low 8 bytes of KeyY), which is close enough to brute force. However, the actual value is usually about 0-4000 units off the actual high u32 of the KeyY (called msed3 in the seedminer implementation). Could there possibly be a deterministic formula given this 1/5 ratio is so close to the correct value? It&#039;s difficult to imagine this is just a coincidence.&lt;/div&gt;</summary>
		<author><name>EvilFlight</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=Mii_Maker&amp;diff=20620</id>
		<title>Mii Maker</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=Mii_Maker&amp;diff=20620"/>
		<updated>2018-02-28T03:24:17Z</updated>

		<summary type="html">&lt;p&gt;EvilFlight: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Mii Maker&#039;&#039;&#039; lets you create [[Mii]]s, and is the successor of the Wii&#039;s Mii Channel.&lt;br /&gt;
&lt;br /&gt;
It can transfer Miis over [[NWM_Services|local wireless]] from other systems running Mii Maker (3DS/Wii U), or receive, but not send, from Mii Channel.&lt;br /&gt;
&lt;br /&gt;
== Wii Mii Channel transfer protocol ==&lt;br /&gt;
&lt;br /&gt;
The Wii beacons are similar to the usual multi-cart NDS beacons, except: beacon_type is zero, and payload size is 0x14. The payload data is just the Wii UTF-16 nickname, with some extra unused zero data. The usual multi-cast NDS protocol is used for sending the 3DS nick to the Wii. After many keep-alive frames, it eventually sends a bunch of frames, each containing the whole Mii. There&#039;s a 6-byte header, followed by [http://wiibrew.org/wiki/Wiimote/Mii_Data Mii data]. At the end of these frames like most NDS frames is the 0200 byte marker.&lt;br /&gt;
&lt;br /&gt;
== Mii QR Code format ==&lt;br /&gt;
&lt;br /&gt;
3DS Mii QR is a standard 57x57 pixel Level 10 High ECC QR code with &#039;Mii&#039; logo in center (refer to [http://www.denso-wave.com/qrcode Denso-Wave Inc] web site for QR Code format specifications). It contains 0x70-bytes of binary data. 3DS seems to have a fully implemented QR-code decoder, as it can interpret such Mii binary data being encoded even in the smallest possible for that data size Level 6 Low ECC QR code.&lt;br /&gt;
&lt;br /&gt;
The data itself is encrypted with AES-CCM, xorpads can be determined from known plaintext here. The Mii Maker application uses the [[NS]] APT Wrap/Unwrap commands to encrypt/decrypt this Mii data. For the NS [[APT:Unwrap|Unwrap]] command, the Mii Maker application uses nonceoffset=12, noncesize=10, and inputbuffer-size=0x60. Note that the actual nonce size is 8 bytes due to Wrap/Unwrap implementation, and the nonce data should be moved 12 bytes afterwards after decryption. The rest of the data at 0x8-0x5F is encrypted, and should be split into two parts after decryption, with the nonce data in the middle. (See [[APT:Wrap|Wrap]] and [[APT:Unwrap|Unwrap]] for more information)&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset&lt;br /&gt;
! Length&lt;br /&gt;
! &lt;br /&gt;
|-&lt;br /&gt;
| 0x0&lt;br /&gt;
| 0x4&lt;br /&gt;
| Mii ID (big-endian 32-bit unsigned integer)&amp;lt;br/&amp;gt;The most significant 3 bits determine whether the Mii is Special, Foreign, or Normal [http://www.davidhawley.co.uk/special-miis-gold-pants-and-creating.aspx]&amp;lt;br/&amp;gt;time_offset = (mii_id &amp;amp; 0x0FFFFFFF) * 2;&amp;lt;br/&amp;gt;time_offset is the time the Mii was created, represented as the number of seconds since 01/01/2010 00:00:00&lt;br /&gt;
|-&lt;br /&gt;
| 0x4&lt;br /&gt;
| 0x4&lt;br /&gt;
| High 4 octets of MAC address [http://www.adminsub.net/mac-address-finder/nintendo]&lt;br /&gt;
|-&lt;br /&gt;
| 0x8&lt;br /&gt;
| 0x4&lt;br /&gt;
| [[Mii#Mii_ID|Mii ID]], the encrypted data begins here.&lt;br /&gt;
|-&lt;br /&gt;
| 0xC&lt;br /&gt;
| 0x8&lt;br /&gt;
| System ID (this ID is produced by the output from [https://www.3dbrew.org/wiki/Cfg:GenHashConsoleUnique GenHashConsoleUnique(0x0)])&lt;br /&gt;
|-&lt;br /&gt;
| 0x14&lt;br /&gt;
| 0x2&lt;br /&gt;
| Low 2 octets of MAC address&lt;br /&gt;
|-&lt;br /&gt;
| 0x16&lt;br /&gt;
| 0x2&lt;br /&gt;
| padding (0000)&lt;br /&gt;
|-&lt;br /&gt;
| 0x18&lt;br /&gt;
| 0x2&lt;br /&gt;
| Bit-mapped: Birthday (4bit-day,5bit-month), Sex, Shirt, ??&lt;br /&gt;
|-&lt;br /&gt;
| 0x1A&lt;br /&gt;
| 0x14&lt;br /&gt;
| UTF-16 Mii Name (10 chars max)&lt;br /&gt;
|-&lt;br /&gt;
| 0x2E&lt;br /&gt;
| 0x2&lt;br /&gt;
| width &amp;amp; height&lt;br /&gt;
|-&lt;br /&gt;
| 0x30&lt;br /&gt;
| 0x1&lt;br /&gt;
| bit 0: disable sharing&amp;lt;br/&amp;gt;bit 1-4: face shape&amp;lt;br/&amp;gt;bit 5-7: skin color&lt;br /&gt;
|-&lt;br /&gt;
| 0x31&lt;br /&gt;
| 0x1&lt;br /&gt;
| bit 0-3: wrinkles&amp;lt;br/&amp;gt;bit 4-7: makeup&lt;br /&gt;
|-&lt;br /&gt;
| 0x32&lt;br /&gt;
| 0x1&lt;br /&gt;
| hair style&lt;br /&gt;
|-&lt;br /&gt;
| 0x33&lt;br /&gt;
| 0x1&lt;br /&gt;
| bit 0-2: hair color&amp;lt;br/&amp;gt;bit 3: flip hair&lt;br /&gt;
|-&lt;br /&gt;
| 0x34&lt;br /&gt;
| 0x4&lt;br /&gt;
| unknown&lt;br /&gt;
|-&lt;br /&gt;
| 0x38&lt;br /&gt;
| 0x1&lt;br /&gt;
| bit 0-4: eyebrow style&amp;lt;br/&amp;gt;bit 5-7: eyebrow color&lt;br /&gt;
|-&lt;br /&gt;
| 0x39&lt;br /&gt;
| 0x1&lt;br /&gt;
| bit 0-3: eyebrow scale&amp;lt;br/&amp;gt;bit 4-6: eyebrow yscale&lt;br /&gt;
|-&lt;br /&gt;
| 0x3A&lt;br /&gt;
| 0x2&lt;br /&gt;
| note that the bytes are swapped over (little-endian layout)&amp;lt;br/&amp;gt;bit 0-3: eyebrow rotation&amp;lt;br/&amp;gt;bit 5-8: eyebrow x spacing&amp;lt;br/&amp;gt;bit 9-13: eyebrow y position&lt;br /&gt;
|-&lt;br /&gt;
| 0x3C&lt;br /&gt;
| 0x1&lt;br /&gt;
| Allow Copying&lt;br /&gt;
|-&lt;br /&gt;
| 0x3D&lt;br /&gt;
| 0x3&lt;br /&gt;
| unknown&lt;br /&gt;
|-&lt;br /&gt;
| 0x40&lt;br /&gt;
| 0x1&lt;br /&gt;
| Mii Sharing Value&lt;br /&gt;
|-&lt;br /&gt;
| 0x41&lt;br /&gt;
| 0x7&lt;br /&gt;
| unknown&lt;br /&gt;
|-&lt;br /&gt;
| 0x48&lt;br /&gt;
| 0x14&lt;br /&gt;
| UTF-16 Author Name (10 chars max)&lt;br /&gt;
|-&lt;br /&gt;
| 0x5C&lt;br /&gt;
| 0x2&lt;br /&gt;
| unknown&lt;br /&gt;
|-&lt;br /&gt;
| 0x5E&lt;br /&gt;
| 0x2&lt;br /&gt;
| CRC16 over the previous 0x5E&lt;br /&gt;
|-&lt;br /&gt;
| 0x60&lt;br /&gt;
| 0x10&lt;br /&gt;
| AES-CCM MAC&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
* QR codes made from the same 3DS for the same Mii are use the same AES-CCM nonce (you can recreate the xorpad by xoring with known values from this table).&lt;br /&gt;
&lt;br /&gt;
== Mii Database ==&lt;br /&gt;
&lt;br /&gt;
Created, received, or even met-in-multiplayer Miis are saved in [[Mii|CFL_DB.dat]].&lt;br /&gt;
&lt;br /&gt;
== Savedata ==&lt;br /&gt;
=== editSaveData.bin ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset&lt;br /&gt;
! Length&lt;br /&gt;
! &lt;br /&gt;
|-&lt;br /&gt;
| 0x0&lt;br /&gt;
| 0x4&lt;br /&gt;
| &amp;quot;TIDE&amp;quot; header (EDIT byteswapped)&lt;br /&gt;
|-&lt;br /&gt;
| 0x4&lt;br /&gt;
| 0x4&lt;br /&gt;
| zero&lt;br /&gt;
|-&lt;br /&gt;
| 0xC&lt;br /&gt;
| 0x4 (?)&lt;br /&gt;
| 01000000 (constant?)&lt;br /&gt;
|-&lt;br /&gt;
| 0x100&lt;br /&gt;
| 0x4&lt;br /&gt;
| Number of scanned Special Mii QRs&lt;br /&gt;
|-&lt;br /&gt;
| 0x104&lt;br /&gt;
| -&lt;br /&gt;
| Some data identifying each scanned Special Mii QRs, for the purpose of not making them scannable again. 8 or 12 byte each?&lt;br /&gt;
|-&lt;br /&gt;
| 0x2904&lt;br /&gt;
| 0x4&lt;br /&gt;
| Checksum?&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== ExtData ==&lt;br /&gt;
The ExtData [[Extdata#Filesystem|File System]] for Mii Maker is as follows:&lt;br /&gt;
&lt;br /&gt;
 root&lt;br /&gt;
 ├── icon&lt;br /&gt;
 ├── boss&lt;br /&gt;
 └── user&lt;br /&gt;
     └── ExBanner&lt;br /&gt;
         └── COMMON.bin&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  File&lt;br /&gt;
!  Details&lt;br /&gt;
!  Size&lt;br /&gt;
!  FW Introduced&lt;br /&gt;
!  Plaintext&lt;br /&gt;
|-&lt;br /&gt;
|  icon&lt;br /&gt;
|  Duplicate from Application ExeFS. Always image 00000002.&lt;br /&gt;
|  0x36c0 Bytes&lt;br /&gt;
|  [[1.0.0-0]]&lt;br /&gt;
|  [https://dl.dropboxusercontent.com/u/60710927/CTR/Sample/MiiMakerExtdata/icon Download]&lt;br /&gt;
|-&lt;br /&gt;
|  COMMON.bin&lt;br /&gt;
|  [[Extended Banner]] for Home Menu. Always image 00000003.&lt;br /&gt;
|  0x20224 Bytes&lt;br /&gt;
|  [[1.0.0-0]]&lt;br /&gt;
|  [https://dl.dropboxusercontent.com/u/60710927/CTR/Sample/MiiMakerExtdata/COMMON.bin Download]&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>EvilFlight</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=Talk:Main_Page&amp;diff=20616</id>
		<title>Talk:Main Page</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=Talk:Main_Page&amp;diff=20616"/>
		<updated>2018-02-25T00:46:57Z</updated>

		<summary type="html">&lt;p&gt;EvilFlight: /* Seedminer? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;So how about a [http://wiisixtyfour.webs.com/images/3dsbrew-bg4545.png logo]? --[[User:Bg4545|wiisixtyfour]] 06:59, 1 April 2011 (CEST)&lt;br /&gt;
&lt;br /&gt;
Great one, let&#039;s put it as default logo ! --[[User:GeekShadow|GeekShadow]] 09:37, 1 April 2011 (CEST)&lt;br /&gt;
&lt;br /&gt;
Here&#039;s one I made, which doesn&#039;t use any official artwork/photography: [http://dl.dropbox.com/u/1077900/Graphics/3dbrew.png PNG] [http://dl.dropbox.com/u/1077900/Graphics/3dbrew.svg SVG] --[[User:BHSPitMonkey|BHSPitMonkey]] 05:36, 7 April 2011 (CEST)&lt;br /&gt;
&lt;br /&gt;
How about making the default skin [http://3dbrew.org/w/index.php?title=Main_Page&amp;amp;useskin=monobook MonoBook]?, I like the it better. --[[User:Elisherer|Elisherer]] 10:58, 6 October 2011 (CEST)&lt;br /&gt;
&lt;br /&gt;
I want to dump RAM.What can I do now?How can I learn? --[[User:Matyapiro31|Matyapiro31]] 16:30, 20 November 2011 (CET)&lt;br /&gt;
:Sorry, this is not the correct page to talk about that. However, it&#039;s a good topic for our new forum! http://n-dev.net/index.php --[[User:Lazymarek9614|Lazymarek9614]] 17:43, 20 November 2011 (CET)&lt;br /&gt;
&lt;br /&gt;
-Hello, I would like to translate this great wiki into French, how should I do ? Thanks :)&lt;br /&gt;
:I guess each page you want to translate you need to edit the page&#039;s link with a &#039;/&#039; (slash) after it and the language code (fr for french i think), for instance edit the page http://www.3dbrew.org/wiki/Main_Page/Fr and then put a link on the bottom next to Japanese.. --[[User:Elisherer|Elisherer]] 17:49, 21 December 2011 (CET)&lt;br /&gt;
::You should take a look [http://www.mediawiki.org/wiki/Template:Languages here]...Apperantly we don&#039;t have the needed template for it to work automaticaly maybe we need the admin to install some kind of extension to support this type of thing. --[[User:Elisherer|Elisherer]] 18:59, 21 December 2011 (CET)&lt;br /&gt;
&lt;br /&gt;
-Yes, it would be more practical. For now, I&#039;ll continue translating like that, please tell me when the plugin is added.&lt;br /&gt;
---I added a language selection bar at the bottom of each main page.&lt;br /&gt;
&lt;br /&gt;
I cannot have be accessing for a week.Why?--Matyapiro31 12:51, 19 April 2012 (CEST)&lt;br /&gt;
== SVG upload ==&lt;br /&gt;
&lt;br /&gt;
Hey neimod, can you enable svg uploading? I want to upload graphics for the buttons [http://sherer.co.il/svg/ I made] (for future homebrew and stuff)--[[User:Elisherer|Elisherer]] 14:41, 9 February 2012 (CET)&lt;br /&gt;
: You can address this issue to [[User:Mha|Mha]] (mha on irc) --[[User:Neimod|Neimod]] 19:04, 9 February 2012 (CET)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Game Screenshots...&lt;br /&gt;
&lt;br /&gt;
Hey guys how can i export the photos from DoA:D from 3DS to PC i have the right file but on mc if i change to .jpg or mpo it does not open...&lt;br /&gt;
&lt;br /&gt;
== Does anyone know how to tell an installed/braindumped title&#039;s version? ==&lt;br /&gt;
&lt;br /&gt;
I&#039;m on 9.3 and have hax. I want to know this so I can contribute versions to to the title list. --[[User:Hiccup|Hiccup]] ([[User talk:Hiccup|talk]]) 14:57, 6 January 2016 (CET)&lt;br /&gt;
:1.If you have NAND Xorpad you can dump and decrypt to get the .[[TMD]] files and read the version from it. 2.Use [[AM]] service, and use &amp;quot;AM_ListTitles&amp;quot; from libctru, structure &amp;quot;AM_TitleEntry&amp;quot; includes the version. 3.Most versions of System Titles are fetched via System Update SOAP response, thanks to [[User:Yellows8|Yellows8]] for that.&lt;br /&gt;
:BTW I suggest you to ask questions on 4dsdev.org or IRC(EFNET.org#3dsdev) thus it may be dealt faster. --[[User:Syphurith|Syphurith]] ([[User talk:Syphurith|talk]]) 11:35, 7 January 2016 (CET)&lt;br /&gt;
&lt;br /&gt;
== question ==&lt;br /&gt;
&lt;br /&gt;
Can we get an actual board to discuss things instead of a shitty wiki that&#039;s setup like this? --[[User:NintendoFan|NintendoFan]] ([[User talk:NintendoFan|talk]]) 09:36, 3 May 2016 (CEST)&lt;br /&gt;
&lt;br /&gt;
: It says so in the previous discussion on this page :P [4dsdev.org] --[[User:Ryccardo|Ryccardo]] ([[User talk:Ryccardo|talk]]) 09:52, 3 May 2016 (CEST)&lt;br /&gt;
&lt;br /&gt;
:: 4dsdev looks quite dead with a sticky about merging that is 5 months old. :P GBAtemp [http://gbatemp.net/categories/nintendo-3ds-discussions.198/] is quite active, why not there? --[[User:MKody|MKody]] ([[User talk:MKody|talk]]) 10:40, 3 May 2016 (CEST)&lt;br /&gt;
&lt;br /&gt;
::: Eh, while GBATemp is a good place I&#039;d much rather have a board that&#039;s specifically dedicated to 3DS modding, not just modding in general. Also, I&#039;d much rather start fresh with a new board than trying to revive a dead community that&#039;s been merged into some other board. --[[User:NintendoFan|NintendoFan]] ([[User talk:NintendoFan|talk]]) 07:58, 6 May 2016 (CEST)&lt;br /&gt;
&lt;br /&gt;
== Uploads are broken ==&lt;br /&gt;
&lt;br /&gt;
MediaWiki throws a MWException whenever I try to upload an image file. Perhaps uploads are not configured properly? —&#039;&#039;&#039;&amp;lt;span style=&amp;quot;text-shadow:0 0 3px #111&amp;quot;&amp;gt;[[User:Nicholatian|&amp;lt;span style=&amp;quot;color:#ddd&amp;quot;&amp;gt;nicho&amp;lt;/span&amp;gt;]][[User_talk:Nicholatian|&amp;lt;span style=&amp;quot;color:#ddd&amp;quot;&amp;gt;latian&amp;lt;/span&amp;gt;]]&#039;&#039;[[Special:Contributions/Nicholatian|&amp;lt;span style=&amp;quot;color:#c43&amp;quot;&amp;gt;fury&amp;lt;/span&amp;gt;]]&#039;&#039;&amp;lt;/span&amp;gt;&#039;&#039;&#039; 20:09, 15 June 2016 (CEST)&lt;br /&gt;
&lt;br /&gt;
== Seedminer? == &lt;br /&gt;
&lt;br /&gt;
There should be some documentation about seedminer on this wiki.&lt;br /&gt;
&lt;br /&gt;
Please check the 3ds system flaws page: search &amp;quot;movable.sed keyY vulnerable to brute-force&amp;quot;&lt;/div&gt;</summary>
		<author><name>EvilFlight</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=3DS_System_Flaws&amp;diff=20598</id>
		<title>3DS System Flaws</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=3DS_System_Flaws&amp;diff=20598"/>
		<updated>2018-02-18T03:03:06Z</updated>

		<summary type="html">&lt;p&gt;EvilFlight: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Exploits are used to execute unofficial code (homebrew) on the Nintendo 3DS. This page is a list of publicly known system flaws, for userland applications/applets flaws see [[3DS_Userland_Flaws|here]].&lt;br /&gt;
&lt;br /&gt;
=Stale / Rejected Efforts=&lt;br /&gt;
* Neimod has been working on a RAM dumping setup for a little while now. He&#039;s de-soldered the 3DS&#039;s RAM chip and hooked it and the RAM pinouts on the 3DS&#039; PCB up to a custom RAM dumping setup. A while ago he published photos showing his setup to be working quite well, with the 3DS successfully booting up. However, his flickr stream is now private along with most of his work.&lt;br /&gt;
&lt;br /&gt;
* Someone (who will remain unnamed) has released CFW and CIA installers, all of which is copied from the work of others, or copyrighted material.&lt;br /&gt;
&lt;br /&gt;
==Tips and info==&lt;br /&gt;
The 3DS uses the XN feature of the ARM11 processor. There&#039;s no official way from applications to enable executable permission for memory containing arbitrary unsigned code(there&#039;s a [[SVC]] for this, but only [[RO_Services|RO-module]] has access to it). A usable userland exploit would still be useful: you could only do return-oriented-programming with it initially. From ROP one could then exploit system flaw(s), see below.&lt;br /&gt;
&lt;br /&gt;
SD card [[extdata]] and SD savegames can be attacked, for consoles where the console-unique [[Nand/private/movable.sed|movable.sed]] was dumped(accessing SD data is far easier by running code on the target 3DS however).&lt;br /&gt;
&lt;br /&gt;
=System flaws=&lt;br /&gt;
== Hardware ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Summary&lt;br /&gt;
!  Description&lt;br /&gt;
!  Fixed with hardware model/revision&lt;br /&gt;
!  Newest hardware model/revision this flaw was checked for&lt;br /&gt;
!  Timeframe this was discovered&lt;br /&gt;
!  Discovered by&lt;br /&gt;
|-&lt;br /&gt;
| ARM9/ARM11 bootrom vectors point at uninitialized RAM&lt;br /&gt;
| ARM9&#039;s and ARM11&#039;s exception vectors are hardcoded to point at the CPU&#039;s internal memory (0x08000000 region for ARM9, AXIWRAM for ARM11). While the bootrom does set them up to point to an endless loop at some point during boot, it does not do so immediately. As such, a carefully-timed fault injection (via hardware) to trigger an exception (such as an invalid instruction) will cause execution to fall into ARM9 RAM. &lt;br /&gt;
Since RAM isn&#039;t cleared on boot (see below), one can immediately start execution of their own code here to dump bootrom, OTP, etc.&lt;br /&gt;
The ARM9 bootrom does the following at reset:  reset vector branches to another instruction, then branches to bootrom+0x8000. Hence, there&#039;s no way to know for certain when exactly the ARM9 exception-vector data stored in memory gets initialized.&lt;br /&gt;
&lt;br /&gt;
This requires *very* *precise* timing for triggering the hardware fault.&lt;br /&gt;
&lt;br /&gt;
It has been exploited by derrek to dump the ARM9 bootrom as of Summer 2015.&lt;br /&gt;
| None: all available 3DS models at the time of writing have the exact same ARM9/ARM11 bootrom for the unprotected areas.&lt;br /&gt;
| New3DS&lt;br /&gt;
| End of February 2014&lt;br /&gt;
| [[User:Derrek|derrek]], WulfyStylez (May 2015) independently&lt;br /&gt;
|-&lt;br /&gt;
| Missing AES key clearing&lt;br /&gt;
| The hardware AES engine does not clear keys when doing a hard reset/reboot.&lt;br /&gt;
| None&lt;br /&gt;
| New3DS&lt;br /&gt;
| August 2014&lt;br /&gt;
| Mathieulh/Others&lt;br /&gt;
|-&lt;br /&gt;
| No RAM clearing on reboots&lt;br /&gt;
| On an MCU-triggered reboot all RAM including FCRAM/ARM9 memory/AXIWRAM/VRAM keeps its contents.&lt;br /&gt;
| None&lt;br /&gt;
| New3DS&lt;br /&gt;
| March 2014&lt;br /&gt;
| [[User:Derrek|derrek]]&lt;br /&gt;
|-&lt;br /&gt;
| 32bits of actual console-unique TWLNAND keydata&lt;br /&gt;
| On retail the 8-bytes at ARM9 address [[Memory_layout|0x01FFB808]] are XORed with hard-coded data, to generate the TWL console-unique keys, including TWLNAND. On Old3DS the high u32 is always 0x0, while on New3DS that u32 is always 0x2. On top of this, the lower u32&#039;s highest bit is always ORed. only 31 bits of the TWL console-unique keydata / TWL consoleID are actually console-unique.&lt;br /&gt;
This allows one to easily bruteforce the TWL console-unique keydata with *just* data from TWLNAND. On DSi the actual console-unique data for key generation is 8-bytes(all bytes actually set).&lt;br /&gt;
| None&lt;br /&gt;
| New3DS&lt;br /&gt;
| 2012?&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| DSi / 3DS-TWL key-generator&lt;br /&gt;
| After using the key generator to generate the normal-key, you could overwrite parts of the normal-key with your own data and then recover the key-generator output by comparing the new crypto output with the original crypto output. From the normal-key outputs, you could deduce the TWL key-generator function.&lt;br /&gt;
This applies to the keyX/keyY too.&lt;br /&gt;
&lt;br /&gt;
This attack does not work for the 3DS key-generator because keyslots 0-3 are only for TWL keys.&lt;br /&gt;
| None&lt;br /&gt;
| New3DS&lt;br /&gt;
| 2011&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| 3DS key-generator&lt;br /&gt;
| The algorithm for generating the normal-keys for keyslots is cryptographically weak.  As a result, it is easily susceptible to differential cryptanalysis if the normal-key corresponding to any scrambler-generated keyslot is discovered.&lt;br /&gt;
&lt;br /&gt;
Several such pairs of matching normal-keys and KeyY values were found, leading to deducing the key-generator function.&lt;br /&gt;
| None&lt;br /&gt;
| New3DS&lt;br /&gt;
| February 2015&lt;br /&gt;
| [[User:Yellows8|Yellows8]], [[User:Plutooo|plutoo]]&lt;br /&gt;
|-&lt;br /&gt;
| FIRM partitions known-plaintext&lt;br /&gt;
| The [[Flash_Filesystem|FIRM partitions]] are encrypted with AES-CTR without a MAC. Since this works by XOR&#039;ing data with a static (per-console in this case) keystream, one can deduce the keystream of a portion of each FIRM partition if they have the actual FIRM binary stored in it.&lt;br /&gt;
&lt;br /&gt;
This can be paired with many exploits. For example, it allows minor FIRM downgrades (i.e. 10.4 to 9.6 or 9.5 to 9.4, but not 9.6 to 9.5).&lt;br /&gt;
&lt;br /&gt;
This can be somewhat addressed by having a FIRM header skip over previously used section offsets, but this would just air-gap newer FIRMs without fixing the core bug. This can also only be done a limited number of times due to the size of FIRM versus the size of the partitions.&lt;br /&gt;
| None&lt;br /&gt;
| New3DS&lt;br /&gt;
| &lt;br /&gt;
| Everyone&lt;br /&gt;
|-&lt;br /&gt;
| RSA keyslots don&#039;t clear exponent when setting modulus&lt;br /&gt;
| The [[RSA_Registers|RSA keyslots]] are set by boot ROM to have four private RSA keys.  The exponent value in the RSA registers is write-only and not readable.&lt;br /&gt;
&lt;br /&gt;
However, when setting a keyslot&#039;s modulus, the RSA hardware leaves the exponent alone.  This allows retrieving the exponent by doing a discrete logarithm of the output.&lt;br /&gt;
&lt;br /&gt;
By setting the modulus to a prime number whose modular multiplicative order is &amp;quot;smooth&amp;quot; (that is, p-1 is divisible by only small prime numbers), discrete logarithms can be calculated quickly using the [[wikipedia:Pohlig-Hellman algorithm|Pohlig-Hellman algorithm]].  If the prime chosen is greater than the modulus, but the same bit size, the discrete logarithm is the private exponent.&lt;br /&gt;
&lt;br /&gt;
This exploit&#039;s usefulness is limited: RSA keyslot 0 is only used in current firmware for deriving the 6.x save and 7.x NCCH keys, which were already known, and the other three keyslots are entirely unused.  Additionally, with a boot ROM dump, this exploit is moot; these private keys are located in the protected ARM9 boot ROM.&lt;br /&gt;
| None&lt;br /&gt;
| New3DS&lt;br /&gt;
| March 2016&lt;br /&gt;
| [[User:Myria|Myria]]&lt;br /&gt;
|-&lt;br /&gt;
| Boot9 AES keyinit function issues&lt;br /&gt;
| [[Bootloader|Boot9]] seems to have two bugs in the AES key-init function, see [[AES_Registers#AES_key-init|here]].&lt;br /&gt;
| None&lt;br /&gt;
| BootROM issue.&lt;br /&gt;
| 2015&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| [[CONFIG11_Registers#CFG11_GPUPROT|CFG11_GPUPROT]] allowing acccess to AXIWRAM/FCRAM-BASE-memregion&lt;br /&gt;
| [[CONFIG11_Registers#CFG11_GPUPROT|CFG11_GPUPROT]] can be configured by anything with access to it to allow the GPU to access the entire AXIWRAM+FCRAM. For example, this is an issue for any sysmodule that gets exploited and has access to this register memory-page(include one that&#039;s listed below).&lt;br /&gt;
&lt;br /&gt;
See also &amp;quot;kernelhax via gspwn&amp;quot; below.&lt;br /&gt;
| None&lt;br /&gt;
| New3DS&lt;br /&gt;
| February 7, 2017&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| sighax: Boot9 improper PKCS #1 v1.5 signature validation&lt;br /&gt;
| The [[Flash_Filesystem|FIRM partitions]] are signed with RSA-2048 using SHA-256 and PKCS #1 v1.5 padding.  Boot9, however, does improper validation of the padding in three ways:&lt;br /&gt;
# Boot9 permits block type 02, meant for encrypted messages, to be used for signatures.  Only 01, for signatures, should have been permitted.  As a result, a signature block is not required to have a long string of FF bytes as padding, but rather any random values suffice.  While correct for encryption, this severely lessens security of signatures.&lt;br /&gt;
# Boot9 does not require that the length of the padding fill out the signature block completely.  As a result, there is considerable freedom in the layout of a signature.&lt;br /&gt;
# Boot9 fails to do bounds checking in its parsing of the DER-encoded hash algorithm type and hash value; the length values given in DER are permitted to point outside the signature block.&lt;br /&gt;
Flaw 3 allows the DER encoding to be such that boot9 believes that the signature&#039;s hash value is outside the range of the block itself, somewhere on the stack.  This can be pointed at the correct hash value it computes.  Boot9 then memcmp&#039;s the calculated hash against itself, and thinks that the hash is valid.&lt;br /&gt;
&lt;br /&gt;
When all three flaws are combined, a brute force in a reasonable amount of time can find a signature that passes all checks.&lt;br /&gt;
| None&lt;br /&gt;
| New3DS&lt;br /&gt;
| July 2015&lt;br /&gt;
| [[User:Derrek|derrek]]&lt;br /&gt;
|-&lt;br /&gt;
| Boot9 FIRM loading doesn&#039;t blacklist memory-mapped I/O&lt;br /&gt;
| [[Bootloader|Boot9]]&#039;s FIRM loading blacklists Boot9 data regions, but forgets to do other important regions, including Memory-mapped I/O. Combined with sighax, by loading a malicious FIRM section to MMIO, one can get Boot9/Boot11 code execution. &lt;br /&gt;
| None&lt;br /&gt;
| New3DS&lt;br /&gt;
| 2015(?)&lt;br /&gt;
| [[User:Derrek|derrek]] (2015?), [[User:Normmatt|Normmatt]] and [[User:SciresM|SciresM]] independently (January 2017).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== ARM9 software ==&lt;br /&gt;
&lt;br /&gt;
=== arm9loader ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Summary&lt;br /&gt;
!  Description&lt;br /&gt;
!  Successful exploitation result&lt;br /&gt;
!  Fixed in [[FIRM]] system version&lt;br /&gt;
!  Last [[FIRM]] system version this flaw was checked for&lt;br /&gt;
!  Timeframe this was discovered&lt;br /&gt;
!  Public disclosure timeframe&lt;br /&gt;
!  Discovered by&lt;br /&gt;
|-&lt;br /&gt;
| Generating the keysector console-unique keys with ITCM+Boot9&lt;br /&gt;
| [[Bootloader|Boot9]] decrypts the 0x100-byte [[OTP_Registers|OTP]] using AES-CBC with keydata stored in Boot9. If hash verification is successful, the plaintext of the first 0x90-bytes are copied into [[Memory_layout|ITCM]]. This is the &#039;&#039;exact&#039;&#039; &#039;&#039;same&#039;&#039; region hashed by arm9loader when generating the console-unique keys for decrypting the keysector, except arm9loader uses the raw encrypted OTP.&lt;br /&gt;
&lt;br /&gt;
Therefore, with the OTP keydata+IV from Boot9 you can: encrypt the 0x90-bytes from ITCM, then hash the output to get the console-unique keys for the system&#039;s keysector. This can even be done for Old3DS which doesn&#039;t have the arm9loader keysector officially.&lt;br /&gt;
&lt;br /&gt;
It&#039;s unknown why arm9loader only used the first 0x90-bytes of OTP. Using more data from OTP would&#039;ve prevented this. Fixing this would require doing exactly that, but that would also mean updating the NAND keysector(which is dangerous).&lt;br /&gt;
| See description.&lt;br /&gt;
| None&lt;br /&gt;
| &lt;br /&gt;
| 2015&lt;br /&gt;
| January 6, 2017&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| Rearrangable keys in the NAND keystore&lt;br /&gt;
| Due to the keystore being encrypted with AES-ECB, one can rearrange blocks and still have the NAND keystore decrypt in a deterministic way. &lt;br /&gt;
&lt;br /&gt;
Using 10.0 FIRM it is possible to rearrange keys such that ARM9 memory is executed. As such using existing ARM9 execution 10.0 FIRM can be written to NAND and a payload written to memory, with the payload to be executed post-K9L using an MCU reboot.&lt;br /&gt;
| arm9loaderhax given existing ARM9 code execution&lt;br /&gt;
| None&lt;br /&gt;
| [[11.3.0-36|11.3.0-X]]&lt;br /&gt;
| Early 2016&lt;br /&gt;
| 27 September 2016&lt;br /&gt;
| Myria, [[User:Dark samus|dark_samus]]; mathieulh (independently); [[User:Plutooo|plutoo]] (independently) + others&lt;br /&gt;
|-&lt;br /&gt;
| Uncleared OTP hash keydata in console-unique 0x11 key-generation&lt;br /&gt;
| Kernel9Loader does not clear the [[SHA_Registers#SHA_HASH|SHA_HASH register]] after use. As a result, the data stored here as K9L hands over to Kernel9 is the hash of [[OTP_Registers|OTP data]] used to seed the [[FIRM#New_3DS_FIRM|console-unique NAND keystore decryption key]] set on keyslot 0x11.&lt;br /&gt;
&lt;br /&gt;
Retrieving this keydata and the [[Flash_Filesystem#0x12C00|NAND keystore]] of the same device allows calculating the decrypted New3DS NAND keystore (non-unique, common to all New3DS units), which contains AES normal keys, also set on keyslot 0x11, which are then used to derive all current [[AES_Registers#Keyslots|New3DS-only AES keyXs]] including the newer batch introduced in [[9.6.0-24#arm9loader|9.6.0-X]]. From there, it is trivial to perform the same key derivation in order to initialize those keys on any system version, and even on Old3DS.&lt;br /&gt;
&lt;br /&gt;
This can be performed by exploiting the &amp;quot;arm9loaderhax&amp;quot; vulnerability to obtain post-K9L code execution after an MCU reboot (the bootrom section-loading fail is not relevant here, this attack was performed without OTP data by brute-forcing keys), and using this to dump the SHA_HASH register. This attack works on any FIRM version shipping a vulnerable version of K9L, whereas OTP dumping required a boot of &amp;lt;[[3.0.0-6|3.0.0-X]].&lt;br /&gt;
&lt;br /&gt;
This attack results in obtaining the entire (0x200-bytes) NAND keystore - it was confirmed at a later date that this keystore is encrypted with the same key (by comparing the decrypted data from multiple units), and therefore using another key in this store will not remedy the issue as all keys are known (i.e. later, unused keys decrypt to the same 0x200-bytes constant with the same OTP hash). Later keys could have been encrypted differently but this is not the case. As a result of this, it is not possible for Nintendo to use K9L again in its current format for its intended purpose, though this was not news from the moment people dumped a New3DS OTP.&lt;br /&gt;
| Derivation of all New3DS keys generated via the NAND keystore (0x1B &amp;quot;Secure4&amp;quot; etc.)&lt;br /&gt;
| None&lt;br /&gt;
| [[11.3.0-36|11.3.0-X]]&lt;br /&gt;
| ~April 2015, implemented in May 2015&lt;br /&gt;
| 13 January 2016&lt;br /&gt;
| [[User:WulfyStylez|WulfyStylez]], [[User:Dazzozo|Dazzozo]], [[User:Shinyquagsire23|shinyquagsire23]] (complimentary + implemented), [[User:Plutooo|plutoo]], Normmatt (discovered independently)&lt;br /&gt;
|-&lt;br /&gt;
| enhanced-arm9loaderhax&lt;br /&gt;
| See the 32c3 3ds talk.&lt;br /&gt;
Since this is a combination of a trick with the arm9-bootrom + arm9loaderhax, and since you have to manually write FIRM to the firm0/firm1 NAND partitions, this can&#039;t be completely fixed. Any system with existing ARM9 code execution and an OTP/OTP hash dump can exploit this. Additionally, by using the FIRM partition known-plaintext bug and bruteforcing the second entry in the keystore, this can currently be exploited on all New3DS systems without any other prerequisite hacks.&lt;br /&gt;
| arm9loaderhax which automatically occurs at hard-boot.&lt;br /&gt;
| See arm9loaderhax / description.&lt;br /&gt;
| See arm9loaderhax / description.&lt;br /&gt;
| Theorized around mid July, 2015. Later implemented+tested by [[User:Plutooo|plutoo]] and [[User:Derrek|derrek]].&lt;br /&gt;
| 32c3 3ds talk (December 27, 2015)&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| Missing verification-block for the 9.6 keys (arm9loaderhax)&lt;br /&gt;
| Starting with [[9.6.0-24|9.6.0-X]] a new set of NAND-based keys were introduced. However, no verification block was added to verify that the new key read from NAND is correct. This was technically an issue from [[9.5.0-22|9.5.0-X]] with the original sector+0 keydata, however the below is only possible with [[9.6.0-24|9.6.0-X]] since keyslots 0x15 and 0x16 are generated from different 0x11 keyXs.&lt;br /&gt;
&lt;br /&gt;
Writing an incorrect key to NAND will cause arm9loader to decrypt the ARM9 kernel as garbage and then jump to it.&lt;br /&gt;
&lt;br /&gt;
This allows an hardware-based attack where you can boot into an older exploited firmware, fill all memory with NOP sleds/jump-instructions, and then reboot into executing garbage. By automating this process with various input keydata, eventually you&#039;ll find some garbage that jumps to your code.&lt;br /&gt;
&lt;br /&gt;
This gives very early ARM9 code execution (pre-ARM9 kernel). As such, it is possible to dump RSA keyslots with this and calculate the 6.x [[Savegames#6.0.0-11_Savegame_keyY|save]], and 7.x [[NCCH]] keys. This cannot be used to recover keys initialized by arm9loader itself. This is due to it wiping the area used for its stack during NAND sector decryption and keyslot init. &lt;br /&gt;
&lt;br /&gt;
Due to FIRMs on both Old and New 3DS using the same RSA data, this can be exploited on Old3DS as well, but only if one already has the actual plaintext normalkey from New3DS NAND sector 0x96 offset-0 and has dumped the OTP area of the Old3DS.&lt;br /&gt;
| Recovery of 6.x [[Savegames#6.0.0-11_Savegame_keyY|save key]]/7.x [[NCCH]] key, access to uncleared OTP hash keydata&lt;br /&gt;
| None&lt;br /&gt;
| [[11.3.0-36|11.3.0-X]]&lt;br /&gt;
| March, 2015&lt;br /&gt;
| &lt;br /&gt;
| [[User:Plutooo|plutoo]]&lt;br /&gt;
|-&lt;br /&gt;
| Uncleared New3DS keyslot 0x11&lt;br /&gt;
| Originally the New3DS [[FIRM]] arm9bin loader only cleared keyslot 0x11 when it gets executed at firmlaunch. This was fixed with [[9.5.0-22|9.5.0-X]] by completely clearing keyslot 0x11 immediately after the loader finishes using keyslot 0x11.&lt;br /&gt;
This means that any ARM9 code that can execute before the loader clears the keyslot at firmlaunch(including firmlaunch-hax) can get access to the uncleared keyslot 0x11, which then allows one to generate all &amp;lt;=v9.5 New3DS keyXs which are generated by keyslot 0x11.&lt;br /&gt;
&lt;br /&gt;
Therefore, to completely fix this the loader would have to generate more keys using different keyslot 0x11 keydata. This was done with [[9.6.0-24|9.6.0-X]].&lt;br /&gt;
| New3DS keyXs generation&lt;br /&gt;
| Mostly fixed with [[9.5.0-22|9.5.0-X]], completely fixed with new keys with [[9.6.0-24|9.6.0-X]].&lt;br /&gt;
| &lt;br /&gt;
| February 3, 2015 (one day after [[9.5.0-22|9.5.0-X]] release)&lt;br /&gt;
| &lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Process9 ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Summary&lt;br /&gt;
!  Description&lt;br /&gt;
!  Successful exploitation result&lt;br /&gt;
!  Fixed in [[FIRM]] system version&lt;br /&gt;
!  Last [[FIRM]] system version this flaw was checked for&lt;br /&gt;
!  Timeframe this was discovered&lt;br /&gt;
!  Public disclosure timeframe&lt;br /&gt;
!  Discovered by&lt;br /&gt;
|-&lt;br /&gt;
| Leak of normal-key matching a key-scrambler key&lt;br /&gt;
| New 3DS firmware versions [[8.1.0-0 New3DS|8.1.0]] through [[9.2.0-20|9.2.0]] set the encryption key for [[Amiibo]] data using a hardcoded normal-key in Process9.  In firmware [[9.3.0-21|9.3.0]], Nintendo &amp;quot;fixed&amp;quot; this by using the key scrambler instead, by calculating the keyY value for keyslot 0x39 that results in the same normal-key, then hardcoding that keyY into Process9.&lt;br /&gt;
&lt;br /&gt;
Nintendo&#039;s fix is actually the problem: Nintendo revealed the normal-key matching an unknown keyX and a known keyY.  Combined with the key scrambler using an insecure scrambling algorithm (see &amp;quot;Hardware&amp;quot; above), the key scrambler function could be deduced.&lt;br /&gt;
| Deducing the keyX for keyslot 0x39 and the key scrambler algorithm&lt;br /&gt;
| New 3DS [[9.3.0-21|9.3.0-X]], sort of&lt;br /&gt;
| [[10.0.0-27|10.0.0-X]]&lt;br /&gt;
| Sometime in 2015 after the hardware key-generator was broken.&lt;br /&gt;
| 32c3 3ds talk (December 27, 2015)&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| Leak of normal-key matching a key-generator key&lt;br /&gt;
| During the 3DS&#039; development (June/July 2010) Nintendo added support installing encrypted content ([[CIA]]). Common-key index1 was intended to be a [[AES|hardware generated key]]. However while they added code to generate the key in hardware, they forgot to remove the normal-key for index1 (used elsewhere, likely old debug code). Nintendo later removed the normal key sometime before the first non-prototype firmware release.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Knowing the keyY and the normal-key for common-key index1, the devkit key-generator algorithm can be deduced (see &amp;quot;Hardware&amp;quot; above). Additionally the remaining devkit common-keys can be generated once the common-key keyX is recovered.&lt;br /&gt;
&lt;br /&gt;
Note the devkit key-generator was discovered to be the same as the retail key-generator.&lt;br /&gt;
| Deducing the keyX for keyslot 0x3D and hardware key-generator algorithm. Generate remaining devkit common-keys.&lt;br /&gt;
| pre-[[1.0.0-0|1.0.0-X]]&lt;br /&gt;
| &lt;br /&gt;
| Shortly after the key-generator was revealed to be flawed at the 32c3 3ds talk&lt;br /&gt;
| January 20, 2016&lt;br /&gt;
| [[User:Jakcron|jakcron]]&lt;br /&gt;
|-&lt;br /&gt;
| Factory firmware is vulnerable to sighax&lt;br /&gt;
| During the 3DS&#039;s development, presumably boot9 was written (including the sighax) vulnerability. This vulnerability is also present in factory firmware (and earlier, including 0.11). This was fixed in version 1.0.0-0.&lt;br /&gt;
| Deducing the mechanics of the sighax vulnerability in boot9 without having boot9 prot. Arm9 code execution on factory/earlier firmware.&lt;br /&gt;
| [[1.0.0-0|1.0.0-X]]&lt;br /&gt;
| [[1.0.0-0|1.0.0-X]]&lt;br /&gt;
| May 9, 2017&lt;br /&gt;
| May 19, 2017&lt;br /&gt;
| [[User:SciresM|SciresM]], [[User:Myria|Myria]]&lt;br /&gt;
|-&lt;br /&gt;
| safefirmhax&lt;br /&gt;
| SAFE_MODE_FIRM is almost never updated(even when NATIVE_FIRM is updated for vuln fixes), this can be noticed by &#039;&#039;just&#039;&#039; checking 3dbrew/ninupdates title-listings.&lt;br /&gt;
&lt;br /&gt;
The fix for firmlaunch-hax was only applied to NATIVE_FIRM in [[9.5.0-22|9.5.0-X]], leaving SAFE_FIRM exploitable. With ARM11-kernel execution, one can trigger FIRM-launch in to SAFE_FIRM, do Kernel9 &amp;lt;=&amp;gt; Kernel11 sync, PXI sync and then repeat the original attack on SAFE_FIRM instead.&lt;br /&gt;
| ARM9 code execution&lt;br /&gt;
| [[11.3.0-36|11.3.0-X]]&lt;br /&gt;
| &lt;br /&gt;
| 2012-2013?&lt;br /&gt;
| Wiki: January 2, 2017&lt;br /&gt;
| Everyone&lt;br /&gt;
|-&lt;br /&gt;
| safefirmhax 1.1&lt;br /&gt;
| Nintendo&#039;s original safefirmhax fix was flawed -- they added a global boolean that got set to true whenever a non-sysmodule title got launched (except for a hardcoded repair title id), and panic()&#039;d if that boolean was true to prevent launching safefirm after hax was active. However, because the boolean was initially false after firmlaunch -- With ARM11-kernel execution, one could FIRM-launch into NATIVE_FIRM, and then immediately FIRM-launch again into SAFE_FIRM early in NATIVE_FIRM boot before the boolean got set to true to repeat the safehax attack.&lt;br /&gt;
&lt;br /&gt;
This was fixed by adding additional CFG9_BOOTENV checks to firmlaunch code in 11.4.&lt;br /&gt;
| ARM9 code execution&lt;br /&gt;
| [[11.4.0-37|11.4.0-X]]&lt;br /&gt;
| &lt;br /&gt;
| safefirmhax fix&lt;br /&gt;
| Wiki: April 10, 2017&lt;br /&gt;
| Everyone&lt;br /&gt;
|-&lt;br /&gt;
| ntrcardhax&lt;br /&gt;
| When reading the banner of a NTR title, Process9 relies on a hardware register to know when the banner was fully read.&lt;br /&gt;
However that register is shared between the ARM9 and the ARM11.&lt;br /&gt;
An attacker with k11 control can so make Process9 believe the banner continues forever and so trigger a buffer overflow.&lt;br /&gt;
With a custom banner for a NTR flashcart, this leads to code execution in Process9.&lt;br /&gt;
&lt;br /&gt;
This was fixed by adding bound checks on the read data.&lt;br /&gt;
| ARM9 code execution&lt;br /&gt;
| [[10.4.0-29|10.4.0-X]]&lt;br /&gt;
| &lt;br /&gt;
| March 2015&lt;br /&gt;
| 32c3 3ds talk (December 27, 2015)&lt;br /&gt;
| [[User:Plutooo|plutoo]]&lt;br /&gt;
|-&lt;br /&gt;
| Title downgrading via [[Application_Manager_Services|AM]]([[Application_Manager_Services_PXI|PXI]])&lt;br /&gt;
| When a title is *already* installed, Process9 will compare the installed title-version with the title-version being installed. When the one being installed is older, Process9 would return an error.&lt;br /&gt;
&lt;br /&gt;
However, this can be bypassed by just deleting the title first via the service command(s) for that: with the title removed from the [[Title_Database]], Process9 can&#039;t compare the input title-version with anything. Hence, titles can be downgraded this way.&lt;br /&gt;
&lt;br /&gt;
[[11.0.0-33|11.0.0-X]] fixed this for key system titles (MSET, Home Menu, spider, ErrDisp, SKATER, NATIVE_FIRM, and every retail system module), by checking the version of the title to install against a hard-coded list of (titleID, minimumVersionRequired) pairs.&lt;br /&gt;
| Bypassing title version check at installation, which then allows downgrading any title.&lt;br /&gt;
| [[11.0.0-33|11.0.0-X]], for key system titles.&lt;br /&gt;
| NATIVE_FIRM / AM-sysmodule [[11.0.0-33|11.0.0-X]]&lt;br /&gt;
| ?&lt;br /&gt;
| &lt;br /&gt;
| ?&lt;br /&gt;
|-&lt;br /&gt;
| FAT FS code null-deref&lt;br /&gt;
| When FSFile:Read is used with a file which is corrupted on a FAT filesystem(in particular SD), Process9 can crash. This particular crash is caused by a function returning NULL instead of an actual ptr due to an error. The caller of that function doesn&#039;t check for NULL which then triggers a read based at NULL.&lt;br /&gt;
&lt;br /&gt;
Sample &amp;quot;fsck.vfat -n -v -V &amp;lt;fat image backup&amp;gt;&amp;quot; output for the above crash:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;...&lt;br /&gt;
Starting check/repair pass.&lt;br /&gt;
&amp;lt;FilePath0&amp;gt; and&lt;br /&gt;
&amp;lt;FilePath1&amp;gt;&lt;br /&gt;
 share clusters.&lt;br /&gt;
 Truncating second to 3375104 bytes.&lt;br /&gt;
&amp;lt;FilePath1&amp;gt;&lt;br /&gt;
 File size is 2787392 bytes, cluster chain length is 16384 bytes.&lt;br /&gt;
 Truncating file to 16384 bytes.&lt;br /&gt;
Checking for unused clusters.&lt;br /&gt;
Reclaimed 1 unused cluster (16384 bytes).&lt;br /&gt;
Checking free cluster summary.&lt;br /&gt;
Free cluster summary wrong (1404490 vs. really 1404491)&lt;br /&gt;
 Auto-correcting.&lt;br /&gt;
Starting verification pass.&lt;br /&gt;
Checking for unused clusters.&lt;br /&gt;
Leaving filesystem unchanged.&amp;lt;/pre&amp;gt;&lt;br /&gt;
| Useless null-based-read&lt;br /&gt;
| None&lt;br /&gt;
| [[9.6.0-24|9.6.0-X]]&lt;br /&gt;
| July 8-9, 2015&lt;br /&gt;
| &lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| RSA signature padding checks&lt;br /&gt;
| The TWL_FIRM RSA sig padding check code used for all TWL RSA sig-checks has issues, see [[FIRM|here]].&lt;br /&gt;
The main 3DS RSA padding check code(non-certificate, including NATIVE_FIRM) uses the function used with the above to extract more padding + the actual hash from the additional padding. This isn&#039;t really a problem here because there&#039;s proper padding check code which is executed prior to this.&lt;br /&gt;
| &lt;br /&gt;
| None&lt;br /&gt;
| [[9.5.0-22|9.5.0-X]]&lt;br /&gt;
| March 2015&lt;br /&gt;
| &lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| [[AMPXI:ValidateDSiWareSectionMAC]] [[AES_Registers|AES]] keyslot reuse&lt;br /&gt;
| When the input DSiWare section index is higher than &amp;lt;max number of DSiWare sections supported by this FIRM&amp;gt;, Process9 uses keyid 0x40 for calculating the AESMAC, which translates to keyslot 0x40. The result is that the keyslot is left at whatever was already selected before, since the AES selectkeyslot code will immediately  return when keyslot is &amp;gt;=0x40. However, actually exploiting this is difficult: the calculated AESMAC is never returned, this command just compares the calculated AESMAC with the input AESMAC(result-code depends on whether the AESMACs match). It&#039;s unknown whether a timing attack would work with this.&lt;br /&gt;
This is basically a different form of the pxips9 keyslot vuln, except with AESMAC etc.&lt;br /&gt;
| See description.&lt;br /&gt;
| None&lt;br /&gt;
| [[11.3.0-36|11.3.0-X]]&lt;br /&gt;
| March 15, 2015&lt;br /&gt;
| December 29, 2015&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| pxips9 [[AES_Registers|AES]] keyslot reuse&lt;br /&gt;
| This requires access to the [[Process_Services|ps:ps]]/pxi:ps9 services. One way to get access to this would be snshax on system-version &amp;lt;=10.1.0-X(see 32c3 3ds talk).&lt;br /&gt;
When an invalid key-type value is passed to any of the PS commands, Process9 will try to select keyslot 0x40. That aesengine_setkeyslot() code will then immediately return due to the invalid keyslot value. Since that function doesn&#039;t return any errors, Process9 will just continue to do crypto with whatever AES keyslot was selected before the PS command was sent.&lt;br /&gt;
| Reusing the previously used keyslot, for crypto with PS.&lt;br /&gt;
| None&lt;br /&gt;
| [[11.3.0-36|11.3.0-X]]&lt;br /&gt;
| Roughly the same time(same day?) as firmlaunch-hax.&lt;br /&gt;
| December 29, 2015&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| firmlaunch-hax: FIRM header ToCToU&lt;br /&gt;
| This can&#039;t be exploited from ARM11 userland.&lt;br /&gt;
During [[FIRM]] launch, the only FIRM header the ARM9 uses at all is stored in FCRAM, this is 0x200-bytes(the actual used FIRM RSA signature is read to the Process9 stack however). The ARM9 doesn&#039;t expect &amp;quot;anything&amp;quot; besides the ARM9 to access this data.&lt;br /&gt;
With [[9.5.0-22]] the address of this FIRM header was changed from a FCRAM address, to ARM9-only address 0x01fffc00.&lt;br /&gt;
| ARM9 code execution&lt;br /&gt;
| [[9.5.0-22]]&lt;br /&gt;
| &lt;br /&gt;
| 2012, 3 days after [[User:Yellows8|Yellows8]] started Process9 code RE.&lt;br /&gt;
| &lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| Uninitialized data output for (PXI) command replies&lt;br /&gt;
| PXI commands for various services(including some [[Filesystem_services_PXI|here]] and many others) can write uninitialized data (like from ARM registers) to the command reply. This happens with stubbed commands, but this can also occur with certain commands when returning an error.&lt;br /&gt;
Certain ARM11 service commands have this same issue as well.&lt;br /&gt;
| &lt;br /&gt;
| None&lt;br /&gt;
| [[9.3.0-21|9.3.0-X]]&lt;br /&gt;
| ?&lt;br /&gt;
| &lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| [[Filesystem_services_PXI|FSPXI]] OpenArchive SD permissions&lt;br /&gt;
| Process9 does not use the exheader ARM9 access-mount permission flag for SD at all.&lt;br /&gt;
This would mean ARM11-kernelmode code / fs-module itself could directly use FSPXI to access SD card without ARM9 checking for SD access, but this is rather useless since a process is usually running with SD access(Home Menu for example) anyway.&lt;br /&gt;
| &lt;br /&gt;
| None&lt;br /&gt;
| [[9.3.0-21|9.3.0-X]]&lt;br /&gt;
| 2012&lt;br /&gt;
| &lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| [[AMPXI:ExportDSiWare]] export path&lt;br /&gt;
| Process9 allocates memory on Process9 heap for the export path then verifies that the actual allocated size matches the input size. Then Process9 copies the input path from FCRAM to this buffer, and uses it with the Process9 FS openfile code, which use paths in the form of &amp;quot;&amp;lt;mountpoint&amp;gt;:/&amp;lt;path&amp;gt;&amp;quot;.&lt;br /&gt;
Process9 does not check the contents of this path at all before passing it to the FS code, besides writing a NUL-terminator to the end of the buffer.&lt;br /&gt;
| Exporting of DSiWare to arbitrary Process9 file-paths, such as &amp;quot;nand:/&amp;lt;path&amp;gt;&amp;quot; etc. This isn&#039;t really useful since the data which gets written can&#039;t be controlled.&lt;br /&gt;
| None&lt;br /&gt;
| [[9.5.0-22]]&lt;br /&gt;
| April 2013&lt;br /&gt;
| &lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| [[DSiWare_Exports]] [[CTCert]] verification&lt;br /&gt;
| Just like DSi originally did, 3DS verifies the APCert for DSiWare on SD with the CTCert also in the DSiWare .bin. On DSi this was fixed with with system-version 1.4.2 by verifying with the actual console-unique cert instead(stored in NAND), while on 3DS it&#039;s still not(?) fixed.&lt;br /&gt;
On 3DS however this is useless, unless one can obtain the console-unique movable.sed keyY which encrypts the entire DSiWare .bin.&lt;br /&gt;
| When the movable.sed keyY for the target 3DS is known and the target 3DS CTCert private-key is unknown, importing of modified DSiWare SD .bin files.&lt;br /&gt;
| Unknown, probably none.&lt;br /&gt;
| ?&lt;br /&gt;
| April 2013&lt;br /&gt;
| &lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| movable.sed keyY vulnerable to brute-force&lt;br /&gt;
| Half of the movable.sed keyY&#039;s 128 bits are leaked through the LFCS, which is available in userland and below. The LFCS itself also leaks almost half of the remaining bits by following the ratio: u32 keyY[3]=1/5(LFCS). The remaining keyY[3] uncertainty of about ±2000 can be greatly reduced by plotting expected error margins with several keyYs. This results in a final uncertainty of about 2^40, easily within practical brute force range of an average modern PC.&lt;br /&gt;
| Knowing the keyY of a given 3ds allows for modification of DSiWare export contents, and chained with several other public vulns, ultimately arm9 execution.&lt;br /&gt;
| None.&lt;br /&gt;
| 11.6.0-X&lt;br /&gt;
| December 2017&lt;br /&gt;
| January 2018&lt;br /&gt;
| zoogie&lt;br /&gt;
|-&lt;br /&gt;
| Improper validation of DSiWare title SRLs&lt;br /&gt;
| The 3DS does not verify if the actual SRL embedded in the title&#039;s directory matches the titleID in the TMD before launching it or importing it from an sd DSiWare export. &lt;br /&gt;
| This allows embedding older, exploitable DSiWare titles in completely different, unexploitable DSiWare titles. Since DSiWare has raw NAND RW, this can result in arm9 control through FIRM known-plaintext and sighax attacks.&lt;br /&gt;
| None.&lt;br /&gt;
| 11.6.0-X&lt;br /&gt;
| 2015?&lt;br /&gt;
| December 2016&lt;br /&gt;
| Everyone&lt;br /&gt;
|-&lt;br /&gt;
| [[Gamecard_Services_PXI]] unchecked REG_CTRCARDCNT transfer-size&lt;br /&gt;
| The u8 REG_CTRCARDCNT transfer-size parameter for the [[Gamecard_Services_PXI]] read/write CTRCARD commands is used as an index for an array of u16 values. Before [[5.0.0-11|5.0.0-X]] this u8 value wasn&#039;t checked, thus out-of-bounds reads could be triggered(which is rather useless in this case).&lt;br /&gt;
| Out-of-bounds read for a value which gets written to a register.&lt;br /&gt;
| [[5.0.0-11|5.0.0-X]]&lt;br /&gt;
| &lt;br /&gt;
| 2013?&lt;br /&gt;
| &lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| [[PXI_Registers|PXI]] cmdbuf buffer overrun&lt;br /&gt;
| The Process9 code responsible [[PXI_Registers|PXI]] communications didn&#039;t verify the size of the incoming command before writing it to a C++ member variable. &lt;br /&gt;
| Probably ARM9 code execution&lt;br /&gt;
| [[5.0.0-11|5.0.0-11]]&lt;br /&gt;
| &lt;br /&gt;
| March 2015, original timeframe if any unknown&lt;br /&gt;
| &lt;br /&gt;
| [[User:Plutooo|plutoo]]/[[User:Yellows8|Yellows8]]/maybe others(?)&lt;br /&gt;
|-&lt;br /&gt;
| [[Application_Manager_Services_PXI|PXIAM]] command 0x003D0108(See also [[Application_Manager_Services|this]])&lt;br /&gt;
| When handling this command, Process9 allocates a 0x2800-byte heap buffer, then copies the 4 FCRAM input buffers to this heap buffer without checking the sizes at all(only the buffers with non-zero sizes are copied). Starting with [[5.0.0-11|5.0.0-X]], the total combined size of the input data must be &amp;lt;=0x2800.&lt;br /&gt;
| ARM9 code execution&lt;br /&gt;
| [[5.0.0-11|5.0.0-X]]&lt;br /&gt;
| &lt;br /&gt;
| May 2013&lt;br /&gt;
| &lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| [[Process_Services_PXI|PS RSA]] commands buffer overflows&lt;br /&gt;
| pxips9 cmd1(not accessible via ps:ps) and VerifyRsaSha256: unchecked copy to a buffer in Process9&#039;s .bss, from the input FCRAM buffer. The buffer is located before the pxi cmdhandler threads&#039; stacks. SignRsaSha256 also has a buf overflow, but this isn&#039;t exploitable.&lt;br /&gt;
The buffer for this is the buffer for the signature data. With v5.0, the signature buffer was moved to stack, with a check for the signature data size. When the signature data size is too large, Process9 uses [[SVC|svcBreak]].&lt;br /&gt;
| ARM9 code execution&lt;br /&gt;
| [[5.0.0-11|5.0.0-X]]&lt;br /&gt;
| &lt;br /&gt;
| 2012&lt;br /&gt;
| &lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| [[PXI_Registers|PXI]] pxi_id bad check&lt;br /&gt;
| The Process9 code responsible for [[PXI_Registers|PXI]] communications read pxi_id as a signed char. There were two flaws:&lt;br /&gt;
* They used it as index to a lookup-table without checking the value at all.&lt;br /&gt;
* Another function verified that pxi_id &amp;lt; 7, allowing negative values to pass the check. This would also cause an out-of-range table-lookup.&lt;br /&gt;
| Maybe ARM9 code execution&lt;br /&gt;
| [[3.0.0-5|3.0.0-5]]&lt;br /&gt;
|&lt;br /&gt;
| March 2015, originally 2012 for the first issue at least&lt;br /&gt;
| &lt;br /&gt;
| [[User:Plutooo|plutoo]], [[User:Yellows8|Yellows8]], maybe others(?)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Kernel9 ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Summary&lt;br /&gt;
!  Description&lt;br /&gt;
!  Successful exploitation result&lt;br /&gt;
!  Fixed in [[FIRM]] system version&lt;br /&gt;
!  Last [[FIRM]] system version this flaw was checked for&lt;br /&gt;
!  Timeframe this was discovered&lt;br /&gt;
!  Discovered by&lt;br /&gt;
|-&lt;br /&gt;
| [[CONFIG Registers#CFG_SYSPROT9|CFG_SYSPROT9]] bit1 not set by Kernel9&lt;br /&gt;
| Old versions of Kernel9 never set bit1 of [[CONFIG Registers#CFG_SYSPROT9|CFG_SYSPROT9]]. This leaves the [[OTP Registers|0x10012000]]-region unprotected (this region should be locked early during boot!). Since it&#039;s never locked, you can dump it once you get ARM9 code execution.&lt;br /&gt;
&lt;br /&gt;
From [[3.0.0-5|3.0.0-X]] this was fixed by setting the bit in Kernel9 after poking some registers in that region. On New3DS arm9loader sets this bit instead of Kernel9, which is exploitable through a hardware + software vulnerability (see arm9loaderhax / description).&lt;br /&gt;
&lt;br /&gt;
This flaw resurged when it gained a new practical use: retrieving the OTP data for a New3DS console in order to decrypt the key data used in arm9loader (see enhanced-arm9loaderhax / description). This was performed by downgrading to a vulnerable system version. By accounting for differences in CTR-NAND crypto (0x05 -&amp;gt; 0x04, see partition encryption types [[Flash_Filesystem#NAND_structure|here]]), it is possible to boot a New3DS using Old3DS firmware 1.0-2.X and an Old3DS [[NCSD#NCSD_header|NCSD Header]] to retrieve the required OTP data using this flaw.&lt;br /&gt;
| Dumping of the [[OTP Registers|OTP]] area&lt;br /&gt;
| [[3.0.0-5|3.0.0-X]]&lt;br /&gt;
|&lt;br /&gt;
| February 2015&lt;br /&gt;
| [[User:Plutooo|plutoo]], Normmatt independently&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== ARM11 software ==&lt;br /&gt;
=== Kernel11 ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Summary&lt;br /&gt;
!  Description&lt;br /&gt;
!  Successful exploitation result&lt;br /&gt;
!  Fixed in [[FIRM]] system version&lt;br /&gt;
!  Last [[FIRM]] system version this flaw was checked for&lt;br /&gt;
!  Timeframe this was discovered&lt;br /&gt;
!  Discovered by&lt;br /&gt;
|-&lt;br /&gt;
| [[SVC|svcSetProcessIdealProcessor]] reference count overflow and therefore use-after-free.&lt;br /&gt;
| The SVC receive two arguments: handle and idealprocessor. The handle is used to get the KProcess object and the KProcess-&amp;gt;refCnt gets incremented,later the function check if the KProcess-&amp;gt;mem_type != BASE and if yes, it checks for idealprocessor == 2 or idealprocessor != 3. The problem here is that if you pass the idealprocessor = 3 it won&#039;t meet any condition and return the error 0xD9001BEA without decrement the reference count. &lt;br /&gt;
It can be abused to overflow the KProcess reference count that will lead to an Use-after-free. &lt;br /&gt;
| Before [[11.2.0-35|11.2.0-X]]: reference count overflow and therefore use-after-free.&lt;br /&gt;
| &lt;br /&gt;
| [[11.6.0-39|11.6.0-X]]&lt;br /&gt;
| November 2, 2017&lt;br /&gt;
| [[User:st4rk|st4rk]]&lt;br /&gt;
|-&lt;br /&gt;
| [[SVC|svcGetThreadList]] process reference leak&lt;br /&gt;
| When given a valid process handle (including &amp;lt;code&amp;gt;0xFFFF8001&amp;lt;/code&amp;gt;), svcGetThreadList forgets to decrement the reference count of the underlying [[KProcess]] instance, after having finished using it.&lt;br /&gt;
| Before [[11.2.0-35|11.2.0-X]]: reference count overflow and therefore use-after-free, but this UAF was most likely not exploitable&lt;br /&gt;
| &lt;br /&gt;
| [[11.3.0-36|11.3.0-X]]&lt;br /&gt;
| April 3, 2017&lt;br /&gt;
| [[User:TuxSH|TuxSH]]&lt;br /&gt;
|-&lt;br /&gt;
| kernelhax via gspwn&lt;br /&gt;
| Originally the kernel didn&#039;t initialize [[CONFIG11_Registers#CFG11_GPUPROT|CFG11_GPUPROT]]. Since it&#039;s 0 at hard-boot, this allowed the GPU to access the entire FCRAM + AXIWRAM.&lt;br /&gt;
| Entire FCRAM+AXIWRAM R/W.&lt;br /&gt;
| [[3.0.0-5|3.0.0-X]]&lt;br /&gt;
| &lt;br /&gt;
| February 7, 2017&lt;br /&gt;
| [[User:Plutooo|plutoo]], [[User:Yellows8|Yellows8]] partly&lt;br /&gt;
|-&lt;br /&gt;
| fasthax&lt;br /&gt;
| When a KTimer is created in pulse mode, the kernel calls a virtual function to reset the timer each time it pulses. The scheduler is locked for that core to avoid race conditions, but another core can call CloseHandle on the timer and free it, leading to a UAF vtable call.&lt;br /&gt;
| See description.&lt;br /&gt;
| [[11.3.0-36|11.3.0-X]]&lt;br /&gt;
| [[11.3.0-36|11.3.0-X]]&lt;br /&gt;
| May 2016&lt;br /&gt;
| nedwill&lt;br /&gt;
|-&lt;br /&gt;
| ipctakeover&lt;br /&gt;
| When sending cmdreplies, it does not validate that the src_addr and src_size match the equivalent dst_addr and dst_size. With a modified addr/size specified in a cmdreply for an output buffer, the data-copy for the first/last pages could be used to overwrite data outside of the buffer specified by the original process.&lt;br /&gt;
&lt;br /&gt;
Used by ctr-httpwn as of v1.2, for &amp;quot;ipctakeover/bosshaxx&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
This can be used to takeover processes where the process is using your service session. Like HTTPC -&amp;gt; BOSS, for bosshaxx above. NIM takeover can be done too(actual stack buffer overflow can trigger), etc.&lt;br /&gt;
| See description.&lt;br /&gt;
| None&lt;br /&gt;
| [[11.3.0-36|11.3.0-X]]&lt;br /&gt;
| November 26, 2016&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| Using IPC input buffers as output buffers&lt;br /&gt;
| When sending cmdreplies, it does not validate that the cmdreply descriptor type matches the equivalent cmdreq descriptor type. This could be used by an exploited sysmodule to use what was intended as an input-buffer as an output-buffer, and also combine other IPC vuln(s) with this.&lt;br /&gt;
&lt;br /&gt;
Used by ctr-httpwn as of v1.2, for &amp;quot;ipctakeover/bosshaxx&amp;quot;.&lt;br /&gt;
| See description.&lt;br /&gt;
| None&lt;br /&gt;
| [[11.3.0-36|11.3.0-X]]&lt;br /&gt;
| November 2016&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
|  [[SVC]] table too small&lt;br /&gt;
|  The table of function pointers for SVC&#039;s only contains entries up to 0x7D, but the biggest allowed SVC for the table is 0x7F. Thus, executing SVC7E or SVC7F would make the SVC-handler read after the buffer, and interpret some ARM instructions as function pointers.&lt;br /&gt;
&lt;br /&gt;
However, this would require patching the kernel .text or modifying SVC-access-control. Even if you could get these to execute, they would still jump to memory that isn&#039;t mapped as executable.&lt;br /&gt;
| &lt;br /&gt;
|  None&lt;br /&gt;
| [[11.3.0-36|11.3.0-X]]&lt;br /&gt;
| 2012&lt;br /&gt;
| Everyone&lt;br /&gt;
|-&lt;br /&gt;
|  [[SVC|svcBackdoor (0x7B)]]&lt;br /&gt;
|  This backdoor allows executing SVC-mode code at the user-specified code-address. This is used by Process9, using this on the ARM11 (with NATIVE_FIRM) required patching the kernel .text or modifying SVC-access-control.&lt;br /&gt;
| See description&lt;br /&gt;
| [[11.0.0-33|11.0.0-X]] (deleted)&lt;br /&gt;
| &lt;br /&gt;
|&lt;br /&gt;
| Everyone&lt;br /&gt;
|-&lt;br /&gt;
| veryslowpidhax&lt;br /&gt;
| &#039;&#039;&#039;This is completely different from the kernelmode-code-execution vuln described in the below separate entry.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
When updating the kernel global PID counter under [[SVC|svcCreateProcess]] the kernel does not check for wraparound to 0x0(the PID for the very first process). This only matters because [[Services|SM-module]] allows processes with PID value less than &amp;lt;total ARM11 FIRM modules&amp;gt; to access &#039;&#039;all&#039;&#039; services, without checking exheader service-access-control; and because Kernel11 checks for the PID to be 1 (loader) to use the input mem-region value on ControlMemory. This alone does not affect access the [[SVC|SVCs]] access table at all.&lt;br /&gt;
&lt;br /&gt;
Inlined ldrex+strex code is used for updating the above counter. [[11.2.0-35|11.2.0-X]] had changes for similar code, but it was only for dedicated ldrex+strex functions(mainly for kernel objects) and hence this PID code was not affected.&lt;br /&gt;
&lt;br /&gt;
With launching+terminating a sysmodule repeatedly with this via ns:s, it would take weeks to finish(if not at least about a month?).&lt;br /&gt;
| Access to all [[Services_API|services]], ControlMemory on any given mem-region.&lt;br /&gt;
| None&lt;br /&gt;
| [[11.3.0-36|11.3.0-X]]&lt;br /&gt;
| 2012 maybe?&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
|  slowhax/waithax&lt;br /&gt;
|  svcWaitSynchronizationN does not decrement the references to valid handles in an array before returning an error when it encounters an invalid handle. This allows one to (slowly) overflow the reference count for a handle object to zero.&lt;br /&gt;
| ARM11 kernel-mode code execution&lt;br /&gt;
| [[11.2.0-35|11.2.0-X]]&lt;br /&gt;
| [[11.2.0-35|11.2.0-X]]&lt;br /&gt;
| 2016&lt;br /&gt;
| nedwill, [[User:Derrek|derrek]]&lt;br /&gt;
|-&lt;br /&gt;
| [[Memory_layout#ARM11_Detailed_virtual_memory_map|0xEFF00000]] / 0xDFF00000 ARM11 kernel virtual-memory&lt;br /&gt;
| The ARM11 kernel-mode 0xEFF00000/0xDFF00000 virtual-memory(size 0x100000) is mapped to phys-mem 0x1FF00000(entire DSP-mem + entire AXIWRAM), with permissions RW-. This is used during ARM11 kernel startup for loading the FIRM-modules from the FIRM section located in DSP-mem, this never seems to be used after that, however. This is never unmapped either.&lt;br /&gt;
| &lt;br /&gt;
| None&lt;br /&gt;
| [[11.3.0-36|11.3.0-X]]&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| memchunkhax2.1&lt;br /&gt;
| Nintendo&#039;s fix for memchunkhax2 in [[10.4.0-29|10.4.0-X]] did not fix the GPU case: one may cause the requisite ToCToU race using gspwn, bypassing the new validation.&lt;br /&gt;
derrek&#039;s original 32c3 presentation for memchunkhax2 commented that a GPU-based attack was possible, but would be difficult.  However, memchunkhax2.1 showed that it was possible to do fairly reliably.&lt;br /&gt;
| ARM11 kernel code execution&lt;br /&gt;
| [[11.0.0-33|11.0.0-X]], via the new [[Memory_Management#MemoryBlockHeader|memchunkhdr]] MAC which prevents modifying memchunkhdr data with DMA.&lt;br /&gt;
| [[11.0.0-33|11.0.0-X]]&lt;br /&gt;
|&lt;br /&gt;
| [[User:Derrek|derrek]], aliaspider&lt;br /&gt;
|-&lt;br /&gt;
| memchunkhax2&lt;br /&gt;
| When allocating a block of memory, the &amp;quot;next&amp;quot; pointer of the [[Memory_Management#MemoryBlockHeader|memchunkhdr]] is accessed without being checked after being mapped to userland.&lt;br /&gt;
This allows a race condition, where the process can change the next pointer just before it&#039;s accessed. By pointing the next pointer to a crafted memchunckhdr in the kernel SlabHeap, some of the SlabHeap is allocated to the calling process, allowing to change vtables of kernel objects. &lt;br /&gt;
| ARM11 kernel code execution&lt;br /&gt;
| [[10.4.0-29|10.4.0-X]] (partially, see memchunkhax2.1)&lt;br /&gt;
| [[10.4.0-29|10.4.0-X]]&lt;br /&gt;
|&lt;br /&gt;
| [[User:Derrek|derrek]]&lt;br /&gt;
|-&lt;br /&gt;
| heaphax&lt;br /&gt;
| Can change the size of free memchunk structures stored in FCRAM using DMA, which leads to the ability to allocate memory chunks over already-allocated memory. This can be used in the SYSTEM region to allocate RW memory over any part of the NS system module, which is enough to take it over.&lt;br /&gt;
| Code execution with access to all of NS&#039;s privileges. (including downgrading) Code execution within any applet.&lt;br /&gt;
| [[11.0.0-33|11.0.0-X]], via the new [[Memory_Management#MemoryBlockHeader|memchunkhdr]] MAC which prevents modifying memchunkhdr data with DMA.&lt;br /&gt;
| [[11.0.0-33|11.0.0-X]]&lt;br /&gt;
| April 2015 ?&lt;br /&gt;
| smea&lt;br /&gt;
|-&lt;br /&gt;
| snshax&lt;br /&gt;
| Can force creation of Safe NS process into gspwn-able memory, allowing for takeover.&lt;br /&gt;
| Code execution with access to all of NS&#039;s privileges. (including downgrading)&lt;br /&gt;
| [[10.1.0-27|10.1.0-X]]&lt;br /&gt;
| [[10.1.0-27|10.1.0-X]]&lt;br /&gt;
| April 2015 ?&lt;br /&gt;
| smea&lt;br /&gt;
|-&lt;br /&gt;
|  AffinityMask/processorid validation&lt;br /&gt;
|  With [[10.0.0-27|10.0.0-X]] the following functions were updated: svcGetThreadAffinityMask, svcGetProcessAffinityMask, svcSetProcessAffinityMask, and svcCreateThread. The code changes for all but svcCreateThread are identical.&lt;br /&gt;
The original code with the first 3 did the following: &lt;br /&gt;
* if(u32_processorcount &amp;gt; ~0x80000001)return 0xe0e01bfd;&lt;br /&gt;
* if(s32_processorcount &amp;gt; &amp;lt;total_cores&amp;gt;)return 0xd8e007fd;&lt;br /&gt;
The following code replaced the above:&lt;br /&gt;
* if(u32_processorcount &amp;gt;= &amp;lt;total_cores+1&amp;gt;)return 0xd8e007fd;&lt;br /&gt;
In theory the latter should catch everything that the former did, so it&#039;s unknown if this was really a security issue.&lt;br /&gt;
&lt;br /&gt;
The svcCreateThread changes with [[10.0.0-27|10.0.0-X]] definitely did fix a security issue.&lt;br /&gt;
* Original code: &amp;quot;if(s32_processorid &amp;gt; &amp;lt;total_cores&amp;gt;)return 0xd8e007fd;&amp;quot;&lt;br /&gt;
* New code: &amp;quot;if(s32_processorid &amp;gt;= &amp;lt;total_cores&amp;gt; || s32_processorid &amp;lt;= -4)return 0xd8e007fd;&amp;quot;&lt;br /&gt;
This fixed an off-by-one issue: if one would use processorid=total_cores, which isn&#039;t actually a valid value, svcCreateThread would accept that value on &amp;lt;[[10.0.0-27|10.0.0-X]]. This results in data being written out-of-bounds(baseaddr = arrayaddr + entrysize*processorid), which has the following result:&lt;br /&gt;
* Old3DS: Useless kernel-mode crash due to accessing unmapped memory.&lt;br /&gt;
* New3DS: uncontrolled data write into a kernel-mode L1 MMU-table. This isn&#039;t really useful: the data can&#039;t be controlled, and the data which gets overwritten is all-zero anyway(this isn&#039;t anywhere near MMU L1 entries for actually mapped memory).&lt;br /&gt;
The previous version also allowed large negative s32_processorid values(negative processorid values are special values not actual procids), but it appears using values like that won&#039;t actually do anything(meaning no crash) besides the thread not running / thread not running for a while(besides triggering a kernelpanic with certain s32_processorid value(s)).&lt;br /&gt;
| Nothing useful&lt;br /&gt;
|  [[10.0.0-27|10.0.0-X]]&lt;br /&gt;
| [[10.0.0-27|10.0.0-X]]&lt;br /&gt;
| svcCreateThread issue: May 31, 2015. The rest: September 8, 2015, via v9.6-&amp;gt;v10.0 ARM11-kernel code-diff.&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| memchunkhax&lt;br /&gt;
| The kernel originally did not validate the data stored in the FCRAM kernel heap [[Memchunkhdr|memchunk-headers]] for free-memory at all. Exploiting this requires raw R/W access to these memchunk-headers, like physical-memory access with gspwn.&lt;br /&gt;
&lt;br /&gt;
There are &#039;&#039;multiple&#039;&#039; ways to exploit this, but the end-result for most of these is the same: overwrite code in AXIWRAM via the 0xEFF00000/0xDFF00000 kernel virtual-memory mapping.&lt;br /&gt;
&lt;br /&gt;
This was fixed in [[9.3.0-21|9.3.0-X]] by checking that the memchunk(including size, next, and prev ptrs) is located within the currently used heap memory. The kernel may also check that the next/prev ptrs are valid compared to other memchunk-headers basically. When any of these checks fail, kernelpanic() is called.&lt;br /&gt;
| When combined with other flaws: ARM11-kernelmode code execution&lt;br /&gt;
| [[9.3.0-21|9.3.0-21]]&lt;br /&gt;
| &lt;br /&gt;
| February 2014&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| Multiple [[KLinkedListNode|KLinkedListNode]] SlabHeap use after free bugs&lt;br /&gt;
| The ARM11-kernel did access the &#039;key&#039; field of [[KLinkedListNode|KLinkedListNode]] objects, which are located on the SlabHeap, after freeing them. Thus, triggering an allocation of a new [[KLinkedListNode|KLinkedListNode]] object at the right time could result in a type-confusion. Pseudo-code:&lt;br /&gt;
SlabHeap_free(KLinkedListNode);&lt;br /&gt;
KObject *obj = KLinkedListNode-&amp;gt;key;  // the object there might have changed!&lt;br /&gt;
This bug appeared all over the place.&lt;br /&gt;
| ARM11-kernelmode code exec maybe&lt;br /&gt;
| [[8.0.0-18|8.0.0-18]]&lt;br /&gt;
| &lt;br /&gt;
| April 2015&lt;br /&gt;
| [[User:Derrek|derrek]]&lt;br /&gt;
|-&lt;br /&gt;
| PXI [[RPC_Command_Structure|Command]] input/output buffer permissions&lt;br /&gt;
| Originally the ARM11-kernel didn&#039;t check permissions for PXI input/output buffers for commands. Starting with [[6.0.0-11|6.0.0]] PXI input/output buffers must have RW permissions, otherwise kernelpanic is triggered.&lt;br /&gt;
| &lt;br /&gt;
| [[6.0.0-11|6.0.0-11]]&lt;br /&gt;
| &lt;br /&gt;
| 2012&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| [[SVC|svcStartInterProcessDma]]&lt;br /&gt;
| For svcStartInterProcessDma, the kernel code had the following flaws:&lt;br /&gt;
&lt;br /&gt;
* Originally the ARM11-kernel read the input DmaConfig structure directly in kernel-mode(ldr(b/h) instructions), without checking whether the DmaConfig address is readable under userland. This was fixed by copying that structure to the SVC-mode stack, using the ldrbt instruction.&lt;br /&gt;
&lt;br /&gt;
* Integer overflows for srcaddr+size and dstaddr+size are now checked(with [[6.0.0-11]]), which were not checked before.&lt;br /&gt;
&lt;br /&gt;
* The kernel now also checks whether the srcaddr/dstaddr (+size) is within userland memory (0x20000000), the kernel now (with [[6.0.0-11]]) returns an error when the address is beyond userland memory. Using an address &amp;gt;=0x20000000 would result in the kernel reading from the process L1 MMU table, beyond the memory allocated for that MMU table(for vaddr-&amp;gt;physaddr conversion). &lt;br /&gt;
| &lt;br /&gt;
| [[6.0.0-11]]&lt;br /&gt;
| &lt;br /&gt;
| DmaConfig issue: unknown. The rest: 2014&lt;br /&gt;
| [[User:Plutooo|plutoo]], [[User:Yellows8|Yellows8]] independently&lt;br /&gt;
|-&lt;br /&gt;
| [[SVC|svcControlMemory]] Parameter checks&lt;br /&gt;
| For svcControlMemory the parameter check had these two flaws:&lt;br /&gt;
&lt;br /&gt;
* The allowed range for addr0, addr1, size parameters depends on which MemoryOperation is being specified. The limitation for GSP heap was only checked if op=(u32)0x10003. By setting a random bit in op that has no meaning (like bit17?), op would instead be (u32)0x30003, and the range-check would be less strict and not accurate. However, the kernel doesn&#039;t actually use the input address for LINEAR memory-mapping at all besides the range-checks, so this isn&#039;t actually useful. This was fixed in the kernel by just checking for the LINEAR bit, instead of comparing the entire MemoryOperation value with 0x10003.&lt;br /&gt;
&lt;br /&gt;
* Integer overflows on (addr0+size) are now checked that previously weren&#039;t (this also applies to most other address checks elsewhere in the kernel).&lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
| [[5.0.0-11]]&lt;br /&gt;
| &lt;br /&gt;
|&lt;br /&gt;
| [[User:Plutooo|plutoo]]&lt;br /&gt;
|-&lt;br /&gt;
| [[RPC_Command_Structure|Command]] request/response buffer overflow&lt;br /&gt;
| Originally the kernel did not check the word-values from the command-header. Starting with [[5.0.0-11]], the kernel will trigger a kernelpanic() when the total word-size of the entire command(including the cmd-header) is larger than 0x40-words (0x100-bytes). This allows overwriting threadlocalstorage+0x180 in the destination thread. However, since the data written there would be translate parameters (such as header-words + buffer addresses), exploiting this would likely be very difficult, if possible at all.&lt;br /&gt;
&lt;br /&gt;
If the two words at threadlocalstorage+0x180 could be overwritten with controlled data this way, one could then use a command with a buffer-header of &amp;lt;nowiki&amp;gt;((size&amp;lt;&amp;lt;14) | 2)&amp;lt;/nowiki&amp;gt; to write arbitrary memory to any RW userland memory in the destination process.&lt;br /&gt;
| &lt;br /&gt;
| [[5.0.0-11]]&lt;br /&gt;
| &lt;br /&gt;
| v4.1 FIRM -&amp;gt; v5.0 code diff&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| [[SVC|SVC stack allocation overflows]]&lt;br /&gt;
| &lt;br /&gt;
* Syscalls that allocate a variable-length array on stack, only checked bit31 before multiplying by 4/16 (when calculating how much memory to allocate). If a large integer was passed as input to one of these syscalls, an integer overflow would occur, and too little memory would have been allocated on stack resulting in a buffer overrun. &lt;br /&gt;
* The alignment (size+7)&amp;amp;~7 calculation before allocation was not checked for integer overflow.&lt;br /&gt;
&lt;br /&gt;
This might allow for ARM11 kernel code-execution.&lt;br /&gt;
&lt;br /&gt;
(Applies to svcSetResourceLimitValues, svcGetThreadList, svcGetProcessList, svcReplyAndReceive, svcWaitSynchronizationN.)&lt;br /&gt;
| &lt;br /&gt;
| [[5.0.0-11]]&lt;br /&gt;
| &lt;br /&gt;
| v4.1 FIRM -&amp;gt; v5.0 code diff&lt;br /&gt;
| [[User:Plutooo|plutoo]], [[User:Yellows8|Yellows8]] complementary&lt;br /&gt;
|-&lt;br /&gt;
| [[SVC|svcControlMemory]] MemoryOperation MAP memory-permissions&lt;br /&gt;
| svcControlMemory with MemoryOperation=MAP allows mapping the already-mapped process virtual-mem at addr1, to addr0. The lowest address permitted for addr1 is 0x00100000. Originally the ARM11 kernel didn&#039;t check memory permissions for addr1. Therefore .text as addr1 could be mapped elsewhere as RW- memory, which allowed ARM11 userland code-execution.&lt;br /&gt;
| &lt;br /&gt;
| [[4.1.0-8]]&lt;br /&gt;
| &lt;br /&gt;
| 2012&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| [[RPC_Command_Structure|Command]] input/output buffer permissions&lt;br /&gt;
| Originally the ARM11 kernel didn&#039;t check memory permissions for the input/output buffers for commands. Starting with [[4.0.0-7]] the ARM11 kernel will trigger a kernelpanic() if the input/output buffers don&#039;t have the required memory permissions. For example, this allowed a FSUSER file-read to .text, which therefore allowed ARM11-userland code execution.&lt;br /&gt;
| &lt;br /&gt;
| [[4.0.0-7]]&lt;br /&gt;
| &lt;br /&gt;
| 2012&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| [[SVC|svcReadProcessMemory/svcWriteProcessMemory memory]] permissions&lt;br /&gt;
| Originally the kernel only checked the first page(0x1000-bytes) of the src/dst buffers, for svcReadProcessMemory and svcWriteProcessMemory. There is no known retail processes which have access to these SVCs.&lt;br /&gt;
| &lt;br /&gt;
| [[4.0.0-7]]&lt;br /&gt;
| &lt;br /&gt;
| 2012?&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== [[FIRM]] Sysmodules ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Summary&lt;br /&gt;
!  Description&lt;br /&gt;
!  Successful exploitation result&lt;br /&gt;
!  Fixed in [[FIRM]] system version&lt;br /&gt;
!  Last [[FIRM]] system version this flaw was checked for&lt;br /&gt;
!  Timeframe this was discovered&lt;br /&gt;
!  Discovered by&lt;br /&gt;
|-&lt;br /&gt;
| [[Services|&amp;quot;srv:pm&amp;quot;]] process registration&lt;br /&gt;
| Originally any process had access to the port &amp;quot;srv:pm&amp;quot;. The PID&#039;s used for the (un)registration commands are not checked either. This allowed any process to re-register itself with &amp;quot;srv:pm&amp;quot;, and therefore allowed the process to give itself access to any service, bypassing the exheader service-access-control list.&lt;br /&gt;
&lt;br /&gt;
This was fixed in [[7.0.0-13]]: starting with [[7.0.0-13]] &amp;quot;srv:pm&amp;quot; is now a service instead of a globally accessible port. Only processes with PID&#039;s less than 6 (in other words: fs, ldr, sm, pm, pxi modules) have access to it. With [[7.0.0-13]] there can only be one session for &amp;quot;srv:pm&amp;quot; open at a time(this is used by pm module), svcBreak will be executed if more sessions are opened by the processes which can access this.&lt;br /&gt;
&lt;br /&gt;
This flaw was needed for exploiting the &amp;lt;=v4.x Process9 PXI vulnerabilities from ARM11 userland ROP, since most applications don&#039;t have access to those service(s).&lt;br /&gt;
| Access to arbitrary services&lt;br /&gt;
| [[7.0.0-13]]&lt;br /&gt;
| &lt;br /&gt;
| 2012&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| FSDIR null-deref&lt;br /&gt;
| [[Filesystem_services|FS]]-module may crash in some cases when handling directory reading. The trigger seems to be due to using [[FSDir:Close]] without closing the dir-handle afterwards?(Perhaps this is caused by out-of-memory?) This seems to be useless since it&#039;s just a null-deref.&lt;br /&gt;
| &lt;br /&gt;
| None&lt;br /&gt;
| [[9.6.0-24|9.6.0-X]]&lt;br /&gt;
| May 19(?)-20, 2015&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| [[SM]] out-of-bounds BSS write (table 1 entry too small)&lt;br /&gt;
| After accepting a new session, [[SM]] writes a (handler ID (0 for srv: sessions (max. 64), 1 for the srv:pm one), pointer to session context structure in BSS) pair in a global array. However that array is only 64-entry-big instead of 65 (as it ought to be), and no bound check is done in that regard.&lt;br /&gt;
&lt;br /&gt;
Unfortunately, as of [[11.4.0-37]], the overwritten fields are totally unused after their initialization by &amp;lt;code&amp;gt;__libc_init_array&amp;lt;/code&amp;gt;.&lt;br /&gt;
| Not currently exploitable&lt;br /&gt;
| None&lt;br /&gt;
| [[11.4.0-37]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Standalone Sysmodules ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Summary&lt;br /&gt;
!  Description&lt;br /&gt;
!  Successful exploitation result&lt;br /&gt;
!  Fixed in system-module system-version&lt;br /&gt;
!  Last system-module system-version this flaw was checked for&lt;br /&gt;
!  Timeframe this was discovered&lt;br /&gt;
!  Timeframe this was added to wiki&lt;br /&gt;
!  Discovered by&lt;br /&gt;
|-&lt;br /&gt;
| [[MP:SendDataFrame]] missing input array index validation&lt;br /&gt;
| [[MP:SendDataFrame]] doesn&#039;t validate the input index at cmdreq[1], unless the function for flag=non-zero is executed. This is used to calculate the following, without validating the index at all: someptr = stateptr + (index*0x924) + somestateoffset.&lt;br /&gt;
&lt;br /&gt;
After validating some flags from someptr, when input_flag=0 the input buffer data is copied to someptr+someotheroffset+0x14 with the u16 size loaded from someptr+someotheroffset.&lt;br /&gt;
&lt;br /&gt;
With a large input index someptr could be setup to be at a &amp;lt;target address&amp;gt;, for overwriting memory.&lt;br /&gt;
&lt;br /&gt;
This is probably difficult to exploit.&lt;br /&gt;
| &lt;br /&gt;
| None&lt;br /&gt;
| [[8.0.0-18]](MP-sysmodule v2048)&lt;br /&gt;
| January 22, 2017&lt;br /&gt;
| January 22, 2017&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| [[MP_Services|MP]] cmd1 out-of-bounds handle read&lt;br /&gt;
| MP-sysmodule handles the input parameter for cmd1 as a s32. It checks for &amp;gt;=16, but not &amp;lt;0. With &amp;lt;16 it basically does the following(array of entries 4-bytes each): *outhandle = ((Handle*)(stateptr+offsetinstate))[inputindex].&lt;br /&gt;
&lt;br /&gt;
Hence, this can be used to load any handle in MP-sysmodule memory. MP doesn&#039;t really have any service handles of interest however(can be obtained from elsewhere too).&lt;br /&gt;
| Reading any handle in MP-sysmodule memory.&lt;br /&gt;
| None&lt;br /&gt;
| [[8.0.0-18]](MP-sysmodule v2048)&lt;br /&gt;
| January 21, 2017&lt;br /&gt;
| January 22, 2017&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| AM stack/.bss infoleak via [[AM:ReadTwlBackupInfo]]([[AM:ReadTwlBackupInfoEx|Ex]])&lt;br /&gt;
| After writing the output-info structure to stack, it then copies that structure to the output buffer ptr using the size from the command. The size is not checked. This could be used to read data from the AM-service-thread stack handling the command + .bss.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;This was not tested on hardware.&#039;&#039;&#039;&lt;br /&gt;
| Stack/.bss reading&lt;br /&gt;
| None&lt;br /&gt;
| [[10.0.0-27]](AM v9217)&lt;br /&gt;
| Roughly October 17, 2016&lt;br /&gt;
| October 25, 2016&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| [[MVD_Services|MVD]]: Stack buffer overflow with [[MVDSTD:SetupOutputBuffers]].&lt;br /&gt;
| The input total_entries is not validated when initially processing the input entry-list. This fixed-size input entry-list is copied to stack from the command request. The loop for processing this initializes a global table, the converted linearmem-&amp;gt;physaddrs used there are also copied to stack(0x8-bytes of physaddrs per entry).&lt;br /&gt;
&lt;br /&gt;
If total_entries is too large, MVD-sysmodule will crash due to reading unmapped memory following the stack(0x10000000). Afterwards if the out-of-bounds total_entries is smaller than that, it will crash due accessing address 0x0, hence this useless.&lt;br /&gt;
| MVD-sysmodule crash.&lt;br /&gt;
| None&lt;br /&gt;
| [[9.0.0-20]]&lt;br /&gt;
| April 22, 2016 (Tested on the 25th)&lt;br /&gt;
| April 25, 2016&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| [[NWM_Services|NWM]]: Using CTRSDK heap with UDS sharedmem from the user-process.&lt;br /&gt;
| See the HTTP-sysmodule section below.&lt;br /&gt;
&lt;br /&gt;
CTRSDK heap is used with the sharedmem from [[NWMUDS:InitializeWithVersion]]. Buffers are allocated/freed under this heap using [[NWMUDS:Bind]] and [[NWMUDS:Unbind]].&lt;br /&gt;
&lt;br /&gt;
Hence, overwriting sharedmem with gspwn then using [[NWMUDS:Unbind]] results in the usual controlled CTRSDK memchunk-header write, similar to HTTP-sysmodule.&lt;br /&gt;
&lt;br /&gt;
This could be done by creating an UDS network, without any other nodes on the network.&lt;br /&gt;
&lt;br /&gt;
Besides CTRSDK memchunk-headers, there are no addresses stored under this sharedmem.&lt;br /&gt;
| ROP under NWM-module.&lt;br /&gt;
| [[11.4.0-37|11.4.0-X]]&lt;br /&gt;
| [[9.0.0-20|9.0.0-X]]&lt;br /&gt;
| April 10, 2016&lt;br /&gt;
| April 16, 2016&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| [[DLP_Services|DLP]]: Out-of-bounds memory access during spectator [[Download_Play|data-frame]] checksum calculation&lt;br /&gt;
| DLP doesn&#039;t validate the frame_size when receiving spectator data-frames at all, unlike non-spectator data-frames. The actual spectator data-frame parsing code doesn&#039;t use that field either. However, the data-frame checksum calculation code called during checksum verification does use the frame_size for loading the size of the framebuf.&lt;br /&gt;
&lt;br /&gt;
Hence, using a large frame_size like 0xFFFF will result in the checksum calculation code reading data out-of-bounds. This isn&#039;t really useful, you could trigger a remote local-WLAN DLP-sysmodule crash while a 3DS system is scanning for DLP networks(due to accessing unmapped memory), but that&#039;s about all(trying to infoleak with this likely isn&#039;t useful either).&lt;br /&gt;
| DLP-sysmodule crash, handled by dlplay system-application by a &amp;quot;connection interrupted&amp;quot; error eventually then a fatal-error via ErrDisp.&lt;br /&gt;
| None&lt;br /&gt;
| [[10.0.0-27|10.0.0-X]]&lt;br /&gt;
| April 8, 2016 (Tested on the 10th)&lt;br /&gt;
| April 10, 2016&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| [[DLP_Services|DLP]]: Out-of-bounds output data writing during spectator sysupdate titlelist [[Download_Play|data-frame]] handling&lt;br /&gt;
| The total_entries and out_entryindex fields for the titlelist DLP spectator data-frames are not validated. This is parsed during DLP network scanning. Hence, the specified titlelist data can be written out-of-bounds using the specified out_entryindex and total_entries. A crash will occur while reading the input data-frame titlelist if total_entries is larger than 0x27A, due to accessing unmapped memory.&lt;br /&gt;
&lt;br /&gt;
There&#039;s not much non-zero data to overwrite following the output buffer(located in sharedmem), any ptrs are located in sharedmem. Overwriting certain ptr(s) are only known to cause a crash when attempting to use the DLP-client shutdown service-command.&lt;br /&gt;
&lt;br /&gt;
There&#039;s no known way to exploit the above crash, since the linked-list code involves writes zeros(with a controlled start ptr).&lt;br /&gt;
| &lt;br /&gt;
| None&lt;br /&gt;
| [[10.0.0-27|10.0.0-X]]&lt;br /&gt;
| April 8-9, 2016&lt;br /&gt;
| April 10, 2016&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| [[IR_Services|IR]]: Stack buffer overflow with custom hardware&lt;br /&gt;
| Originally IR sysmodule used the read value from the I2C-IR registers TXLVL and RXLVL without validating them at all. See [[10.6.0-31|here]] for the fix. This is the size used for reading the data-recv FIFO, etc. The output buffer for reading is located on the stack.&lt;br /&gt;
&lt;br /&gt;
This should be exploitable if one could successfully setup the custom hardware for this and if the entire intended sizes actually get read from I2C.&lt;br /&gt;
| ROP under IR sysmodule.&lt;br /&gt;
| [[10.6.0-31|10.6.0-31]]&lt;br /&gt;
| &lt;br /&gt;
| February 23, 2016 (Unknown if it was noticed before then)&lt;br /&gt;
| February 23, 2016&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| [[HTTP_Services|HTTP]]: Using CTRSDK heap with sharedmem from the user-process.&lt;br /&gt;
| The data from httpcAddPostDataAscii and other commands is stored under a CTRSDK heap. That heap is the sharedmem specified by the user-process via the HTTPC Initialize command.&lt;br /&gt;
Normally this sharedmem isn&#039;t accessible to the user-process once the sysmodule maps it, hence using it is supposed to be &amp;quot;safe&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
This isn&#039;t the case due to gspwn however. Since CTRSDK heap code is so insecure in general, one can use gspwn to locate the HTTPC sharedmem + read/write it, then trigger a mem-write under the sysmodule. This can then be used to get ROP going under HTTP-sysmodule.&lt;br /&gt;
&lt;br /&gt;
This is exploited by [https://github.com/yellows8/ctr-httpwn/ctr-httpwn ctr-httpwn].&lt;br /&gt;
| ROP under HTTP sysmdule.&lt;br /&gt;
| [[11.4.0-37|11.4.0-X]]&lt;br /&gt;
| [[9.6.0-24|9.6.0-X]] (Latest sysmodule version as of [[10.7.0-32|10.7.0-32]])&lt;br /&gt;
| Late 2015&lt;br /&gt;
| March 22, 2016&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| [[NIM_Services|NIM]]: Downloading old title-versions from eShop&lt;br /&gt;
| Multiple NIM service commands(such as [[NIMS:StartDownload]]) use a title-version value specified by the user-process, NIM does not validate that this input version matches the latest version available via SOAP. Therefore, when combined with AM(PXI) [[#Process9|title-downgrading]] via deleting the target eShop title with System Settings Data Management(if the title was already installed), this allows downloading+installing any title-version from eShop &#039;&#039;if&#039;&#039; it&#039;s still available from CDN.&lt;br /&gt;
The easiest way to exploit this is to just patch the eShop system-application code using these NIM commands(ideally the code which loads the title-version).&lt;br /&gt;
&lt;br /&gt;
Originally this was tested with a debugging-system via modded-FIRM, eventually smea implemented it in HANS for the 32c3 release.&lt;br /&gt;
| Downloading old title-versions from eShop&lt;br /&gt;
| None&lt;br /&gt;
| [[10.0.0-27|10.0.0-X]]&lt;br /&gt;
| October 24, 2015 (Unknown when exactly the first eShop title downgrade was actually tested, maybe November)&lt;br /&gt;
| January 7, 2016 (Same day Ironfall v1.0 was removed from CDN via the main-CXI files)&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| [[SPI_Services|SPI]] service out-of-bounds write&lt;br /&gt;
| cmd1 has out-of-bounds write allowing overwrite of some static variables in .data.&lt;br /&gt;
| &lt;br /&gt;
| None&lt;br /&gt;
| [[9.5.0-22]]&lt;br /&gt;
| March 2015&lt;br /&gt;
| &lt;br /&gt;
| [[User:Plutooo|plutoo]]&lt;br /&gt;
|-&lt;br /&gt;
| [[NFC_Services|NFC]] module service command buf-overflows&lt;br /&gt;
| NFC module copies data with certain commands, from command input buffers to stack without checking the size. These commands include the following, it&#039;s unknown if there&#039;s more commands with similar issues: &amp;quot;nfc:dev&amp;quot; &amp;lt;0x000C....&amp;gt; and &amp;quot;nfc:s&amp;quot; &amp;lt;0x0037....&amp;gt;.&lt;br /&gt;
Since both of these commands are stubbed in the Old3DS NFC module from the very first version(those just return an error), these issues only affect the New3DS NFC module.&lt;br /&gt;
&lt;br /&gt;
There&#039;s no known retail titles which have access to either of these services.&lt;br /&gt;
| ROP under NFC module.&lt;br /&gt;
| New3DS: None&lt;br /&gt;
| New3DS: [[9.5.0-22]]&lt;br /&gt;
| December 2014?&lt;br /&gt;
| &lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| [[News_Services|NEWSS]] service command notificationID validation failure&lt;br /&gt;
| This module does not validate the input notificationID for &amp;lt;nowiki&amp;gt;&amp;quot;news:s&amp;quot;&amp;lt;/nowiki&amp;gt; service commands. This is an out-of-bounds array index bug. For example, [[NEWSS:SetNotificationHeader]] could be used to exploit news module: this copies the input data(size is properly checked) to: out = newsdb_savedata+0x10 + (someu32array[notificationID]*0x70).&lt;br /&gt;
| ROP under news module.&lt;br /&gt;
| None&lt;br /&gt;
| [[9.7.0-25|9.7.0-X]]&lt;br /&gt;
| December 2014&lt;br /&gt;
| &lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| [[NWMUDS:DecryptBeaconData]] heap buffer overflow&lt;br /&gt;
| input_size = 0x1E * &amp;lt;value the u8 from input_[[NWM_Services|networkstruct]]+0x1D&amp;gt;. Then input_tag0 is copied to a heap buffer. When input_size is larger than 0xFA-bytes, it will then copy input_tag1 to &amp;lt;end_address_of_previous_outbuf&amp;gt;, with size=input_size-0xFA.&lt;br /&gt;
&lt;br /&gt;
This can be triggered by either using this command directly, or by boadcasting a wifi beacon which triggers it while a 3DS system running the target process is in range, when the process is scanning for hosts to connect to. Processes will only pass tag data to this command when the wlancommID and other thing(s) match the values for the process.&lt;br /&gt;
&lt;br /&gt;
There&#039;s no known way to actually exploit this for getting ROP under NWM-module, at the time of originally adding this to the wiki. This is because the data which gets copied out-of-bounds *and* actually causes crash(es), can&#039;t be controlled it seems(with just broadcasting a beacon at least). It&#039;s unknown whether this could be exploited from just using NWMUDS service-cmd(s) directly.&lt;br /&gt;
| Without any actual way to exploit this: NWM-module DoS, resulting in process termination(process crash). This breaks *everything* involving wifi comms, a reboot is required to recover from this.&lt;br /&gt;
| None&lt;br /&gt;
| [[9.0.0-20]]&lt;br /&gt;
| ~September 23, 2014(see the [[NWMUDS:DecryptBeaconData]] page history)&lt;br /&gt;
| August 3, 2015&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| [[HID_Services|HID]] module shared-mem&lt;br /&gt;
| HID module does not validate the index values in [[HID_Shared_Memory|sharedmem]](just changes index to 0 when index == maxval when updating), therefore large values will result in HID module writing HID data to arbitrary addresses.&lt;br /&gt;
| ROP under HID module, but this is *very* unlikely to be exploitable since the data written is HID data.&lt;br /&gt;
| None&lt;br /&gt;
| [[9.3.0-21]]&lt;br /&gt;
| 2014?&lt;br /&gt;
| &lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| gspwn&lt;br /&gt;
| GSP module does not validate addresses given to the GPU. This allows a user-mode application/applet to read/write to a large part of physical FCRAM using GPU DMA. From this, you can overwrite the .text segment of the application you&#039;re running under, and gain real code-execution from a ROP-chain. Normally applets&#039; .text([[Home Menu]], [[Internet Browser]], etc) is located beyond the area accessible by the GPU, except for [[RO_Services|CROs]] used by applets([[Internet Browser]] for example).&lt;br /&gt;
&lt;br /&gt;
FCRAM is gpu-accessible up to physaddr 0x26800000 on Old3DS, and 0x2D800000 on New3DS. This is BASE_memregion_start(aka SYSTEM_memregion_end)-0x400000 (0x800000 with New3DS) with the default memory-layout on Old3DS/New3DS. With [[11.3.0-36|11.3.0-X]] the cutoff now varies due to the new [[SVC]] 0x59. The New3DS &amp;quot;normal&amp;quot;(non-APPLICATION) cutoff was changed to 0x2D000000 due to the new [[SVC]] 0x59.&lt;br /&gt;
| User-mode code execution.&lt;br /&gt;
| None&lt;br /&gt;
| [[9.6.0-24|9.6.0-X]]&lt;br /&gt;
| Early 2014&lt;br /&gt;
| &lt;br /&gt;
| smea, [[User:Yellows8|Yellows8]]/others before then&lt;br /&gt;
|-&lt;br /&gt;
| rohax&lt;br /&gt;
| Using gspwn, it is possible to overwrite a loaded [[CRO0]]/[[CRR0]] after its RSA-signature has been validated. Badly validated [[CRO0]] header leads to arbitrary read/write of memory in the ro-process. This gives code-execution in the ro module, who has access to [[SVC|syscalls]] 0x70-0x72, 0x7D.&lt;br /&gt;
&lt;br /&gt;
This was fixed after [[ninjhax]] release by adding checks on [[CRO0]]-based pointers before writing to them.&lt;br /&gt;
| Memory-mapping syscalls.&lt;br /&gt;
| [[9.3.0-21]]&lt;br /&gt;
| [[9.4.0-21]]&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| smea, [[User:Plutooo|plutoo]] joint effort&lt;br /&gt;
|-&lt;br /&gt;
| Region free&lt;br /&gt;
| Only [[Home Menu]] itself checks gamecards&#039; region when launching them. Therefore, any application launch that is done directly with [[NS]] without signaling Home Menu to launch the app, will result in region checks being bypassed.&lt;br /&gt;
This essentially means launching the gamecard with the [[NS_and_APT_Services|&amp;quot;ns:s&amp;quot;]] service. The main way to exploit this is to trigger a FIRM launch with an application specified, either with a normal FIRM launch or a hardware [[NSS:RebootSystem|reboot]].&lt;br /&gt;
| Launching gamecards from any region + bypassing Home Menu gamecard-sysupdate installation&lt;br /&gt;
| None&lt;br /&gt;
| Last tested with [[10.1.0-27|10.1.0-X]].&lt;br /&gt;
| June(?) 2014&lt;br /&gt;
| &lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| [[NWM_Services|NWM]] service-cmd state null-ptr deref&lt;br /&gt;
| The NWMUDS service command code loads a ptr from .data, adds an offset to that, then passes that as the state address for the actual command-handler function. The value of the ptr loaded from .data is not checked, therefore this will cause crashes due to that being 0x0 when NWMUDS was not properly initialized.&lt;br /&gt;
It&#039;s unknown whether any NWM services besides NWMUDS have this issue.&lt;br /&gt;
| This is rather useless since it&#039;s only a crash caused by a state ptr based at 0x0.&lt;br /&gt;
| None&lt;br /&gt;
| [[9.0.0-20]]&lt;br /&gt;
| 2013?&lt;br /&gt;
| &lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== General/CTRSDK ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Summary&lt;br /&gt;
!  Description&lt;br /&gt;
!  Successful exploitation result&lt;br /&gt;
!  Fixed in version&lt;br /&gt;
!  Last version this flaw was checked for&lt;br /&gt;
!  Timeframe this was discovered&lt;br /&gt;
!  Discovered by&lt;br /&gt;
|-&lt;br /&gt;
| [[NWM_Services|UDS]] beacon additional-data buffer overflow&lt;br /&gt;
| Originally CTRSDK did not validate the UDS additional-data size before using that size to copy the additional-data to a [[NWM_Services|networkstruct]]. This was eventually fixed.&lt;br /&gt;
This was discovered while doing code RE with an old dlp-module version. It&#039;s unknown in what specific CTRSDK version this was fixed, or even what system-version updated titles with a fixed version.&lt;br /&gt;
&lt;br /&gt;
It&#039;s unknown if there&#039;s any titles using a vulnerable CTRSDK version which are also exploitable with this(dlp module can&#039;t be exploited with this).&lt;br /&gt;
&lt;br /&gt;
The maximum number of bytes that can be written beyond the end of the outbuf is 0x37-bytes, with additionaldata_size=0xFF.&lt;br /&gt;
| Perhaps ROP, very difficult if possible with anything at all&lt;br /&gt;
| ?&lt;br /&gt;
| &lt;br /&gt;
| September(?) 2014&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| CTPK buffer overflow&lt;br /&gt;
| At offset 0x20 in CTPK is an array for each texture, each entry is 0x20-bytes. This contains a wordindex(entry+0x18) for some srcdata relative to CTPK+0, and an u8 wordsize(entry+0x14) for this data. The CTRSDK function handling this doesn&#039;t validate the size, when copying srcdata using this size to the output buffer. Applications usually have the output buffer on the stack, hence stack buffer overflow.&lt;br /&gt;
&lt;br /&gt;
While CTPK(*.ctpk) are normally only loaded from RomFS, some application(s) load from elsewhere too.&lt;br /&gt;
| ROP under the target application.&lt;br /&gt;
| None?&lt;br /&gt;
| &amp;quot;[SDK+NINTENDO:CTR_SDK-11_4_0_200_none]&amp;quot;&lt;br /&gt;
| November 14, 2016&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>EvilFlight</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=3DS_System_Flaws&amp;diff=20583</id>
		<title>3DS System Flaws</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=3DS_System_Flaws&amp;diff=20583"/>
		<updated>2018-02-01T05:56:00Z</updated>

		<summary type="html">&lt;p&gt;EvilFlight: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Exploits are used to execute unofficial code (homebrew) on the Nintendo 3DS. This page is a list of publicly known system flaws, for userland applications/applets flaws see [[3DS_Userland_Flaws|here]].&lt;br /&gt;
&lt;br /&gt;
=Stale / Rejected Efforts=&lt;br /&gt;
* Neimod has been working on a RAM dumping setup for a little while now. He&#039;s de-soldered the 3DS&#039;s RAM chip and hooked it and the RAM pinouts on the 3DS&#039; PCB up to a custom RAM dumping setup. A while ago he published photos showing his setup to be working quite well, with the 3DS successfully booting up. However, his flickr stream is now private along with most of his work.&lt;br /&gt;
&lt;br /&gt;
* Someone (who will remain unnamed) has released CFW and CIA installers, all of which is copied from the work of others, or copyrighted material.&lt;br /&gt;
&lt;br /&gt;
==Tips and info==&lt;br /&gt;
The 3DS uses the XN feature of the ARM11 processor. There&#039;s no official way from applications to enable executable permission for memory containing arbitrary unsigned code(there&#039;s a [[SVC]] for this, but only [[RO_Services|RO-module]] has access to it). A usable userland exploit would still be useful: you could only do return-oriented-programming with it initially. From ROP one could then exploit system flaw(s), see below.&lt;br /&gt;
&lt;br /&gt;
SD card [[extdata]] and SD savegames can be attacked, for consoles where the console-unique [[Nand/private/movable.sed|movable.sed]] was dumped(accessing SD data is far easier by running code on the target 3DS however).&lt;br /&gt;
&lt;br /&gt;
=System flaws=&lt;br /&gt;
== Hardware ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Summary&lt;br /&gt;
!  Description&lt;br /&gt;
!  Fixed with hardware model/revision&lt;br /&gt;
!  Newest hardware model/revision this flaw was checked for&lt;br /&gt;
!  Timeframe this was discovered&lt;br /&gt;
!  Discovered by&lt;br /&gt;
|-&lt;br /&gt;
| ARM9/ARM11 bootrom vectors point at uninitialized RAM&lt;br /&gt;
| ARM9&#039;s and ARM11&#039;s exception vectors are hardcoded to point at the CPU&#039;s internal memory (0x08000000 region for ARM9, AXIWRAM for ARM11). While the bootrom does set them up to point to an endless loop at some point during boot, it does not do so immediately. As such, a carefully-timed fault injection (via hardware) to trigger an exception (such as an invalid instruction) will cause execution to fall into ARM9 RAM. &lt;br /&gt;
Since RAM isn&#039;t cleared on boot (see below), one can immediately start execution of their own code here to dump bootrom, OTP, etc.&lt;br /&gt;
The ARM9 bootrom does the following at reset:  reset vector branches to another instruction, then branches to bootrom+0x8000. Hence, there&#039;s no way to know for certain when exactly the ARM9 exception-vector data stored in memory gets initialized.&lt;br /&gt;
&lt;br /&gt;
This requires *very* *precise* timing for triggering the hardware fault.&lt;br /&gt;
&lt;br /&gt;
It has been exploited by derrek to dump the ARM9 bootrom as of Summer 2015.&lt;br /&gt;
| None: all available 3DS models at the time of writing have the exact same ARM9/ARM11 bootrom for the unprotected areas.&lt;br /&gt;
| New3DS&lt;br /&gt;
| End of February 2014&lt;br /&gt;
| [[User:Derrek|derrek]], WulfyStylez (May 2015) independently&lt;br /&gt;
|-&lt;br /&gt;
| Missing AES key clearing&lt;br /&gt;
| The hardware AES engine does not clear keys when doing a hard reset/reboot.&lt;br /&gt;
| None&lt;br /&gt;
| New3DS&lt;br /&gt;
| August 2014&lt;br /&gt;
| Mathieulh/Others&lt;br /&gt;
|-&lt;br /&gt;
| No RAM clearing on reboots&lt;br /&gt;
| On an MCU-triggered reboot all RAM including FCRAM/ARM9 memory/AXIWRAM/VRAM keeps its contents.&lt;br /&gt;
| None&lt;br /&gt;
| New3DS&lt;br /&gt;
| March 2014&lt;br /&gt;
| [[User:Derrek|derrek]]&lt;br /&gt;
|-&lt;br /&gt;
| 32bits of actual console-unique TWLNAND keydata&lt;br /&gt;
| On retail the 8-bytes at ARM9 address [[Memory_layout|0x01FFB808]] are XORed with hard-coded data, to generate the TWL console-unique keys, including TWLNAND. On Old3DS the high u32 is always 0x0, while on New3DS that u32 is always 0x2. On top of this, the lower u32&#039;s highest bit is always ORed. only 31 bits of the TWL console-unique keydata / TWL consoleID are actually console-unique.&lt;br /&gt;
This allows one to easily bruteforce the TWL console-unique keydata with *just* data from TWLNAND. On DSi the actual console-unique data for key generation is 8-bytes(all bytes actually set).&lt;br /&gt;
| None&lt;br /&gt;
| New3DS&lt;br /&gt;
| 2012?&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| DSi / 3DS-TWL key-generator&lt;br /&gt;
| After using the key generator to generate the normal-key, you could overwrite parts of the normal-key with your own data and then recover the key-generator output by comparing the new crypto output with the original crypto output. From the normal-key outputs, you could deduce the TWL key-generator function.&lt;br /&gt;
This applies to the keyX/keyY too.&lt;br /&gt;
&lt;br /&gt;
This attack does not work for the 3DS key-generator because keyslots 0-3 are only for TWL keys.&lt;br /&gt;
| None&lt;br /&gt;
| New3DS&lt;br /&gt;
| 2011&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| 3DS key-generator&lt;br /&gt;
| The algorithm for generating the normal-keys for keyslots is cryptographically weak.  As a result, it is easily susceptible to differential cryptanalysis if the normal-key corresponding to any scrambler-generated keyslot is discovered.&lt;br /&gt;
&lt;br /&gt;
Several such pairs of matching normal-keys and KeyY values were found, leading to deducing the key-generator function.&lt;br /&gt;
| None&lt;br /&gt;
| New3DS&lt;br /&gt;
| February 2015&lt;br /&gt;
| [[User:Yellows8|Yellows8]], [[User:Plutooo|plutoo]]&lt;br /&gt;
|-&lt;br /&gt;
| FIRM partitions known-plaintext&lt;br /&gt;
| The [[Flash_Filesystem|FIRM partitions]] are encrypted with AES-CTR without a MAC. Since this works by XOR&#039;ing data with a static (per-console in this case) keystream, one can deduce the keystream of a portion of each FIRM partition if they have the actual FIRM binary stored in it.&lt;br /&gt;
&lt;br /&gt;
This can be paired with many exploits. For example, it allows minor FIRM downgrades (i.e. 10.4 to 9.6 or 9.5 to 9.4, but not 9.6 to 9.5).&lt;br /&gt;
&lt;br /&gt;
This can be somewhat addressed by having a FIRM header skip over previously used section offsets, but this would just air-gap newer FIRMs without fixing the core bug. This can also only be done a limited number of times due to the size of FIRM versus the size of the partitions.&lt;br /&gt;
| None&lt;br /&gt;
| New3DS&lt;br /&gt;
| &lt;br /&gt;
| Everyone&lt;br /&gt;
|-&lt;br /&gt;
| RSA keyslots don&#039;t clear exponent when setting modulus&lt;br /&gt;
| The [[RSA_Registers|RSA keyslots]] are set by boot ROM to have four private RSA keys.  The exponent value in the RSA registers is write-only and not readable.&lt;br /&gt;
&lt;br /&gt;
However, when setting a keyslot&#039;s modulus, the RSA hardware leaves the exponent alone.  This allows retrieving the exponent by doing a discrete logarithm of the output.&lt;br /&gt;
&lt;br /&gt;
By setting the modulus to a prime number whose modular multiplicative order is &amp;quot;smooth&amp;quot; (that is, p-1 is divisible by only small prime numbers), discrete logarithms can be calculated quickly using the [[wikipedia:Pohlig-Hellman algorithm|Pohlig-Hellman algorithm]].  If the prime chosen is greater than the modulus, but the same bit size, the discrete logarithm is the private exponent.&lt;br /&gt;
&lt;br /&gt;
This exploit&#039;s usefulness is limited: RSA keyslot 0 is only used in current firmware for deriving the 6.x save and 7.x NCCH keys, which were already known, and the other three keyslots are entirely unused.  Additionally, with a boot ROM dump, this exploit is moot; these private keys are located in the protected ARM9 boot ROM.&lt;br /&gt;
| None&lt;br /&gt;
| New3DS&lt;br /&gt;
| March 2016&lt;br /&gt;
| [[User:Myria|Myria]]&lt;br /&gt;
|-&lt;br /&gt;
| Boot9 AES keyinit function issues&lt;br /&gt;
| [[Bootloader|Boot9]] seems to have two bugs in the AES key-init function, see [[AES_Registers#AES_key-init|here]].&lt;br /&gt;
| None&lt;br /&gt;
| BootROM issue.&lt;br /&gt;
| 2015&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| [[CONFIG11_Registers#CFG11_GPUPROT|CFG11_GPUPROT]] allowing acccess to AXIWRAM/FCRAM-BASE-memregion&lt;br /&gt;
| [[CONFIG11_Registers#CFG11_GPUPROT|CFG11_GPUPROT]] can be configured by anything with access to it to allow the GPU to access the entire AXIWRAM+FCRAM. For example, this is an issue for any sysmodule that gets exploited and has access to this register memory-page(include one that&#039;s listed below).&lt;br /&gt;
&lt;br /&gt;
See also &amp;quot;kernelhax via gspwn&amp;quot; below.&lt;br /&gt;
| None&lt;br /&gt;
| New3DS&lt;br /&gt;
| February 7, 2017&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| sighax: Boot9 improper PKCS #1 v1.5 signature validation&lt;br /&gt;
| The [[Flash_Filesystem|FIRM partitions]] are signed with RSA-2048 using SHA-256 and PKCS #1 v1.5 padding.  Boot9, however, does improper validation of the padding in three ways:&lt;br /&gt;
# Boot9 permits block type 02, meant for encrypted messages, to be used for signatures.  Only 01, for signatures, should have been permitted.  As a result, a signature block is not required to have a long string of FF bytes as padding, but rather any random values suffice.  While correct for encryption, this severely lessens security of signatures.&lt;br /&gt;
# Boot9 does not require that the length of the padding fill out the signature block completely.  As a result, there is considerable freedom in the layout of a signature.&lt;br /&gt;
# Boot9 fails to do bounds checking in its parsing of the DER-encoded hash algorithm type and hash value; the length values given in DER are permitted to point outside the signature block.&lt;br /&gt;
Flaw 3 allows the DER encoding to be such that boot9 believes that the signature&#039;s hash value is outside the range of the block itself, somewhere on the stack.  This can be pointed at the correct hash value it computes.  Boot9 then memcmp&#039;s the calculated hash against itself, and thinks that the hash is valid.&lt;br /&gt;
&lt;br /&gt;
When all three flaws are combined, a brute force in a reasonable amount of time can find a signature that passes all checks.&lt;br /&gt;
| None&lt;br /&gt;
| New3DS&lt;br /&gt;
| July 2015&lt;br /&gt;
| [[User:Derrek|derrek]]&lt;br /&gt;
|-&lt;br /&gt;
| Boot9 FIRM loading doesn&#039;t blacklist memory-mapped I/O&lt;br /&gt;
| [[Bootloader|Boot9]]&#039;s FIRM loading blacklists Boot9 data regions, but forgets to do other important regions, including Memory-mapped I/O. Combined with sighax, by loading a malicious FIRM section to MMIO, one can get Boot9/Boot11 code execution. &lt;br /&gt;
| None&lt;br /&gt;
| New3DS&lt;br /&gt;
| 2015(?)&lt;br /&gt;
| [[User:Derrek|derrek]] (2015?), [[User:Normmatt|Normmatt]] and [[User:SciresM|SciresM]] independently (January 2017).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== ARM9 software ==&lt;br /&gt;
&lt;br /&gt;
=== arm9loader ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Summary&lt;br /&gt;
!  Description&lt;br /&gt;
!  Successful exploitation result&lt;br /&gt;
!  Fixed in [[FIRM]] system version&lt;br /&gt;
!  Last [[FIRM]] system version this flaw was checked for&lt;br /&gt;
!  Timeframe this was discovered&lt;br /&gt;
!  Public disclosure timeframe&lt;br /&gt;
!  Discovered by&lt;br /&gt;
|-&lt;br /&gt;
| Generating the keysector console-unique keys with ITCM+Boot9&lt;br /&gt;
| [[Bootloader|Boot9]] decrypts the 0x100-byte [[OTP_Registers|OTP]] using AES-CBC with keydata stored in Boot9. If hash verification is successful, the plaintext of the first 0x90-bytes are copied into [[Memory_layout|ITCM]]. This is the &#039;&#039;exact&#039;&#039; &#039;&#039;same&#039;&#039; region hashed by arm9loader when generating the console-unique keys for decrypting the keysector, except arm9loader uses the raw encrypted OTP.&lt;br /&gt;
&lt;br /&gt;
Therefore, with the OTP keydata+IV from Boot9 you can: encrypt the 0x90-bytes from ITCM, then hash the output to get the console-unique keys for the system&#039;s keysector. This can even be done for Old3DS which doesn&#039;t have the arm9loader keysector officially.&lt;br /&gt;
&lt;br /&gt;
It&#039;s unknown why arm9loader only used the first 0x90-bytes of OTP. Using more data from OTP would&#039;ve prevented this. Fixing this would require doing exactly that, but that would also mean updating the NAND keysector(which is dangerous).&lt;br /&gt;
| See description.&lt;br /&gt;
| None&lt;br /&gt;
| &lt;br /&gt;
| 2015&lt;br /&gt;
| January 6, 2017&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| Rearrangable keys in the NAND keystore&lt;br /&gt;
| Due to the keystore being encrypted with AES-ECB, one can rearrange blocks and still have the NAND keystore decrypt in a deterministic way. &lt;br /&gt;
&lt;br /&gt;
Using 10.0 FIRM it is possible to rearrange keys such that ARM9 memory is executed. As such using existing ARM9 execution 10.0 FIRM can be written to NAND and a payload written to memory, with the payload to be executed post-K9L using an MCU reboot.&lt;br /&gt;
| arm9loaderhax given existing ARM9 code execution&lt;br /&gt;
| None&lt;br /&gt;
| [[11.3.0-36|11.3.0-X]]&lt;br /&gt;
| Early 2016&lt;br /&gt;
| 27 September 2016&lt;br /&gt;
| Myria, [[User:Dark samus|dark_samus]]; mathieulh (independently); [[User:Plutooo|plutoo]] (independently) + others&lt;br /&gt;
|-&lt;br /&gt;
| Uncleared OTP hash keydata in console-unique 0x11 key-generation&lt;br /&gt;
| Kernel9Loader does not clear the [[SHA_Registers#SHA_HASH|SHA_HASH register]] after use. As a result, the data stored here as K9L hands over to Kernel9 is the hash of [[OTP_Registers|OTP data]] used to seed the [[FIRM#New_3DS_FIRM|console-unique NAND keystore decryption key]] set on keyslot 0x11.&lt;br /&gt;
&lt;br /&gt;
Retrieving this keydata and the [[Flash_Filesystem#0x12C00|NAND keystore]] of the same device allows calculating the decrypted New3DS NAND keystore (non-unique, common to all New3DS units), which contains AES normal keys, also set on keyslot 0x11, which are then used to derive all current [[AES_Registers#Keyslots|New3DS-only AES keyXs]] including the newer batch introduced in [[9.6.0-24#arm9loader|9.6.0-X]]. From there, it is trivial to perform the same key derivation in order to initialize those keys on any system version, and even on Old3DS.&lt;br /&gt;
&lt;br /&gt;
This can be performed by exploiting the &amp;quot;arm9loaderhax&amp;quot; vulnerability to obtain post-K9L code execution after an MCU reboot (the bootrom section-loading fail is not relevant here, this attack was performed without OTP data by brute-forcing keys), and using this to dump the SHA_HASH register. This attack works on any FIRM version shipping a vulnerable version of K9L, whereas OTP dumping required a boot of &amp;lt;[[3.0.0-6|3.0.0-X]].&lt;br /&gt;
&lt;br /&gt;
This attack results in obtaining the entire (0x200-bytes) NAND keystore - it was confirmed at a later date that this keystore is encrypted with the same key (by comparing the decrypted data from multiple units), and therefore using another key in this store will not remedy the issue as all keys are known (i.e. later, unused keys decrypt to the same 0x200-bytes constant with the same OTP hash). Later keys could have been encrypted differently but this is not the case. As a result of this, it is not possible for Nintendo to use K9L again in its current format for its intended purpose, though this was not news from the moment people dumped a New3DS OTP.&lt;br /&gt;
| Derivation of all New3DS keys generated via the NAND keystore (0x1B &amp;quot;Secure4&amp;quot; etc.)&lt;br /&gt;
| None&lt;br /&gt;
| [[11.3.0-36|11.3.0-X]]&lt;br /&gt;
| ~April 2015, implemented in May 2015&lt;br /&gt;
| 13 January 2016&lt;br /&gt;
| [[User:WulfyStylez|WulfyStylez]], [[User:Dazzozo|Dazzozo]], [[User:Shinyquagsire23|shinyquagsire23]] (complimentary + implemented), [[User:Plutooo|plutoo]], Normmatt (discovered independently)&lt;br /&gt;
|-&lt;br /&gt;
| enhanced-arm9loaderhax&lt;br /&gt;
| See the 32c3 3ds talk.&lt;br /&gt;
Since this is a combination of a trick with the arm9-bootrom + arm9loaderhax, and since you have to manually write FIRM to the firm0/firm1 NAND partitions, this can&#039;t be completely fixed. Any system with existing ARM9 code execution and an OTP/OTP hash dump can exploit this. Additionally, by using the FIRM partition known-plaintext bug and bruteforcing the second entry in the keystore, this can currently be exploited on all New3DS systems without any other prerequisite hacks.&lt;br /&gt;
| arm9loaderhax which automatically occurs at hard-boot.&lt;br /&gt;
| See arm9loaderhax / description.&lt;br /&gt;
| See arm9loaderhax / description.&lt;br /&gt;
| Theorized around mid July, 2015. Later implemented+tested by [[User:Plutooo|plutoo]] and [[User:Derrek|derrek]].&lt;br /&gt;
| 32c3 3ds talk (December 27, 2015)&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| Missing verification-block for the 9.6 keys (arm9loaderhax)&lt;br /&gt;
| Starting with [[9.6.0-24|9.6.0-X]] a new set of NAND-based keys were introduced. However, no verification block was added to verify that the new key read from NAND is correct. This was technically an issue from [[9.5.0-22|9.5.0-X]] with the original sector+0 keydata, however the below is only possible with [[9.6.0-24|9.6.0-X]] since keyslots 0x15 and 0x16 are generated from different 0x11 keyXs.&lt;br /&gt;
&lt;br /&gt;
Writing an incorrect key to NAND will cause arm9loader to decrypt the ARM9 kernel as garbage and then jump to it.&lt;br /&gt;
&lt;br /&gt;
This allows an hardware-based attack where you can boot into an older exploited firmware, fill all memory with NOP sleds/jump-instructions, and then reboot into executing garbage. By automating this process with various input keydata, eventually you&#039;ll find some garbage that jumps to your code.&lt;br /&gt;
&lt;br /&gt;
This gives very early ARM9 code execution (pre-ARM9 kernel). As such, it is possible to dump RSA keyslots with this and calculate the 6.x [[Savegames#6.0.0-11_Savegame_keyY|save]], and 7.x [[NCCH]] keys. This cannot be used to recover keys initialized by arm9loader itself. This is due to it wiping the area used for its stack during NAND sector decryption and keyslot init. &lt;br /&gt;
&lt;br /&gt;
Due to FIRMs on both Old and New 3DS using the same RSA data, this can be exploited on Old3DS as well, but only if one already has the actual plaintext normalkey from New3DS NAND sector 0x96 offset-0 and has dumped the OTP area of the Old3DS.&lt;br /&gt;
| Recovery of 6.x [[Savegames#6.0.0-11_Savegame_keyY|save key]]/7.x [[NCCH]] key, access to uncleared OTP hash keydata&lt;br /&gt;
| None&lt;br /&gt;
| [[11.3.0-36|11.3.0-X]]&lt;br /&gt;
| March, 2015&lt;br /&gt;
| &lt;br /&gt;
| [[User:Plutooo|plutoo]]&lt;br /&gt;
|-&lt;br /&gt;
| Uncleared New3DS keyslot 0x11&lt;br /&gt;
| Originally the New3DS [[FIRM]] arm9bin loader only cleared keyslot 0x11 when it gets executed at firmlaunch. This was fixed with [[9.5.0-22|9.5.0-X]] by completely clearing keyslot 0x11 immediately after the loader finishes using keyslot 0x11.&lt;br /&gt;
This means that any ARM9 code that can execute before the loader clears the keyslot at firmlaunch(including firmlaunch-hax) can get access to the uncleared keyslot 0x11, which then allows one to generate all &amp;lt;=v9.5 New3DS keyXs which are generated by keyslot 0x11.&lt;br /&gt;
&lt;br /&gt;
Therefore, to completely fix this the loader would have to generate more keys using different keyslot 0x11 keydata. This was done with [[9.6.0-24|9.6.0-X]].&lt;br /&gt;
| New3DS keyXs generation&lt;br /&gt;
| Mostly fixed with [[9.5.0-22|9.5.0-X]], completely fixed with new keys with [[9.6.0-24|9.6.0-X]].&lt;br /&gt;
| &lt;br /&gt;
| February 3, 2015 (one day after [[9.5.0-22|9.5.0-X]] release)&lt;br /&gt;
| &lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Process9 ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Summary&lt;br /&gt;
!  Description&lt;br /&gt;
!  Successful exploitation result&lt;br /&gt;
!  Fixed in [[FIRM]] system version&lt;br /&gt;
!  Last [[FIRM]] system version this flaw was checked for&lt;br /&gt;
!  Timeframe this was discovered&lt;br /&gt;
!  Public disclosure timeframe&lt;br /&gt;
!  Discovered by&lt;br /&gt;
|-&lt;br /&gt;
| Leak of normal-key matching a key-scrambler key&lt;br /&gt;
| New 3DS firmware versions [[8.1.0-0 New3DS|8.1.0]] through [[9.2.0-20|9.2.0]] set the encryption key for [[Amiibo]] data using a hardcoded normal-key in Process9.  In firmware [[9.3.0-21|9.3.0]], Nintendo &amp;quot;fixed&amp;quot; this by using the key scrambler instead, by calculating the keyY value for keyslot 0x39 that results in the same normal-key, then hardcoding that keyY into Process9.&lt;br /&gt;
&lt;br /&gt;
Nintendo&#039;s fix is actually the problem: Nintendo revealed the normal-key matching an unknown keyX and a known keyY.  Combined with the key scrambler using an insecure scrambling algorithm (see &amp;quot;Hardware&amp;quot; above), the key scrambler function could be deduced.&lt;br /&gt;
| Deducing the keyX for keyslot 0x39 and the key scrambler algorithm&lt;br /&gt;
| New 3DS [[9.3.0-21|9.3.0-X]], sort of&lt;br /&gt;
| [[10.0.0-27|10.0.0-X]]&lt;br /&gt;
| Sometime in 2015 after the hardware key-generator was broken.&lt;br /&gt;
| 32c3 3ds talk (December 27, 2015)&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| Leak of normal-key matching a key-generator key&lt;br /&gt;
| During the 3DS&#039; development (June/July 2010) Nintendo added support installing encrypted content ([[CIA]]). Common-key index1 was intended to be a [[AES|hardware generated key]]. However while they added code to generate the key in hardware, they forgot to remove the normal-key for index1 (used elsewhere, likely old debug code). Nintendo later removed the normal key sometime before the first non-prototype firmware release.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Knowing the keyY and the normal-key for common-key index1, the devkit key-generator algorithm can be deduced (see &amp;quot;Hardware&amp;quot; above). Additionally the remaining devkit common-keys can be generated once the common-key keyX is recovered.&lt;br /&gt;
&lt;br /&gt;
Note the devkit key-generator was discovered to be the same as the retail key-generator.&lt;br /&gt;
| Deducing the keyX for keyslot 0x3D and hardware key-generator algorithm. Generate remaining devkit common-keys.&lt;br /&gt;
| pre-[[1.0.0-0|1.0.0-X]]&lt;br /&gt;
| &lt;br /&gt;
| Shortly after the key-generator was revealed to be flawed at the 32c3 3ds talk&lt;br /&gt;
| January 20, 2016&lt;br /&gt;
| [[User:Jakcron|jakcron]]&lt;br /&gt;
|-&lt;br /&gt;
| Factory firmware is vulnerable to sighax&lt;br /&gt;
| During the 3DS&#039;s development, presumably boot9 was written (including the sighax) vulnerability. This vulnerability is also present in factory firmware (and earlier, including 0.11). This was fixed in version 1.0.0-0.&lt;br /&gt;
| Deducing the mechanics of the sighax vulnerability in boot9 without having boot9 prot. Arm9 code execution on factory/earlier firmware.&lt;br /&gt;
| [[1.0.0-0|1.0.0-X]]&lt;br /&gt;
| [[1.0.0-0|1.0.0-X]]&lt;br /&gt;
| May 9, 2017&lt;br /&gt;
| May 19, 2017&lt;br /&gt;
| [[User:SciresM|SciresM]], [[User:Myria|Myria]]&lt;br /&gt;
|-&lt;br /&gt;
| safefirmhax&lt;br /&gt;
| SAFE_MODE_FIRM is almost never updated(even when NATIVE_FIRM is updated for vuln fixes), this can be noticed by &#039;&#039;just&#039;&#039; checking 3dbrew/ninupdates title-listings.&lt;br /&gt;
&lt;br /&gt;
The fix for firmlaunch-hax was only applied to NATIVE_FIRM in [[9.5.0-22|9.5.0-X]], leaving SAFE_FIRM exploitable. With ARM11-kernel execution, one can trigger FIRM-launch in to SAFE_FIRM, do Kernel9 &amp;lt;=&amp;gt; Kernel11 sync, PXI sync and then repeat the original attack on SAFE_FIRM instead.&lt;br /&gt;
| ARM9 code execution&lt;br /&gt;
| [[11.3.0-36|11.3.0-X]]&lt;br /&gt;
| &lt;br /&gt;
| 2012-2013?&lt;br /&gt;
| Wiki: January 2, 2017&lt;br /&gt;
| Everyone&lt;br /&gt;
|-&lt;br /&gt;
| safefirmhax 1.1&lt;br /&gt;
| Nintendo&#039;s original safefirmhax fix was flawed -- they added a global boolean that got set to true whenever a non-sysmodule title got launched (except for a hardcoded repair title id), and panic()&#039;d if that boolean was true to prevent launching safefirm after hax was active. However, because the boolean was initially false after firmlaunch -- With ARM11-kernel execution, one could FIRM-launch into NATIVE_FIRM, and then immediately FIRM-launch again into SAFE_FIRM early in NATIVE_FIRM boot before the boolean got set to true to repeat the safehax attack.&lt;br /&gt;
&lt;br /&gt;
This was fixed by adding additional CFG9_BOOTENV checks to firmlaunch code in 11.4.&lt;br /&gt;
| ARM9 code execution&lt;br /&gt;
| [[11.4.0-37|11.4.0-X]]&lt;br /&gt;
| &lt;br /&gt;
| safefirmhax fix&lt;br /&gt;
| Wiki: April 10, 2017&lt;br /&gt;
| Everyone&lt;br /&gt;
|-&lt;br /&gt;
| ntrcardhax&lt;br /&gt;
| When reading the banner of a NTR title, Process9 relies on a hardware register to know when the banner was fully read.&lt;br /&gt;
However that register is shared between the ARM9 and the ARM11.&lt;br /&gt;
An attacker with k11 control can so make Process9 believe the banner continues forever and so trigger a buffer overflow.&lt;br /&gt;
With a custom banner for a NTR flashcart, this leads to code execution in Process9.&lt;br /&gt;
&lt;br /&gt;
This was fixed by adding bound checks on the read data.&lt;br /&gt;
| ARM9 code execution&lt;br /&gt;
| [[10.4.0-29|10.4.0-X]]&lt;br /&gt;
| &lt;br /&gt;
| March 2015&lt;br /&gt;
| 32c3 3ds talk (December 27, 2015)&lt;br /&gt;
| [[User:Plutooo|plutoo]]&lt;br /&gt;
|-&lt;br /&gt;
| Title downgrading via [[Application_Manager_Services|AM]]([[Application_Manager_Services_PXI|PXI]])&lt;br /&gt;
| When a title is *already* installed, Process9 will compare the installed title-version with the title-version being installed. When the one being installed is older, Process9 would return an error.&lt;br /&gt;
&lt;br /&gt;
However, this can be bypassed by just deleting the title first via the service command(s) for that: with the title removed from the [[Title_Database]], Process9 can&#039;t compare the input title-version with anything. Hence, titles can be downgraded this way.&lt;br /&gt;
&lt;br /&gt;
[[11.0.0-33|11.0.0-X]] fixed this for key system titles (MSET, Home Menu, spider, ErrDisp, SKATER, NATIVE_FIRM, and every retail system module), by checking the version of the title to install against a hard-coded list of (titleID, minimumVersionRequired) pairs.&lt;br /&gt;
| Bypassing title version check at installation, which then allows downgrading any title.&lt;br /&gt;
| [[11.0.0-33|11.0.0-X]], for key system titles.&lt;br /&gt;
| NATIVE_FIRM / AM-sysmodule [[11.0.0-33|11.0.0-X]]&lt;br /&gt;
| ?&lt;br /&gt;
| &lt;br /&gt;
| ?&lt;br /&gt;
|-&lt;br /&gt;
| FAT FS code null-deref&lt;br /&gt;
| When FSFile:Read is used with a file which is corrupted on a FAT filesystem(in particular SD), Process9 can crash. This particular crash is caused by a function returning NULL instead of an actual ptr due to an error. The caller of that function doesn&#039;t check for NULL which then triggers a read based at NULL.&lt;br /&gt;
&lt;br /&gt;
Sample &amp;quot;fsck.vfat -n -v -V &amp;lt;fat image backup&amp;gt;&amp;quot; output for the above crash:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;...&lt;br /&gt;
Starting check/repair pass.&lt;br /&gt;
&amp;lt;FilePath0&amp;gt; and&lt;br /&gt;
&amp;lt;FilePath1&amp;gt;&lt;br /&gt;
 share clusters.&lt;br /&gt;
 Truncating second to 3375104 bytes.&lt;br /&gt;
&amp;lt;FilePath1&amp;gt;&lt;br /&gt;
 File size is 2787392 bytes, cluster chain length is 16384 bytes.&lt;br /&gt;
 Truncating file to 16384 bytes.&lt;br /&gt;
Checking for unused clusters.&lt;br /&gt;
Reclaimed 1 unused cluster (16384 bytes).&lt;br /&gt;
Checking free cluster summary.&lt;br /&gt;
Free cluster summary wrong (1404490 vs. really 1404491)&lt;br /&gt;
 Auto-correcting.&lt;br /&gt;
Starting verification pass.&lt;br /&gt;
Checking for unused clusters.&lt;br /&gt;
Leaving filesystem unchanged.&amp;lt;/pre&amp;gt;&lt;br /&gt;
| Useless null-based-read&lt;br /&gt;
| None&lt;br /&gt;
| [[9.6.0-24|9.6.0-X]]&lt;br /&gt;
| July 8-9, 2015&lt;br /&gt;
| &lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| RSA signature padding checks&lt;br /&gt;
| The TWL_FIRM RSA sig padding check code used for all TWL RSA sig-checks has issues, see [[FIRM|here]].&lt;br /&gt;
The main 3DS RSA padding check code(non-certificate, including NATIVE_FIRM) uses the function used with the above to extract more padding + the actual hash from the additional padding. This isn&#039;t really a problem here because there&#039;s proper padding check code which is executed prior to this.&lt;br /&gt;
| &lt;br /&gt;
| None&lt;br /&gt;
| [[9.5.0-22|9.5.0-X]]&lt;br /&gt;
| March 2015&lt;br /&gt;
| &lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| [[AMPXI:ValidateDSiWareSectionMAC]] [[AES_Registers|AES]] keyslot reuse&lt;br /&gt;
| When the input DSiWare section index is higher than &amp;lt;max number of DSiWare sections supported by this FIRM&amp;gt;, Process9 uses keyid 0x40 for calculating the AESMAC, which translates to keyslot 0x40. The result is that the keyslot is left at whatever was already selected before, since the AES selectkeyslot code will immediately  return when keyslot is &amp;gt;=0x40. However, actually exploiting this is difficult: the calculated AESMAC is never returned, this command just compares the calculated AESMAC with the input AESMAC(result-code depends on whether the AESMACs match). It&#039;s unknown whether a timing attack would work with this.&lt;br /&gt;
This is basically a different form of the pxips9 keyslot vuln, except with AESMAC etc.&lt;br /&gt;
| See description.&lt;br /&gt;
| None&lt;br /&gt;
| [[11.3.0-36|11.3.0-X]]&lt;br /&gt;
| March 15, 2015&lt;br /&gt;
| December 29, 2015&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| pxips9 [[AES_Registers|AES]] keyslot reuse&lt;br /&gt;
| This requires access to the [[Process_Services|ps:ps]]/pxi:ps9 services. One way to get access to this would be snshax on system-version &amp;lt;=10.1.0-X(see 32c3 3ds talk).&lt;br /&gt;
When an invalid key-type value is passed to any of the PS commands, Process9 will try to select keyslot 0x40. That aesengine_setkeyslot() code will then immediately return due to the invalid keyslot value. Since that function doesn&#039;t return any errors, Process9 will just continue to do crypto with whatever AES keyslot was selected before the PS command was sent.&lt;br /&gt;
| Reusing the previously used keyslot, for crypto with PS.&lt;br /&gt;
| None&lt;br /&gt;
| [[11.3.0-36|11.3.0-X]]&lt;br /&gt;
| Roughly the same time(same day?) as firmlaunch-hax.&lt;br /&gt;
| December 29, 2015&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| firmlaunch-hax: FIRM header ToCToU&lt;br /&gt;
| This can&#039;t be exploited from ARM11 userland.&lt;br /&gt;
During [[FIRM]] launch, the only FIRM header the ARM9 uses at all is stored in FCRAM, this is 0x200-bytes(the actual used FIRM RSA signature is read to the Process9 stack however). The ARM9 doesn&#039;t expect &amp;quot;anything&amp;quot; besides the ARM9 to access this data.&lt;br /&gt;
With [[9.5.0-22]] the address of this FIRM header was changed from a FCRAM address, to ARM9-only address 0x01fffc00.&lt;br /&gt;
| ARM9 code execution&lt;br /&gt;
| [[9.5.0-22]]&lt;br /&gt;
| &lt;br /&gt;
| 2012, 3 days after [[User:Yellows8|Yellows8]] started Process9 code RE.&lt;br /&gt;
| &lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| Uninitialized data output for (PXI) command replies&lt;br /&gt;
| PXI commands for various services(including some [[Filesystem_services_PXI|here]] and many others) can write uninitialized data (like from ARM registers) to the command reply. This happens with stubbed commands, but this can also occur with certain commands when returning an error.&lt;br /&gt;
Certain ARM11 service commands have this same issue as well.&lt;br /&gt;
| &lt;br /&gt;
| None&lt;br /&gt;
| [[9.3.0-21|9.3.0-X]]&lt;br /&gt;
| ?&lt;br /&gt;
| &lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| [[Filesystem_services_PXI|FSPXI]] OpenArchive SD permissions&lt;br /&gt;
| Process9 does not use the exheader ARM9 access-mount permission flag for SD at all.&lt;br /&gt;
This would mean ARM11-kernelmode code / fs-module itself could directly use FSPXI to access SD card without ARM9 checking for SD access, but this is rather useless since a process is usually running with SD access(Home Menu for example) anyway.&lt;br /&gt;
| &lt;br /&gt;
| None&lt;br /&gt;
| [[9.3.0-21|9.3.0-X]]&lt;br /&gt;
| 2012&lt;br /&gt;
| &lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| [[AMPXI:ExportDSiWare]] export path&lt;br /&gt;
| Process9 allocates memory on Process9 heap for the export path then verifies that the actual allocated size matches the input size. Then Process9 copies the input path from FCRAM to this buffer, and uses it with the Process9 FS openfile code, which use paths in the form of &amp;quot;&amp;lt;mountpoint&amp;gt;:/&amp;lt;path&amp;gt;&amp;quot;.&lt;br /&gt;
Process9 does not check the contents of this path at all before passing it to the FS code, besides writing a NUL-terminator to the end of the buffer.&lt;br /&gt;
| Exporting of DSiWare to arbitrary Process9 file-paths, such as &amp;quot;nand:/&amp;lt;path&amp;gt;&amp;quot; etc. This isn&#039;t really useful since the data which gets written can&#039;t be controlled.&lt;br /&gt;
| None&lt;br /&gt;
| [[9.5.0-22]]&lt;br /&gt;
| April 2013&lt;br /&gt;
| &lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| [[DSiWare_Exports]] [[CTCert]] verification&lt;br /&gt;
| Just like DSi originally did, 3DS verifies the APCert for DSiWare on SD with the CTCert also in the DSiWare .bin. On DSi this was fixed with with system-version 1.4.2 by verifying with the actual console-unique cert instead(stored in NAND), while on 3DS it&#039;s still not(?) fixed.&lt;br /&gt;
On 3DS however this is useless, unless one can obtain the console-unique movable.sed keyY which encrypts the entire DSiWare .bin.&lt;br /&gt;
| When the movable.sed keyY for the target 3DS is known and the target 3DS CTCert private-key is unknown, importing of modified DSiWare SD .bin files.&lt;br /&gt;
| Unknown, probably none.&lt;br /&gt;
| ?&lt;br /&gt;
| April 2013&lt;br /&gt;
| &lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| movable.sed keyY vulnerable to brute-force&lt;br /&gt;
| Half of the movable.sed keyY&#039;s 128 bits are leaked through the LFCS, which is available in userland and below. The LFCS itself also leaks almost half of the remaining bits by following the ratio: u32 keyY[3]=1/5(LFCS). The remaining keyY[3] uncertainty of about ±2000 can be greatly reduced by plotting expected error margins with several keyYs. This results in a final uncertainty of about 2^40, easily within practical brute force range of an average modern PC.&lt;br /&gt;
| Knowing the keyY of a given 3ds allows for modification of dsiware export contents, and chained with several other public vulns, ultimately arm9 execution.&lt;br /&gt;
| None.&lt;br /&gt;
| 11.6.0-X&lt;br /&gt;
| December 2017&lt;br /&gt;
| January 2018&lt;br /&gt;
| zoogie&lt;br /&gt;
|-&lt;br /&gt;
| [[Gamecard_Services_PXI]] unchecked REG_CTRCARDCNT transfer-size&lt;br /&gt;
| The u8 REG_CTRCARDCNT transfer-size parameter for the [[Gamecard_Services_PXI]] read/write CTRCARD commands is used as an index for an array of u16 values. Before [[5.0.0-11|5.0.0-X]] this u8 value wasn&#039;t checked, thus out-of-bounds reads could be triggered(which is rather useless in this case).&lt;br /&gt;
| Out-of-bounds read for a value which gets written to a register.&lt;br /&gt;
| [[5.0.0-11|5.0.0-X]]&lt;br /&gt;
| &lt;br /&gt;
| 2013?&lt;br /&gt;
| &lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| [[PXI_Registers|PXI]] cmdbuf buffer overrun&lt;br /&gt;
| The Process9 code responsible [[PXI_Registers|PXI]] communications didn&#039;t verify the size of the incoming command before writing it to a C++ member variable. &lt;br /&gt;
| Probably ARM9 code execution&lt;br /&gt;
| [[5.0.0-11|5.0.0-11]]&lt;br /&gt;
| &lt;br /&gt;
| March 2015, original timeframe if any unknown&lt;br /&gt;
| &lt;br /&gt;
| [[User:Plutooo|plutoo]]/[[User:Yellows8|Yellows8]]/maybe others(?)&lt;br /&gt;
|-&lt;br /&gt;
| [[Application_Manager_Services_PXI|PXIAM]] command 0x003D0108(See also [[Application_Manager_Services|this]])&lt;br /&gt;
| When handling this command, Process9 allocates a 0x2800-byte heap buffer, then copies the 4 FCRAM input buffers to this heap buffer without checking the sizes at all(only the buffers with non-zero sizes are copied). Starting with [[5.0.0-11|5.0.0-X]], the total combined size of the input data must be &amp;lt;=0x2800.&lt;br /&gt;
| ARM9 code execution&lt;br /&gt;
| [[5.0.0-11|5.0.0-X]]&lt;br /&gt;
| &lt;br /&gt;
| May 2013&lt;br /&gt;
| &lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| [[Process_Services_PXI|PS RSA]] commands buffer overflows&lt;br /&gt;
| pxips9 cmd1(not accessible via ps:ps) and VerifyRsaSha256: unchecked copy to a buffer in Process9&#039;s .bss, from the input FCRAM buffer. The buffer is located before the pxi cmdhandler threads&#039; stacks. SignRsaSha256 also has a buf overflow, but this isn&#039;t exploitable.&lt;br /&gt;
The buffer for this is the buffer for the signature data. With v5.0, the signature buffer was moved to stack, with a check for the signature data size. When the signature data size is too large, Process9 uses [[SVC|svcBreak]].&lt;br /&gt;
| ARM9 code execution&lt;br /&gt;
| [[5.0.0-11|5.0.0-X]]&lt;br /&gt;
| &lt;br /&gt;
| 2012&lt;br /&gt;
| &lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| [[PXI_Registers|PXI]] pxi_id bad check&lt;br /&gt;
| The Process9 code responsible for [[PXI_Registers|PXI]] communications read pxi_id as a signed char. There were two flaws:&lt;br /&gt;
* They used it as index to a lookup-table without checking the value at all.&lt;br /&gt;
* Another function verified that pxi_id &amp;lt; 7, allowing negative values to pass the check. This would also cause an out-of-range table-lookup.&lt;br /&gt;
| Maybe ARM9 code execution&lt;br /&gt;
| [[3.0.0-5|3.0.0-5]]&lt;br /&gt;
|&lt;br /&gt;
| March 2015, originally 2012 for the first issue at least&lt;br /&gt;
| &lt;br /&gt;
| [[User:Plutooo|plutoo]], [[User:Yellows8|Yellows8]], maybe others(?)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Kernel9 ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Summary&lt;br /&gt;
!  Description&lt;br /&gt;
!  Successful exploitation result&lt;br /&gt;
!  Fixed in [[FIRM]] system version&lt;br /&gt;
!  Last [[FIRM]] system version this flaw was checked for&lt;br /&gt;
!  Timeframe this was discovered&lt;br /&gt;
!  Discovered by&lt;br /&gt;
|-&lt;br /&gt;
| [[CONFIG Registers#CFG_SYSPROT9|CFG_SYSPROT9]] bit1 not set by Kernel9&lt;br /&gt;
| Old versions of Kernel9 never set bit1 of [[CONFIG Registers#CFG_SYSPROT9|CFG_SYSPROT9]]. This leaves the [[OTP Registers|0x10012000]]-region unprotected (this region should be locked early during boot!). Since it&#039;s never locked, you can dump it once you get ARM9 code execution.&lt;br /&gt;
&lt;br /&gt;
From [[3.0.0-5|3.0.0-X]] this was fixed by setting the bit in Kernel9 after poking some registers in that region. On New3DS arm9loader sets this bit instead of Kernel9, which is exploitable through a hardware + software vulnerability (see arm9loaderhax / description).&lt;br /&gt;
&lt;br /&gt;
This flaw resurged when it gained a new practical use: retrieving the OTP data for a New3DS console in order to decrypt the key data used in arm9loader (see enhanced-arm9loaderhax / description). This was performed by downgrading to a vulnerable system version. By accounting for differences in CTR-NAND crypto (0x05 -&amp;gt; 0x04, see partition encryption types [[Flash_Filesystem#NAND_structure|here]]), it is possible to boot a New3DS using Old3DS firmware 1.0-2.X and an Old3DS [[NCSD#NCSD_header|NCSD Header]] to retrieve the required OTP data using this flaw.&lt;br /&gt;
| Dumping of the [[OTP Registers|OTP]] area&lt;br /&gt;
| [[3.0.0-5|3.0.0-X]]&lt;br /&gt;
|&lt;br /&gt;
| February 2015&lt;br /&gt;
| [[User:Plutooo|plutoo]], Normmatt independently&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== ARM11 software ==&lt;br /&gt;
=== Kernel11 ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Summary&lt;br /&gt;
!  Description&lt;br /&gt;
!  Successful exploitation result&lt;br /&gt;
!  Fixed in [[FIRM]] system version&lt;br /&gt;
!  Last [[FIRM]] system version this flaw was checked for&lt;br /&gt;
!  Timeframe this was discovered&lt;br /&gt;
!  Discovered by&lt;br /&gt;
|-&lt;br /&gt;
| [[SVC|svcSetProcessIdealProcessor]] reference count overflow and therefore use-after-free.&lt;br /&gt;
| The SVC receive two arguments: handle and idealprocessor. The handle is used to get the KProcess object and the KProcess-&amp;gt;refCnt gets incremented,later the function check if the KProcess-&amp;gt;mem_type != BASE and if yes, it checks for idealprocessor == 2 or idealprocessor != 3. The problem here is that if you pass the idealprocessor = 3 it won&#039;t meet any condition and return the error 0xD9001BEA without decrement the reference count. &lt;br /&gt;
It can be abused to overflow the KProcess reference count that will lead to an Use-after-free. &lt;br /&gt;
| Before [[11.2.0-35|11.2.0-X]]: reference count overflow and therefore use-after-free.&lt;br /&gt;
| &lt;br /&gt;
| [[11.6.0-39|11.6.0-X]]&lt;br /&gt;
| November 2, 2017&lt;br /&gt;
| [[User:st4rk|st4rk]]&lt;br /&gt;
|-&lt;br /&gt;
| [[SVC|svcGetThreadList]] process reference leak&lt;br /&gt;
| When given a valid process handle (including &amp;lt;code&amp;gt;0xFFFF8001&amp;lt;/code&amp;gt;), svcGetThreadList forgets to decrement the reference count of the underlying [[KProcess]] instance, after having finished using it.&lt;br /&gt;
| Before [[11.2.0-35|11.2.0-X]]: reference count overflow and therefore use-after-free, but this UAF was most likely not exploitable&lt;br /&gt;
| &lt;br /&gt;
| [[11.3.0-36|11.3.0-X]]&lt;br /&gt;
| April 3, 2017&lt;br /&gt;
| [[User:TuxSH|TuxSH]]&lt;br /&gt;
|-&lt;br /&gt;
| kernelhax via gspwn&lt;br /&gt;
| Originally the kernel didn&#039;t initialize [[CONFIG11_Registers#CFG11_GPUPROT|CFG11_GPUPROT]]. Since it&#039;s 0 at hard-boot, this allowed the GPU to access the entire FCRAM + AXIWRAM.&lt;br /&gt;
| Entire FCRAM+AXIWRAM R/W.&lt;br /&gt;
| [[3.0.0-5|3.0.0-X]]&lt;br /&gt;
| &lt;br /&gt;
| February 7, 2017&lt;br /&gt;
| [[User:Plutooo|plutoo]], [[User:Yellows8|Yellows8]] partly&lt;br /&gt;
|-&lt;br /&gt;
| fasthax&lt;br /&gt;
| When a KTimer is created in pulse mode, the kernel calls a virtual function to reset the timer each time it pulses. The scheduler is locked for that core to avoid race conditions, but another core can call CloseHandle on the timer and free it, leading to a UAF vtable call.&lt;br /&gt;
| See description.&lt;br /&gt;
| [[11.3.0-36|11.3.0-X]]&lt;br /&gt;
| [[11.3.0-36|11.3.0-X]]&lt;br /&gt;
| May 2016&lt;br /&gt;
| nedwill&lt;br /&gt;
|-&lt;br /&gt;
| ipctakeover&lt;br /&gt;
| When sending cmdreplies, it does not validate that the src_addr and src_size match the equivalent dst_addr and dst_size. With a modified addr/size specified in a cmdreply for an output buffer, the data-copy for the first/last pages could be used to overwrite data outside of the buffer specified by the original process.&lt;br /&gt;
&lt;br /&gt;
Used by ctr-httpwn as of v1.2, for &amp;quot;ipctakeover/bosshaxx&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
This can be used to takeover processes where the process is using your service session. Like HTTPC -&amp;gt; BOSS, for bosshaxx above. NIM takeover can be done too(actual stack buffer overflow can trigger), etc.&lt;br /&gt;
| See description.&lt;br /&gt;
| None&lt;br /&gt;
| [[11.3.0-36|11.3.0-X]]&lt;br /&gt;
| November 26, 2016&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| Using IPC input buffers as output buffers&lt;br /&gt;
| When sending cmdreplies, it does not validate that the cmdreply descriptor type matches the equivalent cmdreq descriptor type. This could be used by an exploited sysmodule to use what was intended as an input-buffer as an output-buffer, and also combine other IPC vuln(s) with this.&lt;br /&gt;
&lt;br /&gt;
Used by ctr-httpwn as of v1.2, for &amp;quot;ipctakeover/bosshaxx&amp;quot;.&lt;br /&gt;
| See description.&lt;br /&gt;
| None&lt;br /&gt;
| [[11.3.0-36|11.3.0-X]]&lt;br /&gt;
| November 2016&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
|  [[SVC]] table too small&lt;br /&gt;
|  The table of function pointers for SVC&#039;s only contains entries up to 0x7D, but the biggest allowed SVC for the table is 0x7F. Thus, executing SVC7E or SVC7F would make the SVC-handler read after the buffer, and interpret some ARM instructions as function pointers.&lt;br /&gt;
&lt;br /&gt;
However, this would require patching the kernel .text or modifying SVC-access-control. Even if you could get these to execute, they would still jump to memory that isn&#039;t mapped as executable.&lt;br /&gt;
| &lt;br /&gt;
|  None&lt;br /&gt;
| [[11.3.0-36|11.3.0-X]]&lt;br /&gt;
| 2012&lt;br /&gt;
| Everyone&lt;br /&gt;
|-&lt;br /&gt;
|  [[SVC|svcBackdoor (0x7B)]]&lt;br /&gt;
|  This backdoor allows executing SVC-mode code at the user-specified code-address. This is used by Process9, using this on the ARM11 (with NATIVE_FIRM) required patching the kernel .text or modifying SVC-access-control.&lt;br /&gt;
| See description&lt;br /&gt;
| [[11.0.0-33|11.0.0-X]] (deleted)&lt;br /&gt;
| &lt;br /&gt;
|&lt;br /&gt;
| Everyone&lt;br /&gt;
|-&lt;br /&gt;
| veryslowpidhax&lt;br /&gt;
| &#039;&#039;&#039;This is completely different from the kernelmode-code-execution vuln described in the below separate entry.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
When updating the kernel global PID counter under [[SVC|svcCreateProcess]] the kernel does not check for wraparound to 0x0(the PID for the very first process). This only matters because [[Services|SM-module]] allows processes with PID value less than &amp;lt;total ARM11 FIRM modules&amp;gt; to access &#039;&#039;all&#039;&#039; services, without checking exheader service-access-control; and because Kernel11 checks for the PID to be 1 (loader) to use the input mem-region value on ControlMemory. This alone does not affect access the [[SVC|SVCs]] access table at all.&lt;br /&gt;
&lt;br /&gt;
Inlined ldrex+strex code is used for updating the above counter. [[11.2.0-35|11.2.0-X]] had changes for similar code, but it was only for dedicated ldrex+strex functions(mainly for kernel objects) and hence this PID code was not affected.&lt;br /&gt;
&lt;br /&gt;
With launching+terminating a sysmodule repeatedly with this via ns:s, it would take weeks to finish(if not at least about a month?).&lt;br /&gt;
| Access to all [[Services_API|services]], ControlMemory on any given mem-region.&lt;br /&gt;
| None&lt;br /&gt;
| [[11.3.0-36|11.3.0-X]]&lt;br /&gt;
| 2012 maybe?&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
|  slowhax/waithax&lt;br /&gt;
|  svcWaitSynchronizationN does not decrement the references to valid handles in an array before returning an error when it encounters an invalid handle. This allows one to (slowly) overflow the reference count for a handle object to zero.&lt;br /&gt;
| ARM11 kernel-mode code execution&lt;br /&gt;
| [[11.2.0-35|11.2.0-X]]&lt;br /&gt;
| [[11.2.0-35|11.2.0-X]]&lt;br /&gt;
| 2016&lt;br /&gt;
| nedwill, [[User:Derrek|derrek]]&lt;br /&gt;
|-&lt;br /&gt;
| [[Memory_layout#ARM11_Detailed_virtual_memory_map|0xEFF00000]] / 0xDFF00000 ARM11 kernel virtual-memory&lt;br /&gt;
| The ARM11 kernel-mode 0xEFF00000/0xDFF00000 virtual-memory(size 0x100000) is mapped to phys-mem 0x1FF00000(entire DSP-mem + entire AXIWRAM), with permissions RW-. This is used during ARM11 kernel startup for loading the FIRM-modules from the FIRM section located in DSP-mem, this never seems to be used after that, however. This is never unmapped either.&lt;br /&gt;
| &lt;br /&gt;
| None&lt;br /&gt;
| [[11.3.0-36|11.3.0-X]]&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| memchunkhax2.1&lt;br /&gt;
| Nintendo&#039;s fix for memchunkhax2 in [[10.4.0-29|10.4.0-X]] did not fix the GPU case: one may cause the requisite ToCToU race using gspwn, bypassing the new validation.&lt;br /&gt;
derrek&#039;s original 32c3 presentation for memchunkhax2 commented that a GPU-based attack was possible, but would be difficult.  However, memchunkhax2.1 showed that it was possible to do fairly reliably.&lt;br /&gt;
| ARM11 kernel code execution&lt;br /&gt;
| [[11.0.0-33|11.0.0-X]], via the new [[Memory_Management#MemoryBlockHeader|memchunkhdr]] MAC which prevents modifying memchunkhdr data with DMA.&lt;br /&gt;
| [[11.0.0-33|11.0.0-X]]&lt;br /&gt;
|&lt;br /&gt;
| [[User:Derrek|derrek]], aliaspider&lt;br /&gt;
|-&lt;br /&gt;
| memchunkhax2&lt;br /&gt;
| When allocating a block of memory, the &amp;quot;next&amp;quot; pointer of the [[Memory_Management#MemoryBlockHeader|memchunkhdr]] is accessed without being checked after being mapped to userland.&lt;br /&gt;
This allows a race condition, where the process can change the next pointer just before it&#039;s accessed. By pointing the next pointer to a crafted memchunckhdr in the kernel SlabHeap, some of the SlabHeap is allocated to the calling process, allowing to change vtables of kernel objects. &lt;br /&gt;
| ARM11 kernel code execution&lt;br /&gt;
| [[10.4.0-29|10.4.0-X]] (partially, see memchunkhax2.1)&lt;br /&gt;
| [[10.4.0-29|10.4.0-X]]&lt;br /&gt;
|&lt;br /&gt;
| [[User:Derrek|derrek]]&lt;br /&gt;
|-&lt;br /&gt;
| heaphax&lt;br /&gt;
| Can change the size of free memchunk structures stored in FCRAM using DMA, which leads to the ability to allocate memory chunks over already-allocated memory. This can be used in the SYSTEM region to allocate RW memory over any part of the NS system module, which is enough to take it over.&lt;br /&gt;
| Code execution with access to all of NS&#039;s privileges. (including downgrading) Code execution within any applet.&lt;br /&gt;
| [[11.0.0-33|11.0.0-X]], via the new [[Memory_Management#MemoryBlockHeader|memchunkhdr]] MAC which prevents modifying memchunkhdr data with DMA.&lt;br /&gt;
| [[11.0.0-33|11.0.0-X]]&lt;br /&gt;
| April 2015 ?&lt;br /&gt;
| smea&lt;br /&gt;
|-&lt;br /&gt;
| snshax&lt;br /&gt;
| Can force creation of Safe NS process into gspwn-able memory, allowing for takeover.&lt;br /&gt;
| Code execution with access to all of NS&#039;s privileges. (including downgrading)&lt;br /&gt;
| [[10.1.0-27|10.1.0-X]]&lt;br /&gt;
| [[10.1.0-27|10.1.0-X]]&lt;br /&gt;
| April 2015 ?&lt;br /&gt;
| smea&lt;br /&gt;
|-&lt;br /&gt;
|  AffinityMask/processorid validation&lt;br /&gt;
|  With [[10.0.0-27|10.0.0-X]] the following functions were updated: svcGetThreadAffinityMask, svcGetProcessAffinityMask, svcSetProcessAffinityMask, and svcCreateThread. The code changes for all but svcCreateThread are identical.&lt;br /&gt;
The original code with the first 3 did the following: &lt;br /&gt;
* if(u32_processorcount &amp;gt; ~0x80000001)return 0xe0e01bfd;&lt;br /&gt;
* if(s32_processorcount &amp;gt; &amp;lt;total_cores&amp;gt;)return 0xd8e007fd;&lt;br /&gt;
The following code replaced the above:&lt;br /&gt;
* if(u32_processorcount &amp;gt;= &amp;lt;total_cores+1&amp;gt;)return 0xd8e007fd;&lt;br /&gt;
In theory the latter should catch everything that the former did, so it&#039;s unknown if this was really a security issue.&lt;br /&gt;
&lt;br /&gt;
The svcCreateThread changes with [[10.0.0-27|10.0.0-X]] definitely did fix a security issue.&lt;br /&gt;
* Original code: &amp;quot;if(s32_processorid &amp;gt; &amp;lt;total_cores&amp;gt;)return 0xd8e007fd;&amp;quot;&lt;br /&gt;
* New code: &amp;quot;if(s32_processorid &amp;gt;= &amp;lt;total_cores&amp;gt; || s32_processorid &amp;lt;= -4)return 0xd8e007fd;&amp;quot;&lt;br /&gt;
This fixed an off-by-one issue: if one would use processorid=total_cores, which isn&#039;t actually a valid value, svcCreateThread would accept that value on &amp;lt;[[10.0.0-27|10.0.0-X]]. This results in data being written out-of-bounds(baseaddr = arrayaddr + entrysize*processorid), which has the following result:&lt;br /&gt;
* Old3DS: Useless kernel-mode crash due to accessing unmapped memory.&lt;br /&gt;
* New3DS: uncontrolled data write into a kernel-mode L1 MMU-table. This isn&#039;t really useful: the data can&#039;t be controlled, and the data which gets overwritten is all-zero anyway(this isn&#039;t anywhere near MMU L1 entries for actually mapped memory).&lt;br /&gt;
The previous version also allowed large negative s32_processorid values(negative processorid values are special values not actual procids), but it appears using values like that won&#039;t actually do anything(meaning no crash) besides the thread not running / thread not running for a while(besides triggering a kernelpanic with certain s32_processorid value(s)).&lt;br /&gt;
| Nothing useful&lt;br /&gt;
|  [[10.0.0-27|10.0.0-X]]&lt;br /&gt;
| [[10.0.0-27|10.0.0-X]]&lt;br /&gt;
| svcCreateThread issue: May 31, 2015. The rest: September 8, 2015, via v9.6-&amp;gt;v10.0 ARM11-kernel code-diff.&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| memchunkhax&lt;br /&gt;
| The kernel originally did not validate the data stored in the FCRAM kernel heap [[Memchunkhdr|memchunk-headers]] for free-memory at all. Exploiting this requires raw R/W access to these memchunk-headers, like physical-memory access with gspwn.&lt;br /&gt;
&lt;br /&gt;
There are &#039;&#039;multiple&#039;&#039; ways to exploit this, but the end-result for most of these is the same: overwrite code in AXIWRAM via the 0xEFF00000/0xDFF00000 kernel virtual-memory mapping.&lt;br /&gt;
&lt;br /&gt;
This was fixed in [[9.3.0-21|9.3.0-X]] by checking that the memchunk(including size, next, and prev ptrs) is located within the currently used heap memory. The kernel may also check that the next/prev ptrs are valid compared to other memchunk-headers basically. When any of these checks fail, kernelpanic() is called.&lt;br /&gt;
| When combined with other flaws: ARM11-kernelmode code execution&lt;br /&gt;
| [[9.3.0-21|9.3.0-21]]&lt;br /&gt;
| &lt;br /&gt;
| February 2014&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| Multiple [[KLinkedListNode|KLinkedListNode]] SlabHeap use after free bugs&lt;br /&gt;
| The ARM11-kernel did access the &#039;key&#039; field of [[KLinkedListNode|KLinkedListNode]] objects, which are located on the SlabHeap, after freeing them. Thus, triggering an allocation of a new [[KLinkedListNode|KLinkedListNode]] object at the right time could result in a type-confusion. Pseudo-code:&lt;br /&gt;
SlabHeap_free(KLinkedListNode);&lt;br /&gt;
KObject *obj = KLinkedListNode-&amp;gt;key;  // the object there might have changed!&lt;br /&gt;
This bug appeared all over the place.&lt;br /&gt;
| ARM11-kernelmode code exec maybe&lt;br /&gt;
| [[8.0.0-18|8.0.0-18]]&lt;br /&gt;
| &lt;br /&gt;
| April 2015&lt;br /&gt;
| [[User:Derrek|derrek]]&lt;br /&gt;
|-&lt;br /&gt;
| PXI [[RPC_Command_Structure|Command]] input/output buffer permissions&lt;br /&gt;
| Originally the ARM11-kernel didn&#039;t check permissions for PXI input/output buffers for commands. Starting with [[6.0.0-11|6.0.0]] PXI input/output buffers must have RW permissions, otherwise kernelpanic is triggered.&lt;br /&gt;
| &lt;br /&gt;
| [[6.0.0-11|6.0.0-11]]&lt;br /&gt;
| &lt;br /&gt;
| 2012&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| [[SVC|svcStartInterProcessDma]]&lt;br /&gt;
| For svcStartInterProcessDma, the kernel code had the following flaws:&lt;br /&gt;
&lt;br /&gt;
* Originally the ARM11-kernel read the input DmaConfig structure directly in kernel-mode(ldr(b/h) instructions), without checking whether the DmaConfig address is readable under userland. This was fixed by copying that structure to the SVC-mode stack, using the ldrbt instruction.&lt;br /&gt;
&lt;br /&gt;
* Integer overflows for srcaddr+size and dstaddr+size are now checked(with [[6.0.0-11]]), which were not checked before.&lt;br /&gt;
&lt;br /&gt;
* The kernel now also checks whether the srcaddr/dstaddr (+size) is within userland memory (0x20000000), the kernel now (with [[6.0.0-11]]) returns an error when the address is beyond userland memory. Using an address &amp;gt;=0x20000000 would result in the kernel reading from the process L1 MMU table, beyond the memory allocated for that MMU table(for vaddr-&amp;gt;physaddr conversion). &lt;br /&gt;
| &lt;br /&gt;
| [[6.0.0-11]]&lt;br /&gt;
| &lt;br /&gt;
| DmaConfig issue: unknown. The rest: 2014&lt;br /&gt;
| [[User:Plutooo|plutoo]], [[User:Yellows8|Yellows8]] independently&lt;br /&gt;
|-&lt;br /&gt;
| [[SVC|svcControlMemory]] Parameter checks&lt;br /&gt;
| For svcControlMemory the parameter check had these two flaws:&lt;br /&gt;
&lt;br /&gt;
* The allowed range for addr0, addr1, size parameters depends on which MemoryOperation is being specified. The limitation for GSP heap was only checked if op=(u32)0x10003. By setting a random bit in op that has no meaning (like bit17?), op would instead be (u32)0x30003, and the range-check would be less strict and not accurate. However, the kernel doesn&#039;t actually use the input address for LINEAR memory-mapping at all besides the range-checks, so this isn&#039;t actually useful. This was fixed in the kernel by just checking for the LINEAR bit, instead of comparing the entire MemoryOperation value with 0x10003.&lt;br /&gt;
&lt;br /&gt;
* Integer overflows on (addr0+size) are now checked that previously weren&#039;t (this also applies to most other address checks elsewhere in the kernel).&lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
| [[5.0.0-11]]&lt;br /&gt;
| &lt;br /&gt;
|&lt;br /&gt;
| [[User:Plutooo|plutoo]]&lt;br /&gt;
|-&lt;br /&gt;
| [[RPC_Command_Structure|Command]] request/response buffer overflow&lt;br /&gt;
| Originally the kernel did not check the word-values from the command-header. Starting with [[5.0.0-11]], the kernel will trigger a kernelpanic() when the total word-size of the entire command(including the cmd-header) is larger than 0x40-words (0x100-bytes). This allows overwriting threadlocalstorage+0x180 in the destination thread. However, since the data written there would be translate parameters (such as header-words + buffer addresses), exploiting this would likely be very difficult, if possible at all.&lt;br /&gt;
&lt;br /&gt;
If the two words at threadlocalstorage+0x180 could be overwritten with controlled data this way, one could then use a command with a buffer-header of &amp;lt;nowiki&amp;gt;((size&amp;lt;&amp;lt;14) | 2)&amp;lt;/nowiki&amp;gt; to write arbitrary memory to any RW userland memory in the destination process.&lt;br /&gt;
| &lt;br /&gt;
| [[5.0.0-11]]&lt;br /&gt;
| &lt;br /&gt;
| v4.1 FIRM -&amp;gt; v5.0 code diff&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| [[SVC|SVC stack allocation overflows]]&lt;br /&gt;
| &lt;br /&gt;
* Syscalls that allocate a variable-length array on stack, only checked bit31 before multiplying by 4/16 (when calculating how much memory to allocate). If a large integer was passed as input to one of these syscalls, an integer overflow would occur, and too little memory would have been allocated on stack resulting in a buffer overrun. &lt;br /&gt;
* The alignment (size+7)&amp;amp;~7 calculation before allocation was not checked for integer overflow.&lt;br /&gt;
&lt;br /&gt;
This might allow for ARM11 kernel code-execution.&lt;br /&gt;
&lt;br /&gt;
(Applies to svcSetResourceLimitValues, svcGetThreadList, svcGetProcessList, svcReplyAndReceive, svcWaitSynchronizationN.)&lt;br /&gt;
| &lt;br /&gt;
| [[5.0.0-11]]&lt;br /&gt;
| &lt;br /&gt;
| v4.1 FIRM -&amp;gt; v5.0 code diff&lt;br /&gt;
| [[User:Plutooo|plutoo]], [[User:Yellows8|Yellows8]] complementary&lt;br /&gt;
|-&lt;br /&gt;
| [[SVC|svcControlMemory]] MemoryOperation MAP memory-permissions&lt;br /&gt;
| svcControlMemory with MemoryOperation=MAP allows mapping the already-mapped process virtual-mem at addr1, to addr0. The lowest address permitted for addr1 is 0x00100000. Originally the ARM11 kernel didn&#039;t check memory permissions for addr1. Therefore .text as addr1 could be mapped elsewhere as RW- memory, which allowed ARM11 userland code-execution.&lt;br /&gt;
| &lt;br /&gt;
| [[4.1.0-8]]&lt;br /&gt;
| &lt;br /&gt;
| 2012&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| [[RPC_Command_Structure|Command]] input/output buffer permissions&lt;br /&gt;
| Originally the ARM11 kernel didn&#039;t check memory permissions for the input/output buffers for commands. Starting with [[4.0.0-7]] the ARM11 kernel will trigger a kernelpanic() if the input/output buffers don&#039;t have the required memory permissions. For example, this allowed a FSUSER file-read to .text, which therefore allowed ARM11-userland code execution.&lt;br /&gt;
| &lt;br /&gt;
| [[4.0.0-7]]&lt;br /&gt;
| &lt;br /&gt;
| 2012&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| [[SVC|svcReadProcessMemory/svcWriteProcessMemory memory]] permissions&lt;br /&gt;
| Originally the kernel only checked the first page(0x1000-bytes) of the src/dst buffers, for svcReadProcessMemory and svcWriteProcessMemory. There is no known retail processes which have access to these SVCs.&lt;br /&gt;
| &lt;br /&gt;
| [[4.0.0-7]]&lt;br /&gt;
| &lt;br /&gt;
| 2012?&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== [[FIRM]] Sysmodules ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Summary&lt;br /&gt;
!  Description&lt;br /&gt;
!  Successful exploitation result&lt;br /&gt;
!  Fixed in [[FIRM]] system version&lt;br /&gt;
!  Last [[FIRM]] system version this flaw was checked for&lt;br /&gt;
!  Timeframe this was discovered&lt;br /&gt;
!  Discovered by&lt;br /&gt;
|-&lt;br /&gt;
| [[Services|&amp;quot;srv:pm&amp;quot;]] process registration&lt;br /&gt;
| Originally any process had access to the port &amp;quot;srv:pm&amp;quot;. The PID&#039;s used for the (un)registration commands are not checked either. This allowed any process to re-register itself with &amp;quot;srv:pm&amp;quot;, and therefore allowed the process to give itself access to any service, bypassing the exheader service-access-control list.&lt;br /&gt;
&lt;br /&gt;
This was fixed in [[7.0.0-13]]: starting with [[7.0.0-13]] &amp;quot;srv:pm&amp;quot; is now a service instead of a globally accessible port. Only processes with PID&#039;s less than 6 (in other words: fs, ldr, sm, pm, pxi modules) have access to it. With [[7.0.0-13]] there can only be one session for &amp;quot;srv:pm&amp;quot; open at a time(this is used by pm module), svcBreak will be executed if more sessions are opened by the processes which can access this.&lt;br /&gt;
&lt;br /&gt;
This flaw was needed for exploiting the &amp;lt;=v4.x Process9 PXI vulnerabilities from ARM11 userland ROP, since most applications don&#039;t have access to those service(s).&lt;br /&gt;
| Access to arbitrary services&lt;br /&gt;
| [[7.0.0-13]]&lt;br /&gt;
| &lt;br /&gt;
| 2012&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| FSDIR null-deref&lt;br /&gt;
| [[Filesystem_services|FS]]-module may crash in some cases when handling directory reading. The trigger seems to be due to using [[FSDir:Close]] without closing the dir-handle afterwards?(Perhaps this is caused by out-of-memory?) This seems to be useless since it&#039;s just a null-deref.&lt;br /&gt;
| &lt;br /&gt;
| None&lt;br /&gt;
| [[9.6.0-24|9.6.0-X]]&lt;br /&gt;
| May 19(?)-20, 2015&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| [[SM]] out-of-bounds BSS write (table 1 entry too small)&lt;br /&gt;
| After accepting a new session, [[SM]] writes a (handler ID (0 for srv: sessions (max. 64), 1 for the srv:pm one), pointer to session context structure in BSS) pair in a global array. However that array is only 64-entry-big instead of 65 (as it ought to be), and no bound check is done in that regard.&lt;br /&gt;
&lt;br /&gt;
Unfortunately, as of [[11.4.0-37]], the overwritten fields are totally unused after their initialization by &amp;lt;code&amp;gt;__libc_init_array&amp;lt;/code&amp;gt;.&lt;br /&gt;
| Not currently exploitable&lt;br /&gt;
| None&lt;br /&gt;
| [[11.4.0-37]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Standalone Sysmodules ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Summary&lt;br /&gt;
!  Description&lt;br /&gt;
!  Successful exploitation result&lt;br /&gt;
!  Fixed in system-module system-version&lt;br /&gt;
!  Last system-module system-version this flaw was checked for&lt;br /&gt;
!  Timeframe this was discovered&lt;br /&gt;
!  Timeframe this was added to wiki&lt;br /&gt;
!  Discovered by&lt;br /&gt;
|-&lt;br /&gt;
| [[MP:SendDataFrame]] missing input array index validation&lt;br /&gt;
| [[MP:SendDataFrame]] doesn&#039;t validate the input index at cmdreq[1], unless the function for flag=non-zero is executed. This is used to calculate the following, without validating the index at all: someptr = stateptr + (index*0x924) + somestateoffset.&lt;br /&gt;
&lt;br /&gt;
After validating some flags from someptr, when input_flag=0 the input buffer data is copied to someptr+someotheroffset+0x14 with the u16 size loaded from someptr+someotheroffset.&lt;br /&gt;
&lt;br /&gt;
With a large input index someptr could be setup to be at a &amp;lt;target address&amp;gt;, for overwriting memory.&lt;br /&gt;
&lt;br /&gt;
This is probably difficult to exploit.&lt;br /&gt;
| &lt;br /&gt;
| None&lt;br /&gt;
| [[8.0.0-18]](MP-sysmodule v2048)&lt;br /&gt;
| January 22, 2017&lt;br /&gt;
| January 22, 2017&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| [[MP_Services|MP]] cmd1 out-of-bounds handle read&lt;br /&gt;
| MP-sysmodule handles the input parameter for cmd1 as a s32. It checks for &amp;gt;=16, but not &amp;lt;0. With &amp;lt;16 it basically does the following(array of entries 4-bytes each): *outhandle = ((Handle*)(stateptr+offsetinstate))[inputindex].&lt;br /&gt;
&lt;br /&gt;
Hence, this can be used to load any handle in MP-sysmodule memory. MP doesn&#039;t really have any service handles of interest however(can be obtained from elsewhere too).&lt;br /&gt;
| Reading any handle in MP-sysmodule memory.&lt;br /&gt;
| None&lt;br /&gt;
| [[8.0.0-18]](MP-sysmodule v2048)&lt;br /&gt;
| January 21, 2017&lt;br /&gt;
| January 22, 2017&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| AM stack/.bss infoleak via [[AM:ReadTwlBackupInfo]]([[AM:ReadTwlBackupInfoEx|Ex]])&lt;br /&gt;
| After writing the output-info structure to stack, it then copies that structure to the output buffer ptr using the size from the command. The size is not checked. This could be used to read data from the AM-service-thread stack handling the command + .bss.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;This was not tested on hardware.&#039;&#039;&#039;&lt;br /&gt;
| Stack/.bss reading&lt;br /&gt;
| None&lt;br /&gt;
| [[10.0.0-27]](AM v9217)&lt;br /&gt;
| Roughly October 17, 2016&lt;br /&gt;
| October 25, 2016&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| [[MVD_Services|MVD]]: Stack buffer overflow with [[MVDSTD:SetupOutputBuffers]].&lt;br /&gt;
| The input total_entries is not validated when initially processing the input entry-list. This fixed-size input entry-list is copied to stack from the command request. The loop for processing this initializes a global table, the converted linearmem-&amp;gt;physaddrs used there are also copied to stack(0x8-bytes of physaddrs per entry).&lt;br /&gt;
&lt;br /&gt;
If total_entries is too large, MVD-sysmodule will crash due to reading unmapped memory following the stack(0x10000000). Afterwards if the out-of-bounds total_entries is smaller than that, it will crash due accessing address 0x0, hence this useless.&lt;br /&gt;
| MVD-sysmodule crash.&lt;br /&gt;
| None&lt;br /&gt;
| [[9.0.0-20]]&lt;br /&gt;
| April 22, 2016 (Tested on the 25th)&lt;br /&gt;
| April 25, 2016&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| [[NWM_Services|NWM]]: Using CTRSDK heap with UDS sharedmem from the user-process.&lt;br /&gt;
| See the HTTP-sysmodule section below.&lt;br /&gt;
&lt;br /&gt;
CTRSDK heap is used with the sharedmem from [[NWMUDS:InitializeWithVersion]]. Buffers are allocated/freed under this heap using [[NWMUDS:Bind]] and [[NWMUDS:Unbind]].&lt;br /&gt;
&lt;br /&gt;
Hence, overwriting sharedmem with gspwn then using [[NWMUDS:Unbind]] results in the usual controlled CTRSDK memchunk-header write, similar to HTTP-sysmodule.&lt;br /&gt;
&lt;br /&gt;
This could be done by creating an UDS network, without any other nodes on the network.&lt;br /&gt;
&lt;br /&gt;
Besides CTRSDK memchunk-headers, there are no addresses stored under this sharedmem.&lt;br /&gt;
| ROP under NWM-module.&lt;br /&gt;
| [[11.4.0-37|11.4.0-X]]&lt;br /&gt;
| [[9.0.0-20|9.0.0-X]]&lt;br /&gt;
| April 10, 2016&lt;br /&gt;
| April 16, 2016&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| [[DLP_Services|DLP]]: Out-of-bounds memory access during spectator [[Download_Play|data-frame]] checksum calculation&lt;br /&gt;
| DLP doesn&#039;t validate the frame_size when receiving spectator data-frames at all, unlike non-spectator data-frames. The actual spectator data-frame parsing code doesn&#039;t use that field either. However, the data-frame checksum calculation code called during checksum verification does use the frame_size for loading the size of the framebuf.&lt;br /&gt;
&lt;br /&gt;
Hence, using a large frame_size like 0xFFFF will result in the checksum calculation code reading data out-of-bounds. This isn&#039;t really useful, you could trigger a remote local-WLAN DLP-sysmodule crash while a 3DS system is scanning for DLP networks(due to accessing unmapped memory), but that&#039;s about all(trying to infoleak with this likely isn&#039;t useful either).&lt;br /&gt;
| DLP-sysmodule crash, handled by dlplay system-application by a &amp;quot;connection interrupted&amp;quot; error eventually then a fatal-error via ErrDisp.&lt;br /&gt;
| None&lt;br /&gt;
| [[10.0.0-27|10.0.0-X]]&lt;br /&gt;
| April 8, 2016 (Tested on the 10th)&lt;br /&gt;
| April 10, 2016&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| [[DLP_Services|DLP]]: Out-of-bounds output data writing during spectator sysupdate titlelist [[Download_Play|data-frame]] handling&lt;br /&gt;
| The total_entries and out_entryindex fields for the titlelist DLP spectator data-frames are not validated. This is parsed during DLP network scanning. Hence, the specified titlelist data can be written out-of-bounds using the specified out_entryindex and total_entries. A crash will occur while reading the input data-frame titlelist if total_entries is larger than 0x27A, due to accessing unmapped memory.&lt;br /&gt;
&lt;br /&gt;
There&#039;s not much non-zero data to overwrite following the output buffer(located in sharedmem), any ptrs are located in sharedmem. Overwriting certain ptr(s) are only known to cause a crash when attempting to use the DLP-client shutdown service-command.&lt;br /&gt;
&lt;br /&gt;
There&#039;s no known way to exploit the above crash, since the linked-list code involves writes zeros(with a controlled start ptr).&lt;br /&gt;
| &lt;br /&gt;
| None&lt;br /&gt;
| [[10.0.0-27|10.0.0-X]]&lt;br /&gt;
| April 8-9, 2016&lt;br /&gt;
| April 10, 2016&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| [[IR_Services|IR]]: Stack buffer overflow with custom hardware&lt;br /&gt;
| Originally IR sysmodule used the read value from the I2C-IR registers TXLVL and RXLVL without validating them at all. See [[10.6.0-31|here]] for the fix. This is the size used for reading the data-recv FIFO, etc. The output buffer for reading is located on the stack.&lt;br /&gt;
&lt;br /&gt;
This should be exploitable if one could successfully setup the custom hardware for this and if the entire intended sizes actually get read from I2C.&lt;br /&gt;
| ROP under IR sysmodule.&lt;br /&gt;
| [[10.6.0-31|10.6.0-31]]&lt;br /&gt;
| &lt;br /&gt;
| February 23, 2016 (Unknown if it was noticed before then)&lt;br /&gt;
| February 23, 2016&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| [[HTTP_Services|HTTP]]: Using CTRSDK heap with sharedmem from the user-process.&lt;br /&gt;
| The data from httpcAddPostDataAscii and other commands is stored under a CTRSDK heap. That heap is the sharedmem specified by the user-process via the HTTPC Initialize command.&lt;br /&gt;
Normally this sharedmem isn&#039;t accessible to the user-process once the sysmodule maps it, hence using it is supposed to be &amp;quot;safe&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
This isn&#039;t the case due to gspwn however. Since CTRSDK heap code is so insecure in general, one can use gspwn to locate the HTTPC sharedmem + read/write it, then trigger a mem-write under the sysmodule. This can then be used to get ROP going under HTTP-sysmodule.&lt;br /&gt;
&lt;br /&gt;
This is exploited by [https://github.com/yellows8/ctr-httpwn/ctr-httpwn ctr-httpwn].&lt;br /&gt;
| ROP under HTTP sysmdule.&lt;br /&gt;
| [[11.4.0-37|11.4.0-X]]&lt;br /&gt;
| [[9.6.0-24|9.6.0-X]] (Latest sysmodule version as of [[10.7.0-32|10.7.0-32]])&lt;br /&gt;
| Late 2015&lt;br /&gt;
| March 22, 2016&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| [[NIM_Services|NIM]]: Downloading old title-versions from eShop&lt;br /&gt;
| Multiple NIM service commands(such as [[NIMS:StartDownload]]) use a title-version value specified by the user-process, NIM does not validate that this input version matches the latest version available via SOAP. Therefore, when combined with AM(PXI) [[#Process9|title-downgrading]] via deleting the target eShop title with System Settings Data Management(if the title was already installed), this allows downloading+installing any title-version from eShop &#039;&#039;if&#039;&#039; it&#039;s still available from CDN.&lt;br /&gt;
The easiest way to exploit this is to just patch the eShop system-application code using these NIM commands(ideally the code which loads the title-version).&lt;br /&gt;
&lt;br /&gt;
Originally this was tested with a debugging-system via modded-FIRM, eventually smea implemented it in HANS for the 32c3 release.&lt;br /&gt;
| Downloading old title-versions from eShop&lt;br /&gt;
| None&lt;br /&gt;
| [[10.0.0-27|10.0.0-X]]&lt;br /&gt;
| October 24, 2015 (Unknown when exactly the first eShop title downgrade was actually tested, maybe November)&lt;br /&gt;
| January 7, 2016 (Same day Ironfall v1.0 was removed from CDN via the main-CXI files)&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| [[SPI_Services|SPI]] service out-of-bounds write&lt;br /&gt;
| cmd1 has out-of-bounds write allowing overwrite of some static variables in .data.&lt;br /&gt;
| &lt;br /&gt;
| None&lt;br /&gt;
| [[9.5.0-22]]&lt;br /&gt;
| March 2015&lt;br /&gt;
| &lt;br /&gt;
| [[User:Plutooo|plutoo]]&lt;br /&gt;
|-&lt;br /&gt;
| [[NFC_Services|NFC]] module service command buf-overflows&lt;br /&gt;
| NFC module copies data with certain commands, from command input buffers to stack without checking the size. These commands include the following, it&#039;s unknown if there&#039;s more commands with similar issues: &amp;quot;nfc:dev&amp;quot; &amp;lt;0x000C....&amp;gt; and &amp;quot;nfc:s&amp;quot; &amp;lt;0x0037....&amp;gt;.&lt;br /&gt;
Since both of these commands are stubbed in the Old3DS NFC module from the very first version(those just return an error), these issues only affect the New3DS NFC module.&lt;br /&gt;
&lt;br /&gt;
There&#039;s no known retail titles which have access to either of these services.&lt;br /&gt;
| ROP under NFC module.&lt;br /&gt;
| New3DS: None&lt;br /&gt;
| New3DS: [[9.5.0-22]]&lt;br /&gt;
| December 2014?&lt;br /&gt;
| &lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| [[News_Services|NEWSS]] service command notificationID validation failure&lt;br /&gt;
| This module does not validate the input notificationID for &amp;lt;nowiki&amp;gt;&amp;quot;news:s&amp;quot;&amp;lt;/nowiki&amp;gt; service commands. This is an out-of-bounds array index bug. For example, [[NEWSS:SetNotificationHeader]] could be used to exploit news module: this copies the input data(size is properly checked) to: out = newsdb_savedata+0x10 + (someu32array[notificationID]*0x70).&lt;br /&gt;
| ROP under news module.&lt;br /&gt;
| None&lt;br /&gt;
| [[9.7.0-25|9.7.0-X]]&lt;br /&gt;
| December 2014&lt;br /&gt;
| &lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| [[NWMUDS:DecryptBeaconData]] heap buffer overflow&lt;br /&gt;
| input_size = 0x1E * &amp;lt;value the u8 from input_[[NWM_Services|networkstruct]]+0x1D&amp;gt;. Then input_tag0 is copied to a heap buffer. When input_size is larger than 0xFA-bytes, it will then copy input_tag1 to &amp;lt;end_address_of_previous_outbuf&amp;gt;, with size=input_size-0xFA.&lt;br /&gt;
&lt;br /&gt;
This can be triggered by either using this command directly, or by boadcasting a wifi beacon which triggers it while a 3DS system running the target process is in range, when the process is scanning for hosts to connect to. Processes will only pass tag data to this command when the wlancommID and other thing(s) match the values for the process.&lt;br /&gt;
&lt;br /&gt;
There&#039;s no known way to actually exploit this for getting ROP under NWM-module, at the time of originally adding this to the wiki. This is because the data which gets copied out-of-bounds *and* actually causes crash(es), can&#039;t be controlled it seems(with just broadcasting a beacon at least). It&#039;s unknown whether this could be exploited from just using NWMUDS service-cmd(s) directly.&lt;br /&gt;
| Without any actual way to exploit this: NWM-module DoS, resulting in process termination(process crash). This breaks *everything* involving wifi comms, a reboot is required to recover from this.&lt;br /&gt;
| None&lt;br /&gt;
| [[9.0.0-20]]&lt;br /&gt;
| ~September 23, 2014(see the [[NWMUDS:DecryptBeaconData]] page history)&lt;br /&gt;
| August 3, 2015&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| [[HID_Services|HID]] module shared-mem&lt;br /&gt;
| HID module does not validate the index values in [[HID_Shared_Memory|sharedmem]](just changes index to 0 when index == maxval when updating), therefore large values will result in HID module writing HID data to arbitrary addresses.&lt;br /&gt;
| ROP under HID module, but this is *very* unlikely to be exploitable since the data written is HID data.&lt;br /&gt;
| None&lt;br /&gt;
| [[9.3.0-21]]&lt;br /&gt;
| 2014?&lt;br /&gt;
| &lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| gspwn&lt;br /&gt;
| GSP module does not validate addresses given to the GPU. This allows a user-mode application/applet to read/write to a large part of physical FCRAM using GPU DMA. From this, you can overwrite the .text segment of the application you&#039;re running under, and gain real code-execution from a ROP-chain. Normally applets&#039; .text([[Home Menu]], [[Internet Browser]], etc) is located beyond the area accessible by the GPU, except for [[RO_Services|CROs]] used by applets([[Internet Browser]] for example).&lt;br /&gt;
&lt;br /&gt;
FCRAM is gpu-accessible up to physaddr 0x26800000 on Old3DS, and 0x2D800000 on New3DS. This is BASE_memregion_start(aka SYSTEM_memregion_end)-0x400000 (0x800000 with New3DS) with the default memory-layout on Old3DS/New3DS. With [[11.3.0-36|11.3.0-X]] the cutoff now varies due to the new [[SVC]] 0x59. The New3DS &amp;quot;normal&amp;quot;(non-APPLICATION) cutoff was changed to 0x2D000000 due to the new [[SVC]] 0x59.&lt;br /&gt;
| User-mode code execution.&lt;br /&gt;
| None&lt;br /&gt;
| [[9.6.0-24|9.6.0-X]]&lt;br /&gt;
| Early 2014&lt;br /&gt;
| &lt;br /&gt;
| smea, [[User:Yellows8|Yellows8]]/others before then&lt;br /&gt;
|-&lt;br /&gt;
| rohax&lt;br /&gt;
| Using gspwn, it is possible to overwrite a loaded [[CRO0]]/[[CRR0]] after its RSA-signature has been validated. Badly validated [[CRO0]] header leads to arbitrary read/write of memory in the ro-process. This gives code-execution in the ro module, who has access to [[SVC|syscalls]] 0x70-0x72, 0x7D.&lt;br /&gt;
&lt;br /&gt;
This was fixed after [[ninjhax]] release by adding checks on [[CRO0]]-based pointers before writing to them.&lt;br /&gt;
| Memory-mapping syscalls.&lt;br /&gt;
| [[9.3.0-21]]&lt;br /&gt;
| [[9.4.0-21]]&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| smea, [[User:Plutooo|plutoo]] joint effort&lt;br /&gt;
|-&lt;br /&gt;
| Region free&lt;br /&gt;
| Only [[Home Menu]] itself checks gamecards&#039; region when launching them. Therefore, any application launch that is done directly with [[NS]] without signaling Home Menu to launch the app, will result in region checks being bypassed.&lt;br /&gt;
This essentially means launching the gamecard with the [[NS_and_APT_Services|&amp;quot;ns:s&amp;quot;]] service. The main way to exploit this is to trigger a FIRM launch with an application specified, either with a normal FIRM launch or a hardware [[NSS:RebootSystem|reboot]].&lt;br /&gt;
| Launching gamecards from any region + bypassing Home Menu gamecard-sysupdate installation&lt;br /&gt;
| None&lt;br /&gt;
| Last tested with [[10.1.0-27|10.1.0-X]].&lt;br /&gt;
| June(?) 2014&lt;br /&gt;
| &lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| [[NWM_Services|NWM]] service-cmd state null-ptr deref&lt;br /&gt;
| The NWMUDS service command code loads a ptr from .data, adds an offset to that, then passes that as the state address for the actual command-handler function. The value of the ptr loaded from .data is not checked, therefore this will cause crashes due to that being 0x0 when NWMUDS was not properly initialized.&lt;br /&gt;
It&#039;s unknown whether any NWM services besides NWMUDS have this issue.&lt;br /&gt;
| This is rather useless since it&#039;s only a crash caused by a state ptr based at 0x0.&lt;br /&gt;
| None&lt;br /&gt;
| [[9.0.0-20]]&lt;br /&gt;
| 2013?&lt;br /&gt;
| &lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== General/CTRSDK ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Summary&lt;br /&gt;
!  Description&lt;br /&gt;
!  Successful exploitation result&lt;br /&gt;
!  Fixed in version&lt;br /&gt;
!  Last version this flaw was checked for&lt;br /&gt;
!  Timeframe this was discovered&lt;br /&gt;
!  Discovered by&lt;br /&gt;
|-&lt;br /&gt;
| [[NWM_Services|UDS]] beacon additional-data buffer overflow&lt;br /&gt;
| Originally CTRSDK did not validate the UDS additional-data size before using that size to copy the additional-data to a [[NWM_Services|networkstruct]]. This was eventually fixed.&lt;br /&gt;
This was discovered while doing code RE with an old dlp-module version. It&#039;s unknown in what specific CTRSDK version this was fixed, or even what system-version updated titles with a fixed version.&lt;br /&gt;
&lt;br /&gt;
It&#039;s unknown if there&#039;s any titles using a vulnerable CTRSDK version which are also exploitable with this(dlp module can&#039;t be exploited with this).&lt;br /&gt;
&lt;br /&gt;
The maximum number of bytes that can be written beyond the end of the outbuf is 0x37-bytes, with additionaldata_size=0xFF.&lt;br /&gt;
| Perhaps ROP, very difficult if possible with anything at all&lt;br /&gt;
| ?&lt;br /&gt;
| &lt;br /&gt;
| September(?) 2014&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|-&lt;br /&gt;
| CTPK buffer overflow&lt;br /&gt;
| At offset 0x20 in CTPK is an array for each texture, each entry is 0x20-bytes. This contains a wordindex(entry+0x18) for some srcdata relative to CTPK+0, and an u8 wordsize(entry+0x14) for this data. The CTRSDK function handling this doesn&#039;t validate the size, when copying srcdata using this size to the output buffer. Applications usually have the output buffer on the stack, hence stack buffer overflow.&lt;br /&gt;
&lt;br /&gt;
While CTPK(*.ctpk) are normally only loaded from RomFS, some application(s) load from elsewhere too.&lt;br /&gt;
| ROP under the target application.&lt;br /&gt;
| None?&lt;br /&gt;
| &amp;quot;[SDK+NINTENDO:CTR_SDK-11_4_0_200_none]&amp;quot;&lt;br /&gt;
| November 14, 2016&lt;br /&gt;
| [[User:Yellows8|Yellows8]]&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>EvilFlight</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=Mii_Maker&amp;diff=20564</id>
		<title>Mii Maker</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=Mii_Maker&amp;diff=20564"/>
		<updated>2018-01-12T01:00:41Z</updated>

		<summary type="html">&lt;p&gt;EvilFlight: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Mii Maker&#039;&#039;&#039; lets you create [[Mii]]s, and is the successor of the Wii&#039;s Mii Channel.&lt;br /&gt;
&lt;br /&gt;
It can transfer Miis over [[NWM_Services|local wireless]] from other systems running Mii Maker (3DS/Wii U), or receive, but not send, from Mii Channel.&lt;br /&gt;
&lt;br /&gt;
== Wii Mii Channel transfer protocol ==&lt;br /&gt;
&lt;br /&gt;
The Wii beacons are similar to the usual multi-cart NDS beacons, except: beacon_type is zero, and payload size is 0x14. The payload data is just the Wii UTF-16 nickname, with some extra unused zero data. The usual multi-cast NDS protocol is used for sending the 3DS nick to the Wii. After many keep-alive frames, it eventually sends a bunch of frames, each containing the whole Mii. There&#039;s a 6-byte header, followed by [http://wiibrew.org/wiki/Wiimote/Mii_Data Mii data]. At the end of these frames like most NDS frames is the 0200 byte marker.&lt;br /&gt;
&lt;br /&gt;
== Mii QR Code format ==&lt;br /&gt;
&lt;br /&gt;
3DS Mii QR is a standard 57x57 pixel Level 10 High ECC QR code with &#039;Mii&#039; logo in center (refer to [http://www.denso-wave.com/qrcode Denso-Wave Inc] web site for QR Code format specifications). It contains 0x70-bytes of binary data. 3DS seems to have a fully implemented QR-code decoder, as it can interpret such Mii binary data being encoded even in the smallest possible for that data size Level 6 Low ECC QR code.&lt;br /&gt;
&lt;br /&gt;
The data itself is encrypted with AES-CCM, xorpads can be determined from known plaintext here. The Mii Maker application uses the [[NS]] APT Wrap/Unwrap commands to encrypt/decrypt this Mii data. For the NS [[APT:Unwrap|Unwrap]] command, the Mii Maker application uses nonceoffset=12, noncesize=10, and inputbuffer-size=0x60. Note that the actual nonce size is 8 bytes due to Wrap/Unwrap implementation, and the nonce data should be moved 12 bytes afterwards after decryption. The rest of the data at 0x8-0x5F is encrypted, and should be split into two parts after decryption, with the nonce data in the middle. (See [[APT:Wrap|Wrap]] and [[APT:Unwrap|Unwrap]] for more information)&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset&lt;br /&gt;
! Length&lt;br /&gt;
! &lt;br /&gt;
|-&lt;br /&gt;
| 0x0&lt;br /&gt;
| 0x4&lt;br /&gt;
| Mii ID (big-endian 32-bit unsigned integer)&amp;lt;br/&amp;gt;The most significant 3 bits determine whether the Mii is Special, Foreign, or Normal [http://www.davidhawley.co.uk/special-miis-gold-pants-and-creating.aspx]&amp;lt;br/&amp;gt;time_offset = (mii_id &amp;amp; 0x0FFFFFFF) * 2;&amp;lt;br/&amp;gt;time_offset is the time the Mii was created, represented as the number of seconds since 01/01/2010 00:00:00&lt;br /&gt;
|-&lt;br /&gt;
| 0x4&lt;br /&gt;
| 0x4&lt;br /&gt;
| High 4 octets of MAC address [http://www.adminsub.net/mac-address-finder/nintendo]&lt;br /&gt;
|-&lt;br /&gt;
| 0x8&lt;br /&gt;
| 0x4&lt;br /&gt;
| [[Mii#Mii_ID|Mii ID]], the encrypted data begins here.&lt;br /&gt;
|-&lt;br /&gt;
| 0xC&lt;br /&gt;
| 0x8&lt;br /&gt;
| System ID&lt;br /&gt;
|-&lt;br /&gt;
| 0x14&lt;br /&gt;
| 0x2&lt;br /&gt;
| Low 2 octets of MAC address&lt;br /&gt;
|-&lt;br /&gt;
| 0x16&lt;br /&gt;
| 0x2&lt;br /&gt;
| padding (0000)&lt;br /&gt;
|-&lt;br /&gt;
| 0x18&lt;br /&gt;
| 0x2&lt;br /&gt;
| Bit-mapped: Birthday (4bit-day,5bit-month), Sex, Shirt, ??&lt;br /&gt;
|-&lt;br /&gt;
| 0x1A&lt;br /&gt;
| 0x14&lt;br /&gt;
| UTF-16 Mii Name (10 chars max)&lt;br /&gt;
|-&lt;br /&gt;
| 0x2E&lt;br /&gt;
| 0x2&lt;br /&gt;
| width &amp;amp; height&lt;br /&gt;
|-&lt;br /&gt;
| 0x30&lt;br /&gt;
| 0x1&lt;br /&gt;
| bit 0: disable sharing&amp;lt;br/&amp;gt;bit 1-4: face shape&amp;lt;br/&amp;gt;bit 5-7: skin color&lt;br /&gt;
|-&lt;br /&gt;
| 0x31&lt;br /&gt;
| 0x1&lt;br /&gt;
| bit 0-3: wrinkles&amp;lt;br/&amp;gt;bit 4-7: makeup&lt;br /&gt;
|-&lt;br /&gt;
| 0x32&lt;br /&gt;
| 0x1&lt;br /&gt;
| hair style&lt;br /&gt;
|-&lt;br /&gt;
| 0x33&lt;br /&gt;
| 0x1&lt;br /&gt;
| bit 0-2: hair color&amp;lt;br/&amp;gt;bit 3: flip hair&lt;br /&gt;
|-&lt;br /&gt;
| 0x34&lt;br /&gt;
| 0x4&lt;br /&gt;
| unknown&lt;br /&gt;
|-&lt;br /&gt;
| 0x38&lt;br /&gt;
| 0x1&lt;br /&gt;
| bit 0-4: eyebrow style&amp;lt;br/&amp;gt;bit 5-7: eyebrow color&lt;br /&gt;
|-&lt;br /&gt;
| 0x39&lt;br /&gt;
| 0x1&lt;br /&gt;
| bit 0-3: eyebrow scale&amp;lt;br/&amp;gt;bit 4-6: eyebrow yscale&lt;br /&gt;
|-&lt;br /&gt;
| 0x3A&lt;br /&gt;
| 0x2&lt;br /&gt;
| note that the bytes are swapped over (little-endian layout)&amp;lt;br/&amp;gt;bit 0-3: eyebrow rotation&amp;lt;br/&amp;gt;bit 5-8: eyebrow x spacing&amp;lt;br/&amp;gt;bit 9-13: eyebrow y position&lt;br /&gt;
|-&lt;br /&gt;
| 0x3C&lt;br /&gt;
| 0x1&lt;br /&gt;
| Allow Copying&lt;br /&gt;
|-&lt;br /&gt;
| 0x3D&lt;br /&gt;
| 0x3&lt;br /&gt;
| unknown&lt;br /&gt;
|-&lt;br /&gt;
| 0x40&lt;br /&gt;
| 0x1&lt;br /&gt;
| Mii Sharing Value&lt;br /&gt;
|-&lt;br /&gt;
| 0x41&lt;br /&gt;
| 0x7&lt;br /&gt;
| unknown&lt;br /&gt;
|-&lt;br /&gt;
| 0x48&lt;br /&gt;
| 0x14&lt;br /&gt;
| UTF-16 Author Name (10 chars max)&lt;br /&gt;
|-&lt;br /&gt;
| 0x5C&lt;br /&gt;
| 0x2&lt;br /&gt;
| unknown&lt;br /&gt;
|-&lt;br /&gt;
| 0x5E&lt;br /&gt;
| 0x2&lt;br /&gt;
| CRC16 over the previous 0x5E&lt;br /&gt;
|-&lt;br /&gt;
| 0x60&lt;br /&gt;
| 0x10&lt;br /&gt;
| AES-CCM MAC&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
* QR codes made from the same 3DS for the same Mii are use the same AES-CCM nonce (you can recreate the xorpad by xoring with known values from this table).&lt;br /&gt;
&lt;br /&gt;
== Mii Database ==&lt;br /&gt;
&lt;br /&gt;
Created, received, or even met-in-multiplayer Miis are saved in [[Mii|CFL_DB.dat]].&lt;br /&gt;
&lt;br /&gt;
== Savedata ==&lt;br /&gt;
=== editSaveData.bin ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset&lt;br /&gt;
! Length&lt;br /&gt;
! &lt;br /&gt;
|-&lt;br /&gt;
| 0x0&lt;br /&gt;
| 0x4&lt;br /&gt;
| &amp;quot;TIDE&amp;quot; header (EDIT byteswapped)&lt;br /&gt;
|-&lt;br /&gt;
| 0x4&lt;br /&gt;
| 0x4&lt;br /&gt;
| zero&lt;br /&gt;
|-&lt;br /&gt;
| 0xC&lt;br /&gt;
| 0x4 (?)&lt;br /&gt;
| 01000000 (constant?)&lt;br /&gt;
|-&lt;br /&gt;
| 0x100&lt;br /&gt;
| 0x4&lt;br /&gt;
| Number of scanned Special Mii QRs&lt;br /&gt;
|-&lt;br /&gt;
| 0x104&lt;br /&gt;
| -&lt;br /&gt;
| Some data identifying each scanned Special Mii QRs, for the purpose of not making them scannable again. 8 or 12 byte each?&lt;br /&gt;
|-&lt;br /&gt;
| 0x2904&lt;br /&gt;
| 0x4&lt;br /&gt;
| Checksum?&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== ExtData ==&lt;br /&gt;
The ExtData [[Extdata#Filesystem|File System]] for Mii Maker is as follows:&lt;br /&gt;
&lt;br /&gt;
 root&lt;br /&gt;
 ├── icon&lt;br /&gt;
 ├── boss&lt;br /&gt;
 └── user&lt;br /&gt;
     └── ExBanner&lt;br /&gt;
         └── COMMON.bin&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  File&lt;br /&gt;
!  Details&lt;br /&gt;
!  Size&lt;br /&gt;
!  FW Introduced&lt;br /&gt;
!  Plaintext&lt;br /&gt;
|-&lt;br /&gt;
|  icon&lt;br /&gt;
|  Duplicate from Application ExeFS. Always image 00000002.&lt;br /&gt;
|  0x36c0 Bytes&lt;br /&gt;
|  [[1.0.0-0]]&lt;br /&gt;
|  [https://dl.dropboxusercontent.com/u/60710927/CTR/Sample/MiiMakerExtdata/icon Download]&lt;br /&gt;
|-&lt;br /&gt;
|  COMMON.bin&lt;br /&gt;
|  [[Extended Banner]] for Home Menu. Always image 00000003.&lt;br /&gt;
|  0x20224 Bytes&lt;br /&gt;
|  [[1.0.0-0]]&lt;br /&gt;
|  [https://dl.dropboxusercontent.com/u/60710927/CTR/Sample/MiiMakerExtdata/COMMON.bin Download]&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>EvilFlight</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=Serials&amp;diff=20483</id>
		<title>Serials</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=Serials&amp;diff=20483"/>
		<updated>2017-11-25T05:53:40Z</updated>

		<summary type="html">&lt;p&gt;EvilFlight: /* Back of Card Serial */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page talks about the 3DS products&#039; serial number and model number structures (the console, manual, accessories, games, etc...).&lt;br /&gt;
&lt;br /&gt;
== Console Serial Numbers ==&lt;br /&gt;
&lt;br /&gt;
A 3DS console serial number is composed of at least two letters followed by nine decimal digits.  The ninth digit is a &amp;quot;check digit&amp;quot;, meaning that it is derived from the other digits.&lt;br /&gt;
&lt;br /&gt;
The check digit is an industry-standard algorithm, the one used for UPC codes.  To calculate the check digit of a 3DS console, separate the non-check digits into &amp;quot;odd&amp;quot; and &amp;quot;even&amp;quot; groups, where the &amp;quot;odd&amp;quot; group is digits in odd-numbered positions, and the &amp;quot;even&amp;quot; group is digits in even-numbered positions.  (The first digit is &amp;quot;odd&amp;quot;, with &amp;quot;first&amp;quot; representing &amp;quot;1&amp;quot;.)&lt;br /&gt;
&lt;br /&gt;
After separating the digits, add the digits in each group together.  Multiply the sum of the even digits by 3, then add the sum of the odd digits. To calculate the check digit, take this value modulo 10, and if not 0, subtract from 10.&lt;br /&gt;
&lt;br /&gt;
Example: CW404567772&lt;br /&gt;
&lt;br /&gt;
The non-check digits are 40456777.  Separating into odd and even groups, we get the following:&lt;br /&gt;
&lt;br /&gt;
Odds: 4 + 4 + 6 + 7 = 21&lt;br /&gt;
Evens: 0 + 5 + 7 + 7 = 19&lt;br /&gt;
&lt;br /&gt;
Applying the algorithm, we get ((3 * 19) + 21) % 10 = 8, which is not 0, thus 10 - 8 = 2, matching the example&#039;s check digit.&lt;br /&gt;
&lt;br /&gt;
The letter prefixes are a letter specifying the device, followed by one letter specifying the region in which it was sold.  In some regions, a third letter is present; a current guess is that this letter distinguishes among factories for a given sales region.  Note that several different sales regions&#039; console may be considered to be the same region for region-locking purposes, such as Europe and Australia.&lt;br /&gt;
&lt;br /&gt;
The current serial number scheme began with the DSi, hence its listing in the tables below.  Among standalone consoles, the Wii U belongs to this scheme as well; the Switch started a new scheme.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Model !! Device Prefix (Retail) !! Device Prefix (Dev/Test)&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;DSi&#039;&#039; || T || V&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;DSi XL/LL&#039;&#039; || W || &#039;&#039;unknown&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;Wii U&#039;&#039; || F || &#039;&#039;unknown&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 3DS || C || E&lt;br /&gt;
|-&lt;br /&gt;
| 3DS XL/LL || S || R&lt;br /&gt;
|-&lt;br /&gt;
| 2DS || A || P&lt;br /&gt;
|-&lt;br /&gt;
| New 3DS || Y || Y&lt;br /&gt;
|-&lt;br /&gt;
| New 3DS XL/LL || Q || Q&lt;br /&gt;
|-&lt;br /&gt;
| New 2DS XL/LL || N || N&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Test (&amp;quot;Panda&amp;quot;) units with the same prefix as retail can be distinguished by test units having 00 or 01 as the first two digits of the serial number portion.  00 was used with the New 3DS and New 3DS XL for test units; 01 was used with the New 2DS XL test unit.  Preview versions of the N2DS XL given out to the press had 01; these appear to have been test units with the development titles deleted.&lt;br /&gt;
&lt;br /&gt;
Old 3DS development systems (Partner-CTR, IS-CTR-BOX, IS-SPR-BOX) use the &amp;quot;E&amp;quot; and &amp;quot;R&amp;quot; prefixes like test systems, but have 90 (Partner-CTR) or 91 (IS-CTR-BOX, IS-SPR-BOX) as their first two digits.  Similarly, the main New 3DS development unit, IS-SNAKE-BOX, uses the Y prefix (same as retail) with 91.  It is currently unknown what is the serial number format of the rare New 3DS XL development system (IS-CLOSER-BOX).&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Sales Region !! Region Lock !! Region Suffix&lt;br /&gt;
|-&lt;br /&gt;
| Japan || Japan || JF, JH, JM&lt;br /&gt;
|-&lt;br /&gt;
| North America || North America || W&lt;br /&gt;
|-&lt;br /&gt;
| Middle East / Southeast Asia || North America || S&lt;br /&gt;
|-&lt;br /&gt;
| Europe || Europe || EF, EH, EM&lt;br /&gt;
|-&lt;br /&gt;
| Australia || Europe || AH, AG&lt;br /&gt;
|-&lt;br /&gt;
| South Korea || Korea || KF, KH, KM&lt;br /&gt;
|-&lt;br /&gt;
| China (iQue) || China || CF, CH, CM&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Console Models ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Device !! Product Code&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;DS&#039;&#039; || NTR&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;DS lite&#039;&#039; || USG&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;DSi&#039;&#039; || TWL&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;DSi XL/LL&#039;&#039; || UTL&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;Wii U&#039;&#039; || WUP&lt;br /&gt;
|-&lt;br /&gt;
| 3DS || CTR&lt;br /&gt;
|-&lt;br /&gt;
| 3DS XL/LL || SPR&lt;br /&gt;
|-&lt;br /&gt;
| 2DS || FTR&lt;br /&gt;
|-&lt;br /&gt;
| [[New 3DS]] || KTR&lt;br /&gt;
|-&lt;br /&gt;
| [[New 3DS]] XL/LL || RED&lt;br /&gt;
|-&lt;br /&gt;
| New 2DS XL/LL || JAN&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The DS had the product code NTR (short for Nitro), so we see the TR is recurring.&lt;br /&gt;
&lt;br /&gt;
== Title ID and Unique ID ==&lt;br /&gt;
&#039;&#039;see [[Titles]]&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== NCCH Product Code ==&lt;br /&gt;
&lt;br /&gt;
This serial is similiar to the &amp;quot;physical serial&amp;quot; described later in this page; it is the canonical identifier for a specific title in the field of business formalities with Nintendo, but this is not reflected in the 3DS&#039;s software architecture (where it is vastly unused in favor of the Title ID: it is therefore considered the successor of the &amp;quot;internal name&amp;quot; contained in ROMs of previous handhelds), is not guaranteed to be unique.&lt;br /&gt;
&lt;br /&gt;
The product code is located in a [[NCCH]]&#039;s header (not its ExHeader).&lt;br /&gt;
&lt;br /&gt;
The product code &amp;quot;CTR-P-CTAP&amp;quot; is the default generic product code for NCCH files. Most [[NCSD|NCCHs apart from the first one]] in a title are generally CTR-P-CTAP.&lt;br /&gt;
Referring to &amp;quot;the product code of a title&amp;quot; is therefore a simplification for &amp;quot;the product code of the NCCH in its first partition&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
So, for example, a Japanese copy of Ridge Racer 3D would have a product code of &amp;quot;CTR-P-ARRJ&amp;quot; and a serial of &amp;quot;LNA-CTR-ARRJ-JPN&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
A Nintendo-assigned product code follows this format, however, there is no requirement for a product code to match or resemble this structure as long as it&#039;s within the length limit:&lt;br /&gt;
&lt;br /&gt;
[CTR/KTR]-[Category letter]-[Type][Identifier][Region]-[Sub ID]&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Category letter !! Description&lt;br /&gt;
|-&lt;br /&gt;
| P || Cartridge software, or downloadable versions of them.&lt;br /&gt;
|-&lt;br /&gt;
| N || Digital-only releases, including [[Title list|system applications and applets]].&lt;br /&gt;
|-&lt;br /&gt;
| M || [[DLC]]&lt;br /&gt;
|-&lt;br /&gt;
| T || [[eShop Demos]], excluding so-called &amp;quot;special demos&amp;quot; which are category N.&lt;br /&gt;
|-&lt;br /&gt;
| U || [[Title list#0004000E - Add-on Content (Updates)|Patches]] for category P titles.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;sub ID&amp;quot; only applies to DLC, demos, and local copies of Download Play titles. It&#039;s a 2-digit number associated with the [[Title list|Title ID Variation]].&lt;br /&gt;
&lt;br /&gt;
See the next chapter for explanation of the other components of the Product Code.&lt;br /&gt;
&lt;br /&gt;
== Physical Serial ==&lt;br /&gt;
&lt;br /&gt;
[Product][Retail/Demo]-CTR-[Type][Identifier][Region]-[Label Region]&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Field !! Length !! Description !! colspan=2 | Values&lt;br /&gt;
|-&lt;br /&gt;
|-align=center&lt;br /&gt;
| rowspan=&amp;quot;6&amp;quot; | Product&lt;br /&gt;
| rowspan=&amp;quot;6&amp;quot; | 2&lt;br /&gt;
| rowspan=&amp;quot;6&amp;quot; | Product type&lt;br /&gt;
|-&lt;br /&gt;
| LN || Cartridge&lt;br /&gt;
|-&lt;br /&gt;
| MA || Instruction manual&lt;br /&gt;
|-&lt;br /&gt;
| TS || Game box&lt;br /&gt;
|-&lt;br /&gt;
| FA || Leaflet&lt;br /&gt;
|-&lt;br /&gt;
| MK || Quick-start Guide&lt;br /&gt;
|-align=center&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; | Retail/Demo&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; | 1 &lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; |&lt;br /&gt;
|-&lt;br /&gt;
| A || Retail&lt;br /&gt;
|-&lt;br /&gt;
| Z || Demo&lt;br /&gt;
|-align=center&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; | CTR/KTR&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; | 3&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; | Platform&lt;br /&gt;
|-&lt;br /&gt;
| CTR || 3DS&lt;br /&gt;
|-&lt;br /&gt;
| KTR || New 3DS&lt;br /&gt;
|-align=center&lt;br /&gt;
| rowspan=&amp;quot;11&amp;quot; | Type&lt;br /&gt;
| rowspan=&amp;quot;11&amp;quot; | 1&lt;br /&gt;
| rowspan=&amp;quot;11&amp;quot; | &lt;br /&gt;
|-&lt;br /&gt;
| A || Retail&lt;br /&gt;
|-&lt;br /&gt;
| B || &lt;br /&gt;
|-&lt;br /&gt;
| C || part of the default serial &#039;CTAP&#039;&lt;br /&gt;
|-&lt;br /&gt;
| E || &lt;br /&gt;
|-&lt;br /&gt;
| H || used for built in applications like [[Mii Maker]]&lt;br /&gt;
|-&lt;br /&gt;
| J || normal eShop Title&lt;br /&gt;
|-&lt;br /&gt;
| K || unknown, seen in Mighty Gunvolt&lt;br /&gt;
|-&lt;br /&gt;
| S || usually a 3D Classics eShop title&lt;br /&gt;
|-&lt;br /&gt;
| P || used with GBA eShop titles&lt;br /&gt;
|-&lt;br /&gt;
| T || used with NES eShop titles&lt;br /&gt;
|-align=center&lt;br /&gt;
| Identifier&lt;br /&gt;
| 2&lt;br /&gt;
| colspan=3 |Game name (two alphanumeric characters)&lt;br /&gt;
|-align=center&lt;br /&gt;
| rowspan=&amp;quot;10&amp;quot; | Region&lt;br /&gt;
| rowspan=&amp;quot;10&amp;quot; | 1&lt;br /&gt;
| rowspan=&amp;quot;10&amp;quot; | &lt;br /&gt;
|-&lt;br /&gt;
| E || English (US)&lt;br /&gt;
|-&lt;br /&gt;
| P || PAL (Europe/Australia)&lt;br /&gt;
|-&lt;br /&gt;
| J || Japanese (Japan)&lt;br /&gt;
|-&lt;br /&gt;
| K || Korean (Korea)&lt;br /&gt;
|-&lt;br /&gt;
| C || Chinese (China/Taiwan)&lt;br /&gt;
|-&lt;br /&gt;
| Y || Multiple regions&lt;br /&gt;
|-&lt;br /&gt;
| W || Tai&#039;&#039;&#039;w&#039;&#039;&#039;an(?) (Taiwan/Hong Kong)&lt;br /&gt;
|-&lt;br /&gt;
| Z || Multiple regions&lt;br /&gt;
|-&lt;br /&gt;
| A || All (region-free)&lt;br /&gt;
|-&lt;br /&gt;
|-align=center&lt;br /&gt;
| rowspan=&amp;quot;9&amp;quot; | Label Region&lt;br /&gt;
| rowspan=&amp;quot;9&amp;quot; | 3&lt;br /&gt;
| rowspan=&amp;quot;9&amp;quot; | &lt;br /&gt;
|-&lt;br /&gt;
| USA || USA&lt;br /&gt;
|-&lt;br /&gt;
| EUR || Europe&lt;br /&gt;
|-&lt;br /&gt;
| CAN || Canada&lt;br /&gt;
|-&lt;br /&gt;
| JPN || Japan&lt;br /&gt;
|-&lt;br /&gt;
| KOR || Korea&lt;br /&gt;
|-&lt;br /&gt;
| TWN || Taiwan/Hong Kong&lt;br /&gt;
|-&lt;br /&gt;
| CHN || China&lt;br /&gt;
|-&lt;br /&gt;
| UKV || United Kingdom version(?) (United Kingdom)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Electronic Manuals ===&lt;br /&gt;
&lt;br /&gt;
Some eShop titles have [[NCCH#CFA|Electronic Manuals]] which store the product code at the end of the &#039;Health &amp;amp; Safety&#039; section of the manual. However,   product codes can differ from the above format as shown below:&lt;br /&gt;
&lt;br /&gt;
CTR-[P/N/T/U]-[Type][Identifier][Region]-[Region]-[Digit]&lt;br /&gt;
&lt;br /&gt;
CTR-[Type][Identifier][Region]-[Region]-[Digit]&lt;br /&gt;
&lt;br /&gt;
* P/N/T/U - Same as in product code structure&lt;br /&gt;
* [Type][Identifier][Region] - Same as in serial structure&lt;br /&gt;
* [Region] - A three character representation of the title region, i.e. &#039;EUR&#039; (not always present)&lt;br /&gt;
* [Digit] - A single digit usually &#039;1&#039; or &#039;0&#039; (not always present). Possibly revision or manual revision.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; These alternate versions of the product code, potentially found in [[NCCH#CFA|Electronic Manuals]] don&#039;t represent the actual product code, as found in the game&#039;s CXI. They are only found in the game&#039;s Home Menu manual, and on the game&#039;s packaging and external labeling.&lt;br /&gt;
&lt;br /&gt;
==Back of Card Serial==&lt;br /&gt;
AREPY10111 (example)&lt;br /&gt;
&lt;br /&gt;
AAAABCDEEE (presumably)&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;A&#039;&#039;&#039; - Identifier (last 4 digits of product code)&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;B&#039;&#039;&#039; - Production Month (X,Y,Z -&amp;gt; Oct,Nov,Dec)&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;C&#039;&#039;&#039; - Production Year (2010 + C)&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;D&#039;&#039;&#039; - Revision&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;E&#039;&#039;&#039; - Production Run? (000-999)&lt;/div&gt;</summary>
		<author><name>EvilFlight</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=Serials&amp;diff=20482</id>
		<title>Serials</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=Serials&amp;diff=20482"/>
		<updated>2017-11-25T05:47:49Z</updated>

		<summary type="html">&lt;p&gt;EvilFlight: /* Back of Card Serial */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page talks about the 3DS products&#039; serial number and model number structures (the console, manual, accessories, games, etc...).&lt;br /&gt;
&lt;br /&gt;
== Console Serial Numbers ==&lt;br /&gt;
&lt;br /&gt;
A 3DS console serial number is composed of at least two letters followed by nine decimal digits.  The ninth digit is a &amp;quot;check digit&amp;quot;, meaning that it is derived from the other digits.&lt;br /&gt;
&lt;br /&gt;
The check digit is an industry-standard algorithm, the one used for UPC codes.  To calculate the check digit of a 3DS console, separate the non-check digits into &amp;quot;odd&amp;quot; and &amp;quot;even&amp;quot; groups, where the &amp;quot;odd&amp;quot; group is digits in odd-numbered positions, and the &amp;quot;even&amp;quot; group is digits in even-numbered positions.  (The first digit is &amp;quot;odd&amp;quot;, with &amp;quot;first&amp;quot; representing &amp;quot;1&amp;quot;.)&lt;br /&gt;
&lt;br /&gt;
After separating the digits, add the digits in each group together.  Multiply the sum of the even digits by 3, then add the sum of the odd digits. To calculate the check digit, take this value modulo 10, and if not 0, subtract from 10.&lt;br /&gt;
&lt;br /&gt;
Example: CW404567772&lt;br /&gt;
&lt;br /&gt;
The non-check digits are 40456777.  Separating into odd and even groups, we get the following:&lt;br /&gt;
&lt;br /&gt;
Odds: 4 + 4 + 6 + 7 = 21&lt;br /&gt;
Evens: 0 + 5 + 7 + 7 = 19&lt;br /&gt;
&lt;br /&gt;
Applying the algorithm, we get ((3 * 19) + 21) % 10 = 8, which is not 0, thus 10 - 8 = 2, matching the example&#039;s check digit.&lt;br /&gt;
&lt;br /&gt;
The letter prefixes are a letter specifying the device, followed by one letter specifying the region in which it was sold.  In some regions, a third letter is present; a current guess is that this letter distinguishes among factories for a given sales region.  Note that several different sales regions&#039; console may be considered to be the same region for region-locking purposes, such as Europe and Australia.&lt;br /&gt;
&lt;br /&gt;
The current serial number scheme began with the DSi, hence its listing in the tables below.  Among standalone consoles, the Wii U belongs to this scheme as well; the Switch started a new scheme.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Model !! Device Prefix (Retail) !! Device Prefix (Dev/Test)&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;DSi&#039;&#039; || T || V&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;DSi XL/LL&#039;&#039; || W || &#039;&#039;unknown&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;Wii U&#039;&#039; || F || &#039;&#039;unknown&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 3DS || C || E&lt;br /&gt;
|-&lt;br /&gt;
| 3DS XL/LL || S || R&lt;br /&gt;
|-&lt;br /&gt;
| 2DS || A || P&lt;br /&gt;
|-&lt;br /&gt;
| New 3DS || Y || Y&lt;br /&gt;
|-&lt;br /&gt;
| New 3DS XL/LL || Q || Q&lt;br /&gt;
|-&lt;br /&gt;
| New 2DS XL/LL || N || N&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Test (&amp;quot;Panda&amp;quot;) units with the same prefix as retail can be distinguished by test units having 00 or 01 as the first two digits of the serial number portion.  00 was used with the New 3DS and New 3DS XL for test units; 01 was used with the New 2DS XL test unit.  Preview versions of the N2DS XL given out to the press had 01; these appear to have been test units with the development titles deleted.&lt;br /&gt;
&lt;br /&gt;
Old 3DS development systems (Partner-CTR, IS-CTR-BOX, IS-SPR-BOX) use the &amp;quot;E&amp;quot; and &amp;quot;R&amp;quot; prefixes like test systems, but have 90 (Partner-CTR) or 91 (IS-CTR-BOX, IS-SPR-BOX) as their first two digits.  Similarly, the main New 3DS development unit, IS-SNAKE-BOX, uses the Y prefix (same as retail) with 91.  It is currently unknown what is the serial number format of the rare New 3DS XL development system (IS-CLOSER-BOX).&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Sales Region !! Region Lock !! Region Suffix&lt;br /&gt;
|-&lt;br /&gt;
| Japan || Japan || JF, JH, JM&lt;br /&gt;
|-&lt;br /&gt;
| North America || North America || W&lt;br /&gt;
|-&lt;br /&gt;
| Middle East / Southeast Asia || North America || S&lt;br /&gt;
|-&lt;br /&gt;
| Europe || Europe || EF, EH, EM&lt;br /&gt;
|-&lt;br /&gt;
| Australia || Europe || AH, AG&lt;br /&gt;
|-&lt;br /&gt;
| South Korea || Korea || KF, KH, KM&lt;br /&gt;
|-&lt;br /&gt;
| China (iQue) || China || CF, CH, CM&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Console Models ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Device !! Product Code&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;DS&#039;&#039; || NTR&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;DS lite&#039;&#039; || USG&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;DSi&#039;&#039; || TWL&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;DSi XL/LL&#039;&#039; || UTL&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;Wii U&#039;&#039; || WUP&lt;br /&gt;
|-&lt;br /&gt;
| 3DS || CTR&lt;br /&gt;
|-&lt;br /&gt;
| 3DS XL/LL || SPR&lt;br /&gt;
|-&lt;br /&gt;
| 2DS || FTR&lt;br /&gt;
|-&lt;br /&gt;
| [[New 3DS]] || KTR&lt;br /&gt;
|-&lt;br /&gt;
| [[New 3DS]] XL/LL || RED&lt;br /&gt;
|-&lt;br /&gt;
| New 2DS XL/LL || JAN&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The DS had the product code NTR (short for Nitro), so we see the TR is recurring.&lt;br /&gt;
&lt;br /&gt;
== Title ID and Unique ID ==&lt;br /&gt;
&#039;&#039;see [[Titles]]&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== NCCH Product Code ==&lt;br /&gt;
&lt;br /&gt;
This serial is similiar to the &amp;quot;physical serial&amp;quot; described later in this page; it is the canonical identifier for a specific title in the field of business formalities with Nintendo, but this is not reflected in the 3DS&#039;s software architecture (where it is vastly unused in favor of the Title ID: it is therefore considered the successor of the &amp;quot;internal name&amp;quot; contained in ROMs of previous handhelds), is not guaranteed to be unique.&lt;br /&gt;
&lt;br /&gt;
The product code is located in a [[NCCH]]&#039;s header (not its ExHeader).&lt;br /&gt;
&lt;br /&gt;
The product code &amp;quot;CTR-P-CTAP&amp;quot; is the default generic product code for NCCH files. Most [[NCSD|NCCHs apart from the first one]] in a title are generally CTR-P-CTAP.&lt;br /&gt;
Referring to &amp;quot;the product code of a title&amp;quot; is therefore a simplification for &amp;quot;the product code of the NCCH in its first partition&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
So, for example, a Japanese copy of Ridge Racer 3D would have a product code of &amp;quot;CTR-P-ARRJ&amp;quot; and a serial of &amp;quot;LNA-CTR-ARRJ-JPN&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
A Nintendo-assigned product code follows this format, however, there is no requirement for a product code to match or resemble this structure as long as it&#039;s within the length limit:&lt;br /&gt;
&lt;br /&gt;
[CTR/KTR]-[Category letter]-[Type][Identifier][Region]-[Sub ID]&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Category letter !! Description&lt;br /&gt;
|-&lt;br /&gt;
| P || Cartridge software, or downloadable versions of them.&lt;br /&gt;
|-&lt;br /&gt;
| N || Digital-only releases, including [[Title list|system applications and applets]].&lt;br /&gt;
|-&lt;br /&gt;
| M || [[DLC]]&lt;br /&gt;
|-&lt;br /&gt;
| T || [[eShop Demos]], excluding so-called &amp;quot;special demos&amp;quot; which are category N.&lt;br /&gt;
|-&lt;br /&gt;
| U || [[Title list#0004000E - Add-on Content (Updates)|Patches]] for category P titles.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;sub ID&amp;quot; only applies to DLC, demos, and local copies of Download Play titles. It&#039;s a 2-digit number associated with the [[Title list|Title ID Variation]].&lt;br /&gt;
&lt;br /&gt;
See the next chapter for explanation of the other components of the Product Code.&lt;br /&gt;
&lt;br /&gt;
== Physical Serial ==&lt;br /&gt;
&lt;br /&gt;
[Product][Retail/Demo]-CTR-[Type][Identifier][Region]-[Label Region]&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Field !! Length !! Description !! colspan=2 | Values&lt;br /&gt;
|-&lt;br /&gt;
|-align=center&lt;br /&gt;
| rowspan=&amp;quot;6&amp;quot; | Product&lt;br /&gt;
| rowspan=&amp;quot;6&amp;quot; | 2&lt;br /&gt;
| rowspan=&amp;quot;6&amp;quot; | Product type&lt;br /&gt;
|-&lt;br /&gt;
| LN || Cartridge&lt;br /&gt;
|-&lt;br /&gt;
| MA || Instruction manual&lt;br /&gt;
|-&lt;br /&gt;
| TS || Game box&lt;br /&gt;
|-&lt;br /&gt;
| FA || Leaflet&lt;br /&gt;
|-&lt;br /&gt;
| MK || Quick-start Guide&lt;br /&gt;
|-align=center&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; | Retail/Demo&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; | 1 &lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; |&lt;br /&gt;
|-&lt;br /&gt;
| A || Retail&lt;br /&gt;
|-&lt;br /&gt;
| Z || Demo&lt;br /&gt;
|-align=center&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; | CTR/KTR&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; | 3&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; | Platform&lt;br /&gt;
|-&lt;br /&gt;
| CTR || 3DS&lt;br /&gt;
|-&lt;br /&gt;
| KTR || New 3DS&lt;br /&gt;
|-align=center&lt;br /&gt;
| rowspan=&amp;quot;11&amp;quot; | Type&lt;br /&gt;
| rowspan=&amp;quot;11&amp;quot; | 1&lt;br /&gt;
| rowspan=&amp;quot;11&amp;quot; | &lt;br /&gt;
|-&lt;br /&gt;
| A || Retail&lt;br /&gt;
|-&lt;br /&gt;
| B || &lt;br /&gt;
|-&lt;br /&gt;
| C || part of the default serial &#039;CTAP&#039;&lt;br /&gt;
|-&lt;br /&gt;
| E || &lt;br /&gt;
|-&lt;br /&gt;
| H || used for built in applications like [[Mii Maker]]&lt;br /&gt;
|-&lt;br /&gt;
| J || normal eShop Title&lt;br /&gt;
|-&lt;br /&gt;
| K || unknown, seen in Mighty Gunvolt&lt;br /&gt;
|-&lt;br /&gt;
| S || usually a 3D Classics eShop title&lt;br /&gt;
|-&lt;br /&gt;
| P || used with GBA eShop titles&lt;br /&gt;
|-&lt;br /&gt;
| T || used with NES eShop titles&lt;br /&gt;
|-align=center&lt;br /&gt;
| Identifier&lt;br /&gt;
| 2&lt;br /&gt;
| colspan=3 |Game name (two alphanumeric characters)&lt;br /&gt;
|-align=center&lt;br /&gt;
| rowspan=&amp;quot;10&amp;quot; | Region&lt;br /&gt;
| rowspan=&amp;quot;10&amp;quot; | 1&lt;br /&gt;
| rowspan=&amp;quot;10&amp;quot; | &lt;br /&gt;
|-&lt;br /&gt;
| E || English (US)&lt;br /&gt;
|-&lt;br /&gt;
| P || PAL (Europe/Australia)&lt;br /&gt;
|-&lt;br /&gt;
| J || Japanese (Japan)&lt;br /&gt;
|-&lt;br /&gt;
| K || Korean (Korea)&lt;br /&gt;
|-&lt;br /&gt;
| C || Chinese (China/Taiwan)&lt;br /&gt;
|-&lt;br /&gt;
| Y || Multiple regions&lt;br /&gt;
|-&lt;br /&gt;
| W || Tai&#039;&#039;&#039;w&#039;&#039;&#039;an(?) (Taiwan/Hong Kong)&lt;br /&gt;
|-&lt;br /&gt;
| Z || Multiple regions&lt;br /&gt;
|-&lt;br /&gt;
| A || All (region-free)&lt;br /&gt;
|-&lt;br /&gt;
|-align=center&lt;br /&gt;
| rowspan=&amp;quot;9&amp;quot; | Label Region&lt;br /&gt;
| rowspan=&amp;quot;9&amp;quot; | 3&lt;br /&gt;
| rowspan=&amp;quot;9&amp;quot; | &lt;br /&gt;
|-&lt;br /&gt;
| USA || USA&lt;br /&gt;
|-&lt;br /&gt;
| EUR || Europe&lt;br /&gt;
|-&lt;br /&gt;
| CAN || Canada&lt;br /&gt;
|-&lt;br /&gt;
| JPN || Japan&lt;br /&gt;
|-&lt;br /&gt;
| KOR || Korea&lt;br /&gt;
|-&lt;br /&gt;
| TWN || Taiwan/Hong Kong&lt;br /&gt;
|-&lt;br /&gt;
| CHN || China&lt;br /&gt;
|-&lt;br /&gt;
| UKV || United Kingdom version(?) (United Kingdom)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Electronic Manuals ===&lt;br /&gt;
&lt;br /&gt;
Some eShop titles have [[NCCH#CFA|Electronic Manuals]] which store the product code at the end of the &#039;Health &amp;amp; Safety&#039; section of the manual. However,   product codes can differ from the above format as shown below:&lt;br /&gt;
&lt;br /&gt;
CTR-[P/N/T/U]-[Type][Identifier][Region]-[Region]-[Digit]&lt;br /&gt;
&lt;br /&gt;
CTR-[Type][Identifier][Region]-[Region]-[Digit]&lt;br /&gt;
&lt;br /&gt;
* P/N/T/U - Same as in product code structure&lt;br /&gt;
* [Type][Identifier][Region] - Same as in serial structure&lt;br /&gt;
* [Region] - A three character representation of the title region, i.e. &#039;EUR&#039; (not always present)&lt;br /&gt;
* [Digit] - A single digit usually &#039;1&#039; or &#039;0&#039; (not always present). Possibly revision or manual revision.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; These alternate versions of the product code, potentially found in [[NCCH#CFA|Electronic Manuals]] don&#039;t represent the actual product code, as found in the game&#039;s CXI. They are only found in the game&#039;s Home Menu manual, and on the game&#039;s packaging and external labeling.&lt;br /&gt;
&lt;br /&gt;
==Back of Card Serial==&lt;br /&gt;
AREPY10111 (example)&lt;br /&gt;
&lt;br /&gt;
AAAABCDEEE (presumably)&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;A&#039;&#039;&#039; - Identifier&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;B&#039;&#039;&#039; - Production Month (X,Y,Z -&amp;gt; Oct,Nov,Dec)&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;C&#039;&#039;&#039; - Production Year (2010 + C)&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;D&#039;&#039;&#039; - Revision&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;E&#039;&#039;&#039; - Production Run? (000-999)&lt;/div&gt;</summary>
		<author><name>EvilFlight</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=Mysteries&amp;diff=20409</id>
		<title>Mysteries</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=Mysteries&amp;diff=20409"/>
		<updated>2017-10-18T21:24:06Z</updated>

		<summary type="html">&lt;p&gt;EvilFlight: /* Is there more than one revision of the bootrom? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The following is a list of mysteries.&lt;br /&gt;
&lt;br /&gt;
== General ==&lt;br /&gt;
* What is the CTR abbreviation?&lt;br /&gt;
: C may stand for Chiheisen (&amp;quot;horizon&amp;quot; in Japanese, the O3DS&#039;s codename being &amp;quot;Project Horizon&amp;quot;).&lt;br /&gt;
:: Not true, Horizon refers to the OS.&lt;br /&gt;
&lt;br /&gt;
== Hardware ==&lt;br /&gt;
=== Why are there two CTRCARD controllers? ===&lt;br /&gt;
&#039;&#039;&#039;Background:&#039;&#039;&#039; Also [http://problemkaputt.de/twl-core.jpg DSi SoC pinout] shows evidence of dual NTRCARD controllers on the final DSi SoC. (This was a [http://i.imgur.com/0kJlbEw.png planned feature] of the DSi before being axed later in development)&lt;br /&gt;
&lt;br /&gt;
=== Why are there two EMMC controllers? ===&lt;br /&gt;
&#039;&#039;&#039;Theory:&#039;&#039;&#039; At some point during 3DS hardware development there was an idea to split up CTR and TWL nand into two different chips.&lt;br /&gt;
=== Is there a JTAG? ===&lt;br /&gt;
=== Is there more than one revision of the bootrom? ===&lt;br /&gt;
&#039;&#039;&#039;Background:&#039;&#039;&#039; Bootrom visible portion has been dumped on the entire 3DS Family (3DS, 3DSXL, 2DS, New3DS, New3DSXL, New2DSXL), and even a prototype board from April(?) 2010. All matching exactly.&lt;br /&gt;
&lt;br /&gt;
=== What is the EMMC controller @ 0x10100000 doing? ===&lt;br /&gt;
&#039;&#039;&#039;Background:&#039;&#039;&#039; There&#039;s dead code in NWM referencing it.&lt;br /&gt;
=== Why did they put NTRCARD accessible from ARM11? ===&lt;br /&gt;
&#039;&#039;&#039;Theory:&#039;&#039;&#039; At some point during 3DS hardware development there was a concept where ARM11 ran a menu with DS(i) icons while ARM9 was in TWL mode.&lt;br /&gt;
&lt;br /&gt;
=== Is there a secret message embedded in the 3DS keyscrambler constant? ===&lt;br /&gt;
&#039;&#039;&#039;Background:&#039;&#039;&#039; TWL key scrambler constant was &amp;quot;Nintendo Co., Ltd&amp;quot; in Japanese (&amp;quot;任天堂株式会社&amp;quot;), UTF-16LE encoded, with byte order mark.  The 3DS key scrambler constant, by comparison, is random-looking.&lt;br /&gt;
&lt;br /&gt;
=== What is the PDN abbreviation? ===&lt;br /&gt;
: Power distribution network&lt;br /&gt;
&lt;br /&gt;
=== How does Nintendo reflash bricked systems? ===&lt;br /&gt;
&#039;&#039;&#039;Theory:&#039;&#039;&#039; Before trying to boot from NAND, the bootrom checks to see if a key combination (Start + Select + X) is being held, and whether the shell is closed. If so, it tries to boot from an inserted NTR (Nintendo DS) cartridge.&lt;br /&gt;
This allows to execute a FIRM that is probably used by Nintendo to reflash the system.&lt;br /&gt;
&lt;br /&gt;
== Software ==&lt;br /&gt;
=== What was the problem in &amp;quot;initial program loader&amp;quot; that was mentioned in an FCC filing by Nintendo for 2DS? ===&lt;br /&gt;
&#039;&#039;&#039;Background:&#039;&#039;&#039; http://www.neogaf.com/forum/showthread.php?t=814624&amp;amp;page=1&lt;br /&gt;
=== What did SVC 0x74 in the ARM11 kernel do before it got stubbed? ===&lt;br /&gt;
=== What is the PTM abbreviation? ===&lt;br /&gt;
: Power/time management&lt;br /&gt;
&lt;br /&gt;
=== Why is the DTCM not used anywhere except bootrom? ===&lt;br /&gt;
&#039;&#039;&#039;Background:&#039;&#039;&#039; Bootrom is known to use part of DTCM as state, memsetting it to 0 when it&#039;s done. After that, it is never used again.&lt;br /&gt;
=== How is CTRAging launched during factory setup? ===&lt;br /&gt;
&#039;&#039;&#039;Background:&#039;&#039;&#039; No TestMenu version is capable of launching CTRAging directly: O3DS factory TestMenu can only launch DevMenu installed on NAND, the inserted cartridge and the TWL/AGB test apps; N3DS factory TestMenu can only launch DevMenu installed on NAND, the inserted cartridge and System Settings. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Theory:&#039;&#039;&#039; NtrBoot another time &lt;br /&gt;
=== Why are there 4 stubbed syscalls named SendSyncRequest1-4? ===&lt;/div&gt;</summary>
		<author><name>EvilFlight</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=11.4.0-37&amp;diff=20090</id>
		<title>11.4.0-37</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=11.4.0-37&amp;diff=20090"/>
		<updated>2017-06-15T17:03:52Z</updated>

		<summary type="html">&lt;p&gt;EvilFlight: New 2DS XL Version&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The Old3DS+New3DS 11.4.0-37 system update was released on April 10, 2017. This Old3DS update was released for the following regions: USA, EUR, JPN, CHN, KOR, and TWN. This New3DS update was released for the following regions: USA, EUR, JPN, CHN, KOR, and TWN.&lt;br /&gt;
&lt;br /&gt;
Security flaws fixed: yes.&lt;br /&gt;
&lt;br /&gt;
==Change-log==&lt;br /&gt;
[http://en-americas-support.nintendo.com/app/answers/detail/a_id/667/p/430/c/267 Official] USA change-log:&lt;br /&gt;
* Further improvements to overall system stability and other minor adjustments have been made to enhance the user experience&lt;br /&gt;
&lt;br /&gt;
==System Titles==&lt;br /&gt;
===NATIVE_FIRM===&lt;br /&gt;
====Process9====&lt;br /&gt;
Exactly two functions were changed.&lt;br /&gt;
&lt;br /&gt;
The global boolean preventing [[FIRM|SAFE_FIRM]] from being launched is now set in Process9&#039;s main() if [[CONFIG9_Registers#CFG9_BOOTENV|CFG9_BOOTENV]] has bit0 set, that is to say, if it has been launched from a firmlaunch (this register is set to 1 just before a firmlaunch). The following code has also been added in the firmlaunch function itself, immediately after the code-block where the boolean is checked: &amp;lt;code&amp;gt;if(!(CFG9_BOOTENV &amp;amp; 1) /* not a firmlaunch */ || (CFG9_BOOTENV &amp;amp; 6) /* firmlaunched from LGY_FIRM (if even possible at all) */) goto panic&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
This is to properly fix [[3DS_System_Flaws#Process9|safehax]].&lt;br /&gt;
&lt;br /&gt;
====New3DS kernel9loader====&lt;br /&gt;
New3DS kernel9loader wasn&#039;t updated.&lt;br /&gt;
&lt;br /&gt;
====ARM11 kernel====&lt;br /&gt;
There&#039;s exactly three code changes:&lt;br /&gt;
&lt;br /&gt;
* [[CONFIG11_Registers#CFG11_WIFIUNK|CFG11_WIFIUNK]] is now set to 0x10 in Kernel11&#039;s crt0&lt;br /&gt;
* A new SVC, [[SVC|svc 0x5A]] has been introduced, to enable or disable wifi&lt;br /&gt;
* The code handling [[SVC|svcArbitrateAddress]] with type = SIGNAL, has been changed. It now counts the actual number of threads arbitrating on that address, and if it is non-zero, it executes the following hack: &amp;lt;code&amp;gt;if(coreId == 0 &amp;amp;&amp;amp; currentThread-&amp;gt;dynamicPriority &amp;gt;= 50) waitCycles(0x64E)&amp;lt;/code&amp;gt;. This supposedly works around the lag issue in some games, which has been introduced on [[11.3.0-36]]&lt;br /&gt;
&lt;br /&gt;
===Modules===&lt;br /&gt;
No FIRM ARM11 sysmodule was changed.&lt;br /&gt;
&lt;br /&gt;
===[[NWM_Services|NWM-sysmodule]]===&lt;br /&gt;
The [[CONFIG11_Registers]] are no longer directly mapped under userland for NWM-sysmodule.&lt;br /&gt;
This prevents anything under NWM-module from modifying the GPUPROT register. This was used by both *hax payload(prior to v11.4 release) and [https://github.com/smealum/udsploit udsploit].&lt;br /&gt;
&lt;br /&gt;
The codebin was updated.&lt;br /&gt;
&lt;br /&gt;
The crt0-poke in PDN that NWM previously did:&lt;br /&gt;
  0x1EC4010C |= 0x10&lt;br /&gt;
&lt;br /&gt;
.. has been removed from NWM. This one has been moved into kernel bootup.&lt;br /&gt;
&lt;br /&gt;
All accesses to 0x1EC40180 have been replaced by a new syscall, [[SVC|0x5A]].&lt;br /&gt;
&lt;br /&gt;
This now includes code from old CTRSDK update(s). A new func was added for calling a func, previously that func was directly called via vtable funcptr. The only other changes was new heap code(and the code for using it basically), for fixing the NWMUDS sharedmem [[3DS_System_Flaws|vuln]]. This includes code which actually validates heap memchunkhdrs, with svcBreak being executed on failure.&lt;br /&gt;
&lt;br /&gt;
A new string was added at 0x13E200: &amp;quot;used&amp;quot;(with 3 0xFF bytes afterwards), this is used by the new heap code. The wifi-fw was moved from .data to .rodata.&lt;br /&gt;
&lt;br /&gt;
===[[HTTP_Services|HTTP-sysmodule]]===&lt;br /&gt;
There were exactly 3 changes in the HTTP-sysmodule codebin.&lt;br /&gt;
&lt;br /&gt;
Two functions, the memalloc and memfree functions used with HTTP sharedmem, were updated to use the new function. The new function is for heap memchunkhdr validation. This additional code is the same new heap code as NWM-sysmodule. This fixed the vuln used by ctr-httpwn at the time of sysupdate release.&lt;br /&gt;
&lt;br /&gt;
===[[Friend_Services|Friends-sysmodule]]===&lt;br /&gt;
Like past updates the only change in this codebin was the fpdver(0x9-&amp;gt;0xA).&lt;br /&gt;
&lt;br /&gt;
===[[NS_and_APT_Services|NS-sysmodule]]===&lt;br /&gt;
The only changes for NS was version values in the codebin, nothing else.&lt;br /&gt;
&lt;br /&gt;
===[[Internet Browser]]===&lt;br /&gt;
The web-browser was updated, only for New3DS. See [[Internet Browser|here]] for details.&lt;br /&gt;
&lt;br /&gt;
===[[Nintendo_3DS_Sound]]===&lt;br /&gt;
soundhax was fixed, it appears other vulns were fixed too.&lt;br /&gt;
&lt;br /&gt;
Exactly 8 functions were changed in the codebin.&lt;br /&gt;
&lt;br /&gt;
  L_1d3ba8&lt;br /&gt;
  updated, prev ver @ L_1d3ba8.&lt;br /&gt;
  Added only the following code:&lt;br /&gt;
  if(len&amp;lt;2)return;&lt;br /&gt;
  if(len&amp;gt;=0xfe)len=0xfe;&lt;br /&gt;
  *lenstorage = len;&lt;br /&gt;
  &lt;br /&gt;
  L_1d3d10&lt;br /&gt;
  updated, prev ver @ L_1d3cfc.&lt;br /&gt;
  When L_1ea0b8 returns non-zero, this now clears the 4-bytes at inr1.&lt;br /&gt;
  &lt;br /&gt;
  L_1f32c4&lt;br /&gt;
  updated, prev ver @ L_1f329c.&lt;br /&gt;
  This now writes u32 val0 to inr0+0x34 immediately after the nop instruction.&lt;br /&gt;
  &lt;br /&gt;
  L_275754&lt;br /&gt;
  updated, prev ver @ L_27572c.&lt;br /&gt;
  This now executes the following each time L_1ea0b8 returns non-zero: sp20 = 0;&lt;br /&gt;
  &lt;br /&gt;
  L_275ed4&lt;br /&gt;
  updated, prev ver @ L_275e94.&lt;br /&gt;
  Added the following code after the branch for &amp;quot;if(*(inr1+8)==0)&amp;quot;:&lt;br /&gt;
  if(len&amp;gt;0xfe){len=0xfe;&amp;lt;jump over the code which checks len0&amp;gt;}&lt;br /&gt;
  Identical changes were added at 0x276054, except with len val 0x82.&lt;br /&gt;
  Likewise at 0x276138 except with len val 0x76.&lt;br /&gt;
  &lt;br /&gt;
  L_280000&lt;br /&gt;
  updated, prev ver @ L_27ff90.&lt;br /&gt;
  This was added at 0x280444: if(len&amp;gt;0xfe)len=0xfe;&lt;br /&gt;
  Minor(?) other changes.&lt;br /&gt;
  &lt;br /&gt;
  L_280c74&lt;br /&gt;
  updated, prev ver @ L_280b60.&lt;br /&gt;
  This now writes u32 val0 to inr0+0x34 immediately after the nop instruction.&lt;br /&gt;
  &lt;br /&gt;
  L_281ab0&lt;br /&gt;
  updated, prev ver @ L_281998.&lt;br /&gt;
  Added the following: if(len&amp;gt;=0xfe)len=0xfe;&lt;br /&gt;
  This was added at 0x281b94:&lt;br /&gt;
  if(somelen&amp;gt;=0xfe)&lt;br /&gt;
  {&lt;br /&gt;
  	len=0xfe;&lt;br /&gt;
  }&lt;br /&gt;
  else&lt;br /&gt;
  {&lt;br /&gt;
  	len=somelen;&lt;br /&gt;
  }&lt;br /&gt;
  *r4 = val;&lt;br /&gt;
  Then len is used for a string data-copy(ASCII/UTF16), unless it&#039;s UTF16 and len is &amp;lt;=0.&lt;br /&gt;
&lt;br /&gt;
===[[Title_list|SNOTE_AP]]===&lt;br /&gt;
This was updated with vuln fixes similar to the sound-app.&lt;br /&gt;
&lt;br /&gt;
  LT_1004d6&lt;br /&gt;
  updated, prev ver @ LT_1004d6.&lt;br /&gt;
  Added a func call for LT_1017c8 at 0x100508.&lt;br /&gt;
  &lt;br /&gt;
  LT_1017c8&lt;br /&gt;
  new func.&lt;br /&gt;
  Only called by LT_1004d6.&lt;br /&gt;
  return LT_10250c(0x405, 5, 0x5109d503);&lt;br /&gt;
  &lt;br /&gt;
  LT_103368&lt;br /&gt;
  updated, prev ver @ LT_1032f8.&lt;br /&gt;
  The first func call was removed, it&#039;s now located in LT_1017c8.&lt;br /&gt;
  &lt;br /&gt;
  LT_11ea6c&lt;br /&gt;
  updated, prev ver @ LT_11ea60.&lt;br /&gt;
  Added the following: if(len&amp;gt;0xfe)*lenptr = 0xfe;&lt;br /&gt;
  &lt;br /&gt;
  LT_11f210&lt;br /&gt;
  updated, prev ver @ LT_11f1fc.&lt;br /&gt;
  The following was added at 0x11f49c: if(len&amp;gt;0xfe)len=0xfe;&lt;br /&gt;
  Before executing &amp;quot;return ~0x63;&amp;quot; this now calls LT_12f542.&lt;br /&gt;
  minor other changes.&lt;br /&gt;
  &lt;br /&gt;
  LT_11f84c&lt;br /&gt;
  updated, prev ver @ LT_11f828.&lt;br /&gt;
  This now clears inr0+0x34 after calling L_14cabc.&lt;br /&gt;
  &lt;br /&gt;
  LT_11f9ac&lt;br /&gt;
  updated, prev ver @ LT_11f984.&lt;br /&gt;
  Added the following: if(len&amp;gt;0xfe)*lenptr=0xfe;&lt;br /&gt;
==New 2DS XL Version==&lt;br /&gt;
On June 15, 2017 a new version of 11.4.0-37E was released pre-installed with the AU/NZ debut of the New 2DS XL model of the 3ds family. There are 13 updated titles over the base NUS version included this new model, apparently to ensure compatibility with the New 2DS XL&#039;s unique 3D-less hardware configuration. A list of changed titles can be found [https://gist.github.com/ihaveamac/bffc8694ac209207c8db86a98f6c4238 here].&lt;br /&gt;
==See Also==&lt;br /&gt;
System update report(s):&lt;br /&gt;
* [https://yls8.mtheall.com/ninupdates/reports.php?date=04-10-17_08-00-38&amp;amp;sys=ctr]&lt;br /&gt;
* [https://yls8.mtheall.com/ninupdates/reports.php?date=04-10-17_08-00-47&amp;amp;sys=ktr]&lt;/div&gt;</summary>
		<author><name>EvilFlight</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=FirmwareNews&amp;diff=20058</id>
		<title>FirmwareNews</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=FirmwareNews&amp;diff=20058"/>
		<updated>2017-06-03T15:16:02Z</updated>

		<summary type="html">&lt;p&gt;EvilFlight: typo&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;As of this writing, the latest firmware is &#039;&#039;&#039;[[11.4.0-37|11.4.0-37]]&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
See [[Homebrew Exploits|here]] regarding running homebrew.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Full system control exploits are only known for system versions up to and including &#039;&#039;&#039;11.4.0-X&#039;&#039;&#039; and public for system versions up to and including &#039;&#039;&#039;11.3.0-X&#039;&#039;&#039;&lt;/div&gt;</summary>
		<author><name>EvilFlight</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=Internet_Browser&amp;diff=17943</id>
		<title>Internet Browser</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=Internet_Browser&amp;diff=17943"/>
		<updated>2016-08-17T10:32:07Z</updated>

		<summary type="html">&lt;p&gt;EvilFlight: /* v9.9 dummy web-browser */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The 3DS Internet Browser was added in the June 2011 Update for JPN/EUR/USA.&lt;br /&gt;
&lt;br /&gt;
From the Internet Browser help section:&lt;br /&gt;
In compliance with the LGPL, the source code of the OSS is available via the Nintendo website.&lt;br /&gt;
This source code can be downloaded here:&lt;br /&gt;
[http://mediacontent.nintendo-europe.com/NOE/images/service/OpenSources.zip] [http://www.nintendo.co.jp/support/oss/index.html]&lt;br /&gt;
&lt;br /&gt;
The 3DS Internet Browser is [http://en.wikipedia.org/wiki/Netfront Netfront] Browser NX v1.0 based on [http://en.wikipedia.org/wiki/WebKit WebKit] engine.&lt;br /&gt;
&lt;br /&gt;
On O3DS the exheader name of this title is &amp;quot;SPIDER&amp;quot;; on N3DS, &amp;quot;SKATER&amp;quot;.&lt;br /&gt;
The only difference between the ExeFS .code for each region of the Old3DS/New3DS browser, is byte values for the title uniqueID/region.&lt;br /&gt;
&lt;br /&gt;
A [[#v9.9_dummy_web-browser|&amp;quot;dummy&amp;quot; browser]] (which replaces the actual browser) is being included with cartdrige games shipping the [[9.9.0-26|9.9.0-X]] system update. &lt;br /&gt;
In addition, versions of the real browser since 9.9.0-26X attempt to [[#Forced_system-update|check-in with a Nintendo server]] to determine if the existing browser version is out of date.&lt;br /&gt;
&lt;br /&gt;
==[[New 3DS]] Internet Browser==&lt;br /&gt;
New3DS has a separate browser title, with the exheader name &amp;quot;SKATER&amp;quot;.&lt;br /&gt;
Unlike the Old3DS browser, the New3DS browser has videos+HTML5 support. &lt;br /&gt;
&lt;br /&gt;
This browser also has a filter enabled by default in the JPN version. &lt;br /&gt;
Disabling it requires paying money with a credit-card, for [[NIM_Services|purchasing]] web-browser [[Title_list/DLC|DLC]].&lt;br /&gt;
During startup the browser does various HTTPS comms. When visting an URL, the browser sends a plaintext HTTP POST here: [http://ars.ifuser.jp:20080/ars2/rating]. The raw POST data begins with &amp;quot;ARS/2.0\r\n\x00&amp;quot;, the rest appears to be encrypted. The server reply content also has this ARS header + encrypted data. This appears to use a fixed xorpad, likely from a fixed encryption CTR/IV. The server content responses for allowed sites, and blocked sites, are fixed. When the server returns that the site is blocked, the browser goes to this page: [http://ars.ifuser.jp/filter/44.html](the Referrer header value is set to the same URL it&#039;s actually requesting).&lt;br /&gt;
&lt;br /&gt;
The WebKit source was updated since the Old3DS browser.&lt;br /&gt;
The New3DS browser uses the following services: [[MVD_Services|mvd:STD]] and [[IR_Services|ir:rst]](DLC-related services are used too but those aren&#039;t New3DS specific).&lt;br /&gt;
Video decoding is done with [[MVD_Services|mvd:STD]]. Audio decoding/playback is done with a browser-specific DSP binary. The Old3DS browser used CSND for audio playback, the New3DS browser doesn&#039;t have access to that at all since it uses DSP instead.&lt;br /&gt;
&lt;br /&gt;
=== Video / libstagefright ===&lt;br /&gt;
The browser manual includes licenses for Android and PacketVideo. The browser uses libstagefright from Android. Just like WebKit, the browser appears to use a very old version of libstagefright with security/other changes back-ported(for example, the v10.7 browser libstagefright codebase seems to be older than [https://android.googlesource.com/platform/frameworks/av/+/ec77122351b4e78c1fe5b60a208f76baf8c67591%5E%21/media/libstagefright/MPEG4Extractor.cpp this]). This codebase is missing certain chunk-parsing code for 3GP.&lt;br /&gt;
&lt;br /&gt;
HTTP for libstagefright is internally handled with [[HTTP_Services|HTTPC]], with a similar(?) set of RootCAs as for browser-version-check.&lt;br /&gt;
&lt;br /&gt;
===User-Agent and Browser Versions===&lt;br /&gt;
Normal user-agent format: &amp;lt;code style=&amp;quot;font-size:larger;&amp;quot;&amp;gt;Mozilla/5.0 (New Nintendo 3DS like iPhone) AppleWebKit/&amp;lt;WebKit version&amp;gt; (KHTML, like Gecko) NX/&amp;lt;Netfront version&amp;gt; Mobile NintendoBrowser/&amp;lt;Mobile NintendoBrowser version&amp;gt;.&amp;lt;region&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;region&amp;gt; can be one of the following: &amp;quot;JP&amp;quot;, &amp;quot;US&amp;quot;, or &amp;quot;EU&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Mobile NintendoBrowser version(displayed in browser settings)&lt;br /&gt;
! Normal UA&lt;br /&gt;
! Mobile UA&lt;br /&gt;
! CDN Title-version&lt;br /&gt;
! Network-only system-update version&lt;br /&gt;
! Notes&lt;br /&gt;
|-&lt;br /&gt;
| 1.0.9934&lt;br /&gt;
| Mozilla/5.0 (New Nintendo 3DS like iPhone) AppleWebKit/536.30 (KHTML, like Gecko) NX/3.0.0.5.8 Mobile NintendoBrowser/1.0.9934.&amp;lt;region&amp;gt;&lt;br /&gt;
| Mozilla/5.0 (iPhone; CPU iPhone OS 6_0 like Mac OS X) AppleWebKit/536.26 (KHTML, like Gecko) Version/6.0 Mobile/10A403 Safari/8536.25&lt;br /&gt;
| v10&lt;br /&gt;
| [[9.0.0-20]]&lt;br /&gt;
| Initial version.&lt;br /&gt;
|-&lt;br /&gt;
| 1.1.9996&lt;br /&gt;
| Mozilla/5.0 (New Nintendo 3DS like iPhone) AppleWebKit/536.30 (KHTML, like Gecko) NX/3.0.0.5.10 Mobile NintendoBrowser/1.1.9996.&amp;lt;region&amp;gt;&lt;br /&gt;
| Mozilla/5.0 (iPhone; CPU iPhone OS 6_0 like Mac OS X) AppleWebKit/536.26 (KHTML, like Gecko) Version/6.0 Mobile/10A403 Safari/8536.25&lt;br /&gt;
| v1027&lt;br /&gt;
| [[9.3.0-21]]&lt;br /&gt;
| See below regarding OSS changes.&lt;br /&gt;
|-&lt;br /&gt;
| 1.2.10085&lt;br /&gt;
| Mozilla/5.0 (New Nintendo 3DS like iPhone) AppleWebKit/536.30 (KHTML, like Gecko) NX/3.0.0.5.13 Mobile NintendoBrowser/1.2.10085.&amp;lt;region&amp;gt;&lt;br /&gt;
| Mozilla/5.0 (iPhone; CPU iPhone OS 6_0 like Mac OS X) AppleWebKit/536.26 (KHTML, like Gecko) Version/6.0 Mobile/10A403 Safari/8536.25&lt;br /&gt;
| v2051&lt;br /&gt;
| [[9.6.0-24]]&lt;br /&gt;
| See below.&lt;br /&gt;
|-&lt;br /&gt;
| None&lt;br /&gt;
| None&lt;br /&gt;
| None&lt;br /&gt;
| v3075&lt;br /&gt;
| v9.9 CUP&lt;br /&gt;
| v9.9 CUP dummy web-browser, see below.&lt;br /&gt;
|-&lt;br /&gt;
| 1.3.10126&lt;br /&gt;
| Mozilla/5.0 (New Nintendo 3DS like iPhone) AppleWebKit/536.30 (KHTML, like Gecko) NX/3.0.0.5.15 Mobile NintendoBrowser/1.3.10126.US&lt;br /&gt;
| Mozilla/5.0 (iPhone; CPU iPhone OS 6_0 like Mac OS X) AppleWebKit/536.26 (KHTML, like Gecko) Version/6.0 Mobile/10A403 Safari/8536.25&lt;br /&gt;
| v3077&lt;br /&gt;
| [[9.9.0-26]]&lt;br /&gt;
| See below.&lt;br /&gt;
|-&lt;br /&gt;
| 1.4.10138&lt;br /&gt;
| Mozilla/5.0 (New Nintendo 3DS like iPhone) AppleWebKit/536.30 (KHTML, like Gecko) NX/3.0.0.5.17 Mobile NintendoBrowser/1.4.10138.US&lt;br /&gt;
| Mozilla/5.0 (iPhone; CPU iPhone OS 6_0 like Mac OS X) AppleWebKit/536.26 (KHTML, like Gecko) Version/6.0 Mobile/10A403 Safari/8536.25&lt;br /&gt;
| v4096&lt;br /&gt;
| [[10.2.0-28]]&lt;br /&gt;
| See below.&lt;br /&gt;
|-&lt;br /&gt;
| 1.5.10143&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| v5121&lt;br /&gt;
| [[10.4.0-29]]&lt;br /&gt;
| See below.&lt;br /&gt;
|-&lt;br /&gt;
| 1.6.10147&lt;br /&gt;
| Mozilla/5.0 (New Nintendo 3DS like iPhone) AppleWebKit/536.30 (KHTML, like Gecko) NX/3.0.0.5.19 Mobile NintendoBrowser/1.6.10147.US&lt;br /&gt;
| Mozilla/5.0 (iPhone; CPU iPhone OS 6_0 like Mac OS X) AppleWebKit/536.26 (KHTML, like Gecko) Version/6.0 Mobile/10A403 Safari/8536.25&lt;br /&gt;
| v6144&lt;br /&gt;
| [[10.6.0-31]]&lt;br /&gt;
| See below.&lt;br /&gt;
|-&lt;br /&gt;
| 1.7.10150&lt;br /&gt;
| Mozilla/5.0 (New Nintendo 3DS like iPhone) AppleWebKit/536.30 (KHTML, like Gecko) NX/3.0.0.5.19 Mobile NintendoBrowser/1.7.10150.US&lt;br /&gt;
| &lt;br /&gt;
| v7184&lt;br /&gt;
| [[10.7.0-32]]&lt;br /&gt;
| See below.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Note that the latest Old3DS browser WebKit version at the time the initial New3DS browser was released, was the following: 532.8.&lt;br /&gt;
&lt;br /&gt;
The first version of the KOR New3DS browser was v9.6(which was when the New3DS KOR titles were originally added). Each version of the KOR browser has the same NintendoBrowser version as the other regions. The KOR browser has been only updated when the browser for the other regions were updated, hence the title-versions are the same as well. The KOR browser ExeFS .code is different from the other regions(more than just region-related IDs etc).&lt;br /&gt;
&lt;br /&gt;
==== OSS 9.0 and 9.3 diff ====&lt;br /&gt;
The following is a diff of the OSS archives from [http://www.nintendo.co.jp/support/oss/index.html here], for v9.0 and v9.3.&lt;br /&gt;
&lt;br /&gt;
 Files NewNintendo3DS_OpenSources9.0.0-/WKC/WebCore/platform/network/WKC/ResourceHandleManagerWKC.cpp and NewNintendo3DS_OpenSources9.3.0-/WKC/WebCore/platform/network/WKC/ResourceHandleManagerWKC.cpp differ&lt;br /&gt;
 Files NewNintendo3DS_OpenSources9.0.0-/WKC/WebKit/WKC/webkit/WKCVersion.h and NewNintendo3DS_OpenSources9.3.0-/WKC/WebKit/WKC/webkit/WKCVersion.h differ&lt;br /&gt;
&lt;br /&gt;
WKC_CUSTOMER_RELEASE_VERSION was changed from &amp;quot;0.5.8&amp;quot; to &amp;quot;0.5.10&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
The following code was added to ResourceHandleManager::doRedirect(): curl_easy_setopt(d-&amp;gt;m_handle, CURLOPT_SHARE, 0);&lt;br /&gt;
&lt;br /&gt;
==== v9.6 ====&lt;br /&gt;
WebKit/OSS code was actually updated.&lt;br /&gt;
ExeFS .code was updated. The following files in RomFS were updated:&lt;br /&gt;
* &amp;quot;/banner/CN/Skater.icn&amp;quot; and &amp;quot;/banner/KR/Skater.icn&amp;quot;.&lt;br /&gt;
* &amp;quot;/browser/rootca.pem&amp;quot;&lt;br /&gt;
* &amp;quot;/build/buildinfo.dat&amp;quot;&lt;br /&gt;
* &amp;quot;/cairo.cro.lex&amp;quot; and &amp;quot;/.crr/static.crr&amp;quot;&lt;br /&gt;
* &amp;quot;/lyt/Button/ButtonSelectHSearch.arc&amp;quot;&lt;br /&gt;
* &amp;quot;/lyt/Kbd/Swkbd.arc&amp;quot;&lt;br /&gt;
* &amp;quot;lyt/Kbd.arc&amp;quot;&lt;br /&gt;
* &amp;quot;skater.msbt&amp;quot; under all of the &amp;quot;/message/&amp;lt;region&amp;gt;_&amp;lt;language&amp;gt;/&amp;quot; directories.&lt;br /&gt;
* &amp;quot;/oss.cro.lex&amp;quot;, &amp;quot;/peer.cro.lex&amp;quot;, &amp;quot;/static.crs&amp;quot;, and &amp;quot;/webkit.cro.lex&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
The following was added to RomFS:&lt;br /&gt;
* &amp;quot;/favicon/naver.dat&amp;quot;&lt;br /&gt;
* A &amp;quot;KO&amp;quot; directory under &amp;quot;/iwnn&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==== v9.9 ====&lt;br /&gt;
ExeFS:/.code was updated.&lt;br /&gt;
&lt;br /&gt;
The only RomFS changes is file-updating, all of the following files were updated:&lt;br /&gt;
 /browser/rootca.pem&lt;br /&gt;
 /build/buildinfo.dat&lt;br /&gt;
 /cairo.cro.lex&lt;br /&gt;
 /.crr/static.crr&lt;br /&gt;
 /message/CN_Simp_Chinese/skater.msbt&lt;br /&gt;
 /message/EU_Dutch/skater.msbt&lt;br /&gt;
 /message/EU_English/skater.msbt&lt;br /&gt;
 /message/EU_French/skater.msbt&lt;br /&gt;
 /message/EU_German/skater.msbt&lt;br /&gt;
 /message/EU_Italian/skater.msbt&lt;br /&gt;
 /message/EU_Portuguese/skater.msbt&lt;br /&gt;
 /message/EU_Russian/skater.msbt&lt;br /&gt;
 /message/EU_Spanish/skater.msbt&lt;br /&gt;
 /message/JP_Japanese/skater.msbt&lt;br /&gt;
 /message/KR_Hangeul/skater.msbt&lt;br /&gt;
 /message/TW_English/skater.msbt&lt;br /&gt;
 /message/TW_Trad_Chinese/skater.msbt&lt;br /&gt;
 /message/US_English/skater.msbt&lt;br /&gt;
 /message/US_French/skater.msbt&lt;br /&gt;
 /message/US_Portuguese/skater.msbt&lt;br /&gt;
 /message/US_Spanish/skater.msbt&lt;br /&gt;
 /oss.cro.lex&lt;br /&gt;
 /peer.cro.lex&lt;br /&gt;
 /static.crs&lt;br /&gt;
 /webkit.cro.lex&lt;br /&gt;
&lt;br /&gt;
See [https://gist.github.com/yellows8/9fb509fde4112339f342 here] for a diff of the OSS(WebKitLibraries/ is not included due to the massive cairo library diff). An exploitable security vuln(which was already known in the context of 3DS webkit) was fixed. [[User:Yellows8|Yellows8]]&#039; private(at the time of writing) exploit for it is based on the PoC from [http://pastebin.com/ufBCQKda here](see the pastebin for the actual pastebin author).&lt;br /&gt;
&lt;br /&gt;
==== v10.2 ====&lt;br /&gt;
The libstagefright build in the main SKATER codebin was updated to a version which fixed libstagefright vuln(s): the vuln used in [[browserhax|browserhax_fright]] at the time of sysupdate release was fixed. The *only* code changed in the main codebin, was code related to libstagefright.&lt;br /&gt;
&lt;br /&gt;
The only RomFS changes is file-updating, all of the following files were updated(see the forced-sysupdate section regarding what changed in the message files):&lt;br /&gt;
 /browser/rootca.pem&lt;br /&gt;
 /build/buildinfo.dat&lt;br /&gt;
 /.crr/static.crr&lt;br /&gt;
 /message/CN_Simp_Chinese/skater.msbt&lt;br /&gt;
 /message/EU_Dutch/skater.msbt&lt;br /&gt;
 /message/EU_English/skater.msbt&lt;br /&gt;
 /message/EU_French/skater.msbt&lt;br /&gt;
 /message/EU_German/skater.msbt&lt;br /&gt;
 /message/EU_Italian/skater.msbt&lt;br /&gt;
 /message/EU_Portuguese/skater.msbt&lt;br /&gt;
 /message/EU_Russian/skater.msbt&lt;br /&gt;
 /message/EU_Spanish/skater.msbt&lt;br /&gt;
 /message/JP_Japanese/skater.msbt&lt;br /&gt;
 /message/KR_Hangeul/skater.msbt&lt;br /&gt;
 /message/TW_English/skater.msbt&lt;br /&gt;
 /message/TW_Trad_Chinese/skater.msbt&lt;br /&gt;
 /message/US_English/skater.msbt&lt;br /&gt;
 /message/US_French/skater.msbt&lt;br /&gt;
 /message/US_Portuguese/skater.msbt&lt;br /&gt;
 /message/US_Spanish/skater.msbt&lt;br /&gt;
 /oss.cro.lex&lt;br /&gt;
 /static.crs&lt;br /&gt;
 /webkit.cro.lex&lt;br /&gt;
&lt;br /&gt;
OSS diff:&lt;br /&gt;
 diff --git a/NewNintendo3DS_OpenSources9.9.0-/WKC/WebKit/WKC/webkit/WKCVersion.h b/NewNintendo3DS_OpenSources10.2.0-/WKC/WebKit/WKC/webkit/WKCVersion.h&lt;br /&gt;
 index 4543297..0860336 100644&lt;br /&gt;
 --- a/NewNintendo3DS_OpenSources9.9.0-/WKC/WebKit/WKC/webkit/WKCVersion.h&lt;br /&gt;
 +++ b/NewNintendo3DS_OpenSources10.2.0-/WKC/WebKit/WKC/webkit/WKCVersion.h&lt;br /&gt;
 @@ -29,7 +29,7 @@&lt;br /&gt;
  #define WKC_VERSION_CHECK(major, minor, micro) \&lt;br /&gt;
      (((major)*10000) + ((minor)*100) + (micro)) &amp;gt;= ((WKC_VERSION_MAJOR*10000) + (WKC_VERSION_MINOR*100) + (WKC_VERSION_MICRO))&lt;br /&gt;
  &lt;br /&gt;
 -#define WKC_CUSTOMER_RELEASE_VERSION &amp;quot;0.5.15&amp;quot;&lt;br /&gt;
 +#define WKC_CUSTOMER_RELEASE_VERSION &amp;quot;0.5.17&amp;quot;&lt;br /&gt;
  &lt;br /&gt;
  #define WKC_WEBKIT_VERSION &amp;quot;536.30&amp;quot;&lt;br /&gt;
  &lt;br /&gt;
 diff --git a/NewNintendo3DS_OpenSources9.9.0-/webkit/WebCore/ChangeLog b/NewNintendo3DS_OpenSources10.2.0-/webkit/WebCore/ChangeLog&lt;br /&gt;
 index a5abb35..cf5a9fa 100644&lt;br /&gt;
 --- a/NewNintendo3DS_OpenSources9.9.0-/webkit/WebCore/ChangeLog&lt;br /&gt;
 +++ b/NewNintendo3DS_OpenSources10.2.0-/webkit/WebCore/ChangeLog&lt;br /&gt;
 @@ -1,3 +1,12 @@&lt;br /&gt;
 +2013-11-05  Ryosuke Niwa  &amp;lt;rniwa@webkit.org&amp;gt;&lt;br /&gt;
 +&lt;br /&gt;
 +        Use-after-free in SliderThumbElement::dragFrom&lt;br /&gt;
 +        https://bugs.webkit.org/show_bug.cgi?id=123873&lt;br /&gt;
 +&lt;br /&gt;
 +        Reviewed by Andreas Kling.&lt;br /&gt;
 +&lt;br /&gt;
 +        Merge https://chromium.googlesource.com/chromium/blink/+/04a23bfca2d04101a1828d36ff36c29f3a24f34b&lt;br /&gt;
 +&lt;br /&gt;
  2015-02-06  Maciej Stachowiak  &amp;lt;mjs@apple.com&amp;gt;&lt;br /&gt;
  &lt;br /&gt;
          REGRESSION(r179706): Caused memory corruption on some tests (Requested by _ap_ on #webkit).&lt;br /&gt;
 @@ -879,7 +888,7 @@&lt;br /&gt;
          * rendering/RenderLineBoxList.cpp:&lt;br /&gt;
          (WebCore::RenderLineBoxList::dirtyLinesFromChangedChild):&lt;br /&gt;
  &lt;br /&gt;
 -2014-01-21  LÃ¡szlÃ³ LangÃ³  &amp;lt;llango.u-szeged@partner.samsung.com&amp;gt;&lt;br /&gt;
 +2014-01-21  Laszlo Lango  &amp;lt;llango.u-szeged@partner.samsung.com&amp;gt;&lt;br /&gt;
  &lt;br /&gt;
          Assertion failure in Range::nodeWillBeRemoved&lt;br /&gt;
          https://bugs.webkit.org/show_bug.cgi?id=121694&lt;br /&gt;
 @@ -1879,7 +1888,7 @@&lt;br /&gt;
  &lt;br /&gt;
  2012-09-14  Simon Fraser  &amp;lt;simon.fraser@apple.com&amp;gt;&lt;br /&gt;
  &lt;br /&gt;
 -        REGRESSION: transition doesnât always override transition-property&lt;br /&gt;
 +        REGRESSION: transition doesnft always override transition-property&lt;br /&gt;
          https://bugs.webkit.org/show_bug.cgi?id=96658&lt;br /&gt;
  &lt;br /&gt;
          Reviewed by Dean Jackson.&lt;br /&gt;
 @@ -3691,8 +3700,8 @@&lt;br /&gt;
              glyph with font data for the primary font, presumably to meet the SVG&lt;br /&gt;
              spec requirement: &amp;quot;If the references to alternate glyphs do not result&lt;br /&gt;
              in successful identification of alternate glyphs to use, then the&lt;br /&gt;
 -            character(s) that are inside of the çª¶åltGlyphçª¶?element are rendered as&lt;br /&gt;
 -            if the çª¶åltGlyphçª¶?element were a çª¶?spançª¶?element instead.&amp;quot;&lt;br /&gt;
 +            character(s) that are inside of the âaltGlyphâ?element are rendered as&lt;br /&gt;
 +            if the âaltGlyphâ?element were a â?spanâ?element instead.&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
              If the alt glyph is not then found we are in the case from the spec&lt;br /&gt;
              and indeed we should use the primary font. However, we end up replacing the GlyphPage&lt;br /&gt;
 diff --git a/NewNintendo3DS_OpenSources9.9.0-/webkit/WebCore/html/RangeInputType.cpp b/NewNintendo3DS_OpenSources10.2.0-/webkit/WebCore/html/RangeInputType.cpp&lt;br /&gt;
 index 484adec..d7e9e8d 100644&lt;br /&gt;
 --- a/NewNintendo3DS_OpenSources9.9.0-/webkit/WebCore/html/RangeInputType.cpp&lt;br /&gt;
 +++ b/NewNintendo3DS_OpenSources10.2.0-/webkit/WebCore/html/RangeInputType.cpp&lt;br /&gt;
 @@ -164,7 +164,7 @@ void RangeInputType::handleMouseDownEvent(MouseEvent* event)&lt;br /&gt;
      ASSERT(element()-&amp;gt;hasShadowRoot());&lt;br /&gt;
      if (targetNode != element() &amp;amp;&amp;amp; !targetNode-&amp;gt;isDescendantOf(element()-&amp;gt;shadowTree()-&amp;gt;oldestShadowRoot()))&lt;br /&gt;
          return;&lt;br /&gt;
 -    SliderThumbElement* thumb = sliderThumbElementOf(element());&lt;br /&gt;
 +    RefPtr&amp;lt;SliderThumbElement&amp;gt; thumb = sliderThumbElementOf(element());&lt;br /&gt;
      if (targetNode == thumb)&lt;br /&gt;
          return;&lt;br /&gt;
      thumb-&amp;gt;dragFrom(event-&amp;gt;absoluteLocation());&lt;br /&gt;
&lt;br /&gt;
==== v10.4 ====&lt;br /&gt;
The ExeFS codebin was updated, the only change was that the following code was updated in the actual NupCheck HTTPS request function:&lt;br /&gt;
* Previous version: sprintf(out, &amp;quot;https://cbvc.cdn.nintendo.net/SNAKE/2/%s&amp;quot;, region);&lt;br /&gt;
* Current  version: sprintf(out, &amp;quot;https://cbvc.cdn.nintendo.net/SNAKE/%d/%s&amp;quot;, 3, region);&lt;br /&gt;
&lt;br /&gt;
libpng was updated from version 1.5.21 to 1.5.24.&lt;br /&gt;
&lt;br /&gt;
The following RomFS files were updated(see the forced-sysupdate section regarding what changed in the message files):&lt;br /&gt;
 /browser/rootca.pem&lt;br /&gt;
 /build/buildinfo.dat&lt;br /&gt;
 /cairo.cro.lex&lt;br /&gt;
 /.crr/static.crr&lt;br /&gt;
 /message/CN_Simp_Chinese/skater.msbt&lt;br /&gt;
 /message/EU_Dutch/skater.msbt&lt;br /&gt;
 /message/EU_English/skater.msbt&lt;br /&gt;
 /message/EU_French/skater.msbt&lt;br /&gt;
 /message/EU_German/skater.msbt&lt;br /&gt;
 /message/EU_Italian/skater.msbt&lt;br /&gt;
 /message/EU_Portuguese/skater.msbt&lt;br /&gt;
 /message/EU_Russian/skater.msbt&lt;br /&gt;
 /message/EU_Spanish/skater.msbt&lt;br /&gt;
 /message/JP_Japanese/skater.msbt&lt;br /&gt;
 /message/KR_Hangeul/skater.msbt&lt;br /&gt;
 /message/TW_English/skater.msbt&lt;br /&gt;
 /message/TW_Trad_Chinese/skater.msbt&lt;br /&gt;
 /message/US_English/skater.msbt&lt;br /&gt;
 /message/US_French/skater.msbt&lt;br /&gt;
 /message/US_Portuguese/skater.msbt&lt;br /&gt;
 /message/US_Spanish/skater.msbt&lt;br /&gt;
 /oss.cro.lex differ&lt;br /&gt;
 /peer.cro.lex differ&lt;br /&gt;
 /static.crs differ&lt;br /&gt;
 /webkit.cro.lex differ&lt;br /&gt;
&lt;br /&gt;
==== v10.6 ====&lt;br /&gt;
The ExeFS codebin was updated.&lt;br /&gt;
&lt;br /&gt;
[[browserhax|browserhax_fright_tx3g]] was fixed. The code handling tx3g now matches the latest libstagefright git.&lt;br /&gt;
&lt;br /&gt;
Hence the below RomFS listing, no OSS was updated at all(besides libstagefright mentioned above).&lt;br /&gt;
&lt;br /&gt;
The following RomFS files were updated:&lt;br /&gt;
 /build/buildinfo.dat&lt;br /&gt;
 /static.crs&lt;br /&gt;
&lt;br /&gt;
==== v10.7 ====&lt;br /&gt;
Basically the same changes as Old3DS v10.7, except with the usual buildinfo.dat update in RomFS. The below date is 6 days after the browser-version-check [[3DS_Userland_Flaws|bypass]] was publicly disclosed.&lt;br /&gt;
&lt;br /&gt;
 cat v7184/00000025_romfs/build/buildinfo.dat&lt;br /&gt;
 10150&lt;br /&gt;
 applet&lt;br /&gt;
 2016-03-02 18:25&lt;br /&gt;
&lt;br /&gt;
=== New3DS Browser Specifications ===&lt;br /&gt;
[http://www.nintendo.co.jp/3ds/new/features/modal_net.html]&lt;br /&gt;
&lt;br /&gt;
English version:&lt;br /&gt;
* &amp;quot;Browser engine: NetFront® Browser NX v3.0&amp;quot;&lt;br /&gt;
* &amp;quot;User agent: Mozilla/5.0 (New Nintendo 3DS like iPhone) AppleWebKit/536.30 (KHTML and like Gecko) NX/3.0.*.*.* Mobile NintendoBrowser/1.0.**** JP&lt;br /&gt;
* ** Version information is stated.&lt;br /&gt;
* *** When using the “Mobile version request” function, it differs from the above-mentioned character string&amp;quot;&lt;br /&gt;
* &amp;quot;Supported protocols: HTTP1.0/HTTP1.1/SSL3.0/TLS1.0/TLS1.1/TLS1.2&amp;quot;&lt;br /&gt;
* &amp;quot;Web standard: HTML4.01 / HTML5 / XHTML1.1 / Fullscreen API / Gamepad API / SVG / WebSocket / Video Subtitle / WOFF / Web Messaging / Server-Sent / Web Storage (partial) / XMLHttpRequest / Canvas element / Video / DOM Levels 1-3 / ECMAScript / CSS1 / CSS2.1 / CSS3 (partial)&amp;quot;&lt;br /&gt;
* &amp;quot;Image format: bmp / ​​gif / ico / jpeg / png / svg (There are, however, possibilities that some images won&#039;t display.)&amp;quot;&lt;br /&gt;
* &amp;quot;Image preview: mpo / jpeg (There are, however, possibilities that some images won&#039;t display.)&amp;quot;&lt;br /&gt;
* &amp;quot;Video format: MP4, M3U8 + TS (HTTPLiveStreaming) (There are, however, some videos that may not be played.)&amp;quot;&lt;br /&gt;
* &amp;quot;Video codec: H.264 - MPEG-4 AVC Video (max 854x480 at level 3.2, 3D compatible) (There are, however, some videos that can not be played.)&amp;quot;&lt;br /&gt;
* &amp;quot;Audio codec: AAC - ISO / IEC 14496-3 MPEG-4AAC, MP3 (There are, however, some videos that can not be played.)&amp;quot;&lt;br /&gt;
* &amp;quot;Format for uploading 3D videos: .mkv (In order to be played, videos must be converted to the appropriate format within the site you are uploading to. In some cases, the video will not play even if converted.)&amp;quot;&lt;br /&gt;
* &amp;quot;Plug-ins: Plug-ins such as Adobe Flash are not supported&amp;quot;&lt;br /&gt;
* &amp;quot;Active Rating System filtering: provided by Digital Arts, Inc.. Access to web content can be limited based on its category information, restricting access to web content that may result inappropriate.&amp;quot;&lt;br /&gt;
* &amp;quot;Websites can be requested to provide the mobile version (However, if the web page does not have a mobile version, it won&#039;t change the way it&#039;s displayed.)&amp;quot;&lt;br /&gt;
&lt;br /&gt;
MJPEG + .avi is also supported.&lt;br /&gt;
&lt;br /&gt;
==== Notes ====&lt;br /&gt;
* The html &amp;quot;color&amp;quot; &amp;lt;input&amp;gt; type is not supported.&lt;br /&gt;
&lt;br /&gt;
== Old3DS browser ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Old3DS Browser Specifications ===&lt;br /&gt;
* &amp;quot;Browser engine: NetFront® Browser&amp;quot;&lt;br /&gt;
* &amp;quot;User agent: Mozilla/5.0 (Nintendo 3DS; region; ; en) Version/1.7498.US&amp;quot;&lt;br /&gt;
* &amp;quot;Supported protocols: HTTP1.0/HTTP1.1/SSLv3/TLS1.0&amp;quot;&lt;br /&gt;
* &amp;quot;Web standard: HTML 4.01/XHTML 1.1/CSS 1/CSS 2.1/CSS 3 (partial functionality)/DOM Levels 1-3/ECMAScript&lt;br /&gt;
/XMLHttpRequest/Canvas Element (partial functionality)&amp;quot;&lt;br /&gt;
* &amp;quot;Image format: MPO / GIF / JPEG / PNG / BMP / ICO (some images cannot be displayed)&amp;quot;&lt;br /&gt;
* &amp;quot;Plug-ins: Plug-ins such as Adobe Flash are not supported&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Old3DS browser doesn&#039;t support events &amp;quot;focusin&amp;quot; and &amp;quot;focusout&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== User-Agent and Browser Versions ===&lt;br /&gt;
User-agent format: &amp;lt;code style=&amp;quot;font-size:larger;&amp;quot;&amp;gt;Mozilla/5.0 (Nintendo 3DS; U; ; &amp;lt;lang&amp;gt;) Version/&amp;lt;version&amp;gt;.&amp;lt;region&amp;gt;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lang&amp;gt; is &amp;quot;en&amp;quot;, &amp;quot;fr&amp;quot;, etc. &amp;lt;region&amp;gt; is &amp;quot;US&amp;quot;, &amp;quot;EU&amp;quot;, etc. See below for &amp;lt;version&amp;gt;.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Browser version&lt;br /&gt;
! CDN Title-version&lt;br /&gt;
! Network-only system-update version&lt;br /&gt;
! Notes&lt;br /&gt;
|-&lt;br /&gt;
| 1.7412&lt;br /&gt;
| v6&lt;br /&gt;
| [[2.0.0-2|2.0.0-2]]&lt;br /&gt;
| This was the initial version.&lt;br /&gt;
|-&lt;br /&gt;
| 1.7455&lt;br /&gt;
| v1024&lt;br /&gt;
| [[2.1.0-4]]&lt;br /&gt;
| ExeFS .code was updated, both of the CROs(webkit/OSS) were updated too.&lt;br /&gt;
|-&lt;br /&gt;
| 1.7498&lt;br /&gt;
| v2050&lt;br /&gt;
| [[4.0.0-7]]&lt;br /&gt;
| ExeFS .code was updated, both of the CROs(webkit/OSS) were updated too. The manual CFA was updated as well.&lt;br /&gt;
|-&lt;br /&gt;
| 1.7538&lt;br /&gt;
| v0&lt;br /&gt;
| [[4.2.0-9]]&lt;br /&gt;
| First version of the KOR browser. The CROs are different from the  USA/EUR/JPN [[4.0.0-7]] browser.&lt;br /&gt;
|-&lt;br /&gt;
| 1.7552&lt;br /&gt;
| v3075&lt;br /&gt;
| [[5.0.0-11]]&lt;br /&gt;
| ExeFS .code and icon were updated, both of the CROs(webkit/OSS) were updated too. The manual CFA was updated as well.&lt;br /&gt;
|-&lt;br /&gt;
| 1.7552&lt;br /&gt;
| v3088&lt;br /&gt;
| [[7.0.0-13]]&lt;br /&gt;
| The main NCCH wasn&#039;t updated at all(same TMD contentID/content-hash as the previous version), only the manual CFA for this title was updated.&lt;br /&gt;
|-&lt;br /&gt;
| 1.7567&lt;br /&gt;
| v4096&lt;br /&gt;
| [[7.1.0-16]]&lt;br /&gt;
| The CXI .code was updated, some data in the RomFS was updated(none of the CROs such as webkit.cro were updated). The manual CFA was updated too.&lt;br /&gt;
|-&lt;br /&gt;
| 1.7585&lt;br /&gt;
| v5121&lt;br /&gt;
| [[9.5.0-23]]&lt;br /&gt;
| The CXI .code was updated, and the manual CFA was updated. RomFS changes:&lt;br /&gt;
* &amp;quot;/browser/rootca.pem&amp;quot; updated&lt;br /&gt;
* &amp;quot;/cro/oss.cro&amp;quot; updated&lt;br /&gt;
* &amp;quot;/cro/static.crs&amp;quot; updated&lt;br /&gt;
* &amp;quot;/cro/webkit.cro&amp;quot; updated&lt;br /&gt;
* &amp;quot;/.crr/static.crr&amp;quot; updated&lt;br /&gt;
* &amp;quot;/layout/dialogheader/WirelessSwitchOff.arc&amp;quot; was removed&lt;br /&gt;
* &amp;quot;/layout/favorite/favicondata/KOR.arc&amp;quot; updated&lt;br /&gt;
&lt;br /&gt;
A vuln used in a public(at the time of this sysupdate) webkit exploit for spider was fixed, which also fixed the removewinframe exploit from [https://github.com/yellows8/3ds_webkithax here].&lt;br /&gt;
|-&lt;br /&gt;
| None&lt;br /&gt;
| v6147&lt;br /&gt;
| v9.9 CUP&lt;br /&gt;
| v9.9 CUP dummy web-browser, see below.&lt;br /&gt;
|-&lt;br /&gt;
| 1.7610&lt;br /&gt;
| v6149&lt;br /&gt;
| [[9.9.0-26]]&lt;br /&gt;
| See below.&lt;br /&gt;
|-&lt;br /&gt;
| 1.7616&lt;br /&gt;
| v7168&lt;br /&gt;
| [[10.2.0-28]]&lt;br /&gt;
| See below.&lt;br /&gt;
|-&lt;br /&gt;
| 1.7622&lt;br /&gt;
| v8192&lt;br /&gt;
| [[10.6.0-31]]&lt;br /&gt;
| See below.&lt;br /&gt;
|-&lt;br /&gt;
| 1.7625&lt;br /&gt;
| v9232&lt;br /&gt;
| [[10.7.0-32]]&lt;br /&gt;
| See below.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Heap ===&lt;br /&gt;
The USA/EUR/JPN + KOR browser allocates the 0x08000000 heap with size 0x01A97000. The size used by the CHN and TWN browser is 0x01997000, exactly 0x100000-bytes smaller.&lt;br /&gt;
&lt;br /&gt;
=== Old3DS v9.9 ===&lt;br /&gt;
ExeFS:/.code was updated.&lt;br /&gt;
&lt;br /&gt;
The only changes in RomFS were file-updating, the following files were updated:&lt;br /&gt;
 /browser/rootca.pem&lt;br /&gt;
 /cro/oss.cro&lt;br /&gt;
 /cro/static.crs&lt;br /&gt;
 /cro/webkit.cro&lt;br /&gt;
 /.crr/static.crr&lt;br /&gt;
 /message/CN_Simp_Chinese/spider.msbt&lt;br /&gt;
 /message/EU_Dutch/spider.msbt&lt;br /&gt;
 /message/EU_English/spider.msbt&lt;br /&gt;
 /message/EU_French/spider.msbt&lt;br /&gt;
 /message/EU_German/spider.msbt&lt;br /&gt;
 /message/EU_Italian/spider.msbt&lt;br /&gt;
 /message/EU_Portuguese/spider.msbt&lt;br /&gt;
 /message/EU_Russian/spider.msbt&lt;br /&gt;
 /message/EU_Spanish/spider.msbt&lt;br /&gt;
 /message/JP_Japanese/spider.msbt&lt;br /&gt;
 /message/KR_Hangeul/spider.msbt&lt;br /&gt;
 /message/TW_English/spider.msbt&lt;br /&gt;
 /message/TW_Trad_Chinese/spider.msbt&lt;br /&gt;
 /message/US_English/spider.msbt&lt;br /&gt;
 /message/US_French/spider.msbt&lt;br /&gt;
 /message/US_Portuguese/spider.msbt&lt;br /&gt;
 /message/US_Spanish/spider.msbt&lt;br /&gt;
&lt;br /&gt;
OSS diff for v9.5 and v9.9, without the .dox changes:&lt;br /&gt;
&lt;br /&gt;
 diff --git a/3DS_InternetBrowser_OpenSources_JP_US_EU_KR_TW_HK_CN_9.5.0(23J_23U_23E_19K_18T_3C)/WKC/WebKit/WKC/webkit/WKCVersion.h b/3DS_InternetBrowser_OpenSources_JP_US_EU_KR_TW_HK_CN_9.9.0/WKC/WebKit/WKC/webkit/WKCVersion.h&lt;br /&gt;
 index be5ff09..55a7274 100644&lt;br /&gt;
 --- a/3DS_InternetBrowser_OpenSources_JP_US_EU_KR_TW_HK_CN_9.5.0(23J_23U_23E_19K_18T_3C)/WKC/WebKit/WKC/webkit/WKCVersion.h&lt;br /&gt;
 +++ b/3DS_InternetBrowser_OpenSources_JP_US_EU_KR_TW_HK_CN_9.9.0/WKC/WebKit/WKC/webkit/WKCVersion.h&lt;br /&gt;
 @@ -29,7 +29,7 @@&lt;br /&gt;
  #define WKC_VERSION_CHECK(major, minor, micro) \&lt;br /&gt;
      (((major)*10000) + ((minor)*100) + (micro)) &amp;gt;= ((WKC_VERSION_MAJOR*10000) + (WKC_VERSION_MINOR*100) + (WKC_VERSION_MICRO))&lt;br /&gt;
  &lt;br /&gt;
 -#define WKC_CUSTOMER_RELEASE_VERSION &amp;quot;1.8.14&amp;quot;&lt;br /&gt;
 +#define WKC_CUSTOMER_RELEASE_VERSION &amp;quot;1.8.16&amp;quot;&lt;br /&gt;
  &lt;br /&gt;
  #define WKC_WEBKIT_VERSION &amp;quot;532.7&amp;quot;&lt;br /&gt;
  &lt;br /&gt;
 diff --git a/3DS_InternetBrowser_OpenSources_JP_US_EU_KR_TW_HK_CN_9.5.0(23J_23U_23E_19K_18T_3C)/webkit/WebCore/rendering/RenderBox.cpp b/3DS_InternetBrowser_OpenSources_JP_US_EU_KR_TW_HK_CN_9.9.0/webkit/WebCore/rendering/RenderBox.cpp&lt;br /&gt;
 index da4127e..d03403e 100644&lt;br /&gt;
 --- a/3DS_InternetBrowser_OpenSources_JP_US_EU_KR_TW_HK_CN_9.5.0(23J_23U_23E_19K_18T_3C)/webkit/WebCore/rendering/RenderBox.cpp&lt;br /&gt;
 +++ b/3DS_InternetBrowser_OpenSources_JP_US_EU_KR_TW_HK_CN_9.9.0/webkit/WebCore/rendering/RenderBox.cpp&lt;br /&gt;
 @@ -305,23 +305,23 @@ int RenderBox::scrollHeight() const&lt;br /&gt;
  &lt;br /&gt;
  int RenderBox::scrollLeft() const&lt;br /&gt;
  {&lt;br /&gt;
 -    return hasOverflowClip() ? layer()-&amp;gt;scrollXOffset() : 0;&lt;br /&gt;
 +    return layer() &amp;amp;&amp;amp; hasOverflowClip() ? layer()-&amp;gt;scrollXOffset() : 0;&lt;br /&gt;
  }&lt;br /&gt;
  &lt;br /&gt;
  int RenderBox::scrollTop() const&lt;br /&gt;
  {&lt;br /&gt;
 -    return hasOverflowClip() ? layer()-&amp;gt;scrollYOffset() : 0;&lt;br /&gt;
 +    return layer() &amp;amp;&amp;amp; hasOverflowClip() ? layer()-&amp;gt;scrollYOffset() : 0;&lt;br /&gt;
  }&lt;br /&gt;
 &lt;br /&gt;
  void RenderBox::setScrollLeft(int newLeft)&lt;br /&gt;
  {&lt;br /&gt;
 -    if (hasOverflowClip())&lt;br /&gt;
 +    if (hasOverflowClip() &amp;amp;&amp;amp; layer())&lt;br /&gt;
          layer()-&amp;gt;scrollToXOffset(newLeft);&lt;br /&gt;
  }&lt;br /&gt;
  &lt;br /&gt;
  void RenderBox::setScrollTop(int newTop)&lt;br /&gt;
  {&lt;br /&gt;
 -    if (hasOverflowClip())&lt;br /&gt;
 +    if (hasOverflowClip() &amp;amp;&amp;amp; layer())&lt;br /&gt;
          layer()-&amp;gt;scrollToYOffset(newTop);&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
=== Old3DS v10.2 ===&lt;br /&gt;
The slider vuln from [https://github.com/yellows8/3ds_webkithax here] was fixed in the Old3DS browser.&lt;br /&gt;
&lt;br /&gt;
The main codebin .text only increased by 0x10-bytes.&lt;br /&gt;
&lt;br /&gt;
The only changes in RomFS was that the following files were updated:&lt;br /&gt;
 /cro/oss.cro&lt;br /&gt;
 /cro/static.crs&lt;br /&gt;
 /cro/webkit.cro&lt;br /&gt;
 /.crr/static.crr&lt;br /&gt;
&lt;br /&gt;
OSS diff:&lt;br /&gt;
 diff --git a/3DS_InternetBrowser_OpenSources_JP_US_EU_KR_TW_HK_CN_9.9.0/WKC/WebKit/WKC/webkit/WKCVersion.h b/3DS_InternetBrowser_OpenSources_JP_US_EU_KR_TW_HK_CN_10.2.0/WKC/WebKit/WKC/webkit/WKCVersion.h&lt;br /&gt;
 index 55a7274..fc153c4 100644&lt;br /&gt;
 --- a/3DS_InternetBrowser_OpenSources_JP_US_EU_KR_TW_HK_CN_9.9.0/WKC/WebKit/WKC/webkit/WKCVersion.h&lt;br /&gt;
 +++ b/3DS_InternetBrowser_OpenSources_JP_US_EU_KR_TW_HK_CN_10.2.0/WKC/WebKit/WKC/webkit/WKCVersion.h&lt;br /&gt;
 @@ -29,7 +29,7 @@&lt;br /&gt;
  #define WKC_VERSION_CHECK(major, minor, micro) \&lt;br /&gt;
      (((major)*10000) + ((minor)*100) + (micro)) &amp;gt;= ((WKC_VERSION_MAJOR*10000) + (WKC_VERSION_MINOR*100) + (WKC_VERSION_MICRO))&lt;br /&gt;
  &lt;br /&gt;
 -#define WKC_CUSTOMER_RELEASE_VERSION &amp;quot;1.8.16&amp;quot;&lt;br /&gt;
 +#define WKC_CUSTOMER_RELEASE_VERSION &amp;quot;1.8.17&amp;quot;&lt;br /&gt;
  &lt;br /&gt;
  #define WKC_WEBKIT_VERSION &amp;quot;532.7&amp;quot;&lt;br /&gt;
  &lt;br /&gt;
 diff --git a/3DS_InternetBrowser_OpenSources_JP_US_EU_KR_TW_HK_CN_9.9.0/webkit/WebCore/rendering/RenderSlider.cpp b/3DS_InternetBrowser_OpenSources_JP_US_EU_KR_TW_HK_CN_10.2.0/webkit/WebCore/rendering/RenderSlider.cpp&lt;br /&gt;
 index b2f5cef..1dd3dbd 100644&lt;br /&gt;
 --- a/3DS_InternetBrowser_OpenSources_JP_US_EU_KR_TW_HK_CN_9.9.0/webkit/WebCore/rendering/RenderSlider.cpp&lt;br /&gt;
 +++ b/3DS_InternetBrowser_OpenSources_JP_US_EU_KR_TW_HK_CN_10.2.0/webkit/WebCore/rendering/RenderSlider.cpp&lt;br /&gt;
 @@ -221,6 +221,7 @@ RenderSlider::~RenderSlider()&lt;br /&gt;
  {&lt;br /&gt;
      if (m_thumb)&lt;br /&gt;
          m_thumb-&amp;gt;detach();&lt;br /&gt;
 +    m_thumb = 0;&lt;br /&gt;
  }&lt;br /&gt;
  &lt;br /&gt;
  int RenderSlider::baselinePosition(bool, bool) const&lt;br /&gt;
 @@ -493,7 +494,8 @@ void RenderSlider::forwardEvent(Event* event)&lt;br /&gt;
          }&lt;br /&gt;
      }&lt;br /&gt;
  &lt;br /&gt;
 -    m_thumb-&amp;gt;defaultEventHandler(event);&lt;br /&gt;
 +    if (m_thumb)&lt;br /&gt;
 +        m_thumb-&amp;gt;defaultEventHandler(event);&lt;br /&gt;
  }&lt;br /&gt;
  &lt;br /&gt;
  bool RenderSlider::inDragMode() const&lt;br /&gt;
&lt;br /&gt;
=== Old3DS v10.6 ===&lt;br /&gt;
[[browserhax|spider28hax]] was fixed. The &amp;quot;2^32 characters long string&amp;quot; vuln described [[3DS_Userland_Flaws|here]] was &#039;&#039;finally&#039;&#039; fixed.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;A lot&#039;&#039; of WebKit issues/vulns were fixed, see [https://gist.github.com/yellows8/b1e10caa1d8bb8a46316 here] for the changes.&lt;br /&gt;
&lt;br /&gt;
libpng was updated from version 1.4.12 to 1.4.19. zlib was updated from 1.2.7 to 1.2.8.&lt;br /&gt;
&lt;br /&gt;
The .text size increased by 0x478-bytes.&lt;br /&gt;
&lt;br /&gt;
The only changes in RomFS was that the following files were updated:&lt;br /&gt;
 /cro/oss.cro&lt;br /&gt;
 /cro/static.crs&lt;br /&gt;
 /cro/webkit.cro&lt;br /&gt;
 /.crr/static.crr&lt;br /&gt;
 /manual/Manual.bcma&lt;br /&gt;
&lt;br /&gt;
=== Old3DS v10.7 ===&lt;br /&gt;
&#039;&#039;Nothing&#039;&#039; changed except some words for version-values in .text being updated(RomFS wasn&#039;t changed), code for browser-version-check was [[#v10.7_2|updated]].&lt;br /&gt;
&lt;br /&gt;
== Forced system-update ==&lt;br /&gt;
The Old3DS/New3DS Internet Browser updated with [[9.9.0-26]] added the following message strings:&lt;br /&gt;
 In order to use the Internet &lt;br /&gt;
 browser, a system update &lt;br /&gt;
 is required.&lt;br /&gt;
 To perform a system update, &lt;br /&gt;
 select System Update from Other&lt;br /&gt;
 Settings in System Settings.&lt;br /&gt;
&lt;br /&gt;
 The Internet browser cannot be&lt;br /&gt;
 used at this time.&lt;br /&gt;
 Please check your network&lt;br /&gt;
 environment or try again later.&lt;br /&gt;
&lt;br /&gt;
For whatever reason, the above &#039;&#039;message strings&#039;&#039; were removed with New3DS-browser v10.2, then re-added with v10.4. This does not apply to the Old3DS browser. Whenever v10.2 New3DS browser tries to use these message-strings for displaying a browser-update-related message, it will crash due to an assert failing since the message-strings are missing. Hence, if/when the v10.2 update-check page is ever updated where the browser tries to display a message for it, or when accessing that page fails, the browser will automatically crash.&lt;br /&gt;
&lt;br /&gt;
This wasn&#039;t enforced(web-browser displaying the above message when the installed browser isn&#039;t the latest version) until October 26, 2015.&lt;br /&gt;
&lt;br /&gt;
This message only triggers when attempting to load a web-page. This is only handled the first time the browser accesses a web-page, during this browser session.&lt;br /&gt;
&lt;br /&gt;
The browser codebins starting with v9.9 now contain the following URL strings:&lt;br /&gt;
* Old3DS: &amp;lt;nowiki&amp;gt;&amp;quot;https://cbvc.cdn.nintendo.net/CTR/1/&amp;lt;region&amp;gt;&amp;quot;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
* New3DS: &amp;lt;nowiki&amp;gt;&amp;quot;https://cbvc.cdn.nintendo.net/SNAKE/1/&amp;lt;region&amp;gt;&amp;quot;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;region&amp;gt; string is one of the following:&lt;br /&gt;
* &amp;quot;JPN&amp;quot;&lt;br /&gt;
* &amp;quot;USA&amp;quot;&lt;br /&gt;
* &amp;quot;EUR&amp;quot;&lt;br /&gt;
* &amp;quot;KOR&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Starting with the browser from [[10.2.0-28]], the &amp;quot;1&amp;quot; in the above URLs were changed to &amp;quot;2&amp;quot;. With the New3DS browser from [[10.4.0-29]], it&#039;s now &amp;quot;3&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
As of October 26, 2015, the &amp;quot;1&amp;quot; URLs return the browser-version for v9.9(decimal number as a string without any &amp;quot;.&amp;quot;), while the &amp;quot;2&amp;quot; URLs returns 0.&lt;br /&gt;
&lt;br /&gt;
 if(internal_browserver &amp;gt; server_browserver)&lt;br /&gt;
 {&lt;br /&gt;
     &amp;lt;safe&amp;gt;&lt;br /&gt;
 }&lt;br /&gt;
 else&lt;br /&gt;
 {&lt;br /&gt;
     &amp;lt;update message&amp;gt;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Hence, internal_browserver == server_browserver will trigger the sysupdate message, which appears to be the normal way to indicate that the current browser is outdated(see above).&lt;br /&gt;
&lt;br /&gt;
There is a cache for this in savedata. The request is only done when at least 24-hours have passed since the last time the request was done(see the below savedata section).&lt;br /&gt;
&lt;br /&gt;
It is still possible to guard against this update by blocking the previous URLs using a proxy. &lt;br /&gt;
It is not possible to remove the update message by entering the [[Recovery Mode]].&lt;br /&gt;
&lt;br /&gt;
=== Page request ===&lt;br /&gt;
For this request, all root-CAs bundled with the browser are trusted, in addition to two of the SSL module builtin Nintendo root-CAs.&lt;br /&gt;
&lt;br /&gt;
The browser(with New3DS at least) does the following with [[HTTP_Services|HTTPC]] for requesting the above page:&lt;br /&gt;
* Initializes the HTTP context and uses [[HTTPC:InitializeConnectionSession]] + [[HTTPC:SetProxyDefault]].&lt;br /&gt;
* Uses [[HTTP_Services|HTTPC]] command 0x250080 twice with cmd[1]=contexthandle: first time cmd[2]=0x3, second time cmd[2]=0x6.&lt;br /&gt;
* Then [[HTTPC:AddTrustedRootCA]] is used 48 times to setup 48 trusted root CAs. This appears to be every cert in the browser &amp;quot;romfs:/browser/rootca.pem&amp;quot; file converted to DER, in the same order from there(in other words, every single root CA the browser trusts by default for normal web-browsing).&lt;br /&gt;
* Then [[HTTPC:BeginRequest]] is used.&lt;br /&gt;
* Then [[HTTPC:ReceiveDataTimeout]] is used, the recv-size seems to be fixed to 0x20.&lt;br /&gt;
* Then [[HTTPC:GetResponseStatusCodeTimeout]] is used.&lt;br /&gt;
* Then [[HTTPC:GetDownloadSizeState]] is used.&lt;br /&gt;
* Then the HTTP context is closed.&lt;br /&gt;
&lt;br /&gt;
Raw request data(New3DS USA v10.2 browser):&lt;br /&gt;
 000000: 47 45 54 20 2f 53 4e 41 4b 45 2f 32 2f 55 53 41  GET /SNAKE/2/USA&lt;br /&gt;
 000010: 20 48 54 54 50 2f 31 2e 31 0d 0a 48 6f 73 74 3a   HTTP/1.1..Host:&lt;br /&gt;
 000020: 20 63 62 76 63 2e 63 64 6e 2e 6e 69 6e 74 65 6e   cbvc.cdn.ninten&lt;br /&gt;
 000030: 64 6f 2e 6e 65 74 0d 0a 0d 0a                    do.net....&lt;br /&gt;
&lt;br /&gt;
=== v10.7 ===&lt;br /&gt;
The only actual code change with Old3DS/New3DS browser v10.7 was that the code which calculates the diff_timestamp was moved to immediately after the block which initializes &amp;lt;state_timestamp&amp;gt; when &amp;lt;state_timestamp&amp;gt; is all-zero. This fixed the browser-version-check [[3DS_Userland_Flaws|bypass]].&lt;br /&gt;
&lt;br /&gt;
== v9.9+ dummy web-browser ==&lt;br /&gt;
Gamecards v9.9 and above include, with their sysupdate, a dummy Old3DS/New3DS web-browser. The *only* thing this title does is display the same message listed in the above forced-update section. The message files in RomFS *only* contain that message string above. There are no &amp;quot;http&amp;quot; strings in the main codebin, and [[RO_Services|RO]] isn&#039;t used either(no CRO data in RomFS at all). Both browsers are internally called &amp;quot;dummySpider&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Hence, if you update your system with any v9.9 or above gamecard, the system web-browser will be rendered *completely* useless until you install a system-update from CDN(no network requests involved here).&lt;br /&gt;
&lt;br /&gt;
== Savedata ==&lt;br /&gt;
=== New3DS ===&lt;br /&gt;
On newer SKATER versions, it appears *all* NAND savedata is stored under the [[System_SaveData|0x000200BB]] savedata.&lt;br /&gt;
&lt;br /&gt;
==== 0x000200BB savedata ====&lt;br /&gt;
This only contains &amp;quot;t.bin&amp;quot; with filesize 0xadf80, the format is below.&lt;br /&gt;
&lt;br /&gt;
The timestamp format used here is the number of milliseconds since January 1, 2000(local-time).&lt;br /&gt;
&lt;br /&gt;
When using the &amp;quot;Initialize savedata&amp;quot; option in the browser, that deletes this savedata file/image then exits the browser. This file is then re-created when the browser gets started again.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset&lt;br /&gt;
! Size&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x68&lt;br /&gt;
| 0x4?&lt;br /&gt;
| This counter is incremented each time the savedata is written.&lt;br /&gt;
|-&lt;br /&gt;
| 0x70&lt;br /&gt;
| 0x8&lt;br /&gt;
| Timestamp for when the savedata was last written.&lt;br /&gt;
|-&lt;br /&gt;
| 0x94&lt;br /&gt;
| 0x15?&lt;br /&gt;
| This is all-zeros on non-JPN systems. On JPN systems where the browser filter is disabled, this is a string in the following format: &amp;quot;4110-%016llX&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| 0xD8&lt;br /&gt;
| 0x8&lt;br /&gt;
| s64 timestamp, can be either a normal positive timestamp or a relative negative one. Used with the forced-update described above. When an update is detected this timestamp is negative, otherwise this is a normal positive timestamp(it&#039;s unknown how exactly this timestamp is checked). When positive, this seems to be the last time the forced-update HTTPS request was done where no update was needed.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==APT Parameters==&lt;br /&gt;
The URL to load can optionally be loaded from char[] string [[APT:SendParameter|paramblk+0]]. This is used when scanning URL QR-codes in Home Menu / etc.&lt;br /&gt;
&lt;br /&gt;
==Errors==&lt;br /&gt;
&amp;quot;Failed to load part of this page&amp;quot;: This can be caused by failing to load &amp;quot;/favicon.ico&amp;quot;. For example, this can be caused by loading a plain HTTP page, with plain-http favicon redirecting to HTTPS. If cert-verify then fails with favicon in this case, this error would then trigger.&lt;br /&gt;
&lt;br /&gt;
==Other details==&lt;br /&gt;
&lt;br /&gt;
*It scored 90/100 on [http://acid3.acidtests.org/ Acid3] test&lt;br /&gt;
*Images from the Internet can be saved to the [[SD Filesystem|SD Card]] and viewed using the [[Nintendo 3DS Camera]] application.&lt;br /&gt;
*Images saved to an [[SD Filesystem|SD Card]] or to the Nintendo 3DS system memory can be uploaded to blogs or other sites that allow the uploading of photos using :&lt;br /&gt;
 &amp;lt;input type=&amp;quot;file&amp;quot; /&amp;gt;&lt;br /&gt;
* HTML5Test.com say that Drag and drop is supported but it&#039;s not (code on WebKit is ready, but it&#039;s not implemented on interface of browser)&lt;br /&gt;
&lt;br /&gt;
==Tips==&lt;br /&gt;
&lt;br /&gt;
=== Detect User Agent ===&lt;br /&gt;
&lt;br /&gt;
To detect if the user agent is Nintendo 3DS Browser :&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;script type=&amp;quot;text/javascript&amp;quot;&amp;gt;&lt;br /&gt;
     if (navigator.userAgent.indexOf(&#039;Nintendo 3DS&#039;) == -1) { //If the UserAgent is not &amp;quot;Nintendo 3DS&amp;quot;&lt;br /&gt;
         location.replace(&#039;http://www.3dbrew.org&#039;); //Redirect to an other page&lt;br /&gt;
     }&lt;br /&gt;
 &amp;lt;/script&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* You can check &amp;lt;em&amp;gt;navigator.platform==&amp;quot;Nintendo 3DS&amp;quot;&amp;lt;/em&amp;gt; as well.&lt;br /&gt;
&lt;br /&gt;
=== Scrolling ===&lt;br /&gt;
&lt;br /&gt;
Scrolling can be altered by modifying &amp;lt;em&amp;gt;document.body.scrollTop&amp;lt;/em&amp;gt; and &amp;lt;em&amp;gt;document.body.scrollLeft&amp;lt;/em&amp;gt;.  However, there are drawbacks related to working with these properties:&lt;br /&gt;
&lt;br /&gt;
* Both properties return 0 when accessed&lt;br /&gt;
* Setting one property resets the other property&#039;s scroll position&lt;br /&gt;
&lt;br /&gt;
In order to set both at the same time (without either resetting to 0), use &amp;lt;em&amp;gt;window.scrollTo&amp;lt;/em&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Events ===&lt;br /&gt;
==== Key Events ====&lt;br /&gt;
The following buttons trigger the &amp;lt;em&amp;gt;onkeydown&amp;lt;/em&amp;gt;, &amp;lt;em&amp;gt;onkeypress&amp;lt;/em&amp;gt; and &amp;lt;em&amp;gt;onkeyup&amp;lt;/em&amp;gt; events:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; width=&amp;quot;20%&amp;quot;&lt;br /&gt;
! Code !! Button &lt;br /&gt;
|-&lt;br /&gt;
| 13 || A&lt;br /&gt;
|-&lt;br /&gt;
| 37 || Left&lt;br /&gt;
|-&lt;br /&gt;
| 38 || Up&lt;br /&gt;
|-&lt;br /&gt;
| 39 || Right&lt;br /&gt;
|-&lt;br /&gt;
| 40 || Down&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The events cannot have their default action cancelled.  Other buttons do not trigger key events.&lt;br /&gt;
&lt;br /&gt;
==== Touch/Mouse Events ====&lt;br /&gt;
&amp;lt;em&amp;gt;onmousedown&amp;lt;/em&amp;gt;, &amp;lt;em&amp;gt;onmouseup&amp;lt;/em&amp;gt; &amp;amp; &amp;lt;em&amp;gt;onclick&amp;lt;/em&amp;gt; are all triggered by the browser.  However, the &amp;lt;em&amp;gt;onmousedown&amp;lt;/em&amp;gt; event doesn&#039;t trigger until you lift the stylus or you&#039;ve held it on the screen for ~2 seconds—which is when text selection mode is activated—making it pretty much the same as &amp;lt;em&amp;gt;onmouseup&amp;lt;/em&amp;gt;.  The events cannot have their default action cancelled.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;em&amp;gt;onmousemove&amp;lt;/em&amp;gt; and common touch/gesture events are not supported.&lt;br /&gt;
&lt;br /&gt;
== Screen Resolution ==&lt;br /&gt;
&lt;br /&gt;
The up screen resolution is 400×240. However, the viewable area in the browser is only &amp;lt;b&amp;gt;400×220&amp;lt;/b&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The touch screen resolution is 320×240. However, the viewable area in the browser is only &amp;lt;b&amp;gt;320×212&amp;lt;/b&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
You can have a page span both screens. However, the browser will behave as if the bottom screen is the only active screen and the top screen is scrolled off. This is important when computing CSS coordinates. Items positioned from &amp;quot;bottom&amp;quot; will be positioned based on 220px and not the full 432px of both screens.&lt;br /&gt;
&lt;br /&gt;
== Using Both Screens ==&lt;br /&gt;
&lt;br /&gt;
Generally the easiest way to accomplish the correct layout is to create HTML elements that &amp;quot;contain&amp;quot; the top and bottom screens. Here&#039;s an example:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;!DOCTYPE html&amp;gt;&lt;br /&gt;
 &amp;lt;html&amp;gt;&lt;br /&gt;
   &amp;lt;head&amp;gt;&lt;br /&gt;
     &amp;lt;meta name=&amp;quot;viewport&amp;quot; content=&amp;quot;width=400&amp;quot;&amp;gt;&lt;br /&gt;
     &amp;lt;style&amp;gt;&lt;br /&gt;
       body{margin:0px;}&lt;br /&gt;
       #topscreen{width:400px;height:220px;overflow:hidden;}&lt;br /&gt;
       #bottomscreen{width:320px;height:212px;overflow:hidden;margin:0 auto;}&lt;br /&gt;
     &amp;lt;/style&amp;gt;&lt;br /&gt;
   &amp;lt;/head&amp;gt;&lt;br /&gt;
   &amp;lt;body&amp;gt;&lt;br /&gt;
     &amp;amp;lt;div id=&amp;quot;topscreen&amp;quot;&amp;gt;Top Screen&amp;amp;lt;/div&amp;gt;&lt;br /&gt;
     &amp;amp;lt;div id=&amp;quot;bottomscreen&amp;quot;&amp;gt;Bottom Screen&amp;amp;lt;/div&amp;gt;&lt;br /&gt;
   &amp;lt;/body&amp;gt;&lt;br /&gt;
 &amp;lt;/html&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This scheme allows the page to be easily manipulated through JavaScript.  In order to have the window snap to the correct position, use the following JavaScript code:&lt;br /&gt;
&lt;br /&gt;
 window.setInterval(function () {&lt;br /&gt;
     window.scrollTo(40, 220);  &lt;br /&gt;
 }, 50);&lt;br /&gt;
&lt;br /&gt;
This automatically resets the position if the user accidentally scrolls the page.&lt;br /&gt;
&lt;br /&gt;
==Example Sites==&lt;br /&gt;
&amp;lt;!-- If you have a website that demonstrates these techniques, place it here! --&amp;gt;&lt;br /&gt;
* [http://www.nintendo.com/3ds/internetbrowser/bookmarks Nintendo 3DS Bookmarks] - This is the first bookmark pre-installed in the browser.&lt;br /&gt;
* [http://3ds.andysmith.co.uk/jFox.html jFox] (Short URL: http://bit.ly/iB7FqW)&lt;br /&gt;
* [http://ditto3d.com/3ds Ditto3D] (Short URL: http://bit.ly/oVreWA)&lt;/div&gt;</summary>
		<author><name>EvilFlight</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=Makerom&amp;diff=17471</id>
		<title>Makerom</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=Makerom&amp;diff=17471"/>
		<updated>2016-06-06T01:19:01Z</updated>

		<summary type="html">&lt;p&gt;EvilFlight: fix sample rsf link&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox homebrew&lt;br /&gt;
| title       = makerom&lt;br /&gt;
| type        = pc utility&lt;br /&gt;
| author      = [[User:3dsguy|3dsguy]]&lt;br /&gt;
| download = https://github.com/profi200/Project_CTR/releases&lt;br /&gt;
| source = https://github.com/profi200/Project_CTR/tree/master/makerom&lt;br /&gt;
| version     = 0.15&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
makerom is a tool which can be used to create [[NCCH]], [[NCSD|CCI]], and [[CIA]] files.&lt;br /&gt;
&lt;br /&gt;
== Format Overviews ==&lt;br /&gt;
=== NCCH ===&lt;br /&gt;
The native format storing code binaries and data archives for the 3DS is [[NCCH]]. [[NCCH]] files are comprised of:&lt;br /&gt;
* code/exheader/plainregion (used for code execution) (plainregion just lists included SDK library add-ons)&lt;br /&gt;
* icon (app title text, icon, homemenu settings, see [[SMDH|here]]&lt;br /&gt;
* banner (cbmd + cwav, i.e. the upper screen banner/sound shown on the homemenu)&lt;br /&gt;
* logo (the splash screen displayed after an application is launched from the homemenu)&lt;br /&gt;
* romfs (read-only filesystem used to store resources)&lt;br /&gt;
&lt;br /&gt;
Typical uses for NCCH files include:&lt;br /&gt;
* Executable image (code+exheader+icon+banner+logo+romfs)&lt;br /&gt;
* e-Manual archive (accessed from homemenu) (romfs)&lt;br /&gt;
* [[Download Play|DLP]] child CIA archive (accessed from application) (romfs)&lt;br /&gt;
* Update Data archive (romfs)&lt;br /&gt;
* Standalone data archive (romfs)&lt;br /&gt;
* DLC index archive (icon+romfs)&lt;br /&gt;
* DLC archive (romfs)&lt;br /&gt;
&lt;br /&gt;
=== CCI ===&lt;br /&gt;
The native format for gamecard images is [[NCSD|CCI]] and is a NCCH container format. CCI files are limited to containing 8 NCCH files, and can contain NCCH files for applications titles only.&lt;br /&gt;
==== NCCH configuration for CCI ====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! NCCH&lt;br /&gt;
! Required&lt;br /&gt;
! Index&lt;br /&gt;
|-&lt;br /&gt;
| Executable image&lt;br /&gt;
| YES&lt;br /&gt;
| 0&lt;br /&gt;
|-&lt;br /&gt;
| e-Manual archive&lt;br /&gt;
| NO&lt;br /&gt;
| 1&lt;br /&gt;
|-&lt;br /&gt;
| DLP child CIA archive&lt;br /&gt;
| NO&lt;br /&gt;
| 2&lt;br /&gt;
|-&lt;br /&gt;
| Update Data archive&lt;br /&gt;
| NO&lt;br /&gt;
| 7&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== CIA ===&lt;br /&gt;
The native format for packaging NCCH files for install is [[CIA]], which is also a NCCH container format. CIA files are limited to containing 65535 NCCH files and can be used to contain NCCH files for any title type. CIA files also contain &#039;&#039;&#039;signed&#039;&#039;&#039; data used by the 3DS for general title management and DRM. Installing custom CIA files on a 3DS which also uses eShop/SysUpdates is unwise as conflicts will likely occur.&lt;br /&gt;
&lt;br /&gt;
==== NCCH configurations for CIA ====&lt;br /&gt;
Applications (Application/DlpChild/Demo/Patch/SystemApplication):&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! NCCH&lt;br /&gt;
! Required&lt;br /&gt;
! Index&lt;br /&gt;
|-&lt;br /&gt;
| Executable image&lt;br /&gt;
| YES&lt;br /&gt;
| 0&lt;br /&gt;
|-&lt;br /&gt;
| e-Manual archive&lt;br /&gt;
| NO&lt;br /&gt;
| 1&lt;br /&gt;
|-&lt;br /&gt;
| DLP child CIA archive&lt;br /&gt;
| NO&lt;br /&gt;
| 2&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
System Applet/Module:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! NCCH&lt;br /&gt;
! Required&lt;br /&gt;
! Index&lt;br /&gt;
|-&lt;br /&gt;
| Executable image&lt;br /&gt;
| YES&lt;br /&gt;
| 0&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
System Data Archives:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! NCCH&lt;br /&gt;
! Required&lt;br /&gt;
! Index&lt;br /&gt;
|-&lt;br /&gt;
| Data archive&lt;br /&gt;
| YES&lt;br /&gt;
| 0&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
DLC:&lt;br /&gt;
&lt;br /&gt;
The number of DLC data archives in DLC varies for each DLC.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! NCCH&lt;br /&gt;
! Required&lt;br /&gt;
! Index&lt;br /&gt;
|-&lt;br /&gt;
| DLC index archive&lt;br /&gt;
| YES&lt;br /&gt;
| 0&lt;br /&gt;
|-&lt;br /&gt;
| DLC data archive&lt;br /&gt;
| YES&lt;br /&gt;
| Varies&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Using Makerom ==&lt;br /&gt;
&lt;br /&gt;
=== Command line ===&lt;br /&gt;
&lt;br /&gt;
 makerom [general args] [rsf args] [crypto args] [ncch 0 build args] [cci args] [cia args]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;General Arguments&#039;&#039;&#039;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Argument&lt;br /&gt;
! Acceptable values&lt;br /&gt;
! Notes&lt;br /&gt;
|-&lt;br /&gt;
| -f &amp;lt;format&amp;gt;&lt;br /&gt;
| &#039;ncch&#039;/&#039;cxi&#039;/&#039;cfa&#039;/&#039;cci&#039;/&#039;cia&#039;&lt;br /&gt;
| Specify the output file format. &#039;ncch&#039;/&#039;cxi&#039;/&#039;cfa&#039; has no affect, probably parsed without error for legacy support.&lt;br /&gt;
|-&lt;br /&gt;
| -o &amp;lt;path&amp;gt;&lt;br /&gt;
| Valid file path.&lt;br /&gt;
| Specify name/path for output file. Makerom will decided a name if this is not specified.&lt;br /&gt;
|-&lt;br /&gt;
| -v&lt;br /&gt;
| not required&lt;br /&gt;
| Enables verbose output.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;RSF Arguments&#039;&#039;&#039;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Argument&lt;br /&gt;
! Acceptable values&lt;br /&gt;
! Notes&lt;br /&gt;
|-&lt;br /&gt;
| -rsf &amp;lt;path&amp;gt;&lt;br /&gt;
| Valid file path&lt;br /&gt;
| Specify the path to Rom Specification File(RSF). See below for creating RSF.&lt;br /&gt;
|-&lt;br /&gt;
| -D&amp;lt;NAME&amp;gt;=&amp;lt;VALUE&amp;gt;&lt;br /&gt;
| &lt;br /&gt;
| This is used to substitute where &amp;quot;$(&amp;lt;NAME&amp;gt;)&amp;quot; exists in the RSF files with &amp;quot;&amp;lt;VALUE&amp;gt;&amp;quot;. (Uppercase isn&#039;t a requirement)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Crypto Arguments&#039;&#039;&#039;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Argument&lt;br /&gt;
! Acceptable values&lt;br /&gt;
! Notes&lt;br /&gt;
|-&lt;br /&gt;
| -target &amp;lt;target&amp;gt;&lt;br /&gt;
| &#039;t&#039;/&#039;d&#039;/&#039;p&#039;&lt;br /&gt;
| Specify key-chain. This affects encryption, signing and &#039;-desc&#039; template availability. t=test, suitable for homebrew. d=devkit(incomplete), suitable for devkits. p=retail(unusable), suitable for signing retail software?&lt;br /&gt;
|-&lt;br /&gt;
| -ckeyid &amp;lt;index&amp;gt;&lt;br /&gt;
| Any value between 0-255 (inclusive).&lt;br /&gt;
| Overrides the default common key used to encrypt CIA title keys.&lt;br /&gt;
|-&lt;br /&gt;
| -showkeys&lt;br /&gt;
| none&lt;br /&gt;
| Dumps loaded key-chain to stdout.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NCCH Build Arguments&#039;&#039;&#039;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Argument&lt;br /&gt;
! Acceptable values&lt;br /&gt;
! Notes&lt;br /&gt;
|-&lt;br /&gt;
| -elf &amp;lt;file&amp;gt;&lt;br /&gt;
| Valid file path&lt;br /&gt;
| Specify ELF. See below for creating ELF.&lt;br /&gt;
|-&lt;br /&gt;
| -icon &amp;lt;file&amp;gt;&lt;br /&gt;
| Valid file path&lt;br /&gt;
| Specify [[SMDH|icon]].&lt;br /&gt;
|-&lt;br /&gt;
| -banner &amp;lt;file&amp;gt;&lt;br /&gt;
| Valid file path&lt;br /&gt;
| Specify banner.&lt;br /&gt;
|-&lt;br /&gt;
| -desc &amp;lt;apptype&amp;gt;:&amp;lt;fw&amp;gt;&lt;br /&gt;
| &amp;lt;apptype&amp;gt;=&#039;app&#039;/&#039;ecapp&#039;/&#039;demo&#039;/&#039;dlpchild&#039;. &amp;lt;fw&amp;gt;=&#039;kernel version minor&#039;.&lt;br /&gt;
| Use a template for [[Exheader|exheader/accessdesc]]. These are hard-coded, so not all firmwares have a template. A value from 1-7 can be used in place of &#039;kernel version minor&#039;. A template shouldn&#039;t be used if the title needs &amp;quot;special&amp;quot; permissions, the RSF must be configured fully.&lt;br /&gt;
|-&lt;br /&gt;
| -exefslogo&lt;br /&gt;
| none&lt;br /&gt;
| Include logo in ExeFS. Required for usage on &amp;lt;5.0 systems.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Arguments useful for rebuilding a NCCH file:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Argument&lt;br /&gt;
! Acceptable values&lt;br /&gt;
! Notes&lt;br /&gt;
|-&lt;br /&gt;
| -code &amp;lt;file&amp;gt;&lt;br /&gt;
| Valid file path&lt;br /&gt;
| Specify decompressed/plaintext exefs code binary.&lt;br /&gt;
|-&lt;br /&gt;
| -exheader &amp;lt;file&amp;gt;&lt;br /&gt;
| Valid file path&lt;br /&gt;
| Specify plaintext exheader binary.&lt;br /&gt;
|-&lt;br /&gt;
| -logo &amp;lt;file&amp;gt;&lt;br /&gt;
| Valid file path&lt;br /&gt;
| Specify logo.&lt;br /&gt;
|-&lt;br /&gt;
| -plainrgn &amp;lt;file&amp;gt;&lt;br /&gt;
| Valid file path&lt;br /&gt;
| Specify NCCH plain-region.&lt;br /&gt;
|-&lt;br /&gt;
| -romfs &amp;lt;file&amp;gt;&lt;br /&gt;
| Valid file path&lt;br /&gt;
| Specify an unencrypted RomFS binary.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;CCI Arguments&#039;&#039;&#039;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Argument&lt;br /&gt;
! Acceptable values&lt;br /&gt;
! Notes&lt;br /&gt;
|-&lt;br /&gt;
| -content &amp;lt;path&amp;gt;:&amp;lt;index&amp;gt;&lt;br /&gt;
| &amp;lt;path&amp;gt;=Valid file path. &amp;lt;index&amp;gt;=Any value between 0-7 (inclusive)&lt;br /&gt;
| Include a built NCCH file in the CCI container. &amp;quot;-i&amp;quot; can be used instead of &amp;quot;-content&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| -devcci&lt;br /&gt;
| none&lt;br /&gt;
| Build a debug CCI?&lt;br /&gt;
|-&lt;br /&gt;
| -nomodtid&lt;br /&gt;
| none&lt;br /&gt;
| Don&#039;t modify the TitleIds of NCCH files included to match NCCH0&lt;br /&gt;
|-&lt;br /&gt;
| -alignwr&lt;br /&gt;
| none&lt;br /&gt;
| Align the offset for the Card2 writable region to the end of the last NCCH in the CCI.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;CIA Arguments&#039;&#039;&#039;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Argument&lt;br /&gt;
! Acceptable values&lt;br /&gt;
! Notes&lt;br /&gt;
|-&lt;br /&gt;
| -content &amp;lt;path&amp;gt;:&amp;lt;index&amp;gt;:&amp;lt;id&amp;gt;&lt;br /&gt;
| &amp;lt;path&amp;gt;=Valid file path. &amp;lt;index&amp;gt;=Any value between 0x0-0xFFFF (inclusive). &amp;lt;id&amp;gt;=Any value between 0x0-0xFFFFFFFF (inclusive)&lt;br /&gt;
| Include a built NCCH file in the CIA container. If &amp;lt;id&amp;gt; isn&#039;t specified, it will be generated randomly. &amp;quot;-i&amp;quot; can be used instead of &amp;quot;-content&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| -major &amp;lt;version&amp;gt;&lt;br /&gt;
| Any value between 0-63 (inclusive)&lt;br /&gt;
| Specify the version major for the title. This cannot be used with &amp;quot;-dver&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| -minor &amp;lt;version&amp;gt;&lt;br /&gt;
| Any value between 0-63 (inclusive)&lt;br /&gt;
| Specify the version minor for the title. This cannot be used with &amp;quot;-dver&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| -micro &amp;lt;version&amp;gt;&lt;br /&gt;
| Any value between 0-15 (inclusive)&lt;br /&gt;
| Specify the version micro for the title.&lt;br /&gt;
|-&lt;br /&gt;
| -dver &amp;lt;version&amp;gt;&lt;br /&gt;
| Any value between 0-4095 (inclusive)&lt;br /&gt;
| Specify the data-title version for the title. This cannot be used with &amp;quot;-major&amp;quot; or &amp;quot;-minor&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| -dlc&lt;br /&gt;
| none&lt;br /&gt;
| Specify this flag when building a DLC CIA.&lt;br /&gt;
|-&lt;br /&gt;
| -rand&lt;br /&gt;
| none&lt;br /&gt;
| Use a random title key to encrypt CIA content.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Examples ====&lt;br /&gt;
&lt;br /&gt;
General examples:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Create CXI&#039;&#039;&#039;&lt;br /&gt;
 makerom -o sample.cxi -rsf sample.rsf -target t -elf sample.elf -icon sample.icn -banner sample.bnr -desc app:4&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Create CFA&#039;&#039;&#039;&lt;br /&gt;
 makerom -o sample.cfa -rsf sample.rsf -target t&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Create CCI&#039;&#039;&#039;&lt;br /&gt;
 makerom -f cci -o sample.cci -target t -i sample.cxi:0 -i sample.cfa:1&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Create CIA&#039;&#039;&#039;&lt;br /&gt;
 makerom -f cia -o sample.cia -target t -i sample.cxi:0:0 -i sample.cfa:1:1&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Makerom supports building a NCCH file and including it automatically (as index 0) into a NCCH container:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Create CCI and CXI at the same time and include a CFA&#039;&#039;&#039;&lt;br /&gt;
 makerom -f cci -o sample.cci -rsf sample.rsf -target t -elf sample.elf -icon sample.icn -banner sample.bnr -desc app:4 -i sample.cfa:1&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Create CIA and CXI at the same time and include a CFA&#039;&#039;&#039;&lt;br /&gt;
 makerom -f cia -o sample.cia -rsf sample.rsf -target t -elf sample.elf -icon sample.icn -banner sample.bnr -desc app:4 -i sample.cfa:1:1&lt;br /&gt;
&lt;br /&gt;
Rebuilding CXI:&lt;br /&gt;
 makerom -o rebuild.cxi -rsf rebuild.rsf -target t -code rebuild/code.bin -exheader rebuild/exheader.bin -icon rebuild/icon.bin -banner rebuild/banner.bin -romfs rebuild/romfs.bin&lt;br /&gt;
&lt;br /&gt;
=== Creating RSF files ===&lt;br /&gt;
Inspired by Nintendo&#039;s format for their makerom, a yaml configuration file is required for creating NCCH files. CIA/CCI can be created without using a RSF file, but default settings will be used.&lt;br /&gt;
&lt;br /&gt;
For CXI, RSF files can be used to specify permissions, and access control settings. Makerom can use default settings by use of the &amp;quot;-desc&amp;quot; option, which removes the requirement for specifying them in the RSF file.&lt;br /&gt;
&lt;br /&gt;
Sample RSF to be used with &amp;quot;-desc&amp;quot;: [https://gist.githubusercontent.com/3DSGuy/83e12e0ae3dcccb9827f/raw/sample0.rsf download] (link broken)&lt;br /&gt;
&lt;br /&gt;
Sample RSF to be used without &amp;quot;-desc&amp;quot;: [https://gist.github.com/jakcron/9f9f02ffd94d98a72632 download]&lt;br /&gt;
&lt;br /&gt;
=== Creating ELF files ===&lt;br /&gt;
The latest devkitARM used in conjunction with [https://github.com/smealum/ctrulib ctrulib] can create ELF files compatible with makerom.&lt;br /&gt;
&lt;br /&gt;
ELF files that are created using the official SDK are also supported by makerom.&lt;br /&gt;
&lt;br /&gt;
== Compiling Source ==&lt;br /&gt;
For Windows a MinGW-W64/MSYS build setup is required. &lt;br /&gt;
&lt;br /&gt;
For Linux, gcc/g++/make must be installed.&lt;br /&gt;
&lt;br /&gt;
All additional libraries used by makerom (polarssl/libyaml) are included in the source, and are linked statically.&lt;/div&gt;</summary>
		<author><name>EvilFlight</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=Hardware&amp;diff=13313</id>
		<title>Hardware</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=Hardware&amp;diff=13313"/>
		<updated>2015-09-18T20:37:57Z</updated>

		<summary type="html">&lt;p&gt;EvilFlight: /* Common hardware */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page lists and describes the hardware found inside the Nintendo 3DS. Many of these parts are custom made and are expanded upon here or in other pages.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Common hardware ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| ARM11 Processor Core || [http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0360f/index.html ARM11 2x MPCore &amp;amp; 2x VFPv2 Co-Processor] 268MHz(~268123480 Hz).&lt;br /&gt;
On New3DS models, there is instead 4x MPCore, 4x VFPv2, and 268-804MHz CPU.&lt;br /&gt;
|-&lt;br /&gt;
| ARM9 Processor Core || [http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0201d/index.html ARM946] 134MHz(~134058675 Hz),&lt;br /&gt;
|-&lt;br /&gt;
| GPU || [http://en.wikipedia.org/wiki/PICA200 DMP PICA] 268MHz,&lt;br /&gt;
|-&lt;br /&gt;
| DSP || [https://twitter.com/CEVADSP/status/177172880918986752 CEVA TeakLite]. 134Mhz. 24ch 32728Hz sampling rates.&lt;br /&gt;
|-&lt;br /&gt;
| VRAM || 6 MB within SoC.&lt;br /&gt;
|}&lt;br /&gt;
The above clock-rates were calculated by calling svcGetSystemTick in sets of 5(call it, execute svcSleepThread for 1s, then call it again), then the average of those were calculated. The clock-rate listed above applies for *all* 4 New3DS MPCores.&lt;br /&gt;
&lt;br /&gt;
New3DS exclusives are able to clock the CPU at 804MHz, but this appears to be limited to the currently running application/app cores. (timed by running svcGetSystemTick on either side of a long idle loop to stay in the current process context. svcSleepThread + svcGetSystemTick implies a tick counter running at 268mhz in this mode.)&lt;br /&gt;
&lt;br /&gt;
== Specifications ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Type !! 3DS !! 3DSXL !! 2DS !! N3DS !! N3DSXL&lt;br /&gt;
|-&lt;br /&gt;
| SoC || CPU CTR (1048 0H)&lt;br /&gt;
CPU CTR (1214 32)&lt;br /&gt;
|| CPU CTR A (1226 60)&lt;br /&gt;
CPU CTR (1037 21)&lt;br /&gt;
|| CPU CTR B (??) || CPU LGR A (1444 86) || CPU LGR A (1446 17)&lt;br /&gt;
|-&lt;br /&gt;
| FCRAM || [http://www.fujitsu.com/downloads/MICRO/fma/pdf/MB81EDS516545_e511463.pdf 2x64MB Fujitsu MB82M8080-07L] || Fujitsu MB82DBS16641 || Fujitsu MB82DBS1664 || ?? || Fujitsu MB82MK9A9A&lt;br /&gt;
|-&lt;br /&gt;
| Storage || Toshiba THGBM2G3P1FBAI8 1GB || ?? || Toshiba THGBM4G3P1H8BAIR 1GB || Samsung KLM4G1YEQC 4GB (in 1.3GiB SLC mode)&lt;br /&gt;
Toshiba THGBMBG4P1KBAIT 2GB (MLC)&lt;br /&gt;
|| Samsung KLM4G1YEMD-B031 4GB (in 1.3GiB SLC mode)&lt;br /&gt;
Toshiba THGBMBG4P1KBAIT (MLC)&lt;br /&gt;
|-&lt;br /&gt;
| Audio Codec || TI PAIC3010B 0AA37DW || ?? || ?? || TI AIC3010B 39C4ETW  || TI AIC3010D 48C01JW&lt;br /&gt;
|-&lt;br /&gt;
| Gyroscope || [http://dl-web.dropbox.com/u/20520664/references/PS-ITG-3200-00-01.4.pdf Invensense ITG-3270 MEMS Gyroscope] || ?? || ?? || ?? || ??&lt;br /&gt;
|-&lt;br /&gt;
| Accelerometer || ST Micro 2048 33DH X1MAQ Accelerometer Model LIS331DH || ?? || ?? || ?? || ??&lt;br /&gt;
|-&lt;br /&gt;
| Wifi || Atheros AR6014 || ?? || ?? || ?? || Atheros AR6014G-AL1C&lt;br /&gt;
|-&lt;br /&gt;
| Infrared IC || NXP S750 0803 TSD031C || ?? || ?? || ?? || NXP S750 1603 TSD438C&lt;br /&gt;
|-&lt;br /&gt;
| Custom Microcontroller || Renesas UC CTR || ?? || Renesas UC CTR 324KM47 KG10  || Renesas UC KTR || Renesas UC KTR 442KM13 TK14&lt;br /&gt;
|-&lt;br /&gt;
| PMIC? || TI 93045A4 OAAH86W || ?? || ?? || TI 93045A4 38A6TYW G2 || TI 93045A4 49AF3NW G2&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
* [11] Official Documentation&lt;br /&gt;
&lt;br /&gt;
* [5],[10] According to iFixit.com ([http://www.ifixit.com/Teardown/Nintendo-3DS-Teardown/5029/1#s22696 source]):&lt;br /&gt;
&lt;br /&gt;
* Datasheet for memory is for a chip in the same series, it has less memory than the one inside the 3DS (128mbits vs 512mbits).&lt;br /&gt;
&lt;br /&gt;
* There is a trove of data on the FCC website at [https://fjallfoss.fcc.gov/oetcf/eas/reports/ViewExhibitReport.cfm?mode=Exhibits&amp;amp;RequestTimeout=500&amp;amp;calledFromFrame=N&amp;amp;application_id=462292&amp;amp;fcc_id=%27EW4DWMW028%27].&lt;br /&gt;
&lt;br /&gt;
* [12] This IC is somewhat similar to [http://www.alldatasheet.net/datasheet-pdf/pdf/347838/NXP/SC16IS750IBS.html this].&lt;br /&gt;
&lt;br /&gt;
== FCRAM ==&lt;br /&gt;
&lt;br /&gt;
There is one FCRAM (Fast Cycle RAM) IC in the 3DS, produced by Fujitsu and branded as MB82M8080-07L. The Fujitsu MB82M8080-07L chip internally contains 2 dies, where each die is branded MB81EDS516545 and MB82DBS08645.&lt;br /&gt;
&lt;br /&gt;
The MB81EDS516545 die is a CMOS Fast Cycle Random Access Memory (FCRAM) with Low Power Double Data Rate (LPDDR) SDRAM Interface containing 512MBit storage accessible in a 64-bit format. The MB81EDS516545 is suited for consumer applications requiring high data bandwidth with low power consumption.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== SoC ==&lt;br /&gt;
&lt;br /&gt;
The 3DS has much of it&#039;s internals housed in a SoC (System on Chip) just like it&#039;s predecessors. This is done to reduce build costs, cut down on power consumption, as well as make the PCB layout less complex and make the system harder to tamper with. The SoC, branded as the Nintendo 1048 0H, contains the CPU, GPU, DSP and VRAM.&lt;br /&gt;
&lt;br /&gt;
According to official documents, the CPU used is a dual-core ARM11 CPU, clocked at 268MHz. One core is dedicated to system software, while the other is used for application programming, each known as the syscore and appcore, respectively.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== GPU ==&lt;br /&gt;
&lt;br /&gt;
Designed by Digital Media Professionals Inc. (DMP) and codenamed PICA200, 268Mhz.&lt;br /&gt;
&lt;br /&gt;
Block diagram of an ULTRAY2000 based architecture PICA200:&lt;br /&gt;
&lt;br /&gt;
[[File:Pica200BlockDiagram.png]]&lt;br /&gt;
&lt;br /&gt;
PICA200 is compatible with OpenGL ES 1.1. It furthermore provides unique functionality for:&lt;br /&gt;
* Per-fragment lighting (&amp;quot;Lighting Maestro&amp;quot;)&lt;br /&gt;
* Hard- and soft-shadowing (&amp;quot;Shadow Maestro&amp;quot;)&lt;br /&gt;
* Polygon subdivision (&amp;quot;Figure Maestro&amp;quot;)&lt;br /&gt;
* Bump mapping and procedural textures (&amp;quot;Mapping Maestro&amp;quot;)&lt;br /&gt;
* Rendering of gaseous objects (&amp;quot;Particle Maestro&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
Some parts of the extended functionality are provided in hardware by an extended geometry pipeline. Most importantly, PICA200 has three programmable vertex processors. There is furthermore a unit called [[GPU/Primitive_Engine|Primitive Engine]], which is a geometry shader unit (using the same instruction set as vertex shaders) with support for variable-size primitives. The Primitive Engine functionality may be disabled, and the geometry shader unit then acts as a fourth vertex processor. See [[Shader_Instruction_Set]] for more information on the shader instruction set.&lt;br /&gt;
&lt;br /&gt;
[[GPU/Fragment Lighting|Fragment lighting]] is implemented as an optional pipeline step during pixel processing. It&#039;s implemented by having the vertex shader output an additional attribute describing the transformation (represented by a quaternion) to surface-local space. This per-vertex quaternion can then be interpolated across screen space to calculate dot products relevant for lighting (e.g. light vector dot normal vector). To provide support for advanced lighting models, these dot products are used as indices into programmable lookup tables. With this setup, PICA200 in particular supports the shading models Blinn-Phong, Cook-Terrance, Ward, and microfacet-based BRDF-models.&lt;br /&gt;
&lt;br /&gt;
PICA200 supports four texture units, the fourth of which is used exclusively for [[GPU/Procedural Texture Generation|procedural texture generation]].&lt;br /&gt;
&lt;br /&gt;
== SDIO controller ==&lt;br /&gt;
&lt;br /&gt;
Nintendo recommends SD cards up to 32 GB however the internal SDIO controller seems to support SD cards up to 2.19 Terabyte (32-bit sector number). It&#039;s unknown if it really can handle that much. 128 GB was tested and works fine however it causes a major slowdown of the system especially at boot.&lt;br /&gt;
&lt;br /&gt;
== Images ==&lt;br /&gt;
&lt;br /&gt;
=== Front ===&lt;br /&gt;
&lt;br /&gt;
[[Image:CTR_Front.jpg|600px]]&lt;br /&gt;
&lt;br /&gt;
[http://guide-images.ifixit.net/igi/ishJaSCOwLkvbLYK High Resolution]&lt;br /&gt;
&lt;br /&gt;
=== Back ===&lt;br /&gt;
&lt;br /&gt;
[[Image:CTR_Back.jpg]]&lt;br /&gt;
&lt;br /&gt;
[http://guide-images.ifixit.net/igi/n1CKAdbPrHyNPNuW High Resolution]&lt;br /&gt;
&lt;br /&gt;
=== NAND pinout ===&lt;br /&gt;
&lt;br /&gt;
NAND dumping has been successful, but the image is encrypted.&lt;br /&gt;
&lt;br /&gt;
==== Normal model ====&lt;br /&gt;
&lt;br /&gt;
[[Image:CTR_NAND_pinout.png]]&lt;br /&gt;
&lt;br /&gt;
==== XL model ====&lt;br /&gt;
&lt;br /&gt;
[[Image:CTR_NAND_pinout_XL.jpg|500px]]&lt;br /&gt;
&lt;br /&gt;
==== 2DS ====&lt;br /&gt;
&lt;br /&gt;
[[Image:2DSeMMC.jpg|500px]]&lt;br /&gt;
&lt;br /&gt;
==== New 3DS ====&lt;br /&gt;
&lt;br /&gt;
[[Image:N3DSeMMC.jpg]]&lt;br /&gt;
&lt;br /&gt;
==== New 3DS XL ====&lt;br /&gt;
&lt;br /&gt;
[[Image:N3DSXLeMMC.jpg]]&lt;br /&gt;
&lt;br /&gt;
=== WiFi dongle pinout ===&lt;br /&gt;
[[Image:CTR_WiFiDongle_pinout.png|600px]]&lt;br /&gt;
&lt;br /&gt;
SDIO interface is colored red: &lt;br /&gt;
* CLK&lt;br /&gt;
* CMD&lt;br /&gt;
* D0, D1, D2, D3&lt;br /&gt;
&lt;br /&gt;
This is the interface for the &#039;NEW&#039; WiFi module (based on Atheros AR6002) first included in DSi.&lt;br /&gt;
&lt;br /&gt;
The proprietary and by now ancient DS-mode WiFi is colored yellow, pins are unknown.&lt;br /&gt;
&lt;br /&gt;
I2C eeprom is colored blue:&lt;br /&gt;
* SCL&lt;br /&gt;
* SDA&lt;br /&gt;
&lt;br /&gt;
SPI Flash is colored purple:&lt;br /&gt;
* CLK&lt;br /&gt;
* CS#&lt;br /&gt;
* SI&lt;br /&gt;
* SO&lt;br /&gt;
* WP#&lt;br /&gt;
* NC&lt;br /&gt;
&lt;br /&gt;
=== Auxiliary Microntroller ===&lt;br /&gt;
[[Image:CTR_UC.png|600px]]&lt;br /&gt;
&lt;br /&gt;
Monitors HOME button, WiFi switch, 3D slider, volume control slider.&lt;br /&gt;
Controls LEDs, various power supplies.&lt;br /&gt;
&lt;br /&gt;
Devices attached to I2C bus:&lt;br /&gt;
* UC (master?)&lt;br /&gt;
* Accelerometer (slave address 0x18)&lt;br /&gt;
* SoC (master? slave?)&lt;/div&gt;</summary>
		<author><name>EvilFlight</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=Hardware&amp;diff=12970</id>
		<title>Hardware</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=Hardware&amp;diff=12970"/>
		<updated>2015-07-29T04:49:53Z</updated>

		<summary type="html">&lt;p&gt;EvilFlight: restored from Google cache -yellows8 authored&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page lists and describes the hardware found inside the Nintendo 3DS. Many of these parts are custom made and are expanded upon here or in other pages.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Common hardware ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| ARM11 Processor Core || [http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0360f/index.html ARM11 2x MPCore &amp;amp; 2x VFPv2 Co-Processor] 268MHz(~268123480 Hz).&lt;br /&gt;
On New3DS models, there is instead 4x MPCore &amp;amp; 4x VFPv2.&lt;br /&gt;
|-&lt;br /&gt;
| ARM9 Processor Core || [http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0201d/index.html ARM946] 134MHz(~134058675 Hz),&lt;br /&gt;
|-&lt;br /&gt;
| GPU || [http://en.wikipedia.org/wiki/PICA200 DMP PICA] 268MHz,&lt;br /&gt;
|-&lt;br /&gt;
| DSP || [https://twitter.com/CEVADSP/status/177172880918986752 CEVA TeakLite]. 134Mhz. 24ch 32728Hz sampling rates.&lt;br /&gt;
|-&lt;br /&gt;
| VRAM || 6 MB within SoC.&lt;br /&gt;
|}&lt;br /&gt;
The above clock-rates were calculated by calling svcGetSystemTick in sets of 5(call it, execute svcSleepThread for 1s, then call it again), then the average of those were calculated. The clock-rate listed above applies for *all* 4 New3DS MPCores.&lt;br /&gt;
&lt;br /&gt;
== Specifications ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Type !! 3DS !! 3DSXL !! 2DS !! N3DS !! N3DSXL&lt;br /&gt;
|-&lt;br /&gt;
| SoC || CPU CTR (1048 0H)&lt;br /&gt;
CPU CTR (1214 32)&lt;br /&gt;
|| CPU CTR A (1226 60)&lt;br /&gt;
CPU CTR (1037 21)&lt;br /&gt;
|| CPU CTR B (??) || CPU LGR A (1444 86) || CPU LGR A (1446 17)&lt;br /&gt;
|-&lt;br /&gt;
| FCRAM || [http://www.fujitsu.com/downloads/MICRO/fma/pdf/MB81EDS516545_e511463.pdf 2x64MB Fujitsu MB82M8080-07L] || Fujitsu MB82DBS16641 || Fujitsu MB82DBS1664 || ?? || Fujitsu MB82MK9A9A&lt;br /&gt;
|-&lt;br /&gt;
| Storage || Toshiba THGBM2G3P1FBAI8 1GB || ?? || Toshiba THGBM4G3P1H8BAIR 1GB || Samsung KLM4G1YEQC 4GB || Samsung KLM4G1YEMD-B031 4GB &lt;br /&gt;
|-&lt;br /&gt;
| Audio Codec || TI PAIC3010B 0AA37DW || ?? || ?? || TI AIC3010B 39C4ETW  || TI AIC3010D 48C01JW&lt;br /&gt;
|-&lt;br /&gt;
| Gyroscope || [http://dl-web.dropbox.com/u/20520664/references/PS-ITG-3200-00-01.4.pdf Invensense ITG-3270 MEMS Gyroscope] || ?? || ?? || ?? || ??&lt;br /&gt;
|-&lt;br /&gt;
| Accelerometer || ST Micro 2048 33DH X1MAQ Accelerometer Model LIS331DH || ?? || ?? || ?? || ??&lt;br /&gt;
|-&lt;br /&gt;
| Wifi || Atheros AR6014 || ?? || ?? || ?? || Atheros AR6014G-AL1C&lt;br /&gt;
|-&lt;br /&gt;
| Infrared IC || NXP S750 0803 TSD031C || ?? || ?? || ?? || NXP S750 1603 TSD438C&lt;br /&gt;
|-&lt;br /&gt;
| Custom Microcontroller || Renesas UC CTR || ?? || Renesas UC CTR 324KM47 KG10  || Renesas UC KTR || Renesas UC KTR 442KM13 TK14&lt;br /&gt;
|-&lt;br /&gt;
| PMIC? || TI 93045A4 OAAH86W || ?? || ?? || TI 93045A4 38A6TYW G2 || TI 93045A4 49AF3NW G2&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
* [11] Official Documentation&lt;br /&gt;
&lt;br /&gt;
* [5],[10] According to iFixit.com ([http://www.ifixit.com/Teardown/Nintendo-3DS-Teardown/5029/1#s22696 source]):&lt;br /&gt;
&lt;br /&gt;
* Datasheet for memory is for a chip in the same series, it has less memory than the one inside the 3DS (128mbits vs 512mbits).&lt;br /&gt;
&lt;br /&gt;
* There is a trove of data on the FCC website at [https://fjallfoss.fcc.gov/oetcf/eas/reports/ViewExhibitReport.cfm?mode=Exhibits&amp;amp;RequestTimeout=500&amp;amp;calledFromFrame=N&amp;amp;application_id=462292&amp;amp;fcc_id=%27EW4DWMW028%27].&lt;br /&gt;
&lt;br /&gt;
* [12] This IC is somewhat similar to [http://www.alldatasheet.net/datasheet-pdf/pdf/347838/NXP/SC16IS750IBS.html this].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== FCRAM ==&lt;br /&gt;
&lt;br /&gt;
There is one FCRAM (Fast Cycle RAM) IC in the 3DS, produced by Fujitsu and branded as MB82M8080-07L. The Fujitsu MB82M8080-07L chip internally contains 2 dies, where each die is branded MB81EDS516545 and MB82DBS08645.&lt;br /&gt;
&lt;br /&gt;
The MB81EDS516545 die is a CMOS Fast Cycle Random Access Memory (FCRAM) with Low Power Double Data Rate (LPDDR) SDRAM Interface containing 512MBit storage accessible in a 64-bit format. The MB81EDS516545 is suited for consumer applications requiring high data bandwidth with low power consumption.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== SoC ==&lt;br /&gt;
&lt;br /&gt;
The 3DS has much of it&#039;s internals housed in a SoC (System on Chip) just like it&#039;s predecessors. This is done to reduce build costs, cut down on power consumption, as well as make the PCB layout less complex and make the system harder to tamper with. The SoC, branded as the Nintendo 1048 0H, contains the CPU, GPU, DSP and VRAM.&lt;br /&gt;
&lt;br /&gt;
According to official documents, the CPU used is a dual-core ARM11 CPU, clocked at 268MHz. One core is dedicated to system software, while the other is used for application programming, each known as the syscore and appcore, respectively.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== GPU ==&lt;br /&gt;
&lt;br /&gt;
Designed by Digital Media Professionals Inc. (DMP) and codenamed PICA 200, 268Mhz. Supports OpenGL ES 1.1.&lt;br /&gt;
&lt;br /&gt;
[[File:Pica200BlockDiagram.png]]&lt;br /&gt;
&lt;br /&gt;
Block diagram of an ULTRAY2000 based architecture PICA200&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== SDIO controller ==&lt;br /&gt;
&lt;br /&gt;
Nintendo recommends SD cards up to 32 GB however the internal SDIO controller seems to support SD cards up to 2.19 Terabyte (32-bit sector number). It&#039;s unknown if it really can handle that much. 128 GB was tested and works fine however it causes a major slowdown of the system especially at boot.&lt;br /&gt;
&lt;br /&gt;
== Images ==&lt;br /&gt;
&lt;br /&gt;
=== Front ===&lt;br /&gt;
&lt;br /&gt;
[[Image:CTR_Front.jpg|600px]]&lt;br /&gt;
&lt;br /&gt;
[http://guide-images.ifixit.net/igi/ishJaSCOwLkvbLYK High Resolution]&lt;br /&gt;
&lt;br /&gt;
=== Back ===&lt;br /&gt;
&lt;br /&gt;
[[Image:CTR_Back.jpg]]&lt;br /&gt;
&lt;br /&gt;
[http://guide-images.ifixit.net/igi/n1CKAdbPrHyNPNuW High Resolution]&lt;br /&gt;
&lt;br /&gt;
=== NAND pinout ===&lt;br /&gt;
&lt;br /&gt;
NAND dumping has been successful, but the image is encrypted.&lt;br /&gt;
&lt;br /&gt;
==== Normal model ====&lt;br /&gt;
&lt;br /&gt;
[[Image:CTR_NAND_pinout.png]]&lt;br /&gt;
&lt;br /&gt;
==== XL model ====&lt;br /&gt;
&lt;br /&gt;
[[Image:CTR_NAND_pinout_XL.jpg|500px]]&lt;br /&gt;
&lt;br /&gt;
==== 2DS ====&lt;br /&gt;
&lt;br /&gt;
[[Image:2DSeMMC.jpg|500px]]&lt;br /&gt;
&lt;br /&gt;
==== New 3DS ====&lt;br /&gt;
&lt;br /&gt;
[[Image:N3DSeMMC.jpg]]&lt;br /&gt;
&lt;br /&gt;
==== New 3DS XL ====&lt;br /&gt;
&lt;br /&gt;
[[Image:N3DSXLeMMC.jpg]]&lt;br /&gt;
&lt;br /&gt;
=== WiFi dongle pinout ===&lt;br /&gt;
[[Image:CTR_WiFiDongle_pinout.png|600px]]&lt;br /&gt;
&lt;br /&gt;
SDIO interface is colored red: &lt;br /&gt;
* CLK&lt;br /&gt;
* CMD&lt;br /&gt;
* D0, D1, D2, D3&lt;br /&gt;
&lt;br /&gt;
This is the interface for the &#039;NEW&#039; WiFi module (based on Atheros AR6002) first included in DSi.&lt;br /&gt;
&lt;br /&gt;
The proprietary and by now ancient DS-mode WiFi is colored yellow, pins are unknown.&lt;br /&gt;
&lt;br /&gt;
I2C eeprom is colored blue:&lt;br /&gt;
* SCL&lt;br /&gt;
* SDA&lt;br /&gt;
&lt;br /&gt;
SPI Flash is colored purple:&lt;br /&gt;
* CLK&lt;br /&gt;
* CS#&lt;br /&gt;
* SI&lt;br /&gt;
* SO&lt;br /&gt;
* WP#&lt;br /&gt;
* NC&lt;br /&gt;
&lt;br /&gt;
=== Auxiliary Microntroller ===&lt;br /&gt;
[[Image:CTR_UC.png|600px]]&lt;br /&gt;
&lt;br /&gt;
Monitors HOME button, WiFi switch, 3D slider, volume control slider.&lt;br /&gt;
Controls LEDs, various power supplies.&lt;br /&gt;
&lt;br /&gt;
Devices attached to I2C bus:&lt;br /&gt;
* UC (master?)&lt;br /&gt;
* Accelerometer (slave address 0x18)&lt;br /&gt;
* SoC (master? slave?)&lt;/div&gt;</summary>
		<author><name>EvilFlight</name></author>
	</entry>
</feed>