Closed Bug 1918028 Opened 19 days ago Closed 12 days ago

Pasting warning text again after 5 seconds after the first scan was canceled makes the page unresponsive

Categories

(Firefox :: Data Loss Prevention, defect)

Desktop
Windows
defect

Tracking

()

VERIFIED FIXED
132 Branch
Tracking Status
firefox-esr115 --- unaffected
firefox-esr128 --- verified
firefox130 --- disabled
firefox131 --- disabled
firefox132 --- verified

People

(Reporter: atrif, Assigned: gstoll)

References

(Blocks 2 open bugs, Regression)

Details

(Keywords: regression, Whiteboard: [fidefe-quality-foundation?])

Attachments

(3 files)

Attached image dlp_unresponsive.gif

Found in

  • 132.0a1

Affected versions

  • 132.0a1 (2024-09-10)

Tested platforms

  • Affected platforms: Windows 11, Windows 10
  • Unaffected platforms:macOS 12, Ubuntu 22

Preconditoins

  • 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

  1. Open Wikipedia.
  2. Copy warning text from an external program
  3. Paste the warning text inside the search area.
  4. Click on Cancel and wait ~5 seconds.
  5. Paste the text again.

Expected result

  • The scan is happening again.

Actual result

  • Page becomes unresponsive.

Regression range

  • This happens after bug 1915350 was fixed. I will set bug 1912384 as the regressor, please change it if this is incorrect.

Additional notes

  • Attached a screen recording.
  • Another set of steps:
  1. Copy warning text and paste it inside the Wikipedia search.
  2. Click the cancel button, and repeat both steps 3 more times.

Set release status flags based on info from the regressing bug 1912384

:gstoll, since you are the author of the regressor, bug 1912384, could you take a look?

For more information, please visit BugBot documentation.

Flags: needinfo?(gstoll)

Yeah, I can reproduce this, will investigate.

Flags: needinfo?(gstoll)

This only seems to reproduce with WARN results, not ALLOW or BLOCK.

Assignee: nobody → gstoll
Status: NEW → ASSIGNED

I think this is because we store the WARN result in the cache even if the scan was cancelled. We rely on not storing WARN results in the cache, otherwise things like bug 1915350 happen.

Pushed by gstoll@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/88be53726640 avoid potential future hang when cancelling Content Analysis WARN response r=dlp-reviewers,handyman
Status: ASSIGNED → RESOLVED
Closed: 12 days ago
Resolution: --- → FIXED
Target Milestone: --- → 132 Branch

Verified fixed with Firefox 132.0a1 (20240918041351) on Windows 10x64 and 11. The browser no longer hangs after pasting warning text again after 5 seconds after following steps from comment 0.

Don't cache canceled CA results, as this can cause particular problem with WARN responses,
which shouldn't be in the cache.

Original Revision: https://phabricator.services.mozilla.com/D221880

Attachment #9425565 - Flags: approval-mozilla-esr128?

esr128 Uplift Approval Request

  • User impact if declined: possible hang in DLP when cancelling a WARN response and then quickly doing another DLP request with the same data
  • Code covered by automated testing: no
  • Fix verified in Nightly: yes
  • Needs manual QE test: no
  • Steps to reproduce for manual QE testing: n/a, will be covered as a part of the general DLP test plan
  • Risk associated with taking this patch: low
  • Explanation of risk level: minor change to DLP
  • String changes made/needed: no
  • Is Android affected?: no
Attachment #9425565 - Flags: approval-mozilla-esr128? → approval-mozilla-esr128+

Verified fixed with Firefox 128.3.0esr (20240923123820) on Windows 10x64. The browser no longer hangs after pasting warning text again after 5 seconds.

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

Attachment

General

Created:
Updated:
Size: