#997808 apparmor: widevine crashes (upstream fix)

Package:
firefox
Source:
firefox
Description:
Mozilla Firefox web browser
Submitter:
Joseph Carter
Date:
2021-10-24 22:27:03 UTC
Severity:
normal
#997808#5
Date:
2021-10-24 22:22:45 UTC
From:
To:
Pages using widevine kept crashing for me … I was wondering for awhile
there if this was because my Firefox profile had been through about five
release versions of two Linux distributions. However it didn't work on a
new profile, so we dug deeper on irc to figure out if there was another
cause.

Ultimately, it appears upstream has a fix for exactly this problem,
found at the end of their AppArmor profile:

https://gitlab.com/apparmor/apparmor/-/blob/656f2103ed70387d2643ff83d510960dfd959e7f/profiles/apparmor/profiles/extras/usr.lib.firefox.firefox

Specifically:

# needed by widevine
ptrace (trace) peer=@{profile_name},
@{HOME}/.mozilla/firefox/*/gmp-widevinecdm/*/lib*so m,

The ability to ptrace itself, and the ability to mmap the libwidevine
and other .so files associated with WideVine.

This fixed a newly-created profile and my existing one.