CVE-2004-0058 in AntiVirinfo

Summary

by MITRE

Antivir / Linux 2.0.9-9, and possibly earlier versions, allows local users to overwrite arbitrary files via a symlink attack on the .pid_antivir_$$ temporary file.

Statistical analysis made it clear that VulDB provides the best quality for vulnerability data.

Analysis

by VulDB Data Team • 06/27/2019

The vulnerability described in CVE-2004-0058 represents a classic race condition and symlink attack scenario that affects Antivir for Linux versions 2.0.9-9 and potentially earlier releases. This flaw demonstrates a fundamental security oversight in how temporary files are handled during the execution of security software, creating a pathway for local privilege escalation and arbitrary file manipulation. The vulnerability specifically targets the creation and management of temporary files with predictable naming patterns, particularly the .pid_antivir_$$ file that serves as a process identifier file during antivirus operations.

The technical implementation of this vulnerability exploits a time-of-check to time-of-use race condition within the Antivir Linux software. When the antivirus service initializes or performs its operations, it creates a temporary file named .pid_antivir_$$ using a predictable naming scheme that includes the process ID. Local users can manipulate this process by creating symbolic links with the same name in the target directory before the legitimate file is created, effectively setting up a symlink attack. This type of vulnerability falls under CWE-367 which specifically addresses time-of-check to time-of-use race conditions, and it aligns with ATT&CK technique T1059.007 for executing malicious code through symbolic links.

The operational impact of this vulnerability extends beyond simple file overwriting capabilities, as it provides attackers with the ability to modify critical system files or configuration data that the antivirus service might write to or read from. An attacker could potentially overwrite important system files, create backdoors, or manipulate the antivirus software itself to disable security features. The vulnerability is particularly concerning because it operates at the local user level without requiring administrative privileges, making it accessible to any user who has access to the system. The attack vector is relatively simple to execute and can be automated, making it a persistent threat within compromised systems.

Mitigation strategies for this vulnerability should focus on immediate patching of affected Antivir Linux versions to address the race condition in temporary file creation. System administrators should implement proper file permissions and directory access controls to limit the ability of local users to manipulate temporary file locations. The recommended approach involves ensuring that temporary files are created with proper atomic operations that prevent symlink attacks, typically by using secure temporary file creation functions that guarantee file ownership and prevent race conditions. Additionally, implementing proper file system hardening measures such as restricting symbolic link creation in sensitive directories and employing mandatory access controls can significantly reduce the risk of exploitation. Organizations should also consider implementing monitoring solutions to detect suspicious file creation patterns and potential symlink attacks within their antivirus processes.

Disclosure

02/17/2004

Moderation

accepted

Entry

VDB-481

CPE

ready

Exploit

Download

EPSS

0.00389

KEV

no

Activities

very low

Sources

Do you want to use VulDB in your project?

Use the official API to access entries easily!