Skip to content
Commit e540a983 authored by Robert Lubos's avatar Robert Lubos Committed by Stephanos Ioannidis
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>
parent c85e5438
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment