Input validation error in Snapd - CVE-2021-4120
Published: February 21, 2022
Vulnerability details
The vulnerability allows a local user to escalate privileges on the system.
The vulnerability exists due to insufficient validation of snap content interface and layout paths. A local user can inject arbitrary AppArmor policy rules via malformed content interface and layout declarations and execute arbitrary code with elevated privileges.
Affected software
Fedora
Ubuntu
snapd
snap-confine (Ubuntu package)
snapd (Ubuntu package)
How to mitigate CVE-2021-4120
snapd - addressed in versions 2.54.3-1.el7, 2.54.3-1.el8, 2.54.3-1.el9, 2.54.3-1.fc34, 2.54.3-1.fc35
snap-confine (Ubuntu package) - addressed in versions 2.54.3+16.04~esm2, 2.54.3+18.04, 2.54.3+18.04.2ubuntu0.2, 2.54.3+20.04, 2.54.3+20.04.1, 2.54.3+20.04.1ubuntu0.2, 2.54.3+21.10.1, 2.54.3+21.10.1ubuntu0.2
snapd (Ubuntu package) - addressed in versions 2.54.3+16.04~esm2, 2.54.3+18.04, 2.54.3+18.04.2ubuntu0.2, 2.54.3+20.04, 2.54.3+20.04.1, 2.54.3+20.04.1ubuntu0.2, 2.54.3+21.10.1, 2.54.3+21.10.1ubuntu0.2