From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 9083C41BDF; Sun, 5 Feb 2023 22:08:49 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 432E840A7D; Sun, 5 Feb 2023 22:08:49 +0100 (CET) Received: from mail-pj1-f44.google.com (mail-pj1-f44.google.com [209.85.216.44]) by mails.dpdk.org (Postfix) with ESMTP id B320640041 for ; Sun, 5 Feb 2023 22:08:47 +0100 (CET) Received: by mail-pj1-f44.google.com with SMTP id f16-20020a17090a9b1000b0023058bbd7b2so8878614pjp.0 for ; Sun, 05 Feb 2023 13:08:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=kIjuW0vdaRVva2gIo4WAzwVRwb2kvyt+wQ5UUDKSAQk=; b=E83LoJml/aVJN1T9UM01buRzP4OfBsHwxkxXUzlwO1DJFnZjb12F0ENfSTwcq5W5w8 oVq604QkApZUUi8jrlHlJ7+P5GyI6f9vsoA4KgPaXVigHeCxwQh30vWWKQf8e/nb5pk5 x4Yybn9XENPGk0C8u3WhvkRRo/rGglBQ93kajRxA4BzkUILZ42kaKtkCVNvi4E1BsBsI Zpxti+RkMFeMoWEkaXtGEyU995UNJJrRvxDO/ReOKsqKNkVASUXCBWwSD+aX3fFjB0Yl WH9jaKR3gjt2mcQ7eVs6U6P9GNfgtxasNDm/AINa1OiNk+ZiGhkM9Svph5hg5MulwDrO jrLQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=kIjuW0vdaRVva2gIo4WAzwVRwb2kvyt+wQ5UUDKSAQk=; b=6neRie2Ke8ncu1BM+mkppB3zJAVxw1S+kR5vglyEcjxO0+oTEiZnkMURhPJ2p/ASgH fnar2fIibDAktuFfBOV48V55eF95x4Da5OEsbYsIyaTu7wqh+0r2WoH4Rbt2Rxx0CmUk dZ254KHY0RLRmFiuFqKEcCFX3dVhsuZoMOx3gsjXOmwC7njdMt2CgE3agyrYddnp5537 URahl3vzKoc5ZxoNxLKr5e+Vj3n8mj6pEkCqP3rS/19umFzAWjyaYWF4uoASks+xZK9W KwtD2Y2Os2Mg48LyQfXH8WAvgX8G8trZyflcjr/xXMj2PijztUbAyN8TP7hGZo+9S8mH wntw== X-Gm-Message-State: AO0yUKVOqTZUoJJCGnHs85z8Kim8+UJzTJW/gD+pt7ckjyBrSC4KhIrt pH8d4Cy9agR0YhJthzSLHr7POg== X-Google-Smtp-Source: AK7set/lyhrwYIVsXmsPTOIKU9GCVyShSAPxqM2FHwJS9iqyHdJ3lsgHWSDzpNE9dZrl4HldZH6EMg== X-Received: by 2002:a17:90b:4a8f:b0:22b:f035:c09c with SMTP id lp15-20020a17090b4a8f00b0022bf035c09cmr18600335pjb.4.1675631326840; Sun, 05 Feb 2023 13:08:46 -0800 (PST) Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218]) by smtp.gmail.com with ESMTPSA id l14-20020a17090a598e00b0022bbad75af4sm5052367pji.2.2023.02.05.13.08.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 05 Feb 2023 13:08:46 -0800 (PST) Date: Sun, 5 Feb 2023 13:08:44 -0800 From: Stephen Hemminger To: Isaac Boukris Cc: dev@dpdk.org Subject: Re: BUG: AddressSanitizer reports a buffer-overflow on rte_hash_lookup Message-ID: <20230205130844.024c22fc@hermes.local> In-Reply-To: References: <20230205114921.605de31a@hermes.local> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On Sun, 5 Feb 2023 22:14:28 +0200 Isaac Boukris wrote: > > > > This code is using the common optimization of doing a full 32 bit access > > and masking the result. This will read past the end of the passed input > > but ignore the extra bytes. It won't be a problem unless the application > > goes out of its way to put a hash key value at the end of a mapped > > region. > > Ack, fwiw it still makes it trickier to use AddressSanitizer in user app. Probably can be fixed with some annotations.