RHSA-2002:132
Vulnerability from csaf_redhat - Published: 2002-07-29 15:00 - Updated: 2025-11-21 17:24setpwnam.c in the util-linux package, as included in Red Hat Linux 7.3 and earlier, and other operating systems, does not properly lock a temporary file when modifying /etc/passwd, which may allow local users to gain privileges via a complex race condition that uses an open file descriptor in utility programs such as chfn and chsh.
| Product | Identifier | Version | Remediation |
|---|---|---|---|
|
Red Hat Linux 6.2
Red Hat / Red Hat Linux
|
cpe:/o:redhat:linux:6.2
|
— |
Vendor Fix
fix
|
|
Red Hat Linux 7.0
Red Hat / Red Hat Linux
|
cpe:/o:redhat:linux:7.0
|
— |
Vendor Fix
fix
|
|
Red Hat Linux 7.1
Red Hat / Red Hat Linux
|
cpe:/o:redhat:linux:7.1
|
— |
Vendor Fix
fix
|
|
Red Hat Linux 7.2
Red Hat / Red Hat Linux
|
cpe:/o:redhat:linux:7.2
|
— |
Vendor Fix
fix
|
|
Red Hat Linux 7.3
Red Hat / Red Hat Linux
|
cpe:/o:redhat:linux:7.3
|
— |
Vendor Fix
fix
|
{
"document": {
"aggregate_severity": {
"namespace": "https://access.redhat.com/security/updates/classification/",
"text": "Moderate"
},
"category": "csaf_security_advisory",
"csaf_version": "2.0",
"distribution": {
"text": "Copyright \u00a9 Red Hat, Inc. All rights reserved.",
"tlp": {
"label": "WHITE",
"url": "https://www.first.org/tlp/"
}
},
"lang": "en",
"notes": [
{
"category": "summary",
"text": "A locally exploitable vulnerability is present in the util-linux package\nwhich shipped with Red Hat Linux.\n\n[Updated 8 July 2003]\nAdded packages for Red Hat Linux on IBM iSeries and pSeries systems.",
"title": "Topic"
},
{
"category": "general",
"text": "The util-linux package contains a large variety of low-level system\nutilities that are necessary for a Linux system to function. The chfn\nutility included in this package allows users to modify personal\ninformation stored in the system-wide password file, /etc/passwd. In order\nto modify this file, this application is installed setuid root.\n\nUnder certain conditions, a carefully crafted attack sequence can be\nperformed to exploit a complex file locking and modification race present\nin this utility allowing changes to be made to /etc/passwd. \n\nIn order to successfully exploit the vulnerability and perform privilege\nescalation there is a need for minimal administrator interaction. \nAdditionally, the password file must be over 4 kilobytes, and the local\nattackers entry must not be in the last 4 kilobytes of the password file.\n\nThe Common Vulnerabilities and Exposures project (cve.mitre.org) has\nassigned the name CAN-2002-0638 to this issue.\n\nAn interim workaround is to remove setuid flags from /usr/bin/chfn and\n/usr/bin/chsh. All users of Red Hat Linux should update the packages\ncontained in this erratum, which are patched to correct this vulnerability.\n\nMany thanks to Michal Zalewski of Bindview for alerting us to this issue.",
"title": "Details"
},
{
"category": "legal_disclaimer",
"text": "This content is licensed under the Creative Commons Attribution 4.0 International License (https://creativecommons.org/licenses/by/4.0/). If you distribute this content, or a modified version of it, you must provide attribution to Red Hat Inc. and provide a link to the original.",
"title": "Terms of Use"
}
],
"publisher": {
"category": "vendor",
"contact_details": "https://access.redhat.com/security/team/contact/",
"issuing_authority": "Red Hat Product Security is responsible for vulnerability handling across all Red Hat products and services.",
"name": "Red Hat Product Security",
"namespace": "https://www.redhat.com"
},
"references": [
{
"category": "self",
"summary": "https://access.redhat.com/errata/RHSA-2002:132",
"url": "https://access.redhat.com/errata/RHSA-2002:132"
},
{
"category": "external",
"summary": "http://www.kb.cert.org/vuls/id/405955",
"url": "http://www.kb.cert.org/vuls/id/405955"
},
{
"category": "external",
"summary": "http://razor.bindview.com/publish/advisories/adv_chfn.html",
"url": "http://razor.bindview.com/publish/advisories/adv_chfn.html"
},
{
"category": "self",
"summary": "Canonical URL",
"url": "https://security.access.redhat.com/data/csaf/v2/advisories/2002/rhsa-2002_132.json"
}
],
"title": "Red Hat Security Advisory: : : : Updated util-linux package fixes password locking race",
"tracking": {
"current_release_date": "2025-11-21T17:24:53+00:00",
"generator": {
"date": "2025-11-21T17:24:53+00:00",
"engine": {
"name": "Red Hat SDEngine",
"version": "4.6.12"
}
},
"id": "RHSA-2002:132",
"initial_release_date": "2002-07-29T15:00:00+00:00",
"revision_history": [
{
"date": "2002-07-29T15:00:00+00:00",
"number": "1",
"summary": "Initial version"
},
{
"date": "2002-06-27T00:00:00+00:00",
"number": "2",
"summary": "Last updated version"
},
{
"date": "2025-11-21T17:24:53+00:00",
"number": "3",
"summary": "Last generated version"
}
],
"status": "final",
"version": "3"
}
},
"product_tree": {
"branches": [
{
"branches": [
{
"branches": [
{
"category": "product_name",
"name": "Red Hat Linux 6.2",
"product": {
"name": "Red Hat Linux 6.2",
"product_id": "Red Hat Linux 6.2",
"product_identification_helper": {
"cpe": "cpe:/o:redhat:linux:6.2"
}
}
},
{
"category": "product_name",
"name": "Red Hat Linux 7.0",
"product": {
"name": "Red Hat Linux 7.0",
"product_id": "Red Hat Linux 7.0",
"product_identification_helper": {
"cpe": "cpe:/o:redhat:linux:7.0"
}
}
},
{
"category": "product_name",
"name": "Red Hat Linux 7.1",
"product": {
"name": "Red Hat Linux 7.1",
"product_id": "Red Hat Linux 7.1",
"product_identification_helper": {
"cpe": "cpe:/o:redhat:linux:7.1"
}
}
},
{
"category": "product_name",
"name": "Red Hat Linux 7.2",
"product": {
"name": "Red Hat Linux 7.2",
"product_id": "Red Hat Linux 7.2",
"product_identification_helper": {
"cpe": "cpe:/o:redhat:linux:7.2"
}
}
},
{
"category": "product_name",
"name": "Red Hat Linux 7.3",
"product": {
"name": "Red Hat Linux 7.3",
"product_id": "Red Hat Linux 7.3",
"product_identification_helper": {
"cpe": "cpe:/o:redhat:linux:7.3"
}
}
}
],
"category": "product_family",
"name": "Red Hat Linux"
}
],
"category": "vendor",
"name": "Red Hat"
}
]
},
"vulnerabilities": [
{
"cve": "CVE-2002-0638",
"ids": [
{
"system_name": "Red Hat Bugzilla ID",
"text": "1616783"
}
],
"notes": [
{
"category": "description",
"text": "setpwnam.c in the util-linux package, as included in Red Hat Linux 7.3 and earlier, and other operating systems, does not properly lock a temporary file when modifying /etc/passwd, which may allow local users to gain privileges via a complex race condition that uses an open file descriptor in utility programs such as chfn and chsh.",
"title": "Vulnerability description"
},
{
"category": "summary",
"text": "security flaw",
"title": "Vulnerability summary"
}
],
"product_status": {
"fixed": [
"Red Hat Linux 6.2",
"Red Hat Linux 7.0",
"Red Hat Linux 7.1",
"Red Hat Linux 7.2",
"Red Hat Linux 7.3"
]
},
"references": [
{
"category": "self",
"summary": "Canonical URL",
"url": "https://access.redhat.com/security/cve/CVE-2002-0638"
},
{
"category": "external",
"summary": "RHBZ#1616783",
"url": "https://bugzilla.redhat.com/show_bug.cgi?id=1616783"
},
{
"category": "external",
"summary": "https://www.cve.org/CVERecord?id=CVE-2002-0638",
"url": "https://www.cve.org/CVERecord?id=CVE-2002-0638"
},
{
"category": "external",
"summary": "https://nvd.nist.gov/vuln/detail/CVE-2002-0638",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2002-0638"
}
],
"release_date": "2002-07-29T00:00:00+00:00",
"remediations": [
{
"category": "vendor_fix",
"date": "2002-07-29T15:00:00+00:00",
"details": "Before applying this update, make sure all previously released errata\nrelevant to your system have been applied.\n\nTo update all RPMs for your particular architecture, run:\n\nrpm -Fvh [filenames]\n\nwhere [filenames] is a list of the RPMs you wish to upgrade. Only those\nRPMs which are currently installed will be updated. Those RPMs which are\nnot installed but included in the list will not be updated. Note that you\ncan also use wildcards (*.rpm) if your current directory *only* contains\nthe desired RPMs.\n\nPlease note that this update is also available via Red Hat Network. Many\npeople find this an easier way to apply updates. To use Red Hat Network,\nlaunch the Red Hat Update Agent with the following command:\n\nup2date\n\nThis will start an interactive process that will result in the appropriate\nRPMs being upgraded on your system.",
"product_ids": [
"Red Hat Linux 6.2",
"Red Hat Linux 7.0",
"Red Hat Linux 7.1",
"Red Hat Linux 7.2",
"Red Hat Linux 7.3"
],
"restart_required": {
"category": "none"
},
"url": "https://access.redhat.com/errata/RHSA-2002:132"
}
],
"threats": [
{
"category": "impact",
"details": "Moderate"
}
],
"title": "security flaw"
}
]
}
Drag nodes to arrange them. Double-click a related vulnerability to open it, or a source to visit its link. The Physics button on the left tunes the layout and the simulation; the legend at the bottom left hides or shows nodes by kind and by sighting type.
Sightings
| Author | Source | Type | Date | Other |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or observed by the user.
- Confirmed: The vulnerability has been validated from an analyst's perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
- Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
- Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
- Not confirmed: The user expressed doubt about the validity of the vulnerability.
- Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.
Vulnerability timeline
Sightings and recorded dates, grouped by day · UTC
How durations are calculated
Following the VTEM framework (Black Hat USA 2015), time to patch starts when the vendor or a coordinator was informed, total time to patch at discovery, and disclosure to patch at public disclosure; vendor response time runs from the report to its acknowledgement. Time to exploit and time unpatched start at the earliest discovery or report, falling back to public disclosure. Unpatched time ends at the first recorded patch, or the calculation time when no patch is recorded. Exploitation to patch shows the interval between those two events; a published proof of concept is a public exploit, not exploitation.
Each result shows its source dates. A negative interval means the end event came first; when date-only inputs leave the order open, the result says so. Date-only inputs are approximate. The earliest evidence wins: KEV report dates and sightings are labelled as such. Records describing another vulnerability are listed but never calculated from, and a PoC alone does not establish exploitation. Missing patch evidence does not prove that no patch exists. Filters below change the event list only.
Loading timeline…
The approach is described in our paper Mapping CVEs to MITRE ATT&CK Techniques: A Curated Gold-Set Classifier and the Limits of LLM-Assisted Label Expansion.
Browse all ATT&CK techniques and the vulnerabilities related to each.
Related by attack behaviour
Vulnerabilities whose description is nearest to this one in the vector space of the CIRCL/vulnerability-attack-technique-biencoder model. This is a similarity search over the bi-encoder space (plain cosine), not a classification, and it has no measured accuracy.