net: shell: Validate pointer provided with net pkt command
The net_pkt pointer provided to net pkt commands was not validated in any way. Therefore it was fairly easy to crash an application by providing invalid address. This commit adds the pointer validation. It's checked whether the pointer provided belongs to any net_pkt pools known to the net stack, and if the pointer offset within the slab actually points to the beginning of the net_pkt structure. Signed-off-by:Robert Lubos <robert.lubos@nordicsemi.no> (cherry picked from commit e540a983)
Loading
Please sign in to comment