Bug 14041

Summary: using modprobe/insmod with compressed modules gives scary kernel warnings
Product: Busybox Reporter: nolange79
Component: OtherAssignee: unassigned
Status: NEW ---    
Severity: normal CC: busybox-cvs
Priority: P5    
Version: 1.33.x   
Target Milestone: ---   
Hardware: All   
OS: Linux   
Host: Target:
Build:

Description nolange79 2021-07-28 07:32:33 UTC
I am using kernel 5.4 on x86_64 fro an embedded system.

loading a compressed module will give the kernel log error:
kernel: Module has invalid ELF structures

steps to reproduce are simply:
# busybox insmod nbd.ko.gz

Some points:

this happens with gzip and xz

the util-linux insmod/modprobe work without log entry

the module seems correctly loaded and works.

decompressing the module (with the same busybox executable) and then loading it will lead to no log entry

# (after unloading the module again)
# busybox gzip -d nbd.ko.gz
# busybox insmod nbd.ko


I dont know if there is any functional issue, but I am tempted to raise severity since I cant rule it out either.
Comment 1 sylvain.prat 2022-02-01 18:48:38 UTC
I also fell into the problem. I was wondering how alpine linux worked out with compressed linux modules and I finally found out that they don't use busybox's modprobe anymore... Since the decompression methods already exist in busybox, it shouldn't be too hard to implement I guess, but I'm not competent enough to do it myself.