Closed Bug 1979727 Opened 1 year ago Closed 11 months ago

Testcase generating eTLD + N URL and fetching it hangs the Parent-Process for 6minutes+. Chrome is instant (i think it errors out)

Categories

(Core :: Security: PSM, defect, P1)

defect

Tracking

()

VERIFIED FIXED

People

(Reporter: mayankleoboy1, Assigned: nwipper)

References

(Blocks 1 open bug)

Details

(Whiteboard: [psm-assigned])

Attachments

(3 files)

Attached file etld + N.html

Open testcase
Enter 500000 (or use a saner smaller number)
Click on generate. -- > This is instant, so thats good
Now click on Fetch button

Firefox (partial): https://share.firefox.dev/4faULbO (6minutes + )
Chrome: instant (or instant error-out)

Here is a saner profile with N= 150000 : https://share.firefox.dev/4l1a08Q

See Also: → 1943230
Component: DOM: Networking → Networking: DNS
Blocks: 1980560
See Also: 1943230

It looks like the source of the jank is this piece of code:
nsSiteSecurityService.cpp

Not sure if this parsing logic needs to be adjusted for this specific test case (an extremely long URL with "." delimiters).

I’ll defer to the security team to determine if any changes are necessary.

Component: Networking: DNS → Security: PSM

Jank in nsSiteSecurityService::IsSecureHost()

Well, you're never going to be able to resolve a hostname like that, so I wonder if it makes sense to add a limit to the number of subdomain components when constructing a URI (this may be what makes Chrome so fast here). Kershaw, what do you think?

Flags: needinfo?(kershaw)

(In reply to Dana Keeler (she/her) [:keeler] from comment #4)

Well, you're never going to be able to resolve a hostname like that, so I wonder if it makes sense to add a limit to the number of subdomain components when constructing a URI (this may be what makes Chrome so fast here). Kershaw, what do you think?

So, we have a limit here to check if a host name is valid.
I think we just need to reuse that check in nsSiteSecurityService::IsSecureHost().

Flags: needinfo?(kershaw)

Sounds good!
Nikolas, would you be interested in taking this on?

Flags: needinfo?(nwipper)
Assignee: nobody → nwipper
Status: NEW → ASSIGNED
Flags: needinfo?(nwipper)

This does happen on my machine + I also get a consistent 7 seconds of JS jank regardless of N: https://share.firefox.dev/3JpXN02. Not sure how that is related.

(In reply to Nikolas Wipper [:nwipper] from comment #7)

This does happen on my machine + I also get a consistent 7 seconds of JS jank regardless of N: https://share.firefox.dev/3JpXN02. Not sure how that is related.

Might be these regexes: https://searchfox.org/mozilla-central/rev/ca035d76ad92757859375c2dc807c7a61055823b/devtools/client/netmonitor/src/utils/request-utils.js#354-356 - maybe file a bug to see what we can do there?

Attachment #9506335 - Attachment description: Bug 1979727 - Return early for host names > 253 when checking if they are secure. r=keeler → Bug 1979727 - Return early for invalid host names when checking if they are secure. r=keeler
See Also: → 1983755

The severity field is not set for this bug.
:keeler, could you have a look please?

For more information, please visit BugBot documentation.

Flags: needinfo?(dkeeler)
Status: ASSIGNED → RESOLVED
Closed: 11 months ago
Resolution: --- → FIXED
Severity: -- → S4
Flags: needinfo?(dkeeler)
Priority: -- → P1
Whiteboard: [psm-assigned]

This is fixed on the latest Nightly - The browser seems to do nothing when i press the "fetch" button.
Thanks!

Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: