From patchwork Sun Mar 13 18:40:24 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Cristian_Rodr=C3=ADguez?= X-Patchwork-Id: 1604817 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=lob+YLWi; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=8.43.85.97; helo=sourceware.org; envelope-from=libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org; receiver=) Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4KGpRK0yf0z9sGF for ; Mon, 14 Mar 2022 05:41:32 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 041723858406 for ; Sun, 13 Mar 2022 18:41:29 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 041723858406 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1647196889; bh=cKaSYBDsTT45UJsyDv/oID0+44Ot23TGI/0MQb0bPxY=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=lob+YLWi7UhDr/4rdGNHM5EZBZF/ny5jDdtSEKBABU0Lfk6j6H4KhpFTW4cV7/UjW ZBGxsaNnqDB/A9nB/ufkTWejipVfQ944gHZjKRw/THb6LpVNd77W0OxJIywY6EMcL5 ZUxztMwuLHEFG+MnnAPFK7Uk0XN2/er5yllOPW2E= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-oo1-f48.google.com (mail-oo1-f48.google.com [209.85.161.48]) by sourceware.org (Postfix) with ESMTPS id 724293858C78 for ; Sun, 13 Mar 2022 18:41:14 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 724293858C78 Received: by mail-oo1-f48.google.com with SMTP id g5-20020a4ae885000000b003240bc9b2afso4968999ooe.10 for ; Sun, 13 Mar 2022 11:41:14 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=cKaSYBDsTT45UJsyDv/oID0+44Ot23TGI/0MQb0bPxY=; b=Tj9InOqJCiFvry66nQg87ttbVBhpk1AD4v2GlfeEbEHPPXE838AKaOjlEKQTiPe4aM B8Mj2621F9keEA4PfqdVToSnMYbWh6oJDCBcNfOozW9Mi+nJneqBDrlHCbRKyIW8pV4A LjBoL1n7XhF74/HRh3CkQsCEIxQRooSgnD/EIXigwTxEqlzfie39KwyRH++CUxkh8QRa lkoYo0yPcGiy9axSvej/xJfkpuI2LHyyaRdsQ3yAU2tkF17i81pfSV0KG3gyFwDIvpsJ XtM9GPdXNcL6hZ+AlTm0OF68Kr0vPtDYVWynAxNMmr0oVFupMBIOezwHyKtILmDR7aWY YrHw== X-Gm-Message-State: AOAM532exRoF/KsQHfIUoy5H5sFtIM21zh17EuGEyj8c1M6FD3OPnwtm tK4kV29oTX1JR8Tg6p9TexsdoMRm5dU= X-Google-Smtp-Source: ABdhPJzeH4lJTed1pE6tO7tVb2GMYtegotrh98UPP+u3sBpZzRrpCrLGTKQytOtl2uroeqRo9fPgYQ== X-Received: by 2002:a4a:9dc1:0:b0:320:d90d:997f with SMTP id y1-20020a4a9dc1000000b00320d90d997fmr8747995ook.29.1647196873524; Sun, 13 Mar 2022 11:41:13 -0700 (PDT) Received: from tumbleweedvm.. (181-162-26-248.baf.movistar.cl. [181.162.26.248]) by smtp.gmail.com with ESMTPSA id d12-20020a056871040c00b000d9eed0f8fdsm5690051oag.14.2022.03.13.11.41.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 13 Mar 2022 11:41:13 -0700 (PDT) To: libc-alpha@sourceware.org Subject: [PATCH] debug: Improve fdelt_chk error message Date: Sun, 13 Mar 2022 18:40:24 +0000 Message-Id: <20220313184024.10130-1-crrodriguez@opensuse.org> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 X-Spam-Status: No, score=-10.5 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, GIT_PATCH_0, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, KAM_SHORT, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: =?utf-8?q?Cristian_Rodr=C3=ADguez_via_Libc-alpha?= From: =?utf-8?q?Cristian_Rodr=C3=ADguez?= Reply-To: =?utf-8?q?Cristian_Rodr=C3=ADguez?= Errors-To: libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org Sender: "Libc-alpha" It is not a "buffer overflow detected" but an out of range bit on fd_set Signed-off-by: Cristian Rodríguez Reviewed-by: Siddhesh Poyarekar --- debug/fdelt_chk.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/debug/fdelt_chk.c b/debug/fdelt_chk.c index c5f16462ad..30f5a4bec1 100644 --- a/debug/fdelt_chk.c +++ b/debug/fdelt_chk.c @@ -15,6 +15,7 @@ License along with the GNU C Library; if not, see . */ +#include #include @@ -22,7 +23,7 @@ long int __fdelt_chk (long int d) { if (d < 0 || d >= FD_SETSIZE) - __chk_fail (); + __fortify_fail ("bit out of range 0 - FD_SETSIZE on fd_set"); return d / __NFDBITS; }