LibAFL icon indicating copy to clipboard operation
LibAFL copied to clipboard

Android: Allow multiple SharedMap Servers on the same machine

Open s1341 opened this issue 4 years ago • 11 comments

Perhaps by specifying broker names/ports in an environment variable?

  • [ ] Core support in LlmpBroker
  • [ ] If running without the flag/environment variable, set it to the default for both the broker and client process, so that it can be assumed to exist.
  • [ ] The launcher should automate whatever mechanism is used, so just running the launcher twice should give you two brokers. Or perhaps with a command line argument?
  • [ ] AshmemService needs to use the broker name/port to make itself unique.

s1341 avatar Apr 15 '21 09:04 s1341

Doesn't specifying an individual broker_port already solve this issue? You can read the port from an env in your fuzzer, if you'd like?

domenukk avatar Apr 26 '21 12:04 domenukk

Not in the ashmem service case... that is independent of port, but could be tied to it, I guess.

s1341 avatar Apr 26 '21 14:04 s1341

The ashmem service uses a file instead, but the general concept should remain the same, right? Do we need specific code in the ashmem service to support multiple, like the filename?

domenukk avatar Apr 26 '21 14:04 domenukk

Yes. Currently the filename of the service is hard-coded.

s1341 avatar Apr 26 '21 15:04 s1341

The MacOS shmem simply uses the current path for the unix socket, starting with PR #238 - maybe that'd be an easy solution for this issue?

domenukk avatar Aug 05 '21 02:08 domenukk

We need to use abstract sockets on android.... they don't really have a path, although we could just use the path prepended with an @.

s1341 avatar Aug 05 '21 11:08 s1341

Or the current broker port, that should be unique, too?

domenukk avatar Aug 05 '21 11:08 domenukk

Yeah. Do you want me to make the change?

s1341 avatar Aug 08 '21 05:08 s1341

Feel free. I don't really have the setup to test android atm, so I won't touch it for now :)

domenukk avatar Aug 08 '21 09:08 domenukk

How would I get the broker port in the AshmemService?

s1341 avatar Aug 12 '21 06:08 s1341

Good question. The broker launches the shmem service now so it could pass the port, but we could also just go with the path, then?

domenukk avatar Aug 12 '21 07:08 domenukk