Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 9abd5581eeb8cdf9595c8807e8ec4ad4fd61495c
      
https://github.com/WebKit/WebKit/commit/9abd5581eeb8cdf9595c8807e8ec4ad4fd61495c
  Author: Chris Dumez <[email protected]>
  Date:   2026-06-11 (Thu, 11 Jun 2026)

  Changed paths:
    M Source/WebKit/UIProcess/WebsiteData/EnhancedSecuritySitesPersistence.cpp

  Log Message:
  -----------
  EnhancedSecuritySitesPersistence::trackEnhancedSecurityForDomain continues 
after a failed query and reads the wrong row
https://bugs.webkit.org/show_bug.cgi?id=316886

Reviewed by Rupin Mittal.

trackEnhancedSecurityForDomain() called reportSQLError() when the SelectSite
statement was null or its bindText() failed, but did not return afterwards.
Control fell through to selectSiteStatement->step(), so on a bind failure
(e.g. under memory pressure) the SELECT ran against a statement whose
parameter was never bound, evaluating the cached/auto-reset statement
against a stale or NULL site. The subsequent EnhancedSecurity::Disabled
check then read the wrong row, which could skip the INSERT OR REPLACE and
silently re-enable a site the user had explicitly disabled (or, in the
unreachable null-statement case, dereference a null CheckedPtr).

reportSQLError() only logs; it is meant to be a terminal error path here.
Return on the error, matching the existing idiom in this file (e.g.
deleteAllSites() and enhancedSecurityOnlyDomains()).

* Source/WebKit/UIProcess/WebsiteData/EnhancedSecuritySitesPersistence.cpp:
(WebKit::EnhancedSecuritySitesPersistence::trackEnhancedSecurityForDomain):

Canonical link: https://commits.webkit.org/315071@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to