Integer overflow in WebView (CVE-2026-11290)
An exported Android service for WebView network logging lacked proper caller authorisation, letting any app write files to the WebView provider's private directory. A separate integer truncation bug in the log cleanup comparator could then be exploited to persistently crash the webview_service process.
Google Chrome
Originally disclosed on Chrome VRP
- Fix shipped in 51 days
Project Fortify, an experimental security project, has identified the following potential security issue. If you're a feature owner CC-ed on this bug, please do your best to review these reports without the Chrome Security team.
Overview: AwNetLogService lacks proper authorization, allowing any unprivileged Android app to write files to the WebView provider's private directory. Furthermore, an integer truncation bug in the log cleanup logic can be exploited to persistently crash the webview_service process.
Affected files:
android_webview/nonembedded/java/src/org/chromium/android_webview/services/AwNetLogService.javaandroid_webview/nonembedded/java/AndroidManifest.xml
Estimated timestamp from git blame: 2025-10-08
Overview
Two potential vulnerabilities exist in org.chromium.android_webview.services.AwNetLogService, a newly introduced service for streaming network logs in WebView. Together, they allow an unprivileged malicious application to write files into the WebView provider's private data directory and trigger a persistent Denial of Service (DoS) by crashing the :webview_service process.
1. Missing Authorization
AwNetLogService is declared in AndroidManifest.xml as an exported service without any <permission> restrictions. Its streamLog(long creationTime, String packageName) method attempts to authorize callers via the isCorrectPackage method:
private boolean isCorrectPackage(String packageName) {
int binderUid = Binder.getCallingUid();
// ... fetches applicationUid for packageName ...
if (applicationUid == binderUid) {
return true;
}
return false;
}
This logic only verifies that the caller has provided their own package name. It completely fails to verify whether the caller is actually authorized to use the developer-only NetLog functionality. Consequently, any application on the device can bind to the service, call streamLog, and obtain a write-only ParcelFileDescriptor pointing to the WebView provider's private aw_net_logs directory.
2. Integer Truncation in Storage Reclamation
To limit disk usage, AwNetLogService includes a cleanUpNetLogDirectory() method that deletes older logs when the directory exceeds 1 GB. It sorts files using a custom Comparator inside reclaimStorageSpace():
long diff = firstFileTime - secondFileTime;
return (int) diff;
Because the timestamps are in milliseconds, a difference greater than Integer.MAX_VALUE (approximately 24.8 days) will truncate when cast to an int, causing an integer overflow that flips the sign of the result.
If an attacker crafts three log files with specific future timestamps that exploit this truncation, they can create a state where compare(A, B) < 0 and compare(B, C) < 0, but compare(A, C) >= 0. This violates the strict transitivity contract of Java's Arrays.sort() (Timsort), causing it to throw an unhandled IllegalArgumentException: Comparison method violates its general contract!.
Impact
This unhandled exception persistently crashes the :webview_service background process. Because the malicious files remain in the aw_net_logs directory, the crash loop repeats every time AwNetLogService or the WebView DevTools UI attempts to process the directory. This disables critical WebView background features running in the same process, such as Finch variations, metrics/crash uploading, and Safe Browsing component updates, until the user manually clears the WebView provider's app data.
Potential Attacker Steps
(Note: These are suggested steps based on code analysis; our tooling agent does not run code to provide a working PoC.)
- An attacker creates a malicious, unprivileged Android application.
- The app binds to
org.chromium.android_webview.services.AwNetLogService. - The app invokes
streamLog(creationTime, packageName)using its own package name and heavily padded future timestamps (e.g.,T,T - (Integer.MAX_VALUE + 1), andT - 2 * (Integer.MAX_VALUE + 1)). - The app writes garbage data into the returned
ParcelFileDescriptors until the 1 GBMAX_TOTAL_CAPACITYthreshold is reached. - The next time
streamLogis invoked,cleanUpNetLogDirectory()triggersArrays.sort(), throws theIllegalArgumentException, and crashes the:webview_serviceprocess.
Suggested Fix
-
Authorization: Implement strict UID/Package checks similar to
DeveloperUiService, requiring the caller to share the same UID as the WebView provider (Binder.getCallingUid() == Process.myUid()), or enforce a specific developer permission. -
Truncation: Replace the unsafe integer cast in the
ComparatorwithLong.compare():Java return Long.compare(firstFileTime, secondFileTime);
Evaluated with Chrome root at commit: 096fc8fdbfacf2546485756d03f160a3d04fcc9b
Results so far have been promising, but there can be wrong deductions. If this proves to be a false positive, please close as WAI; data from false positives will be used to improve accuracy over time. And please feel free to reach out to me directly if you have concerns or feedback on the project.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
The service's authorisation check only confirmed the caller supplied its own package name rather than verifying the caller was permitted to use the developer-only feature, and the log cleanup comparator cast a millisecond timestamp difference to an int, causing overflow and violating the sorting contract.
Impact
The crash loop disables WebView background features such as Finch variations, metrics/crash uploading, and Safe Browsing component updates until the user manually clears the WebView provider's app data.
What the attacker needed
Malicious app installed on the device; no special permissions required
The fix
The service should enforce strict UID or package checks (for example, requiring the caller to share the WebView provider's UID or hold a specific developer permission), and the comparator should use Long.compare instead of casting the difference to an int.
How it was found
- Create a malicious, unprivileged Android application.
- Bind to the exported AwNetLogService.
- Invoke streamLog with the app's own package name and crafted future timestamps.
- Write data into the returned file descriptors until the 1 GB capacity threshold is reached.
- Invoke streamLog again so cleanUpNetLogDirectory runs Arrays.sort and throws an exception, crashing the webview_service process.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
Android apps can expose services that other apps on the phone can call. This service was meant only for developers, but it checked only that the caller used its own package name, not that it was allowed to use the feature. Separately, a maths mistake when sorting old log files could make the sorting code throw an error and crash a background process.
What is DoS?
A request that exhausts resources or crashes a component. Many programs forbid testing it; reports usually show it from code, not by attacking.