Opened 16 years ago

Closed 16 years ago

#2895 closed bug (fixed)

buffer overflow in vmdkimage

Reported by: kaliber Owned by: bonefish
Priority: normal Milestone: R1
Component: Build System Version: R1/pre-alpha1
Keywords: Cc:
Blocked By: Blocking:
Platform: All

Description

Ubuntu 8.10

Creating image ...
*** buffer overflow detected ***: generated/objects/linux/x86/release/tools/vmdkimage/vmdkimage terminated
======= Backtrace: =========
/lib/tls/i686/cmov/libc.so.6(__fortify_fail+0x48)[0x4013b558]
/lib/tls/i686/cmov/libc.so.6[0x40139680]
/lib/tls/i686/cmov/libc.so.6[0x40139de8]
generated/objects/linux/x86/release/tools/vmdkimage/vmdkimage[0x804a4aa]
/lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xe5)[0x40057685]
generated/objects/linux/x86/release/tools/vmdkimage/vmdkimage[0x80496c1]
======= Memory map: ========
08048000-08053000 r-xp 00000000 08:07 603985635  /home/stuff/download/SCM/haiku/haiku-build/generated/objects/linux/x86/release/tools/vmdkimage/vmdkimage
08054000-08055000 r--p 0000b000 08:07 603985635  /home/stuff/download/SCM/haiku/haiku-build/generated/objects/linux/x86/release/tools/vmdkimage/vmdkimage
08055000-08056000 rw-p 0000c000 08:07 603985635  /home/stuff/download/SCM/haiku/haiku-build/generated/objects/linux/x86/release/tools/vmdkimage/vmdkimage
08056000-0805a000 rw-p 08056000 00:00 0 
09844000-09865000 rw-p 09844000 00:00 0          [heap]
40000000-4001a000 r-xp 00000000 08:02 522381     /lib/ld-2.8.90.so
4001a000-4001b000 r-xp 4001a000 00:00 0          [vdso]
4001b000-4001c000 r--p 0001a000 08:02 522381     /lib/ld-2.8.90.so
4001c000-4001d000 rw-p 0001b000 08:02 522381     /lib/ld-2.8.90.so
4001d000-4001e000 rw-p 4001d000 00:00 0 
40031000-4003e000 r-xp 00000000 08:02 138740     /lib/libgcc_s.so.1
4003e000-4003f000 r--p 0000c000 08:02 138740     /lib/libgcc_s.so.1
4003f000-40040000 rw-p 0000d000 08:02 138740     /lib/libgcc_s.so.1
40040000-40041000 rw-p 40040000 00:00 0 
40041000-40199000 r-xp 00000000 08:02 563543     /lib/tls/i686/cmov/libc-2.8.90.so
40199000-4019b000 r--p 00158000 08:02 563543     /lib/tls/i686/cmov/libc-2.8.90.so
4019b000-4019c000 rw-p 0015a000 08:02 563543     /lib/tls/i686/cmov/libc-2.8.90.so
4019c000-401a0000 rw-p 4019c000 00:00 0 
bf7fa000-bf80f000 rw-p bffeb000 00:00 0          [stack]
build/scripts/build_haiku_image: line 140:  2293 Aborted                 (core dumped) $vmdkimage -h 64k -i${imageSize}M $vmdkImageFlags "$imagePath"

Change History (2)

comment:1 by kaliber, 16 years ago

I'm not sure that is a good solution but increasing buffer size from:

char fullPath[PATH_MAX + 1];

to

char fullPath[PATH_MAX + 5];

resolves the problem.

comment:2 by korli, 16 years ago

Resolution: fixed
Status: newclosed

Should be fixed in hrev28252.

Note: See TracTickets for help on using tickets.