Firefox · Networking
CVE-2026-5734
Memory Corruption in Networking
Overview
High
Severity
—
CVSS
No
Exploited ITW
Fixed
Fix Status
Changed Functions
| Function | Change | Notes |
|---|---|---|
ifnetwerk/cookie/CookieStorage.cpp |
modified |
Files Changed
netwerk/cookie/CookieStorage.cpp
Patch
diff --git a/netwerk/cookie/CookieStorage.cpp b/netwerk/cookie/CookieStorage.cpp
index 3b811fc0815..8df262aa8f1 100644
--- a/netwerk/cookie/CookieStorage.cpp
+++ b/netwerk/cookie/CookieStorage.cpp
@@ -609,6 +609,7 @@ void CookieStorage::RemoveOlderCookiesByBytes(CookieEntry* aEntry,
uint32_t removeBytes,
nsCOMPtr<nsIArray>& aPurgedList) {
MOZ_ASSERT(aEntry);
+ CookieKey key(aEntry->mBaseDomain, aEntry->mOriginAttributes);
// remove insecure older cookies until we are within the byte limit
// (CHIPS cookies will not be detected here since they must be secure)
@@ -617,11 +618,16 @@ void CookieStorage::RemoveOlderCookiesByBytes(CookieEntry* aEntry,
// remove secure cookies if we still have cookies to remove
if (bytesRemoved <= removeBytes) {
+ // Re-lookup: aEntry may have been freed if pass 1 emptied it.
+ CookieEntry* entry = mHostTable.GetEntry(key);
+ if (!entry) {
+ return;
+ }
// remove secure older cookies until we are within the byte limit
MOZ_LOG(gCookieLog, LogLevel::Debug,
("Still too many cookies for partition, purging secure\n"));
uint32_t bytesStillToRemove = removeBytes - bytesRemoved;
- RemoveOldestCookies(aEntry, true, bytesStillToRemove, aPurgedList);
+ RemoveOldestCookies(entry, true, bytesStillToRemove, aPurgedList);
}
}
Loading diff…
References
On This Page