|
From: | niuguoxiang |
Subject: | 答复: [Report Vulnerability from Huawei] Segmentation fault issue of make version 4.1 |
Date: | Fri, 1 Mar 2019 02:32:39 +0000 |
Hi, There is a segfault issue. It was found in v4.1, but not found in v3.81 and v4.2. There are another 3 issues like this. and 2 of them was also found v3.81. The code I get from
http://ftp.gnu.org/gnu/make/ If you identify the problem as a vulnerability, please provide us with the following information: 1. the affected name/versions, your repair plan and your publication plan.
2. If it is convenient, please provide us with the fixed version before you public the vulnerability information and reserve the repair time for Huawei products.
3. Please assign a CVE-ID, thank you! ISSUE DESCRIPTION ====== There is an Segmentation fault issue with crafted Makefile file, which caused by illegal address read in eval () function, read.c file, in make version 4.1. It was not found in make version
3.81. //eval routine Line 1353: for (d = suffix_file->deps; d != 0; d = d->next) Line 1354: { Line 1355: register struct dep *d2; Line 1356: if (*dep_name (d) != '.' && streq (name, dep_name (d))) // Segmentation fault caused when target name too long in Makefile, memory of d will can’t
be access Line 1357: { Line 1358: reject = 1; Line 1359: break; Line 1360: } address@hidden:/opt/niugx/test# ll total 24 drwxr-xr-x 2 root root 4096 Feb 27 15:31 ./ drwxr-xr-x 16 root root 4096 Feb 27 13:37 ../ -rw-r--r-- 1 root root 10160 Feb 27 00:33 Makefile -rw-r--r-- 1 root root 62 Feb 27 10:41 mytest.c address@hidden:/opt/niugx/test# make Segmentation fault address@hidden:/opt/niugx/test# gdb make Reading symbols from make...done. (gdb) r Starting program: /opt/niugx/make-4.1/make-4.1/make
Program received signal SIGSEGV, Segmentation fault. 0x0000000000421efc in eval (ebuf=0x7fffffffca90, set_default=1) at read.c:1356 1356 if (*dep_name (d) != '.' && streq (name, dep_name (d))) (gdb) bt #0 0x0000000000421efc in eval (ebuf=0x7fffffffca90, set_default=1) at read.c:1356 #1 0x000000000041ff1f in eval_makefile (filename=0x657baa "Makefile", flags=0) at read.c:445 #2 0x000000000041f9d1 in read_all_makefiles (makefiles=0x0) at read.c:262 #3 0x000000000041a52f in main (argc=1, argv=0x7fffffffe628, envp=0x7fffffffe638) at main.c:1895 (gdb) IMPACT ====== Segmentation fault issue, illegal address read Vulnerability Discoverer ======= Guoxiang Niu, EaglEye Team 本邮件及其附件含有华为公司的保密信息,仅限于发送给上面地址中列出的个人或群组。禁 |
poc2.zip
Description: poc2.zip
[Prev in Thread] | Current Thread | [Next in Thread] |