From: Siddhesh Poyarekar <siddhesh@gotplt.org>
To: "Никита Попов" <npv1310@gmail.com>, libc-alpha@sourceware.org
Subject: Re: [PATCH] librt: fix NULL pointer dereference (bug 28213)
Date: Mon, 9 Aug 2021 18:51:19 +0530 [thread overview]
Message-ID: <ef1aecbb-fb10-7c93-5315-0f5ed886b152@gotplt.org> (raw)
In-Reply-To: <CA+cA0PA3mNB=QW_oSd2BAuRsr=6Hmt1bt61kanQ=_vcN4ygeYQ@mail.gmail.com>
On 8/9/21 5:55 PM, Никита Попов via Libc-alpha wrote:
> 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).
Thank you, the fix looks good to me. Do you have a test case to go with it?
Thanks,
Siddhesh
next prev parent reply other threads:[~2021-08-09 13:21 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-09 12:25 [PATCH] librt: fix NULL pointer dereference (bug 28213) Никита Попов via Libc-alpha
2021-08-09 13:21 ` Siddhesh Poyarekar [this message]
2021-08-09 13:27 ` Florian Weimer via Libc-alpha
2021-08-09 13:32 ` Siddhesh Poyarekar
2021-08-09 13:45 ` Никита Попов via Libc-alpha
2021-08-09 14:35 ` Siddhesh Poyarekar
2021-08-09 14:50 ` Siddhesh Poyarekar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/libc/involved.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ef1aecbb-fb10-7c93-5315-0f5ed886b152@gotplt.org \
--to=siddhesh@gotplt.org \
--cc=libc-alpha@sourceware.org \
--cc=npv1310@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).