From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by sourceware.org (Postfix) with ESMTPS id AC0113858D28 for ; Tue, 2 Apr 2024 14:38:09 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org AC0113858D28 Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=huawei.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org AC0113858D28 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=45.249.212.187 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1712068691; cv=none; b=QRwA30ys0+Mm7obO22R7sC0udolsDY1pSnz5gufz6Vld97yvQTLuV+dj9cA/JMTvKgisO3aDg9fB1v3Mw3xLF8LRJPTjdZtXyFp6aUtxfbTXKQTfkNcOaBsXVAOT76AEGPcuwKeBTzOa035Bha12yRGPfz0c7LHIQdv5Q4Z3OAg= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1712068691; c=relaxed/simple; bh=Y1sG7VIUUVPMCpo0qsDmTH4ATB9HZrLVhV2pkvtHGLg=; h=Subject:To:From:Message-ID:Date:MIME-Version; b=ZtqvWfB4gi7XcdgyXOysMBHrPl0vB6QzZMFe91mVCzldj2mEBYscjRNVAN+mEMKLFkpUn387VB4QCouscSgUS5usLrQRNTi+bxOgYquoH2j+UyLS3OUiewlC9zDBWDV0dgmN9pRCIksMmZyVBM1gvKpcMpZVI3sEmpb9n0wY03k= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from mail.maildlp.com (unknown [172.19.163.174]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4V89Qp5RZ2ztRPR; Tue, 2 Apr 2024 22:35:30 +0800 (CST) Received: from canpemm500010.china.huawei.com (unknown [7.192.105.118]) by mail.maildlp.com (Postfix) with ESMTPS id 09A941400D6; Tue, 2 Apr 2024 22:38:04 +0800 (CST) Received: from [10.67.111.82] (10.67.111.82) by canpemm500010.china.huawei.com (7.192.105.118) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Tue, 2 Apr 2024 22:38:03 +0800 Subject: Re: [PATCH] elf: sanitize objname in _dl_signal_error To: Adhemerval Zanella Netto 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> CC: , , , , , From: Jiangfeng Xiao Message-ID: <0d0aaf71-4f20-0bc1-9ac7-f31f1b426398@huawei.com> Date: Tue, 2 Apr 2024 22:37:57 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.7.1 MIME-Version: 1.0 In-Reply-To: <3f6a6290-9136-4a72-a24b-7c6bb7965569@linaro.org> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.67.111.82] X-ClientProxiedBy: dggems704-chm.china.huawei.com (10.3.19.181) To canpemm500010.china.huawei.com (7.192.105.118) X-Spam-Status: No, score=-5.1 required=5.0 tests=BAYES_00,KAM_DMARC_STATUS,NICE_REPLY_A,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 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. 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.