Cloudanix VulnDB

CVE-2015-8865

High · 7.3

CVSS

7.3

EPSS

5.5%

Published

May 20, 2016

CISA due date

—

Cloudanix analysis

Schedule a fix SSVC: Track

A flaw in how certain software reads special file descriptions can let attackers crash programs or run harmful code by providing a specially made file.

Exploit Available
Exploitation
Requires User Interaction
Attacker needs
User Interaction
Complexity
Low
Impact
Full Compromise
Component
Library
Class
Memory Corruption
Remediation
Upgrade
Effort
Medium
Patch risk
Low

What it actually does

Mishandled continuation-level jumps in file_check_mem allow a crafted magic file to trigger buffer overflow, enabling denial of service via application crash or potential arbitrary code execution in affected file and PHP Fileinfo components.

Why it matters to the business

Systems processing untrusted files may experience crashes or remote code execution, leading to service outages, data exposure, or full host compromise; older packages remain exposed years after disclosure despite available fixes.

How an attack unfolds

An attacker crafts a malicious magic file exploiting jump mishandling, then supplies it to an application using the vulnerable file library or PHP Fileinfo (such as through file uploads or command-line processing) to trigger overflow and gain code execution or crash the process.

How to fix it

Upgrade affected chicken packages on Debian 11/12/13 and Ubuntu 18.04 LTS to the listed fixed versions (4.12.0-0.2 or 4.12.0-0.3) and rebuild/restart dependent services; replace or isolate any remaining older file/PHP Fileinfo instances.

How to confirm the fix worked

Verify installed package versions match or exceed the fixed releases; test file command and PHP Fileinfo against known-good and crafted magic files to confirm absence of overflow behavior.

Typical attack path

  1. Identify application or service that invokes file or PHP Fileinfo on user-supplied files
  2. Craft magic file triggering continuation-level jump mishandling
  3. Deliver crafted file via upload, email attachment, or command-line invocation
  4. Trigger processing to cause buffer overflow
  5. Achieve denial of service or execute arbitrary code

How to detect it

Review application and system logs for unexpected crashes or segmentation faults during file or PHP Fileinfo processing of external files; inspect process dumps or core files for signs of buffer overflow when handling magic databases.

What your security team should do

  • Immediately upgrade chicken and dependent file/PHP packages to fixed versions
  • Scan environments for legacy file < 5.23 or PHP < 5.5.34/5.6.20/7.0.5 usage
  • Implement file-type validation and sandboxing for untrusted file processing
  • Monitor EPSS and exploit availability trends for any renewed interest

The record

The file_check_mem function in funcs.c in file before 5.23, as used in the Fileinfo component in PHP before 5.5.34, 5.6.x before 5.6.20, and 7.x before 7.0.5, mishandles continuation-level jumps, which allows context-dependent attackers to cause a denial of service (buffer overflow and application crash) or possibly execute arbitrary code via a crafted magic file.

Affected packages

Ecosystem Package Introduced Fixed
Debian:11 file 0 1:5.24-1
Debian:12 file 0 1:5.24-1
Debian:13 file 0 1:5.24-1
Debian:7 file 0 5.11-2+deb7u9
Debian:7 php5 0 5.4.45-0+deb7u3
Debian:8 php5 0 5.6.20+dfsg-0+deb8u1
Red Hat:rhel_software_collections:2::el6 rh-php56 0 0:2.3-1.el6
Red Hat:rhel_software_collections:2::el6 rh-php56-php 0 0:5.6.25-1.el6
Red Hat:rhel_software_collections:2::el6 rh-php56-php-bcmath 0 0:5.6.25-1.el6
Red Hat:rhel_software_collections:2::el6 rh-php56-php-cli 0 0:5.6.25-1.el6
Red Hat:rhel_software_collections:2::el6 rh-php56-php-common 0 0:5.6.25-1.el6
Red Hat:rhel_software_collections:2::el6 rh-php56-php-dba 0 0:5.6.25-1.el6
Red Hat:rhel_software_collections:2::el6 rh-php56-php-dbg 0 0:5.6.25-1.el6
Red Hat:rhel_software_collections:2::el6 rh-php56-php-debuginfo 0 0:5.6.25-1.el6
Red Hat:rhel_software_collections:2::el6 rh-php56-php-devel 0 0:5.6.25-1.el6
Red Hat:rhel_software_collections:2::el6 rh-php56-php-embedded 0 0:5.6.25-1.el6
Red Hat:rhel_software_collections:2::el6 rh-php56-php-enchant 0 0:5.6.25-1.el6
Red Hat:rhel_software_collections:2::el6 rh-php56-php-fpm 0 0:5.6.25-1.el6
Red Hat:rhel_software_collections:2::el6 rh-php56-php-gd 0 0:5.6.25-1.el6
Red Hat:rhel_software_collections:2::el6 rh-php56-php-gmp 0 0:5.6.25-1.el6
Red Hat:rhel_software_collections:2::el6 rh-php56-php-imap 0 0:5.6.25-1.el6
Red Hat:rhel_software_collections:2::el6 rh-php56-php-intl 0 0:5.6.25-1.el6
Red Hat:rhel_software_collections:2::el6 rh-php56-php-ldap 0 0:5.6.25-1.el6
Red Hat:rhel_software_collections:2::el6 rh-php56-php-mbstring 0 0:5.6.25-1.el6
Red Hat:rhel_software_collections:2::el6 rh-php56-php-mysqlnd 0 0:5.6.25-1.el6
Red Hat:rhel_software_collections:2::el6 rh-php56-php-odbc 0 0:5.6.25-1.el6
Red Hat:rhel_software_collections:2::el6 rh-php56-php-opcache 0 0:5.6.25-1.el6
Red Hat:rhel_software_collections:2::el6 rh-php56-php-pdo 0 0:5.6.25-1.el6
Red Hat:rhel_software_collections:2::el6 rh-php56-php-pear 0 1:1.9.5-4.el6
Red Hat:rhel_software_collections:2::el6 rh-php56-php-pgsql 0 0:5.6.25-1.el6
Red Hat:rhel_software_collections:2::el6 rh-php56-php-process 0 0:5.6.25-1.el6
Red Hat:rhel_software_collections:2::el6 rh-php56-php-pspell 0 0:5.6.25-1.el6
Red Hat:rhel_software_collections:2::el6 rh-php56-php-recode 0 0:5.6.25-1.el6
Red Hat:rhel_software_collections:2::el6 rh-php56-php-snmp 0 0:5.6.25-1.el6
Red Hat:rhel_software_collections:2::el6 rh-php56-php-soap 0 0:5.6.25-1.el6
Red Hat:rhel_software_collections:2::el6 rh-php56-php-tidy 0 0:5.6.25-1.el6
Red Hat:rhel_software_collections:2::el6 rh-php56-php-xml 0 0:5.6.25-1.el6
Red Hat:rhel_software_collections:2::el6 rh-php56-php-xmlrpc 0 0:5.6.25-1.el6
Red Hat:rhel_software_collections:2::el6 rh-php56-runtime 0 0:2.3-1.el6
Red Hat:rhel_software_collections:2::el6 rh-php56-scldevel 0 0:2.3-1.el6
Red Hat:rhel_software_collections:2::el7 rh-php56 0 0:2.3-1.el7
Red Hat:rhel_software_collections:2::el7 rh-php56-php 0 0:5.6.25-1.el7
Red Hat:rhel_software_collections:2::el7 rh-php56-php-bcmath 0 0:5.6.25-1.el7
Red Hat:rhel_software_collections:2::el7 rh-php56-php-cli 0 0:5.6.25-1.el7
Red Hat:rhel_software_collections:2::el7 rh-php56-php-common 0 0:5.6.25-1.el7
Red Hat:rhel_software_collections:2::el7 rh-php56-php-dba 0 0:5.6.25-1.el7
Red Hat:rhel_software_collections:2::el7 rh-php56-php-dbg 0 0:5.6.25-1.el7
Red Hat:rhel_software_collections:2::el7 rh-php56-php-debuginfo 0 0:5.6.25-1.el7
Red Hat:rhel_software_collections:2::el7 rh-php56-php-devel 0 0:5.6.25-1.el7
Red Hat:rhel_software_collections:2::el7 rh-php56-php-embedded 0 0:5.6.25-1.el7
Red Hat:rhel_software_collections:2::el7 rh-php56-php-enchant 0 0:5.6.25-1.el7
Red Hat:rhel_software_collections:2::el7 rh-php56-php-fpm 0 0:5.6.25-1.el7
Red Hat:rhel_software_collections:2::el7 rh-php56-php-gd 0 0:5.6.25-1.el7
Red Hat:rhel_software_collections:2::el7 rh-php56-php-gmp 0 0:5.6.25-1.el7
Red Hat:rhel_software_collections:2::el7 rh-php56-php-intl 0 0:5.6.25-1.el7
Red Hat:rhel_software_collections:2::el7 rh-php56-php-ldap 0 0:5.6.25-1.el7
Red Hat:rhel_software_collections:2::el7 rh-php56-php-mbstring 0 0:5.6.25-1.el7
Red Hat:rhel_software_collections:2::el7 rh-php56-php-mysqlnd 0 0:5.6.25-1.el7
Red Hat:rhel_software_collections:2::el7 rh-php56-php-odbc 0 0:5.6.25-1.el7
Red Hat:rhel_software_collections:2::el7 rh-php56-php-opcache 0 0:5.6.25-1.el7
Red Hat:rhel_software_collections:2::el7 rh-php56-php-pdo 0 0:5.6.25-1.el7
Red Hat:rhel_software_collections:2::el7 rh-php56-php-pear 0 1:1.9.5-4.el7
Red Hat:rhel_software_collections:2::el7 rh-php56-php-pgsql 0 0:5.6.25-1.el7
Red Hat:rhel_software_collections:2::el7 rh-php56-php-process 0 0:5.6.25-1.el7
Red Hat:rhel_software_collections:2::el7 rh-php56-php-pspell 0 0:5.6.25-1.el7
Red Hat:rhel_software_collections:2::el7 rh-php56-php-recode 0 0:5.6.25-1.el7
Red Hat:rhel_software_collections:2::el7 rh-php56-php-snmp 0 0:5.6.25-1.el7
Red Hat:rhel_software_collections:2::el7 rh-php56-php-soap 0 0:5.6.25-1.el7
Red Hat:rhel_software_collections:2::el7 rh-php56-php-xml 0 0:5.6.25-1.el7
Red Hat:rhel_software_collections:2::el7 rh-php56-php-xmlrpc 0 0:5.6.25-1.el7
Red Hat:rhel_software_collections:2::el7 rh-php56-runtime 0 0:2.3-1.el7
Red Hat:rhel_software_collections:2::el7 rh-php56-scldevel 0 0:2.3-1.el7
Ubuntu:14.04:LTS file 0 1:5.14-2ubuntu3.4
Ubuntu:14.04:LTS php5 0 5.5.9+dfsg-1ubuntu4.16
Ubuntu:14.04:LTS php5 0 5.5.9+dfsg-1ubuntu4.17
Ubuntu:16.04:LTS file 0 1:5.25-2ubuntu1
Ubuntu:16.04:LTS file 0 1:5.25-2ubuntu1.1
Ubuntu:16.04:LTS php7.0 0 7.0.4-7ubuntu2.1
Ubuntu:18.04:LTS file 0 1:5.32-2ubuntu0.1

Related vulnerabilities