Vulnerabilities: Difference between revisions

From PS5 Developer wiki
Jump to navigation Jump to search
No edit summary
 
(29 intermediate revisions by 2 users not shown)
Line 1: Line 1:
= Usermode =
= Usermode =


== Unclassified usermode type exploits ==
== BD-J exploits ==


=== TheFloW's usermode exploit ===
=== FW <= 7.61 - BD-JB2 - Path traversal sandbox escape by TheFloW ===


See [https://twitter.com/theflow0/status/1457362920501829636 TheFloW's PS5 kernel exploit announcement (2021-11-07)].
See [https://www.psdevwiki.com/ps4/Vulnerabilities#FW_%3C=10.71_-_BD-JB2_-_Path_traversal_sandbox_escape_by_TheFloW].


We have no information on this such as which usermode module it exploits.
==== Patched ====


Potentially unpatched.
'''Yes''' on PS5 FW 8.00.
 
=== FW <= 4.51 - BD-JB - Five vulnerabilities chained by TheFloW ===
 
See [https://www.psdevwiki.com/ps4/Vulnerabilities#FW_%3C=9.00_-_BD-JB_-_Five_vulnerabilities_chained_by_TheFloW].
 
==== Implementations ====
 
* [https://github.com/psxdev/bd-jb PS5 BD-JB implementation by Antonio Jose Ramos Marquez (psxdev)]
* [https://github.com/john-tornblom/bdj-sdk/tree/master/samples/ps5-invoke-native PS5 BD-JB implementation by John Törnblom]
* [https://github.com/sleirsgoevy/bd-jb/tree/ps5 PS5 BD-JB implementation by sleirsgoevy]
* [https://github.com/TheOfficialFloW/bd-jb PS5 BD-JB implementation by TheFloW]
 
==== Patched ====
 
'''Yes''' partially on PS5 FWs > 4.50 (need to test). Probably unpatched on FW 4.51 and patched on FW 5.00.


== WebKit exploits ==
== WebKit exploits ==
Line 19: Line 34:
* 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 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.


=== FW 3.00-4.50 - WebCore::CSSFontFaceSet vulnerabilities leading to addrof/fakeobj ===
==== Patched ====
 
'''No''' as of PS5 FW 5.10.
 
=== FW <= 5.50 - FrameLoader::loadInSameDocument UaF (CVE-2022-22620) leading to arbitrary RW ===
 
See also [https://www.psdevwiki.com/ps4/Vulnerabilities#FW_6.00-9.60_-_FrameLoader::loadInSameDocument_UaF_(CVE-2022-22620)_leading_to_arbitrary_RW].
 
==== Patched ====
 
'''Yes''' on PS5 FW 6.00.
 
==== Tested ====
 
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 ===
 
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 [https://www.psdevwiki.com/ps4/Vulnerabilities#FW_9.00-9.04_-_WebCore::CSSFontFaceSet_vulnerabilities_leading_to_arbitrary_RW].
 
==== Implementations ====
 
* [https://github.com/ChendoChap/PS5-Webkit-Execution Implementation for PS5 by ChendoChap]


Contrarly to PS4, on PS5 this exploit does not allow arbitrary RW because of PS5 memory protections.
==== Patched ====


See [https://www.psdevwiki.com/ps4/Working_Exploits#FW_9.00-9.03_-_WebCore::CSSFontFaceSet_vulnerabilities_leading_to_arbitrary_RW].
'''No''' as of PS5 FW 4.51 (need to test on PS5 FWs >=5.00).


Tested working on PS4 FWs 9.00-9.03 and PS5 FWs 3.00-4.50. Untested: PS5 FWs 2.10-2.50.
==== Tested ====


Unpatched as of PS5 FW 4.50.
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 ==
== Game savedata exploits ==


Nothing yet.
=== PS2 games savedata exploits ===
 
See [https://www.psdevwiki.com/ps4/Vulnerabilities#Usermode_Exploits_.28Game_Savedata.29].
 
=== PS4/PS5 PS2emu sandbox escape (mast1c0re) ===
 
See [https://www.psdevwiki.com/ps4/Vulnerabilities#PS4.2FPS5_PS2emu_sandbox_escape_.28mast1c0re.29].


== PS4 emulator exploits ==
== PS4 emulator exploits ==
Line 39: Line 84:
= Kernel =
= Kernel =


== FW <= 4.50 - exFAT driver OOB ==
== Physical memory readable by kernel (Meme Dumper) ==


Not yet exploited because no public usermode exploit has been released yet.
=== Credits ===


See [https://www.psdevwiki.com/ps4/Working_Exploits#FW_.3C.3D_9.00_-_exFAT_driver_OOB]
Discovered by cheburek3000. Released on 2023-02-07 by cheburek3000.


Not yet patched.
=== Bug Description ===


== TheFloW's kernel exploit ==
Steps:


Not released yet.
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.


See [https://twitter.com/theflow0/status/1457362920501829636 TheFloW's PS5 kernel exploit announcement (2021-11-07)].
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.


Potentially unpatched.
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 ===
 
* [https://github.com/cheburek3000/meme_dumper]
 
=== Patched ===
 
'''No''' in PS5 FW 4.51.
----
 
== FW 3.00-4.51 - IPV6_2292PKTOPTIONS UaF (yielding arbitrary kernel R/W) (CVE-2020-7457) ==
 
See the [https://www.psdevwiki.com/ps4/Vulnerabilities#FW_.3C.3D_7.02_-_IPV6_2292PKTOPTIONS_UaF_.28yielding_arbitrary_kernel_R.2FW.29_.28CVE-2020-7457.29 PS4 wiki].
 
=== Credits ===
 
* Discovered for PS4 and ported to PS5 by TheFloW.
 
=== Exploit Implementation ===
 
* See also implementation for FreeBSD 9 or 12 or PS4.
* [https://github.com/Cryptogenic/PS5-4.03-Kernel-Exploit Kernel exploit implementation for PS5 3.00-4.51 by Specter (2022-10-02)]
 
=== Patched ===
 
'''Yes''' in PS5 FW 5.00. Invulnerable in PS5 FW 2.50 and below.
----
 
== FW <= 4.03 - exFAT driver heap-based buffer overflow ==
 
=== Credits ===
 
Discovered by TheFloW. Disclosed by ChendoChap.
 
=== Exploit Implementation ===
 
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.
 
See the [https://www.psdevwiki.com/ps4/Vulnerabilities#FW_.3C.3D_9.00_-_exFAT_driver_heap-based_buffer_overflow PS4 wiki].
 
=== Patched ===
 
'''Yes''' in PS5 FW 4.50.
----


== SMAP bypass (CVE-2021-29628) ==
== SMAP bypass (CVE-2021-29628) ==


* Discovered and disclosed publicly by m00nbsd. Disclosed to Sony on 2020-12-01.
See also [https://www.psdevwiki.com/ps4/Vulnerabilities#Kernel_SMAP].


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 is not coming from FreeBSD but is custom from Sony. It used to work on PS5 before it was disclosed and patched.
=== Credits ===
 
* Discovered and disclosed publicly by m00nbsd. Disclosed to SIE on 2020-12-01.
 
=== Analysis ===


* [https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-29628 CVE-2021-29628 (FreeBSD SMAP bypass) by m00nbsd]
* [https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-29628 CVE-2021-29628 (FreeBSD SMAP bypass) by m00nbsd]
* [https://hackerone.com/reports/1048322 CVE-2021-29628 (PS5 SMAP bypass) by m00nbsd]
* [https://hackerone.com/reports/1048322 CVE-2021-29628 (PS5 SMAP bypass) by m00nbsd]


See also [https://www.psdevwiki.com/ps4/Working_Exploits#Kernel_SMAP].
=== Bug Description ===
 
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 ===


Patched on PS5 FW 2.30 or later according to dates.
'''Yes''' in PS5 FW 2.30 or later according to dates.
----


= Secure Kernel =
= Secure Kernel =
Line 72: Line 172:
== Untested: Partial SAMU KeyRings bruteforce by missing HMAC length check in secure kernel ==
== Untested: Partial SAMU KeyRings bruteforce by missing HMAC length check in secure kernel ==


See [https://www.psdevwiki.com/ps4/Bugs_%26_Vulnerabilities#Partial_SAMU_KeyRings_bruteforce_by_missing_HMAC_length_check_in_secure_kernel].
See [https://www.psdevwiki.com/ps4/Vulnerabilities#Partial_SAMU_KeyRings_bruteforce_by_missing_HMAC_length_check_in_secure_kernel].


Potentially vulnerable on PS5 FWs <= 4.03.
Potentially vulnerable on PS5 FWs <= 4.03.

Latest revision as of 00:44, 2 December 2023

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]

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

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 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.

Patched[edit | edit source]

No as of PS5 FW 5.10.

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

See also [3].

Patched[edit | edit source]

Yes on 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 [4].

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]

PS2 games savedata exploits[edit | edit source]

See [5].

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

See [6].

PS4 emulator exploits[edit | edit source]

Nothing yet.

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 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]

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.

See the PS4 wiki.

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.

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.

Hardware[edit | edit source]

Nothing yet.