Bug 14041 - using modprobe/insmod with compressed modules gives scary kernel warnings
Summary: using modprobe/insmod with compressed modules gives scary kernel warnings
Status: NEW
Alias: None
Product: Busybox
Classification: Unclassified
Component: Other (show other bugs)
Version: 1.33.x
Hardware: All Linux
: P5 normal
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-07-28 07:32 UTC by nolange79
Modified: 2022-02-01 18:48 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.