Skip to content
Commit d7e05311 authored by Ravi kumar Veeramally's avatar Ravi kumar Veeramally Committed by Jukka Rissanen
Browse files

net: fragment: Fix the 802.15.4 fragmentation



Currently fragmentation introduces empty fragment in the
beginning of the list, and adds fragmentation header, and moves frags
data to previous fragments. This is done based on condition that max
data should be multiples of 8 bytes and offset is based on before
compression.

It will fail at scenario when current fragment has not enough space
to move from next fragment and next fragment has more than allowable
max bytes. This will cause memory overflow which is typically seen
as double-free error to the user.

This is solved more simple way by this commit. First detach frags list,
prepare new fragment and attach that to buffer. Then move data from
detached frag list and free the fragments in the old one.

Change-Id: I5e3693d47828ff3b92db4ba5f6c00c0b751daadc
Signed-off-by: default avatarRavi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
parent dace9961
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment