Assert_failure("linux_loader.ml", 392, 7)

19 views
Skip to first unread message

Wubing Wang

unread,
Jul 13, 2015, 2:31:07 PM7/13/15
to bitblaz...@googlegroups.com
Hi,

I was encountered the problem: Fatal error: exception Assert_failure("linux_loader.ml", 392, 7).  When I ran: fuzzball -linux-syscalls /bin/cat -- cat /etc/hostname

390      if phr.ph_type = 1L then (* PT_LOAD *)
391        (if phr.ph_flags = 5L && extra_vaddr = 0L then
392           assert(phr.vaddr = load_base);
393         if data_too || (phr.ph_flags <> 6L && phr.ph_flags <> 7L) then
394           load_segment fm ic phr extra_vaddr true)

Do you have any idea why this problem happen?

My system is ubuntu 14.04 LTS, 64-bit

Thanks

Stephen McCamant

unread,
Jul 13, 2015, 3:01:53 PM7/13/15
to bitblaz...@googlegroups.com
>>>>> "WW" == Wubing Wang <wbwa...@gmail.com> writes:

WW> Hi,
WW> I was encountered the problem: Fatal error: exception
WW> Assert_failure("linux_loader.ml", 392, 7). When I ran: fuzzball
WW> -linux-syscalls /bin/cat -- cat /etc/hostname

WW> 390 if phr.ph_type = 1L then (* PT_LOAD *)
WW> 391 (if phr.ph_flags = 5L && extra_vaddr = 0L then
WW> 392 assert(phr.vaddr = load_base);
WW> 393 if data_too || (phr.ph_flags <> 6L && phr.ph_flags <> 7L) then
WW> 394 load_segment fm ic phr extra_vaddr true)

WW> Do you have any idea why this problem happen?

WW> My system is ubuntu 14.04 LTS, 64-bit

Despite your system being 64-bit, did you nonetheless arrange for
/bin/cat to be a 32-bit binary? Usually on a 64-bit system that binary
would be 64-bit, so that would be my first guess as to the problem.

We've been working on FuzzBALL's 64-bit x86 support recently, which
would allow it to get to this point in the loading process, but I
wouldn't expect the whole program to function yet. Also at the moment
you need to specify the instruction set architecture if it's not
32-bit x86, so you'd need to supply "-arch x64" to run a 64-bit
binary, but if you make only that change I think it will just get a
bit further before failing.

As it happens, someone else sent me a similar question by private
email today as well, but without the hint of the system being 64-bit.
In answering that I brainstormed some other possible causes, which I
can go into if it's not, but after thinking about your question I
think the binary being 64-bit is the most likely problem. (This is the
very first example in the README, so I'm guessing you haven't gotten
any other programs to work yet either.)

You can use the "file" program to distinguish 32-bit from 64-bit
binaries. Usually on a 64-bit Linux system you can still compile
32-bit binaries by giving the -m32 option to gcc, and Debian and
Ubuntu can install 32-bit libraries in parallel using the "multiarch"
feature, but to get a complete set of 32-bit binaries and libraries
the most foolproof approach is to install a whole 32-bit system,
either in a virtual machine or a "chroot" virtual filesystem.

Hope this helps,

-- Stephen
Reply all
Reply to author
Forward
0 new messages