CVE-2023-46139
JSON

5.0medium

KernelSU signature validation mismatch

Severity
5.0medium CVSS:3.1 by GitHub_M
Exploit likelihood
0.17% (higher than 6% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M

Description

KernelSU is a Kernel based root solution for Android. Starting in version 0.6.1 and prior to version 0.7.0, if a KernelSU installed device is infected with a malware whose app signing block specially constructed, it can take over root privileges on the device. The vulnerable verification logic actually obtains the signature of the last block with an id of `0x7109871a`, while the verification logic during Android installation is to obtain the first one. In addition to the actual signature upgrade that has been fixed (KSU thought it was V2 but was actually V3), there is also the problem of actual signature downgrading (KSU thought it was V2 but was actually V1). Find a condition in the signature verification logic that will cause the signature not to be found error, and KernelSU does not implement the same conditions, so KSU thinks there is a V2 signature, but the APK signature verification actually uses the V1 signature. This issue is fixed in version 0.7.0. As workarounds, keep the KernelSU manager installed and avoid installing unknown apps.

Affected

Product or packageVersionsReported by
tiann KernelSU>= 0.6.1, < 0.7.0CVE List
kernelsu kernelsufrom 0.6.1 before 0.7.0NVD

All scores

GitHub_M5.0medium CVSS:3.1CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:C/C:L/I:L/A:L
NVD5.7medium CVSS:3.1CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:L

Classification

CWE-863

SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.

What each source says

CVE List

KernelSU is a Kernel based root solution for Android. Starting in version 0.6.1 and prior to version 0.7.0, if a KernelSU installed device is infected with a malware whose app signing block specially constructed, it can take over root privileges on the device. The vulnerable verification logic actually obtains the signature of the last block with an id of `0x7109871a`, while the verification logic during Android installation is to obtain the first one. In addition to the actual signature upgrade that has been fixed (KSU thought it was V2 but was actually V3), there is also the problem of actual signature downgrading (KSU thought it was V2 but was actually V1). Find a condition in the signature verification logic that will cause the signature not to be found error, and KernelSU does not implement the same conditions, so KSU thinks there is a V2 signature, but the APK signature verification actually uses the V1 signature. This issue is fixed in version 0.7.0. As workarounds, keep the KernelSU manager installed and avoid installing unknown apps.

NVD (es)

KernelSU es una solución raíz basada en Kernel para Android. A partir de la versión 0.6.1 y anteriores a la versión 0.7.0, si un dispositivo instalado con KernelSU está infectado con un malware cuyo bloque de firma de aplicación está especialmente construido, puede asumir los privilegios de root en el dispositivo. La lógica de verificación vulnerable en realidad obtiene la firma del último bloque con una identificación de `0x7109871a`, mientras que la lógica de verificación durante la instalación de Android es obtener la primera. Además de la actualización de la firma real que se ha solucionado (KSU pensó que era V2 pero en realidad era V3), también existe el problema de la degradación de la firma real (KSU pensó que era V2 pero en realidad era V1). Encuentre una condición en la lógica de verificación de firma que causará un error de no encontrar la firma, y KernelSU no implementa las mismas condiciones, por lo que KSU cree que hay una firma V2, pero la verificación de firma APK en realidad usa la firma V1. Este problema se solucionó en la versión 0.7.0. Como workarounds, mantenga instalado el administrador KernelSU y evite instalar aplicaciones desconocidas.

References

https://github.com/tiann/KernelSU/security/advisories/GHSA-86cp-3prf-pwqqthird-party-advisory
https://github.com/tiann/KernelSU/commit/d24813b2c3738f2f9bd762932141cadd948c354fthird-party-advisory
https://drive.google.com/drive/folders/1XdYCCAhC_mkt1k1IyUiwcgFsuOFvwNRlthird-party-advisory
https://github.com/tiann/KernelSU/blob/344c08bb79ba12b692016750cda363f9f3500182/kernel/apk_sign.c#L179C32-L179C32third-party-advisory
https://github.com/tiann/KernelSU/blob/344c08bb79ba12b692016750cda363f9f3500182/kernel/apk_sign.c#L188third-party-advisory
http://aospxref.com/android-14.0.0_r2/xref/frameworks/base/core/java/android/util/apk/ApkSigningBlockUtils.java#770third-party-advisory
http://aospxref.com/android-14.0.0_r2/xref/frameworks/base/core/java/android/util/apk/ApkSigningBlockUtils.java#783third-party-advisory

Sources

SourceRecordLicence
CVE ListCVE-2023-46139 changed 2024-09-05CVE Terms of Use
NVDCVE-2023-46139 changed 2026-06-17Public domain