Closed Bug 1899491 Opened 4 months ago Closed 4 months ago

Pasting an empty clipboard will make the page unresponsive

Categories

(Firefox :: Data Loss Prevention, defect)

defect

Tracking

()

VERIFIED FIXED
129 Branch
Tracking Status
firefox-esr115 --- unaffected
firefox-esr128 --- verified
firefox126 --- unaffected
firefox127 --- unaffected
firefox128 --- wontfix
firefox129 --- verified

People

(Reporter: atrif, Assigned: gstoll)

References

(Blocks 2 open bugs)

Details

Attachments

(5 files)

Attached image dlp_2.gif

Found in

  • 128.0a1 (2024-05-29)

Affected versions

  • 128.0a1 (2024-05-29)

Tested platforms

  • Affected platforms: Windows 10x64
  • Unaffected platforms: Ubuntu 23, macOS

Preconditions

  • Download the DLP test assets from https://drive.google.com/file/d/1yjqVRuxdKV3WnO7D2wzMgDXBuYBxUgVw/view
  • Create a distribution folder inside the Firefox folder and paste the policies-1.json to it and then rename it to policies.json
  • run the DLP agent in CMD using: .\content_analysis_sdk_agent.exe --user --toblock=.\d{3}-?\d{2}-?\d{4}. --towarn=.warn. --delays=10

Steps to reproduce
Unfortunately, I don’t have the steps to reproduce this issue. I think that sometimes after Firefox is closed it will delete the clipboard data. This happens very intermittently. I have one deleted clipboard data available on my computer and I can reproduce the issue every time I use it but I don’t know how to share it.

Expected result

  • The page does not get unresponsive.

Actual result

  • Page becomes unresponsive after pasting deleted clipboard data.

Regression range

  • Not a regression. New implementation.

Additional notes

  • Attached a screen recording.
  • S4 due to intermittency and the low chance of reproducing.

This sounds a lot like bug 1888498, which I thought I had fixed...

:atrif - If you're able to reproduce this, can you turn on logging by:

  1. Navigating to about:logging
  2. Set the "New log modules:" field to "contentanalysis:5"
  3. Under "Logging output", select "Logging to a file"
  4. Click "Set log modules"

Then reproduce the issue and look at the file listed in the "New file name:" text field - it should have some logging information which might help us see what's going on. Thanks!

Flags: needinfo?(atrif)
Attached image dlp_log.gif

(In reply to Greg Stoll :gstoll from comment #2)

:atrif - If you're able to reproduce this, can you turn on logging by:

  1. Navigating to about:logging
  2. Set the "New log modules:" field to "contentanalysis:5"
  3. Under "Logging output", select "Logging to a file"
  4. Click "Set log modules"

Then reproduce the issue and look at the file listed in the "New file name:" text field - it should have some logging information which might help us see what's going on. Thanks!

Hello!
I tried to make a log file but the only thing logged in the file is [Parent 29344: Main Thread]: D/contentanalysis Local DLP Content Analysis is active
I followed the next steps:

  1. Navigated to about:logging and set "New log modules:" field to "contentanalysis:5"
  2. Select "logging to a file" and click "set log modules".
  3. Clicked "Start Logging" then reproduced the issue
  4. Clicked "Stop logging" and open the log file.
    I have attached a screen recording as well. Am I doing something wrong here? Thank you in advance!
Flags: needinfo?(atrif) → needinfo?(gstoll)

Hmm, it looks like you're doing the right things (and the fact that you see anything in the file means that it's at least sort of working :-) ). If you follow the steps to turn on logging and then paste a non-empty string, do you see more in the log file?

It's possible that something is going wrong so early that nothing is getting logged.

Flags: needinfo?(gstoll) → needinfo?(atrif)

(In reply to Greg Stoll :gstoll from comment #4)

Hmm, it looks like you're doing the right things (and the fact that you see anything in the file means that it's at least sort of working :-) ). If you follow the steps to turn on logging and then paste a non-empty string, do you see more in the log file?

It's possible that something is going wrong so early that nothing is getting logged.

Yes, this is working as expected if pasting non-empty content... Nothing is logged when I reproduce the issue with an empty string tho... If more information is needed please let us know.

Flags: needinfo?(atrif)

OK, that is helpful, thank you!

I was able to reproduce this by manually changing the pasted text to empty in the debugger.

Assignee: nobody → gstoll
Status: NEW → ASSIGNED
Pushed by gstoll@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/51fbb28ba38a correctly handle pasting an empty string for DLP r=dlp-reviewers,handyman
Status: ASSIGNED → RESOLVED
Closed: 4 months ago
Resolution: --- → FIXED
Target Milestone: --- → 129 Branch

Verified fixed with Firefox 129.0a1 (20240612215151) on Windows 10x64. Pasting an empty string will no longer make the page unresponsive.

The patch landed in nightly and beta is affected.
:gstoll, is this bug important enough to require an uplift?

  • If yes, please nominate the patch for beta approval.
  • If no, please set status-firefox128 to wontfix.

For more information, please visit BugBot documentation.

Flags: needinfo?(gstoll)

No (although we will be uplifting to ESR next cycle)

Flags: needinfo?(gstoll)
Status: RESOLVED → VERIFIED
Attachment #9422854 - Flags: approval-mozilla-esr128?

esr128 Uplift Approval Request

  • User impact if declined: In weird cases pasting an empty string with DLP active can make Firefox hang
  • Code covered by automated testing: yes
  • Fix verified in Nightly: yes
  • Needs manual QE test: no
  • Steps to reproduce for manual QE testing: n/a
  • Risk associated with taking this patch: low
  • Explanation of risk level: just affects DLP
  • String changes made/needed: no
  • Is Android affected?: no
Attachment #9422854 - Flags: approval-mozilla-esr128? → approval-mozilla-esr128+

Verified fixed with Firefox 128.3.0esr (20240906145046) on Windows 10x64. The page is responsive after pasting an empty clipboard.

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: