Skip to content
Commit 79474303 authored by Nikita Popov's avatar Nikita Popov Committed by Siddhesh Poyarekar
Browse files

librt: fix NULL pointer dereference (bug 28213)



Helper thread frees copied attribute on NOTIFY_REMOVED message
received from the OS kernel.  Unfortunately, it fails to check whether
copied attribute actually exists (data.attr != NULL).  This worked
earlier because free() checks passed pointer before actually
attempting to release corresponding memory.  But
__pthread_attr_destroy assumes pointer is not NULL.

So passing NULL pointer to __pthread_attr_destroy will result in
segmentation fault.  This scenario is possible if
notification->sigev_notify_attributes == NULL (which means default
thread attributes should be used).

Signed-off-by: default avatarNikita Popov <npv1310@gmail.com>
Reviewed-by: default avatarSiddhesh Poyarekar <siddhesh@sourceware.org>
(cherry picked from commit b805aebd)
parent 31902ae6
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment