Vulnerabilities: Difference between revisions

From PS5 Developer wiki
Jump to navigation Jump to search
 
(3 intermediate revisions by the same user not shown)
Line 27: Line 27:


== WebKit exploits ==
== WebKit exploits ==
WebKit exploits are harder to make and do not even give arbitrary RW because of PS5 memory protections.


=== Modal Browser HTTPS Bypass ===
=== Modal Browser HTTPS Bypass ===


* It is possible to bypass HTTPS in the modal browser, if you reply to the HTTPS CONNECT with a standard HTTP 1.1 response, instead of attempting to create a tunnel. The browser will just display that response. The downside to this is you have no idea what the contents of even the HTTP REQUEST would have been, but it is useful for directing the web browser to any website you want.
* It is possible to bypass HTTPS in the modal browser, if you reply to the HTTPS CONNECT with a standard HTTP 1.1 response, instead of attempting to create a tunnel. The web browser will just display that response. The downside to this is that you have no idea of what the contents of even the HTTP REQUEST would have been, but it is useful for redirecting the web browser to any website you want.


==== Patched ====
==== Patched ====
Line 165: Line 163:
* Shuffle from Fail0verflow for the FreeBSD 11 and PS5 PoC in C++ (2024-09-14)
* Shuffle from Fail0verflow for the FreeBSD 11 and PS5 PoC in C++ (2024-09-14)
* Flatz for writing a PS5 exploit chain with TheFloW's BD-JB2 (2024-09-14)
* Flatz for writing a PS5 exploit chain with TheFloW's BD-JB2 (2024-09-14)
* Specter for chaining the kernel exploit with PsFree WebKit exploit (2024-09-21)


=== Analysis ===
=== Analysis ===
Line 173: Line 172:
* [https://securityonline.info/freebsd-issues-urgent-security-advisory-for-cve-2024-43102-cvss-10/ Vulnerability press release (2024-09-09)]
* [https://securityonline.info/freebsd-issues-urgent-security-advisory-for-cve-2024-43102-cvss-10/ Vulnerability press release (2024-09-09)]
* [https://accessvector.net/2024/freebsd-umtx-privesc Writeup by [email protected] (2024-09-06)]
* [https://accessvector.net/2024/freebsd-umtx-privesc Writeup by [email protected] (2024-09-06)]
* [https://github.com/PS5Dev/PS5-UMTX-Jailbreak Exploitation strategy explanation by Specter (2024-09-21)]


=== Bug Description ===
=== Bug Description ===
Line 193: Line 193:
* [https://gist.github.com/flatz/89dfe9ed662076742f770f92e95e12a7 JAVA implementation for PS5 chained with BD-JB2 by Flatz (2024-09-14)]
* [https://gist.github.com/flatz/89dfe9ed662076742f770f92e95e12a7 JAVA implementation for PS5 chained with BD-JB2 by Flatz (2024-09-14)]
* [https://gist.github.com/flatz/5e12f75cdb210516d31df03069f7ed0a LUA implementation for PS5 chained with LUA exploit by Flatz (2024-09-14)]
* [https://gist.github.com/flatz/5e12f75cdb210516d31df03069f7ed0a LUA implementation for PS5 chained with LUA exploit by Flatz (2024-09-14)]
* [https://github.com/PS5Dev/PS5-UMTX-Jailbreak WebKit implementation for PS5 1.00-5.50 chained with PS Free by Specter (2024-09-21)]


=== Patched ===
=== Patched ===
Line 330: Line 331:


* Vulnerable on PS5 FWs <= 2.50 and potentially patched since 3.00.
* Vulnerable on PS5 FWs <= 2.50 and potentially patched since 3.00.
= Southbridge =
== EMC and EFC-EAP vulnerabilities leading to code execution ==
* Will be disclosed by Shawn Hoffman (of SYMBRKRS LLC, @shuffle2 of fail0verflow) at the Security Analyst Summit Conference 2024 on 22-25 October, 2024.
Exploits allowing code execution on EMC and EFC/EAP will be detailed, along with release of a tool which implements the exploits. The process of initial exploration/discovery will also be briefly covered. From a security researcher point of view, the exploits are interesting as they cover a hard-to-spot bug in a firmware state machine, and abusing hardware misconfiguration to bypass memory protection measures. The exploits/tooling allow for further research into the system.


= Unclassified =
= Unclassified =

Latest revision as of 11:05, 24 September 2024

Usermode[edit | edit source]

BD-J exploits[edit | edit source]

FW <= 7.61 - BD-JB2 - Path traversal sandbox escape by TheFloW[edit | edit source]

See [1].

Patched[edit | edit source]

Yes on PS5 FW 8.00.

FW <= 4.51 - BD-JB - Five vulnerabilities chained by TheFloW[edit | edit source]

See [2].

Implementations[edit | edit source]

Patched[edit | edit source]

Yes partially on PS5 FWs > 4.50 (need to test). Probably unpatched on FW 4.51 and patched on FW 5.00.

WebKit exploits[edit | edit source]

Modal Browser HTTPS Bypass[edit | edit source]

  • It is possible to bypass HTTPS in the modal browser, if you reply to the HTTPS CONNECT with a standard HTTP 1.1 response, instead of attempting to create a tunnel. The web browser will just display that response. The downside to this is that you have no idea of what the contents of even the HTTP REQUEST would have been, but it is useful for redirecting the web browser to any website you want.

Patched[edit | edit source]

No as of PS5 FW 5.10.

FW 6.00-9.60 - Unknown heap and string overflow (no CVE) leading to crash[edit | edit source]

See also [3].

Patched[edit | edit source]

Yes on PS4 FW 12.00 and PS5 FW 10.00.

Tested[edit | edit source]

Tested and working on PS4 FWs 10.00-11.52 and PS5 FWs 6.00-9.60.

FW 6.00-8.60 - JSC DFG Abstract Intepreter clobberWorld Type Confusion (no CVE) leading to arbitrary RW[edit | edit source]

See also [4].

Patched[edit | edit source]

Yes on PS4 FW 11.50 and PS5 FW 9.00.

Tested[edit | edit source]

Tested and working on PS4 FWs 10.00-11.02 and PS5 FWs 6.00-8.60.

FW <= 5.50 - FrameLoader::loadInSameDocument() UaF (CVE-2022-22620) leading to arbitrary RW[edit | edit source]

See also [5].

Patched[edit | edit source]

Yes on PS4 FW 10.00 and PS5 FW 6.00.

Tested[edit | edit source]

Tested and working on PS4 FWs 6.00-9.60 and PS5 FWs 1.00-5.50.

FW 3.00-4.51 - WebCore::CSSFontFaceSet vulnerabilities leading to usermode ROP code execution[edit | edit source]

Contrarly to PS4, on PS5 this exploit does not allow arbitrary usermode memory RW because of PS5 memory protections. However thanks to tricks it is possible to get usermode ROP code execution from this exploit.

See also [6].

Implementations[edit | edit source]

Patched[edit | edit source]

No as of PS5 FW 4.51 (need to test on PS5 FWs >=5.00).

Tested[edit | edit source]

Tested and working on PS4 FWs 9.00-9.04 and PS5 FWs 3.00-4.51. Untested: PS5 FWs 2.10-2.50 and >=5.00.

Game savedata exploits[edit | edit source]

PS1 games savedata exploits[edit | edit source]

See PS4 Dev Wiki.

PS2 game savedata exploits[edit | edit source]

See PS4 Dev Wiki.

PSP games savedata exploits[edit | edit source]

See PS4 Dev Wiki.

PS4/PS5 PS2emu sandbox escape (mast1c0re)[edit | edit source]

See PS4 Dev Wiki.

PS4/PS5 game savedata LUA exploit[edit | edit source]

See PS4 Dev Wiki.

PS4 emulator exploits[edit | edit source]

Nothing yet.

Usermode securities[edit | edit source]

See also PS4 usermode securities.

>=8.00 - Syscalls and libkernel blocked from main usermode applications[edit | edit source]

Since PS5 System Software version 8.00, in order to make the PS5 less vulnerable to kernel escalation from usermode after TheFloW's disclose of BD-JB2, Sony blocked syscall and libkernel access from the main contenders such as BD JAVA, WebKit, PS2emu and probably more else all usermode applications.

Kernel[edit | edit source]

Physical memory readable by kernel (Meme Dumper)[edit | edit source]

Credits[edit | edit source]

Discovered by cheburek3000. Released on 2023-02-07 by cheburek3000.

Bug Description[edit | edit source]

Steps:

1. Find kernel_pmap_store offset in kernel data segment. You can guess its location by specific signature (see guess_kernel_pmap_store_offset code). Luckily kernel_pmap_store has physical and virtual addresses for PML4.

2. Through physical and virtual addresses for PML4, you can find physical memory mapped directly to the kernel memory (DMAP). See PADDR_TO_DMAP macro and vmparam.h from FreeBSD for reference.

3. Use page tables to convert any kernel virtual address to physical address (see vaddr_to_paddr code).

4. Access data by physical address through DMAP.

Exploit Implementation[edit | edit source]

Patched[edit | edit source]

No in PS5 FW 4.51.


FW <= 7.61 - umtx UaF (yielding arbitrary kernel R/W) (CVE-2024-43102)[edit | edit source]

Credits[edit | edit source]

  • [email protected] for discovering the vulnerability, keeping it secret (2020-12) then sharing a writeup (2024-09-06)
  • Rebecca Cran for discovering the bug in umtx (2023-05-07)
  • Synacktiv for finding and disclosing publicly the vulnerability (2024-09-04)
  • Olivier Certner for fixing the bug (2024-09-04), kib for reviewing the bug fix (2024-09-04), Ed Maste for approving the bug fix commit (2024-09-04)
  • Shuffle from Fail0verflow for the FreeBSD 11 and PS5 PoC in C++ (2024-09-14)
  • Flatz for writing a PS5 exploit chain with TheFloW's BD-JB2 (2024-09-14)
  • Specter for chaining the kernel exploit with PsFree WebKit exploit (2024-09-21)

Analysis[edit | edit source]

Bug Description[edit | edit source]

The _umtx_op(2) system call provides support for the implementation of synchronization primitives between threads, and is used by the 1:1 Threading Library (libthr, -lthr) to implement IEEE Std 1003.1-2001 (POSIX.1-2001) pthread locks, like mutexes, condition variables and so on. In particular, its UMTX_OP_SHM operation provides support for anonymous shared memory associated to a particular physical address, which is used to implement process-shared mutexes (PTHREAD_PROCESS_SHARED).

Concurrent removals of such a mapping by using the UMTX_SHM_DESTROY sub-request of UMTX_OP_SHM can lead to decreasing the reference count of the object representing the mapping too many times, causing it to be freed too early.

umtx_shm_unref_reg_locked() would unconditionally drop the "registry" reference, tied to USHMF_LINKED.

This is not a problem for caller umtx_shm_object_terminated(), which operates under the 'umtx_shm_lock' lock end-to-end, but it is for indirect caller umtx_shm(), which drops the lock between umtx_shm_find_reg() and the call to umtx_shm_unref_reg(true) that deregisters the umtx shared region (from 'umtx_shm_registry'; umtx_shm_find_reg() only finds registered shared mutexes).

Thus, two concurrent user-space callers of _umtx_op() with UMTX_OP_SHM and flags UMTX_SHM_DESTROY, both progressing past umtx_shm_find_reg() but before umtx_shm_unref_reg(true), would then decrease twice the reference count for the single reference standing for the shared mutex's registration.

A malicious code exercizing the UMTX_SHM_DESTROY sub-request in parallel can panic the kernel or enable further Use-After-Free attacks, potentially including code execution or Capsicum sandbox escape.

Exploit Implementation[edit | edit source]

Patched[edit | edit source]

Yes in PS5 FW 8.00.


FW <= 8.20 - Remote vulnerabilities in spp (yielding kernel panic) (CVE-2006-4304 and no-CVE)[edit | edit source]

See the PS4 wiki.

Note that kernel ASLR defeat is currently not working on PS5 and there are protections remaining before being able to

Patched[edit | edit source]

Yes in PS5 FW 8.40.


FW <= ?3.21? - PPPoE driver remote buffer overflow (CVE-2022-29867)[edit | edit source]

See the PS4 wiki.

Note that PS5 is maybe not affected even though PS4 is.

Patched[edit | edit source]

Probably in PS5 FW 4.00.


FW 3.00-4.51 - IPV6_2292PKTOPTIONS UaF (yielding arbitrary kernel R/W) (CVE-2020-7457)[edit | edit source]

See the PS4 wiki.

Credits[edit | edit source]

  • Discovered for PS4 and ported to PS5 by TheFloW.

Exploit Implementation[edit | edit source]

Patched[edit | edit source]

Yes in PS5 FW 5.00. Invulnerable in PS5 FW 2.50 and below.


FW <= 4.03 - exFAT driver heap-based buffer overflow[edit | edit source]

See the PS4 wiki.

Credits[edit | edit source]

Discovered by TheFloW. Disclosed by ChendoChap.

Exploit Implementation[edit | edit source]

Not yet because even though there is ChendoChap's method to execute usermode code in WebKit, there is no PS5 kernel dump to build a kernel ROP chain. Exploiting this kernel vulnerability blind is almost impossible because once the USB device is inserted it corrupts the kernel heap memory and if the offsets in the kernel ROP chain are bad it creates a kernel panic.

Patched[edit | edit source]

Yes in PS5 FW 4.50.


SMAP bypass (CVE-2021-29628)[edit | edit source]

See also [8].

Credits[edit | edit source]

  • Discovered and disclosed publicly by m00nbsd. Disclosed to SIE on 2020-12-01.

Analysis[edit | edit source]

Bug Description[edit | edit source]

A SMAP bypass has been found by m00nbsd while working on FreeBSD 12. It is named CVE-2021-29628 and affects FreeBSD 12.2 and later (til it was patched). It does not work on PS4 because PS4 kernel is based on FreeBSD 9 which did not contain the vulnerability and because PS4 SMAP does not come from FreeBSD but is custom from Sony. It used to work on PS5 before it was disclosed and patched.

Patched[edit | edit source]

Yes in PS5 FW 2.30 or later according to dates.


Secure Kernel[edit | edit source]

Untested: Partial SAMU KeyRings bruteforce by missing HMAC length check in secure kernel[edit | edit source]

See [9].

Potentially vulnerable on PS5 FWs <= 4.03.

Secure Loader[edit | edit source]

Symmetric PS5 root keys dump by software exploit by Fail0verflow[edit | edit source]

See Fail0verflow's announcement on Twitter (2021-11-08)

Fail0verflow either has a bootrom execution exploit or an AMD/ARM PSP hack.

It is speculated that this exploit is a derivative of the ZenBleed CVE-2023-20593 exploit, as the PS5 APU is a custom ZEN 2 Ryzen chip.

This allows to decrypt on PC most parts of the PS5 System Software files including:

  • PUP
  • secure loader (?AMD? ARM Platform Security Processor module) of Oberon

And by derivation, mostly like on PS Vita:

  • secure modules
  • kernel boot loader / BIOS
  • non-secure kernel
  • usermode system modules

Potentially unpatched.

Hypervisor[edit | edit source]

<=2.50 - Hypervisor integrated as part of the kernel binary[edit | edit source]

  • Discovered by Specter (2023-07-01) and Flatz (before 2023-07-27).
  • This makes Hypervisor exploitation easier as it can be triggered by usermode directly without the need of a kernel exploit.
  • Patched since PS5 FW 3.00.

Platform Secure Processor[edit | edit source]

<=2.50 - PSP dump via Hypervisor exploit[edit | edit source]

  • Thanks to this software exploit, flatz got access to most PS5 decryption keys.
  • Vulnerable on PS5 FWs <= 2.50 and potentially patched since 3.00.

Southbridge[edit | edit source]

EMC and EFC-EAP vulnerabilities leading to code execution[edit | edit source]

  • Will be disclosed by Shawn Hoffman (of SYMBRKRS LLC, @shuffle2 of fail0verflow) at the Security Analyst Summit Conference 2024 on 22-25 October, 2024.

Exploits allowing code execution on EMC and EFC/EAP will be detailed, along with release of a tool which implements the exploits. The process of initial exploration/discovery will also be briefly covered. From a security researcher point of view, the exploits are interesting as they cover a hard-to-spot bug in a firmware state machine, and abusing hardware misconfiguration to bypass memory protection measures. The exploits/tooling allow for further research into the system.

Unclassified[edit | edit source]

TheFloW's neither usermode nor kernel exploit[edit | edit source]

  • On 2024-08-29, TheFloW received 10.000$ from Sony for disclosing privately on Sony's HackerOne bug bounty program a vulnerability.
  • According to Flatz, this vulnerability affects neither usermode nor kernel, so it might be either about hardware or more likely about Hypervisor.
  • This vulnerability probably got patched in PS5 FW 10.00 or in PS5 FW 9.60, or if it is not patchable by software, is patched in new hardware revisions of the PS5.

Hardware[edit | edit source]

Untested: ZenBleed (CVE-2023-20593) leak register contents directly from the CPU.[edit | edit source]

This is a well documented CPU vulnerability in AMD Processors with the Zen 2 microarchitecture. There is no proof of concept specifically for the PS5, however we do know the PS5 uses a custom Zen 2 chip. This is a hardware bug that uses software to exploit the system. AMD has since patched this with software, but we are unsure of the status for the latest PS5 firmware (assumed to be patched). For more information see PS-Chi.