question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Qemu build issues on Ubuntu 19

See original GitHub issue

Hi,

There seems to be a problem with building QEMU while running Ubuntu 19 when setting up phuzzer.

   static int memfd_create(const char *name, unsigned int flags)
              ^~~~~~~~~~~~
  In file included from /usr/include/x86_64-linux-gnu/bits/mman-linux.h:111:0,
                   from /usr/include/x86_64-linux-gnu/bits/mman.h:34,
                   from /usr/include/x86_64-linux-gnu/sys/mman.h:41,
                   from /tmp/pip-req-build-r26yq_bw/bin/afl-unix/qemu_mode/qemu-2.10.0/include/sysemu/os-posix.h:29,
                   from /tmp/pip-req-build-r26yq_bw/bin/afl-unix/qemu_mode/qemu-2.10.0/include/qemu/osdep.h:104,
                   from util/memfd.c:28:
  /usr/include/x86_64-linux-gnu/bits/mman-shared.h:50:5: note: previous declaration of ‘memfd_create’ was here
   int memfd_create (const char *__name, unsigned int __flags) __THROW;
       ^~~~~~~~~~~~
  make: *** [/tmp/pip-req-build-r26yq_bw/bin/afl-unix/qemu_mode/qemu-2.10.0/rules.mak:66: util/memfd.o] Error 1

I’ve tried downgrading gcc and etc to 6.0 (was using 8.4 before), and same issue. It might be related to a similar issue in Avatar2: https://github.com/avatartwo/avatar2/issues/14.

To maybe help diagnose this would it be possible to know what distro and kernel verion phuzzer is being developed with? Thanks!

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
twizmwazincommented, Jul 16, 2020

This issue seems to have to do with building the binaries for shellphish-afl and shellphish-qemu rather than the phuzzer package itself. This should be able to be bypassed by installing our wheels from the angr/wheels repo. I was able to get phuzzer installed in a 20.04 docker container like this:

FROM ubuntu:focal

RUN apt-get update && apt-get install -y git

RUN git clone https://github.com/angr/angr-dev.git /root/angr-dev
WORKDIR /root/angr-dev

RUN DEBIAN_FRONTEND="noninteractive" ./setup.sh -i -u

RUN pip3 install https://github.com/angr/wheels/blob/master/shellphish_afl-1.2.1-py2.py3-none-manylinux1_x86_64.whl?raw=true
RUN pip3 install https://github.com/angr/wheels/blob/master/shellphish_qemu-0.10.0-py3-none-manylinux1_x86_64.whl?raw=true

RUN ./setup.sh -u phuzzer

RUN python3 -c "import phuzzer; print('it works')"
0reactions
twizmwazincommented, Nov 16, 2022

This issue is related to shellphish-qemu and we have a workaround, so I’m going to consider this complete.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Virtualization - qemu
Qemu is a machine emulator that can run operating systems and programs for one machine on a different machine. Mostly it is not...
Read more >
Build, Install, and Use QEMU on Ubuntu | hacklog
This post describes how you can build, install, and use QEMU on an Ubuntu machine. I basically refererenced http://wiki.qemu.org/Hosts/Linux ...
Read more >
Load of pre-upgrade qemu modules needs to avoid noexec
This is due to qemu modules only working with exactly the same build. * The problem is that the path everyone (upstream+security) agreed...
Read more >
Problem with compiling qemu from source : r/linuxquestions
For some reason there is no Spice OpenGl support build into the Linux Mint qemu package so I had to compile it from...
Read more >
fails on "petalinux-boot --qemu --prebuilt 3"
Problem : when running command petalinux-boot --qemu --prebuilt 3, ... 4.10.0-28-generic #32~16.04.2-Ubuntu SMP Thu Jul 20 10:19:48 UTC 2017 ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found