Null pointer dereference vulnerability in the function get_user() - abcm2ps-8.14.1
December 17, 2018
CVE Number
-
CWE
CWE-476: NULL Pointer Dereference
Product Details
abcm2ps is a C program which converts music tunes from the ABC music notation to PostScript or SVG.
URL:https://github.com/leesavide/abcm2ps.git
Vulnerable Versions
8.14.1-master
Vulnerability Details
Null Pointer Dereference vulnerability is discovered in the abcm2ps (8.14.1-master). The same can be triggered by sending a crafted abc file to the abcm2ps binary. It allows an attacker to cause Denial of Service (Segmentation fault) or possibly have unspecified other impact when a victim opens a specially crafted file.
SYNOPSIS
By observing the functions parse_line()
which parse a ABC line and for parse an information field it calls another function parse_info()
which calls function get_user()
in abcparse.c
to get a user defined symbols and then at strcmp(value, "beambreak")
, strcmp
is accessing the pointer which is already zero,After deugging we observed that, char *
value is assigned by parse.deco_tb[s->u.user.value – 128]
which is 0x0
which leads to the Segmentation fault(NULL pointer dereference).
Vulnerable code
Analysis
Tested environment
64-bit ubuntu 16.04 LTS
Proof of Concept
./abcm2ps r -E -g -x -v -O fff -O = -i -k 1 $POC -s 10 -w 1 -m 100 -d 100 -a 0 -f musicfont.fmt -D Bar/ -p -l -I 500 -x -M -N 3 -1 -G -j 0 -b 1 -f -T all -c -B 10
Timeline
Vendor Disclosure: 2018-12-13
Public Disclosure:
Credit
Discovered by ACE Team - Loginsoft