FreeBSD : ruby -- Unintentional file creation caused by inserting an illegal NUL character (3decc87d-2498-11e2-b0c7-000d601460a4)

medium Nessus Plugin ID 62792

Synopsis

The remote FreeBSD host is missing a security-related update.

Description

The official ruby site reports :

A vulnerability was found that file creation routines can create unintended files by strategically inserting NUL(s) in file paths. This vulnerability has been reported as CVE-2012-4522.

Ruby can handle arbitrary binary patterns as Strings, including NUL chars. On the other hand OSes and other libraries tend not. They usually treat a NUL as an End of String mark. So to interface them with Ruby, NUL chars should properly be avoided.

However methods like IO#open did not check the filename passed to them, and just passed those strings to lower layer routines. This led to create unintentional files.

Solution

Update the affected package.

See Also

http://www.nessus.org/u?d494f86f

https://access.redhat.com/security/cve/cve-2012-4522

http://www.nessus.org/u?beb35305

Plugin Details

Severity: Medium

ID: 62792

File Name: freebsd_pkg_3decc87d249811e2b0c7000d601460a4.nasl

Version: 1.10

Type: local

Published: 11/2/2012

Updated: 1/6/2021

Supported Sensors: Nessus

Risk Information

VPR

Risk Factor: Low

Score: 3.6

CVSS v2

Risk Factor: Medium

Base Score: 5

Vector: CVSS2#AV:N/AC:L/Au:N/C:N/I:P/A:N

Vulnerability Information

CPE: p-cpe:/a:freebsd:freebsd:ruby, cpe:/o:freebsd:freebsd

Required KB Items: Host/local_checks_enabled, Host/FreeBSD/release, Host/FreeBSD/pkg_info

Patch Publication Date: 11/1/2012

Vulnerability Publication Date: 10/12/2012

Reference Information

CVE: CVE-2012-4522