Re: [LEDE-DEV] [PATCH ubox] kmodloader: Check module endian before loading

2017-07-02 Thread Florian Fainelli
Le 07/02/17 à 01:49, Yousong Zhou a écrit : > On 1 July 2017 at 07:34, Florian Fainelli wrote: >> If we manage to accidentally get a module installed that does not match >> the system endianess (there is currently nothing preventing that in >> OpenWrt/LEDE) we will hit a segmentation fault when do

Re: [LEDE-DEV] [PATCH ubox] kmodloader: Check module endian before loading

2017-07-02 Thread Yousong Zhou
On 1 July 2017 at 07:34, Florian Fainelli wrote: > If we manage to accidentally get a module installed that does not match > the system endianess (there is currently nothing preventing that in > OpenWrt/LEDE) we will hit a segmentation fault when doing this: > > sh = (Elf32_Shdr *) (map + e->e_sho

[LEDE-DEV] [PATCH ubox] kmodloader: Check module endian before loading

2017-06-30 Thread Florian Fainelli
If we manage to accidentally get a module installed that does not match the system endianess (there is currently nothing preventing that in OpenWrt/LEDE) we will hit a segmentation fault when doing this: sh = (Elf32_Shdr *) (map + e->e_shoff); because e->e_shoff will be wrongly encoded and this m