Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 866716 (CVE-2021-35937, CVE-2021-35938, CVE-2021-35939)

Summary: <app-arch/rpm-4.18.0: multiple vulnerabilities
Product: Gentoo Security Reporter: John Helmert III <ajak>
Component: VulnerabilitiesAssignee: Gentoo Security <security>
Status: RESOLVED FIXED    
Severity: major CC: maintainer-needed, sam
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard: B1 [glsa+]
Package list:
Runtime testing required: ---
Bug Depends on: 877857    
Bug Blocks:    

Description John Helmert III archtester Gentoo Infrastructure gentoo-dev Security 2022-08-26 16:06:19 UTC
CVE-2021-35937:

A race condition vulnerability was found in rpm. A local unprivileged user could use this flaw to bypass the checks that were introduced in response to CVE-2017-7500 and CVE-2017-7501, potentially gaining root privileges. The highest threat from this vulnerability is to data confidentiality and integrity as well as system availability.

RedHat bug says this will be in 4.18: https://bugzilla.redhat.com/show_bug.cgi?id=1964125
https://rpm.org/wiki/Releases/4.18.0

CVE-2021-35938:

A symbolic link issue was found in rpm. It occurs when rpm sets the desired permissions and credentials after installing a file. A local unprivileged user could use this flaw to exchange the original file with a symbolic link to a security-critical file and escalate their privileges on the system. The highest threat from this vulnerability is to data confidentiality and integrity as well as system availability.

RedHat bug: https://bugzilla.redhat.com/show_bug.cgi?id=1964114):
Patch in 4.18: https://github.com/rpm-software-management/rpm/commit/25a435e90844ea98fe5eb7bef22c1aecf3a9c033
Comment 1 John Helmert III archtester Gentoo Infrastructure gentoo-dev Security 2022-08-26 18:48:11 UTC
CVE-2021-35939:

It was found that the fix for CVE-2017-7500 and CVE-2017-7501 was incomplete: the check was only implemented for the parent directory of the file to be created. A local unprivileged user who owns another ancestor directory could potentially use this flaw to gain root privileges. The highest threat from this vulnerability is to data confidentiality and integrity as well as system availability.

RedHat bug: https://bugzilla.redhat.com/show_bug.cgi?id=1964129
Patch is in 4.18.0: https://github.com/rpm-software-management/rpm/commit/96ec957e281220f8e137a2d5eb23b83a6377d556
Comment 2 John Helmert III archtester Gentoo Infrastructure gentoo-dev Security 2022-10-21 17:57:14 UTC
GLSA request filed.
Comment 3 Larry the Git Cow gentoo-dev 2022-10-25 21:55:47 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1dbbdcdb43b2c2dab997bc818c96b315e48fff77

commit 1dbbdcdb43b2c2dab997bc818c96b315e48fff77
Author:     John Helmert III <ajak@gentoo.org>
AuthorDate: 2022-10-25 21:37:09 +0000
Commit:     John Helmert III <ajak@gentoo.org>
CommitDate: 2022-10-25 21:55:39 +0000

    app-arch/rpm: drop 4.17.1
    
    Bug: https://bugs.gentoo.org/866716
    Signed-off-by: John Helmert III <ajak@gentoo.org>

 app-arch/rpm/Manifest          |   1 -
 app-arch/rpm/rpm-4.17.1.ebuild | 161 -----------------------------------------
 2 files changed, 162 deletions(-)
Comment 4 Larry the Git Cow gentoo-dev 2022-10-31 01:42:20 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/data/glsa.git/commit/?id=d1fba8b4347d1cc39def2710ba7880b64f060ea2

commit d1fba8b4347d1cc39def2710ba7880b64f060ea2
Author:     GLSAMaker <glsamaker@gentoo.org>
AuthorDate: 2022-10-31 01:15:56 +0000
Commit:     John Helmert III <ajak@gentoo.org>
CommitDate: 2022-10-31 01:40:15 +0000

    [ GLSA 202210-22 ] RPM: Multiple Vulnerabilities
    
    Bug: https://bugs.gentoo.org/830380
    Bug: https://bugs.gentoo.org/866716
    Signed-off-by: GLSAMaker <glsamaker@gentoo.org>
    Signed-off-by: John Helmert III <ajak@gentoo.org>

 glsa-202210-22.xml | 46 ++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 46 insertions(+)
Comment 5 John Helmert III archtester Gentoo Infrastructure gentoo-dev Security 2022-10-31 02:18:46 UTC
GLSA released, all done!