Closed Bug 1912626 Opened 1 month ago Closed 1 month ago

Crash in [@ syscall | quinn_udp::imp::recvmmsg_with_fallback]

Categories

(Core :: Networking, defect, P3)

Other
Linux
defect

Tracking

()

RESOLVED FIXED
131 Branch
Tracking Status
firefox-esr115 --- unaffected
firefox-esr128 --- unaffected
firefox129 --- unaffected
firefox130 --- disabled
firefox131 --- fixed

People

(Reporter: release-mgmt-account-bot, Assigned: mail)

References

(Blocks 2 open bugs, Regression)

Details

(Keywords: crash, regression, Whiteboard: [necko-triaged])

Crash Data

Attachments

(1 file)

Crash report: https://crash-stats.mozilla.org/report/index/321a62c5-1e6c-4af9-971d-4128a0240804

Reason: SIGSYS / SYS_SECCOMP

Top 10 frames of crashing thread:

0  libc.so.6  syscall  /usr/src/debug/glibc-2.39-17.fc40.x86_64/sysdeps/unix/sysv/linux/x86_64/syscall.S:38
1  libxul.so  quinn_udp::imp::recvmmsg_with_fallback  third_party/rust/quinn-udp/src/unix.rs:453
1  libxul.so  quinn_udp::imp::recv  third_party/rust/quinn-udp/src/unix.rs:391
1  libxul.so  quinn_udp::imp::UdpSocketState::recv  third_party/rust/quinn-udp/src/unix.rs:188
2  libxul.so  neqo_udp::recv_inner::{{closure}}  third_party/rust/neqo-udp/src/lib.rs:64
2  libxul.so  std::thread::local::LocalKey<core::cell::RefCell<T>>::with_borrow_mut::{{closure}}  library/std/src/thread/local.rs:508
2  libxul.so  std::thread::local::LocalKey<T>::try_with  library/std/src/thread/local.rs:286
2  libxul.so  std::thread::local::LocalKey<T>::with  library/std/src/thread/local.rs:262
2  libxul.so  std::thread::local::LocalKey<core::cell::RefCell<T>>::with_borrow_mut  library/std/src/thread/local.rs:508
2  libxul.so  neqo_udp::recv_inner  third_party/rust/neqo-udp/src/lib.rs:61

By querying Nightly crashes reported within the last 2 months, here are some insights about the signature:

  • First crash report: 2024-08-04
  • Process type: Socket
  • Is startup crash: No
  • Has user comments: No
  • Is null crash: Yes - all crashes happened on null or near null memory address
Component: General → Networking

Thank you for the ping. I am taking a look now.

Some context:

I am new to Mozilla. Thus far I see a total of 18 reports. Is this reason enough to role back the feature on Nightly, i.e. set network.http.http3.use_nspr_for_io to true?

Flags: needinfo?(kershaw)

This is a moderately significant signal from Nightly; it doesn't require an immediate rollback, but I'd be cautious about moving it to beta with this. I wonder if this can be isolated down more in terms of platform/distro/etc

I am new to Mozilla. Thus far I see a total of 18 reports. Is this reason enough to role back the feature on Nightly, i.e. set network.http.http3.use_nspr_for_io to true?

No, I think those crashes are fine. Mostly because all of these crashes are from the socket process. Basically, these crashes in the socket process mean that users have manually set the preference network.http.network_access_on_socket_process.enabled to true (it's false by default). When the preference is false, the parent process makes the HTTP/3 connection, not the socket process.

For what it's worth, the reason for these crashes might be caused by sandboxing rules, but I'm not sure.

Flags: needinfo?(kershaw)
Blocks: socket-proc
Severity: -- → S4
Priority: -- → P3
Whiteboard: [necko-triaged]

(In reply to Randell Jesup [:jesup] (needinfo me) from comment #3)

This is a moderately significant signal from Nightly; it doesn't require an immediate rollback, but I'd be cautious about moving it to beta with this. I wonder if this can be isolated down more in terms of platform/distro/etc

Thank you Randell for the additional context!


(In reply to Kershaw Chang [:kershaw] from comment #6)

I am new to Mozilla. Thus far I see a total of 18 reports. Is this reason enough to role back the feature on Nightly, i.e. set network.http.http3.use_nspr_for_io to true?

No, I think those crashes are fine. Mostly because all of these crashes are from the socket process. Basically, these crashes in the socket process mean that users have manually set the preference network.http.network_access_on_socket_process.enabled to true (it's false by default). When the preference is false, the parent process makes the HTTP/3 connection, not the socket process.

For what it's worth, the reason for these crashes might be caused by sandboxing rules, but I'm not sure.

This is a great hint. Thank you Kershaw! I can reproduce the bug now.

I will work on a patch next. I assume extending SocketProcessSandboxPolicy::EvaluateSocketCall needs a Some(Allow()) for sendmsg and recvmmsg.

https://searchfox.org/mozilla-central/source/security/sandbox/linux/SandboxFilter.cpp#2035-2045

https://bugzilla.mozilla.org/show_bug.cgi?id=1901295 introduced optional
HTTP3/QUIC UDP IO via quinn-udp instead of NSPR, see
network.http.http3.use_nspr_for_io pref. NSPR uses sendto and recvfrom
syscall, quinn-udp uses sendmsg and recvmmsg syscall.

With network.http.network_access_on_socket_process.enabled true and
network.http.http3.use_nspr_for_io false Firefox panics due to seccomp
disallowing a recvmmsg syscall.

This commit allows sendmsg and recvmmsg in the SocketProcessSandboxPolicy
EvaluateSocketCall function.

Assignee: nobody → mail
Status: NEW → ASSIGNED
Pushed by alissy@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/5f3a2655d2f4 allow sendmsg and recvmmsg in SocketProcessSandboxPolicy r=gerard-majax
Status: ASSIGNED → RESOLVED
Closed: 1 month ago
Resolution: --- → FIXED
Target Milestone: --- → 131 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: