KaiOS Security Portal

Bug 141873 - Canvas Rendering: Integer-Overflow Hardening

Original Reference (KaiOS internal tracker, sign-in required): Bug 141873
Reference: CVE-2019-7386.

Vulnerability class: resource exhaustion (CWE-400).

Impact: the affected application is terminated.

Severity: moderate.

Affected product: KaiOS devices that use GPU-accelerated canvas rendering.

Fix availability: KaiOS security patch level 20260326, integrated into v2.6.

Graphics-intensive canvas content could cause high memory consumption. On memory-constrained devices the low memory killer then terminated the affected application in order to protect overall device stability.
A rendering-work limit was first deployed in 2019 (Bug 58204) and released to partners, who distributed it to end users.

This report covers a follow-up change that adds integer-overflow checks to a size calculation in the rendering allocation path. It does not add a further drawing limit.

Residual behaviour. Neither change removes the memory growth. Web content that allocates without limit can still cause the low memory killer to terminate the application. Terminating an application under memory pressure is the platform's intended protection, and the device continues to operate.
The published CVE-2019-7386 record describes this issue as a buffer overflow that crashes the browser engine process with a segmentation fault and that could lead to remote code execution, with a severity of High to Critical.

KaiOS has requested the following correction:

  - Vulnerability class: resource exhaustion (CWE-400)
  - The affected application process is terminated by the kernel low memory killer, not by a segmentation fault
  - Impact in the reported scenario is denial of service; no code execution was observed
  - Severity: Medium (CVSS), recorded as moderate on this site

Basis for the correction. KaiOS reproduced the published proof of concept and collected system debug logs. In each run the affected application was terminated by the low memory killer, and in some runs other applications were terminated as well. The device continued to operate. No segmentation fault and no memory corruption were observed, and the allocation sizes recorded during those runs stayed far below the size at which an arithmetic overflow could occur.

Scope. This correction describes the behaviour of the published proof of concept. Separately, and as a defence-in-depth measure, KaiOS reviewed the surrounding allocation paths and added integer-overflow checks to the size calculation on that path. The proof of concept did not reach the overflow condition.