Skip to content
Commit e02a3377 authored by Robert Lubos's avatar Robert Lubos Committed by Christopher Friedt
Browse files

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: default avatarRobert Lubos <robert.lubos@nordicsemi.no>
(cherry picked from commit e540a983)
parent 76c30dfa
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment