CVE-2021-3939 Free of static data in accountsservice
A use-after-free vulnerability in Ubuntu's accountsservice allows attackers to execute arbitrary code or cause a denial of service via the SetLanguage D-Bus function.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Local or same network only
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2021-3939?
CVE-2021-3939 is a high-severity use after free vulnerability in Canonical Ubuntu Linux, published on 17 Nov 2021. It can only be exploited from the same machine or local network, with no action from the victim.
Official description
Ubuntu-specific modifications to accountsservice (in patch file debian/patches/0010-set-language.patch) caused the fallback_locale variable, pointing to static storage, to be freed, in the user_change_language_authorized_cb function. This is reachable via the SetLanguage dbus function. This is fixed in versions 0.6.55-0ubuntu12~20.04.5, 0.6.55-0ubuntu13.3, 0.6.55-0ubuntu14.1.
Which versions are affected by CVE-2021-3939?
It affects 2 products.
Products include Canonical Accountsservice, Canonical Ubuntu Linux.
How do I fix CVE-2021-3939?
Apply the vendor's patch.
Upgrade to the fixed version. These bugs are found with fuzzing and sanitisers and avoided by memory-safe languages. More about Use after free.
Is CVE-2021-3939 being exploited?
There is no known exploitation of CVE-2021-3939 in the wild and no public exploit code.
Other vulnerabilities in Canonical Ubuntu Linux
Sources
Also known as GHSA-jxh7-q7rm-43ww, UBUNTU-CVE-2021-3939, USN-5149-1.