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

Bug 808911 (CVE-2021-3621)

Summary: <sys-auth/sssd-{2.3.1-r3, 2.5.2-r1}: Shell command injection (CVE-2021-3621)
Product: Gentoo Security Reporter: Sam James <sam>
Component: VulnerabilitiesAssignee: Gentoo Security <security>
Status: RESOLVED FIXED    
Severity: normal CC: ajak, alexxy, base-system, sam
Priority: Normal Keywords: PullRequest
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: https://github.com/gentoo/gentoo/pull/22159
Whiteboard: B2 [glsa+]
Package list:
Runtime testing required: ---
Bug Depends on: 813750    
Bug Blocks:    

Description Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-08-18 18:08:38 UTC
Description:
"A flaw was found in SSSD, where the sssctl command was
vulnerable to shell command injection via the logs-fetch and
cache-expire subcommands. This flaw allows an attacker to trick
the root user into running a specially crafted sssctl command,
such as via sudo, to gain root access. The highest threat from this
vulnerability is to confidentiality, integrity, as well as system
availability.
This patch fixes a flaw by replacing system() with execvp()."

Patches:
- 2.x branch: https://github.com/SSSD/sssd/pull/5748
- 1.16.x branch: https://github.com/SSSD/sssd/pull/5749
Comment 1 Larry the Git Cow gentoo-dev 2021-09-18 23:45:59 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=52949343c8c1ca3d53c9b595f3c549ec08b38a1e

commit 52949343c8c1ca3d53c9b595f3c549ec08b38a1e
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2021-09-18 23:36:24 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2021-09-18 23:44:21 +0000

    sys-auth/sssd: add patch for CVE-2021-3621 for 2.5.2
    
    Bug: https://bugs.gentoo.org/808911
    Signed-off-by: Sam James <sam@gentoo.org>

 sys-auth/sssd/Manifest             |   1 +
 sys-auth/sssd/sssd-2.3.1-r3.ebuild |   2 +-
 sys-auth/sssd/sssd-2.5.2-r1.ebuild | 302 +++++++++++++++++++++++++++++++++++++
 3 files changed, 304 insertions(+), 1 deletion(-)

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0fd94449ab622b0de7e70b8c47cada64dd0349e7

commit 0fd94449ab622b0de7e70b8c47cada64dd0349e7
Author:     Jeremi Piotrowski <jpiotrowski@microsoft.com>
AuthorDate: 2021-08-24 13:26:41 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2021-09-18 23:43:51 +0000

    sys-auth/sssd: add patch for CVE-2021-3621 for 2.3.1
    
    This is a backport of https://github.com/SSSD/sssd/pull/5748 adapted to 2.3.1.
    A change was necessary: src/tools/sssctl/sssctl_logs.c wasn't passing
    '--no-create' to truncate in 2.3.1 yet.
    
    [sam@: moved file to devspace due to patch size]
    
    Bug: https://bugs.gentoo.org/808911
    Signed-off-by: Jeremi Piotrowski <jpiotrowski@microsoft.com>
    Closes: https://github.com/gentoo/gentoo/pull/22159
    Signed-off-by: Sam James <sam@gentoo.org>

 sys-auth/sssd/Manifest             |   1 +
 sys-auth/sssd/sssd-2.3.1-r3.ebuild | 290 +++++++++++++++++++++++++++++++++++++
 2 files changed, 291 insertions(+)
Comment 2 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-09-18 23:47:32 UTC
A contributor from downstream at Flatcar Linux backported to 2.3.x so I assume it's useful for them, so let's keep that for now.
Comment 3 Petr Vaněk gentoo-dev 2023-04-21 22:30:57 UTC
Vulnerable versions are no longer present in the tree.
Comment 4 Larry the Git Cow gentoo-dev 2024-07-01 06:10:14 UTC
The bug has been referenced in the following commit(s):

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

commit fe46661af3d26d5185af58bd83a3c7100d5f9992
Author:     GLSAMaker <glsamaker@gentoo.org>
AuthorDate: 2024-07-01 05:58:27 +0000
Commit:     John Helmert III <ajak@gentoo.org>
CommitDate: 2024-07-01 06:09:22 +0000

    [ GLSA 202407-05 ] SSSD: Command Injection
    
    Bug: https://bugs.gentoo.org/808911
    Signed-off-by: GLSAMaker <glsamaker@gentoo.org>
    Signed-off-by: John Helmert III <ajak@gentoo.org>

 glsa-202407-05.xml | 42 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 42 insertions(+)