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 C64CDA034F for ; Sat, 5 Feb 2022 18:21:44 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A093540143; Sat, 5 Feb 2022 18:21:44 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id BC1B940143 for ; Sat, 5 Feb 2022 18:21:43 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1644081703; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=IwJUC2zJan3rH1bflNwaPN+xFVA4twICtUEAR79A4yI=; b=RZnH+Rs/gEiREzjBkgVp2IbAbikCUMuNS7BNDEjg3/EbYBfs2z3oyj4ekMx0a1fEANrtJs 0w0VVmPjuRtqjCSyJec/avGJgRcH2O5WzrlateWk2gXoG2+1jlBp2eocLLQubwUdkIWZkO DN2w2KSZY+0OJSeWP6XI0ZmQEaDHqcY= Received: from mail-lj1-f197.google.com (mail-lj1-f197.google.com [209.85.208.197]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-662-VUI6ZCdyPzeeP8hqCfAFFw-1; Sat, 05 Feb 2022 12:21:42 -0500 X-MC-Unique: VUI6ZCdyPzeeP8hqCfAFFw-1 Received: by mail-lj1-f197.google.com with SMTP id bd23-20020a05651c169700b0023bc6f845beso2376193ljb.17 for ; Sat, 05 Feb 2022 09:21:41 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=IwJUC2zJan3rH1bflNwaPN+xFVA4twICtUEAR79A4yI=; b=t/0c/pJkbm9OdaaUY9enQIHE8b9nWfZ18qAAK64tpsQKGwfkIaQajG1kuKTRGJ4FlR vXrPIFPdgu6GDU3Lqx2TljtTlnFLWanN/maCTtfa84LpLYhjcY0LeamSmhjmR4J8xmON 5SLGT2ExxiSEP/a76Oybk05MwR7/c2UjMt07uOwODKgfipwAkeP4FUfBOcXH6xP79bKf O0t5ct1q4YyyR90U2hDuikCnY9T8hFV8NT/DsctTBrBByVQS8+ix9aGvoBkldcLn/iGE Sae46UHv/Z/zkcJf/qG9cFaHa4Glyqi1hPChrK8qqA+JintJn8qwi9/Nvyurd910JhFM 2rNw== X-Gm-Message-State: AOAM530K+CuT5Lfpngy5De+LCjDED3fxB7zyxsEGULnFhSPZ9n/4YhB7 eVOwA+AUMcpuoTlvhmR5eTtU7qO7Cdw8rfHHwOe8+JzLjjvUfujAsnznmhGQ5r7uKQ8v3dR9Cck buQdbu8JJYmUUNFADLvmNnJg= X-Received: by 2002:a05:6512:3b90:: with SMTP id g16mr3167640lfv.575.1644081700544; Sat, 05 Feb 2022 09:21:40 -0800 (PST) X-Google-Smtp-Source: ABdhPJz5lguV+oYooYGugBMip7ltkmo2ztpr8pPN40ZkoRg/O3LXlPlhIFf0ZVpIj4KiQK8pDr2jlXW6Uolwk/MB2aw= X-Received: by 2002:a05:6512:3b90:: with SMTP id g16mr3167633lfv.575.1644081700347; Sat, 05 Feb 2022 09:21:40 -0800 (PST) MIME-Version: 1.0 References: <20211214033016.29927-1-wangzhihong.wzh@bytedance.com> In-Reply-To: <20211214033016.29927-1-wangzhihong.wzh@bytedance.com> From: David Marchand Date: Sat, 5 Feb 2022 18:21:29 +0100 Message-ID: Subject: Re: [PATCH] ring: fix overflow in memory size calcuation To: Zhihong Wang Cc: "Ananyev, Konstantin" , Honnappa Nagarahalli , dev , dpdk stable , liangma@liangbit.com, =?UTF-8?Q?Morten_Br=C3=B8rup?= Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=dmarchan@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org On Tue, Dec 14, 2021 at 4:30 AM Zhihong Wang wrote: > > Parameters count and esize are both unsigned int, and their product can > legally exceed unsigned int and lead to runtime access violation. > > Fixes: cc4b218790f6 ("ring: support configurable element size") > Cc: stable@dpdk.org > > Signed-off-by: Zhihong Wang Reviewed-by: Liang Ma Reviewed-by: Morten Br=C3=B8rup Acked-by: Konstantin Ananyev Applied, thanks. --=20 David Marchand