FS#55087 - [afl] Add 32-bit support for llvm_mode

Attached to Project: Community Packages
Opened by Denis Kasak (dkasak) - Wednesday, 09 August 2017, 17:45 GMT
Last edited by Levente Polyak (anthraxx) - Sunday, 10 February 2019, 20:28 GMT
Task Type Feature Request
Category Packages
Status Closed
Assigned To Levente Polyak (anthraxx)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 2
Private No

Details

Description:
The afl package doesn't supply the 32-bit object file for llvm_mode (afl-llvm-rt-32.o). This is useful in some scenarios, for instance when fuzzing with ASAN. I'm not sure why the file isn't in the package since the llvm_mode compiles it by default and the PKGBUILD doesn't look like it's excluding it on purpose. In fact, I've now manually rebuilt the afl package from the PKGBUILD and the file in question gets installed as /usr/lib/afl/afl-llvm-rt-32.o.

Could this be included?

Additional info:
* Version : 2.49b-1

Steps to reproduce:
* `pacman -Ql afl | grep 32` returns nothing.
This task depends upon

Closed by  Levente Polyak (anthraxx)
Sunday, 10 February 2019, 20:28 GMT
Reason for closing:  Implemented
Additional comments about closing:  2.52b-2
Comment by Doug Newgard (Scimmia) - Thursday, 10 August 2017, 03:31 GMT
I'm guessing you didn't build it in a clean chroot when you rebuilt it? That would point to a missing dep that's detected at build time.
Comment by Denis Kasak (dkasak) - Sunday, 13 August 2017, 11:14 GMT
That's correct, I was a bit short on time. I rebuilt it in a chroot now and that particular build step fails when it doesn't find /usr/include/gnu/stubs-32.h. Installing lib32-glibc resolves it and builds afl-llvm-rt-32.o successfully.
Comment by Levente Polyak (anthraxx) - Thursday, 05 October 2017, 14:54 GMT
does a regular extra-x86_64-build with a copy of /usr/lib/afl/afl-llvm-rt-32.o on top work for your scenario?
I don't want to move afl into multilib just to provide 32bit llvm_mode support, but i could add a second multilib package providing afl-llvm-rt-32.o via a package like afl-llvm-32 or such.
Comment by Denis Kasak (dkasak) - Monday, 09 October 2017, 16:11 GMT
Yes, that should work.
Comment by Denis Kasak (dkasak) - Thursday, 08 February 2018, 12:17 GMT
Any progress on this?
Comment by Levente Polyak (anthraxx) - Thursday, 08 February 2018, 12:31 GMT
oh sorry, will fix it with next iteration
Comment by Nicolas I. (IooNag) - Wednesday, 11 July 2018, 12:15 GMT
I hit this issue while trying to run AFL on a program compiled in 32-bit mode (in order to "simulate" its behavior on an 32-bit ARM CPU). Is there anything blocking the creation of a "afl-llvm-32" package in multilib?
Comment by Eli Schwartz (eschwartz) - Monday, 20 August 2018, 20:51 GMT
Well, lib32-glibc is now in core, so there's no need to do the multilib dance.

Loading...