CVE-2021-3864

Description

A flaw was found in the way the dumpable flag setting was handled when certain SUID binaries executed its descendants. The prerequisite is a SUID binary that sets real UID equal to effective UID, and real GID equal to effective GID. The descendant will then have a dumpable value set to 1. As a result, if the descendant process crashes and core_pattern is set to a relative value, its core dump is stored in the current directory with uid:gid permissions. An unprivileged local user with eligible root SUID binary could use this flaw to place core dumps into root-owned directories, potentially resulting in escalation of privileges.

Statement

This issue is rated as having Moderate impact for Red Hat Enterprise Linux 8 because of the core_pattern default setting (both for ABRT and non-ABRT use cases) that doesn't place core dumps relative to current directory. The other versions of the Red Hat Enterprise Linux out of the box is not vulnerable to the described issue too.

Mitigation

Red Hat Enterprise Linux 6 and 7 default core_pattern setting is "core", which places the core dumps into the current working directory. Changing the default settings to use absolute pathnames will prevent this issue from being exploited. When using ABRT, set MakeCompatCore value in /etc/abrt/plugins/CCpp.conf to "no" to avoid ABRT falling back to previous core_pattern setting on core dumps.

Common Vulnerability Scoring System (CVSS) Score Details

Info alert:Important note

CVSS scores for open source components depend on vendor-specific factors (e.g. version or build chain). Therefore, Red Hat's score and impact rating can be different from NVD and other vendors. Red Hat remains the authoritative CVE Naming Authority (CNA) source for its products and services (see Red Hat classifications).

The following CVSS metrics and score provided are preliminary and subject to review.

CVSS v3 Score Breakdown

Red HatNVDcve.org
Base Score77N/A
Attack VectorLocalLocalN/A
Attack ComplexityHighHighN/A
Privileges RequiredLowLowN/A
User InteractionNoneNoneN/A
ScopeUnchangedUnchangedN/A
ConfidentialityHighHighN/A
Integrity ImpactHighHighN/A
Availability ImpactHighHighN/A

Vector

Red Hat: CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H

NVD: CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H

Acknowledgements

Red Hat would like to thank Itai Greenhut (Aleph Research by HCL AppScan) for reporting this issue.

Frequently Asked Questions

Want to get errata notifications? Sign up here.