kmodloader: fix invalid read outside mapped region
authorTony Ambardar <itugrok@yahoo.com>
Mon, 22 Jan 2024 08:48:37 +0000 (00:48 -0800)
committerTony Ambardar <itugrok@yahoo.com>
Wed, 24 Jan 2024 08:55:03 +0000 (00:55 -0800)
commit2c5887cb46883a28d69071c4349c3dabbbe3972c
tree64aed2fbd68ec748571a2be5bd360e3058b60dd1
parent6cf7d837ee7e392ee047aee4f45132f4176b7493
kmodloader: fix invalid read outside mapped region

Code parsing .modinfo data skips over null sequences without checking
bounds and may read past mapped memory, potentially triggering SIGSEGV.

Fixes: https://github.com/openwrt/openwrt/issues/14463
Fixes: d6e6825c4697 ("add support for module handling")
Refer: 9371411715c8 ("kmodloader: fix out-of-bound access when parsing .modinfo")
Signed-off-by: Tony Ambardar <itugrok@yahoo.com>
kmodloader.c