Closed Bug 1825645 Opened 3 years ago Closed 3 years ago

Use-after-free crash in [@ mozilla::net::nsStandardURL::nsStandardURL] mostly from a single machine

Categories

(Core :: Networking, defect, P2)

Unspecified
Windows 11
defect

Tracking

()

RESOLVED INCOMPLETE

People

(Reporter: mccr8, Unassigned)

References

Details

(Keywords: crash, csectype-uaf, Whiteboard: [necko-triaged][necko-priority-next])

Crash Data

Crash report: https://crash-stats.mozilla.org/report/index/0abfe9e9-1fd1-41c9-9916-28ffe0230328

Reason: EXCEPTION_ACCESS_VIOLATION_READ

Top 10 frames of crashing thread:

0  xul.dll  nsCOMPtr_base::assign_assuming_AddRef  xpcom/base/nsCOMPtr.h:377
0  xul.dll  nsCOMPtr_base::assign_with_AddRef  xpcom/base/nsCOMPtr.cpp:41
1  xul.dll  nsCOMPtr<nsIURLParser>::operator=  xpcom/base/nsCOMPtr.h:706
1  xul.dll  mozilla::net::nsStandardURL::nsStandardURL  netwerk/base/nsStandardURL.cpp:218
1  xul.dll  mozilla::net::nsStandardURL::TemplatedMutator<mozilla::net::nsStandardURL>::Create  netwerk/base/nsStandardURL.h:500
1  xul.dll  mozilla::net::nsStandardURL::TemplatedMutator<mozilla::net::nsStandardURL>::Init  netwerk/base/nsStandardURL.h:441
2  xul.dll  NS_MutateURI::Apply  dist/include/nsIURIMutator.h:592
2  xul.dll  NewStandardURI  netwerk/base/nsNetUtil.cpp:1755
3  xul.dll  NS_NewURI  netwerk/base/nsNetUtil.cpp:1854
4  xul.dll  mozilla::dom::URL::Constructor  dom/url/URL.cpp:82

There aren't a lot of these crashes, 8 in the last month, but 7 of those are on the jemalloc poison value, and only on 112 and 113, so maybe there's something we can do here.

Bug 1715960 is also on file for use-after-free crashes related to nsStandardURL, but I don't know if it is related or not.

These crashes are from a variety of install times, but a number of them have URLs from a couple of universities in China, and the UAF crashes all are on the same graphics hardware, so it could be a single person with buggy hardware.

The bad hardware theory seems to make the most sense.
Looking at the code, it seems like the only way net_GetStdURLParser could return a pointer to a freed object would be if net_ShutdownURLHelper gets called between the call to net_GetStdURLParser and the assigning of the pointer.
Considering these crashes are on the main thread, that doesn't seem possible.

Severity: -- → S3
Priority: -- → P2
Whiteboard: [necko-triaged][necko-priority-review]

We'll take another look in two weeks - maybe we'll have more crash stacks that can lead to other insights.

Whiteboard: [necko-triaged][necko-priority-review] → [necko-triaged][necko-priority-next]

There are still a steady trickle of these, but the last 4 all have the exact same Adapter Device ID.

Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → INCOMPLETE
Duplicate of this bug: 1862345

Copying crash signatures from duplicate bugs.

Crash Signature: [@ nsCOMPtr_base::assign_assuming_AddRef | nsCOMPtr_base::assign_with_AddRef | nsCOMPtr<T>::operator= | mozilla::net::nsStandardURL::nsStandardURL] → [@ nsCOMPtr_base::assign_assuming_AddRef | nsCOMPtr_base::assign_with_AddRef | nsCOMPtr<T>::operator= | mozilla::net::nsStandardURL::nsStandardURL] [@ nsCOMPtr<T>::assign_assuming_AddRef | nsCOMPtr<T>::assign_with_AddRef | nsCOMPtr<T>::operator= | mozilla…
See Also: → 1900966
Duplicate of this bug: 1900966
See Also: 1900966
Crash Signature: [@ nsCOMPtr_base::assign_assuming_AddRef | nsCOMPtr_base::assign_with_AddRef | nsCOMPtr<T>::operator= | mozilla::net::nsStandardURL::nsStandardURL] [@ nsCOMPtr<T>::assign_assuming_AddRef | nsCOMPtr<T>::assign_with_AddRef | nsCOMPtr<T>::operator= | → [@ nsCOMPtr_base::assign_assuming_AddRef | nsCOMPtr_base::assign_with_AddRef | nsCOMPtr<T>::operator= | mozilla::net::nsStandardURL::nsStandardURL] [@ nsCOMPtr<T>::assign_assuming_AddRef | nsCOMPtr<T>::assign_with_AddRef | nsCOMPtr<T>::operator= |
Summary: Use-after-free crash in [@ nsCOMPtr_base::assign_assuming_AddRef | nsCOMPtr_base::assign_with_AddRef | nsCOMPtr<T>::operator= | mozilla::net::nsStandardURL::nsStandardURL] → Use-after-free crash in[@ mozilla::net::nsStandardURL::nsStandardURL] mostly from a single machine

Copying crash signatures from duplicate bugs.

Crash Signature: mozilla::net::nsStandardURL::nsStandardURL] → mozilla::net::nsStandardURL::nsStandardURL] [@ mozilla::net::nsStandardURL::nsStandardURL]
Crash Signature: mozilla::net::nsStandardURL::nsStandardURL] [@ mozilla::net::nsStandardURL::nsStandardURL] → mozilla::net::nsStandardURL::nsStandardURL] [@ mozilla::net::nsStandardURL::nsStandardURL]
Summary: Use-after-free crash in[@ mozilla::net::nsStandardURL::nsStandardURL] mostly from a single machine → Use-after-free crash in [@ mozilla::net::nsStandardURL::nsStandardURL] mostly from a single machine
Duplicate of this bug: 1924459

90% of the crashes, and 100% of the e5e5 crashes are from zh-CN with cpu "family 6 model 151 stepping 5 " -> a single machine. Doesn't mean there isn't an issue, but very likely it's something specific to this user or his machine. Most of the e5e5 URLs are from https://moa.xmu.edu.cn/... others are scattered but consistent with one user.

Duplicate of this bug: 1959367
No longer duplicate of this bug: 1959367
Group: network-core-security
You need to log in before you can comment on or make changes to this bug.