<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>268410</bug_id>
          
          <creation_ts>2024-01-30 14:13:56 -0800</creation_ts>
          <short_desc>Limit size of target string stored in serialized session state</short_desc>
          <delta_ts>2025-03-17 07:06:20 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebKit Misc.</component>
          <version>WebKit Local Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=264879</see_also>
    
    <see_also>https://bugs.webkit.org/show_bug.cgi?id=289898</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Ben Nham">nham</reporter>
          <assigned_to name="Ben Nham">nham</assigned_to>
          <cc>mcatanzaro</cc>
    
    <cc>nham</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2009090</commentid>
    <comment_count>0</comment_count>
    <who name="Ben Nham">nham</who>
    <bug_when>2024-01-30 14:13:56 -0800</bug_when>
    <thetext>We&apos;ve seen some MobileSafari launches that take a long time during session restoration because the _WKSessionState object contains a back/forward list item with an absurdly large target string (like &gt;500KB in size).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2009091</commentid>
    <comment_count>1</comment_count>
    <who name="Ben Nham">nham</who>
    <bug_when>2024-01-30 14:14:12 -0800</bug_when>
    <thetext>rdar://120213426</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2009098</commentid>
    <comment_count>2</comment_count>
    <who name="Ben Nham">nham</who>
    <bug_when>2024-01-30 14:21:41 -0800</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/23537</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2009216</commentid>
    <comment_count>3</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2024-01-30 21:35:29 -0800</bug_when>
    <thetext>Committed 273810@main (624a3d6250ec): &lt;https://commits.webkit.org/273810@main&gt;

Reviewed commits have been landed. Closing PR #23537 and removing active labels.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2011726</commentid>
    <comment_count>4</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2024-02-08 06:56:50 -0800</bug_when>
    <thetext>This looks very similar to bug #264879, but unfortunately the patch that landed here is Mac-specific and therefore cannot help with that bug.

(In reply to Ben Nham from comment #0)
&gt; We&apos;ve seen some MobileSafari launches that take a long time during session
&gt; restoration

I think this patch also doesn&apos;t help mobile Safari? It is a Mac-specific file, not a Cocoa file. It shouldn&apos;t be used on iOS. If it&apos;s used on iOS, then it&apos;s in the wrong location.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2011774</commentid>
    <comment_count>5</comment_count>
    <who name="Ben Nham">nham</who>
    <bug_when>2024-02-08 09:03:02 -0800</bug_when>
    <thetext>&gt; unfortunately the patch that landed here is Mac-specific and therefore cannot help with that bug

Despite the name of this file, it compiles on all Cocoa platforms.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2011779</commentid>
    <comment_count>6</comment_count>
    <who name="Ben Nham">nham</who>
    <bug_when>2024-02-08 09:11:07 -0800</bug_when>
    <thetext>That said I think if you want a fix for GTK then you&apos;ll probably have to do a platform-specific change for now given the structure of the code at the moment.

For Cocoa, after looking at this some more, there are even more issues in the way this old code handles deserialization of &gt;2MB session states. But we&apos;re going to fix that in the future. See https://bugs.webkit.org/show_bug.cgi?id=268994.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2011782</commentid>
    <comment_count>7</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2024-02-08 09:21:26 -0800</bug_when>
    <thetext>(In reply to Ben Nham from comment #5)
&gt; Despite the name of this file, it compiles on all Cocoa platforms.

Well the file name is actually OK, just the location is not. It should move from Source/WebKit/UIProcess/mac to Source/WebKit/UIProcess/Cocoa. (Unfortunately moving files is hard without XCode, so I won&apos;t attempt this myself.)</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>