From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-yb1-xb34.google.com (mail-yb1-xb34.google.com [IPv6:2607:f8b0:4864:20::b34]) by sourceware.org (Postfix) with ESMTPS id 057253858C5E for ; Tue, 2 Apr 2024 14:42:48 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 057253858C5E Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 057253858C5E Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::b34 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1712068969; cv=none; b=cctgJe/Es6KIsXqvtBnC5cMU4wGYi5wFJUIPfzlQWeUh8O450EpC1b7pM8btLTqJMTzuzpkp6akz6Cn5HnIMvj3warUUoqjo0Zmy3UGoZS4yPJW5qeVEtH1Lrc4YIC3NwJ14bnD3zOifAdxTqsYzh0JuFJP9tQR8uieNd/C+syQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1712068969; c=relaxed/simple; bh=Msyh0F3sKABrMUoDsAxT++fOu2TmWL5UAp/CprfMQ8Y=; h=DKIM-Signature:MIME-Version:From:Date:Message-ID:Subject:To; b=BpkWQMmWMuBmr1MnzAFgo1yZL4GEnAP0zOHZ+Qx0KqNehQo3O+ZfmGa6x2cUsE2JHbHIVc/i6kKHutgpt2TSKJHzwqM+lp02rOkjYSpfex0kv5ZbjK6LUcmJJVxCf4cFDhO6NgRZ3AW3PfG9/3wmLQg3vGzD0l2gBq1w6eQd7xE= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-yb1-xb34.google.com with SMTP id 3f1490d57ef6-dcbef31a9dbso3392490276.1 for ; Tue, 02 Apr 2024 07:42:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1712068967; x=1712673767; darn=sourceware.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=fpsQU5DEDrhYPLCNFFaakkEKRUsKJyeVKsWLRptl5PQ=; b=QvJl7TiOrcqTSneqZa6s3eqZ/Or4xSyrBCgsLlElV2y7zcfv9GRl7gLH3/a3805AJU 24MtIPlV5jt4gZvKxpuAOSE3fqpE+hq5GKSk8suNa7BRwDlbcnN2HJhx4qQFDi/+UxMd DjcyE2BDdL0e+F/T+g+gekHeykTr2SWumLsvYpw1VXG4DXN51TfLU5TkWdLUZFmTDnI1 DKjvdHcxstOYKf97fIofYA1bxsv5K9OW8sqljLtXPHtO0Ji7mQb1jA3DCUKfxZkNdR/2 Bluogrjg82VMPmcusETwJllZiKjYGU8MBWwEHpk7xmFeytOKn/wdm+CkiMOWPHMnZ9wf ItxQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712068967; x=1712673767; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=fpsQU5DEDrhYPLCNFFaakkEKRUsKJyeVKsWLRptl5PQ=; b=cG3FVAiX+WEWRKRWH0QhrCudd4NsP9pgzT1dlJXKut/tMizZ0NQQXorxf0+lYLySUW 34nrds7gZgqBAGKWrCDIkrzdtwGK91FLBIPoYEEufs3IbRytc4Guk/ISBv0sPvyZhOUs TATi73mzeUuJmXhnhgj3vhp6OrQUw+4ShpZUC1HCY+M8pmt7RjdsoysBvfV1f1VTRxvN ezFusO43yjFxP89FE564o88j31J0ZGNk+dr5sJ1WkOEwAn8kj0vCBqANXoGaMpAnY1Fz zbt7kzIE2wyie8g7y2bISUamZsj9376fZ/Sjzy03Eyi0H2pH1mZ3/xKP/wrOZ6tIwpSt v/gw== X-Forwarded-Encrypted: i=1; AJvYcCVlaUbyzitI1VHVS0A4nuEty4nCvOTdrV8xu17ItDEvUWSis5yZXVim+1qkqIxOvysslB2G380Vpju+Os1tZIkwBAAH1m0Z5pOQ X-Gm-Message-State: AOJu0YzzhVeMp6qeUdodNE5XB0MZf76xpYc2zhq04vdtwwpF3wTBc7/M KTNvN0bvi9DhItvgUfFT+AcYXgEFkNOd0cTdWwa1KSAX4g+3WzLYSor4WgstrA8G/atHOFd/G8u //emlT7mKK4gaZncxBbioXoYEGGc= X-Google-Smtp-Source: AGHT+IGFoYxXYerSgl7aSAsPYWIJYRT7J2qS7SHJ7sbsCGq+B2f8AfZ6JO4hFaRKA1UkCtjumkXQSwnnwZW1LGs9UHo= X-Received: by 2002:a25:ba4e:0:b0:dc6:19ea:9204 with SMTP id z14-20020a25ba4e000000b00dc619ea9204mr10184612ybj.61.1712068967250; Tue, 02 Apr 2024 07:42:47 -0700 (PDT) MIME-Version: 1.0 References: <1711806052-117857-1-git-send-email-xiaojiangfeng@huawei.com> <1711939509-1411-1-git-send-email-xiaojiangfeng@huawei.com> <3f6a6290-9136-4a72-a24b-7c6bb7965569@linaro.org> <0d0aaf71-4f20-0bc1-9ac7-f31f1b426398@huawei.com> In-Reply-To: <0d0aaf71-4f20-0bc1-9ac7-f31f1b426398@huawei.com> From: "H.J. Lu" Date: Tue, 2 Apr 2024 07:42:11 -0700 Message-ID: Subject: Re: [PATCH] elf: sanitize objname in _dl_signal_error To: Jiangfeng Xiao Cc: Adhemerval Zanella Netto , libc-alpha@sourceware.org, schwab@linux-m68k.org, nixiaoming@huawei.com, douzhaolei@huawei.com, wangbing6@huawei.com, wangfangpeng1@huawei.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-3013.6 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Tue, Apr 2, 2024 at 7:38=E2=80=AFAM Jiangfeng Xiao wrote: > > > > 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 > > 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. Is it a Clang bug? > 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. --=20 H.J.