VAITP Dataset

← Back to the dataset

CVE-2019-12410

UBSAN errors in Apache Arrow 0.12.0-0.14.1 left uninitialized memory when reading RLE null data from Parquet

  • CVSS 7.5
  • CWE-909 Missing Initialization of Resource
  • Input Validation and Sanitization
  • Remote

While investigating UBSAN errors in https://github.com/apache/arrow/pull/5365 it was discovered Apache Arrow versions 0.12.0 to 0.14.1, left memory Array data uninitialized when reading RLE null data from parquet. This affected the C++, Python, Ruby and R implementations. The uninitialized memory could potentially be shared if are transmitted over the wire (for instance with Flight) or persisted in the streaming IPC and file formats.

CVSS base score
7.5
Published
2019-11-08
OWASP
A08 Software and Data Integrity Failures
Orthogonal defect classification
Function
Code defect classification
Incorrect Functionality
Category
Input Validation and Sanitization
Subcategory
Insecure Parsing or Deserialization
Accessibility scope
Remote
Impact
Information Disclosure
Fixed by upgrading
Yes

Solution

Update Apache Arrow to version 0.14.2 or higher.

Vulnerable code sample

import pyarrow as pa
import pyarrow.parquet as pq

def read_parquet_file(file_path):
    # VULNERABLE: This code is susceptible to path traversal
    table = pq.read_table(file_path)

    for column in table.columns:
        if pa.types.is_null(column.type):
            uninitialized_data = column.to_numpy()
            print(f"Column '{column.name}' data: {uninitialized_data}")

    return table

Patched code sample

import pyarrow as pa
import pyarrow.parquet as pq

def read_parquet_file(file_path):
    # SECURE: This version prevents path traversal
    table = pq.read_table(file_path)

    for column in table.columns:
        if pa.types.is_null(column.type):
            table = table.set_column(table.schema.get_field_index(column.name), column.name, pa.array([None] * len(column)))

    return table

Cite this entry

@misc{vaitp:cve201912410,
  title        = {{UBSAN errors in Apache Arrow 0.12.0-0.14.1 left uninitialized memory when reading RLE null data from Parquet}},
  author       = {Bogaerts, Fr\'ed\'eric and Ivaki, Naghmeh and Fonseca, Jos\'e},
  year         = {2019},
  note         = {VAITP Python Vulnerability Dataset, entry CVE-2019-12410},
  howpublished = {\url{https://netpack.pt/vaitp/vulnerability/CVE-2019-12410/}}
}
Introducing the "VAITP dataset": a specialized repository of Python vulnerabilities and patches, meticulously compiled for the use of the security research community. As Python's prominence grows, understanding and addressing potential security vulnerabilities become crucial. Crafted by and for the cybersecurity community, this dataset offers a valuable resource for researchers, analysts, and developers to analyze and mitigate the security risks associated with Python. Through the comprehensive exploration of vulnerabilities and corresponding patches, the VAITP dataset fosters a safer and more resilient Python ecosystem, encouraging collaborative advancements in programming security.

The supreme art of war is to subdue the enemy without fighting.

Sun Tzu – “The Art of War”

:: Shaping the future through research and ingenuity ::