AFL-Snapshot-LKM
AFL-Snapshot-LKM copied to clipboard
"could not insert module afl_snapshot.ko: Operation not permitted" on Ubuntu 20.04.1
I'm getting the following error on Ubuntu 20.04.1:
$ sudo ./load.sh
sudo env LINUX_SYSTEM_MAP='/boot/System.map-5.4.0-47-generic' python3 lookup_symbols.py
make -C '/lib/modules/5.4.0-47-generic/build' M='/opt/AFL-Snapshot-LKM/src' modules
make[1]: Entering directory '/usr/src/linux-headers-5.4.0-47-generic'
CC [M] /opt/AFL-Snapshot-LKM/src/memory.o
/opt/AFL-Snapshot-LKM/src/memory.c: In function ‘recover_memory_snapshot’:
/opt/AFL-Snapshot-LKM/src/memory.c:483:30: warning: unused variable ‘entry’ [-Wunused-variable]
483 | pte_t * pte, entry;
| ^~~~~
/opt/AFL-Snapshot-LKM/src/memory.c:481:30: warning: unused variable ‘prev_sp’ [-Wunused-variable]
481 | struct snapshot_page *sp, *prev_sp = NULL;
| ^~~~~~~
CC [M] /opt/AFL-Snapshot-LKM/src/files.o
/opt/AFL-Snapshot-LKM/src/files.c: In function ‘recover_files_snapshot’:
/opt/AFL-Snapshot-LKM/src/files.c:56:24: warning: unused variable ‘file’ [-Wunused-variable]
56 | struct file *file = fdt->fd[i];
| ^~~~
/opt/AFL-Snapshot-LKM/src/files.c: In function ‘clean_files_snapshot’:
/opt/AFL-Snapshot-LKM/src/files.c:78:24: warning: unused variable ‘files’ [-Wunused-variable]
78 | struct files_struct *files = current->files;
| ^~~~~
CC [M] /opt/AFL-Snapshot-LKM/src/threads.o
CC [M] /opt/AFL-Snapshot-LKM/src/task_data.o
CC [M] /opt/AFL-Snapshot-LKM/src/snapshot.o
CC [M] /opt/AFL-Snapshot-LKM/src/hook.o
CC [M] /opt/AFL-Snapshot-LKM/src/module.o
LD [M] /opt/AFL-Snapshot-LKM/src/afl_snapshot.o
Building modules, stage 2.
MODPOST 1 modules
CC [M] /opt/AFL-Snapshot-LKM/src/afl_snapshot.mod.o
LD [M] /opt/AFL-Snapshot-LKM/src/afl_snapshot.ko
make[1]: Leaving directory '/usr/src/linux-headers-5.4.0-47-generic'
insmod: ERROR: could not insert module afl_snapshot.ko: Operation not permitted
Any help would be appreciated. Thanks!
what happens if you do "sudo insmod src/afl_snapshot.ko" ? are you currently running 5.4.0.47?
$ sudo insmod src/afl_snapshot.ko
insmod: ERROR: could not insert module src/afl_snapshot.ko: Operation not permitted
and my kernel is 5.4.0-47-generic.
The same thing happens on a freshly installed Ubuntu 20.10. The kernel is now 5.8.0-29-generic.