Open Bug 2005923 Opened 8 months ago Updated 4 months ago

Snap firefox spams apparmor denied message about /proc/pressure/memory

Categories

(Firefox Build System :: Third Party Packaging, defect, P2)

Firefox 146
defect

Tracking

(Not tracked)

UNCONFIRMED

People

(Reporter: bartona, Unassigned)

References

Details

User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:146.0) Gecko/20100101 Firefox/146.0

Steps to reproduce:

Default firefox snap installation on ubuntu 25.10 updated to 146.0-2
Run firefox for a while
Look at "sudo dmesg" output

Actual results:

Output shows apparmor denied spam:

[79403.891629] audit: type=1400 audit(1765704550.802:11893): apparmor="DENIED" operation="open" class="file" profile="snap.firefox.firefox" name="/proc/pressure/memory" pid=40403 comm="MemoryPoller" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
[79408.892410] audit: type=1400 audit(1765704555.803:11894): apparmor="DENIED" operation="open" class="file" profile="snap.firefox.firefox" name="/proc/pressure/memory" pid=40403 comm="MemoryPoller" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0

Expected results:

There should be minimal denied messages. Being otherwise suggests a bug or poorly defined snap permissions.

The Bugbug bot thinks this bug should belong to the 'Firefox Build System::Third Party Packaging' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → Third Party Packaging
Product: Firefox → Firefox Build System

Same problem here. And on my system when I'm really low on memory it seems to lead to a full system crash.

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

For more information, please visit BugBot documentation.

Flags: needinfo?(thinker.li)

Looks like we are still waiting for a change on portal?

Severity: -- → S3
Flags: needinfo?(thinker.li)
Priority: -- → P2
Duplicate of this bug: 2007019

I have the same problem here on Ubuntu 24.04.3.

Workaround that eliminated the spam on my Ubuntu 25.10 machine:

sudo mkdir /etc/apparmor.d/abstractions/base.d
echo '/proc/pressure/memory r,' | sudo tee /etc/apparmor.d/abstractions/base.d/procpressure
sudo apparmor_parser -r /var/lib/snapd/apparmor/profiles/snap.firefox.firefox

Then restart Firefox.

Same on Ubuntu 26.04: each few seconds:
Mar 01 16:11:23 corrado-n8-dang-0213 kernel: audit: type=1400 audit(1772377883.240:533): apparmor="DENIED" operation="open" class="file" profile="snap.firefox.firefox" name="/proc/pressure/memory" pid=7422 comm="MemoryPoller" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
Mar 01 16:11:28 corrado-n8-dang-0213 kernel: audit: type=1400 audit(1772377888.241:534): apparmor="DENIED" operation="open" class="file" profile="snap.firefox.firefox" name="/proc/pressure/memory" pid=7422 comm="MemoryPoller" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
Mar 01 16:11:33 corrado-n8-dang-0213 kernel: audit: type=1400 audit(1772377893.410:535): apparmor="DENIED" operation="open" class="file" profile="snap.firefox.firefox" name="/proc/pressure/memory" pid=7422 comm="MemoryPoller" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
Mar 01 16:11:38 corrado-n8-dang-0213 kernel: audit: type=1400 audit(1772377898.424:536): apparmor="DENIED" operation="open" class="file" profile="snap.firefox.firefox" name="/proc/pressure/memory" pid=7422 comm="MemoryPoller" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0

(In reply to David Tolnay from comment #8)

Workaround that eliminated the spam on my Ubuntu 25.10 machine:

sudo mkdir /etc/apparmor.d/abstractions/base.d
echo '/proc/pressure/memory r,' | sudo tee /etc/apparmor.d/abstractions/base.d/procpressure
sudo apparmor_parser -r /var/lib/snapd/apparmor/profiles/snap.firefox.firefox

Then restart Firefox.

Thank you, this works.

Same issue Ubuntu 25.10. This should probably be a security issue due to the quantity of spurious log messages hiding important things.

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