public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Jiangfeng Xiao <xiaojiangfeng@huawei.com>
To: Adhemerval Zanella Netto <adhemerval.zanella@linaro.org>
Cc: <libc-alpha@sourceware.org>, <schwab@linux-m68k.org>,
	<nixiaoming@huawei.com>, <douzhaolei@huawei.com>,
	<wangbing6@huawei.com>, <wangfangpeng1@huawei.com>
Subject: Re: [PATCH] elf: sanitize objname in _dl_signal_error
Date: Tue, 2 Apr 2024 22:37:57 +0800	[thread overview]
Message-ID: <0d0aaf71-4f20-0bc1-9ac7-f31f1b426398@huawei.com> (raw)
In-Reply-To: <3f6a6290-9136-4a72-a24b-7c6bb7965569@linaro.org>



On 2024/4/1 21:50, Adhemerval Zanella Netto wrote:


> How did you trigger this issue, either from user provided ABI (dlfcn.h)
> or some some internal usage (if any)? If this is a user-visible issue
> it will require a bug report and a reproducer.
> 

Thanks for your reply.


The following are my reproduction cases:

```
#include <dlfcn.h>

int main(void)
{
	(void)dlopen("not_exist.so", -1);

	return 0;
}

```

However, this case cannot be reproduced in a common environment.

I reproduced this issue in the arm32 environment.
Glibc in the environment is compiled using the Clang compiler.
The glibc version is 2.34. (The patches that supports Clang
compilation has been applied to this version)

I have not figured out why the lcatch variable
in the _dl_signal_error function is null.
As a result, the exception branch
fatal_error(0, NULL, NULL, NULL, "invalid mode parameter")
is executed.
Maybe my Clang compiler's compilation parameters
are not configured properly.

I can then be sure that if glibc is compiled by the GCC compiler,
it should not trigger this issue.

I don't think the glibc mainline branch will trigger this problem
because glibc has not officially promised to support Clang.
So I think I'd rather not submit a bug report first.

  reply	other threads:[~2024-04-02 14:38 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-30 13:40 [PATCH] elf: handle NULL input to fatal_error Jiangfeng Xiao
2024-03-30 15:47 ` Andreas Schwab
2024-04-01  1:40   ` Jiangfeng Xiao
2024-04-01  2:45 ` [PATCH] elf: sanitize objname in _dl_signal_error Jiangfeng Xiao
2024-04-01 13:50   ` Adhemerval Zanella Netto
2024-04-02 14:37     ` Jiangfeng Xiao [this message]
2024-04-02 14:42       ` H.J. Lu
2024-04-02 14:54         ` Jiangfeng Xiao
2024-04-02 15:00           ` H.J. Lu
2024-04-02 15:06             ` Jiangfeng Xiao
2024-04-02 15:08               ` H.J. Lu
2024-04-02 15:21                 ` Jiangfeng Xiao
2024-04-02 15:50         ` Adhemerval Zanella Netto

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0d0aaf71-4f20-0bc1-9ac7-f31f1b426398@huawei.com \
    --to=xiaojiangfeng@huawei.com \
    --cc=adhemerval.zanella@linaro.org \
    --cc=douzhaolei@huawei.com \
    --cc=libc-alpha@sourceware.org \
    --cc=nixiaoming@huawei.com \
    --cc=schwab@linux-m68k.org \
    --cc=wangbing6@huawei.com \
    --cc=wangfangpeng1@huawei.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).