Skip to content
Commit 40ee8791 authored by Chaitanya Tata's avatar Chaitanya Tata Committed by Carles Cufí
Browse files

net: socketpair: Fix use after free



In low memory conditions, its possible for socketpair memory allocation
to fail and then the socketpair is freed but after that the remote
semaphore is released causing a crash.

Fix this by freeing the socketpair after releasing the semaphore. Add a
test case to induce low memory conditions (low HEAP and high socketpair
buffer size), with the fix issue is not seen.

Signed-off-by: default avatarChaitanya Tata <Chaitanya.Tata@nordicsemi.no>
parent 5b9f8266
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment