From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id EB35BA04F3 for ; Fri, 20 Dec 2019 15:44:00 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id DE8D61F1C; Fri, 20 Dec 2019 15:44:00 +0100 (CET) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) by dpdk.org (Postfix) with ESMTP id 0DB791F1C for ; Fri, 20 Dec 2019 15:43:59 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1576853039; 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=FAf3a1WOrc2pXp0ea2Qhu8UgczwYA0IbThTj1LFh8KY=; b=RgNV68S5qOErRgVnet3hi0nAnEf3VcSNHNP0ncwjMI3SHEGauC4BLeYPze2gZVJOeVxiFU VE6H7VllXdm9amA9Ud3O8AO+N9Y6d8sErmOHS3bjMogFq2zCq9+ZKdrYvJ03HwBX8A99xY 28m/I4yt42bVNsoqnv39Emr6K8U8lpk= Received: from mail-vk1-f199.google.com (mail-vk1-f199.google.com [209.85.221.199]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-116-jqo0-Sy3NXKeSEfNoLvYxQ-1; Fri, 20 Dec 2019 09:43:58 -0500 Received: by mail-vk1-f199.google.com with SMTP id q189so4017052vkq.8 for ; Fri, 20 Dec 2019 06:43:57 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=odxALz6Bb5PI+7IVqwxsCTo9Vsmx3sB/jlUwOavhTbE=; b=NKxuTPObc8v7awgbX3E7kEk8cU1mP4Zhs4qKLcfeg91zm/HUyKdQJxWcpmsmebnbkS aEZCWbR20MPDBLGynpmNOfD/XBSDHKkZE/MBCLcB9AzS2vZnWcHNkRAixlHk1qguqaKP /IlsGBEYqgMwGsMYP+HkhE2C2alvO9U3tC8LigYHqnpiSoMeWoy3F+uVtsE9OXhSUF46 NlVIi8sqNmakEj3an/xtOFkFRsbd7BvHU2lki0iUzZviHE/sR/XlgiRmH59ANcPgD68W 5cmBc4nVUVrmtwJQGgSMsnVH74xJLZIaZD5NqQGbOGkTke1D9XV+A/unKKuXLicMo4Hk l9Pw== X-Gm-Message-State: APjAAAXYdZxz7QnDIWbBqkd8icL8TpdvtYsdQryaIUace9VjtJWv3lzj bFARr11XZqMdPnYvAYOD2B7Nqt0rgOC1/ZjJdOFWWBD+/wYuhwbX4GfA4Y4YoMPxIArl4nR+ujf CJFr9rSAJwhBxCw4EPWUP2Tk= X-Received: by 2002:a67:b303:: with SMTP id a3mr8601423vsm.141.1576853037615; Fri, 20 Dec 2019 06:43:57 -0800 (PST) X-Google-Smtp-Source: APXvYqweRUao1hJA0K1Bsi8Y6AZbzo8K7Piol4a7O+7JhiTRC9Qf33UUEHLEp0/oB+pM6SbS+rUUk0mDf8UaRJYmfCc= X-Received: by 2002:a67:b303:: with SMTP id a3mr8601409vsm.141.1576853037421; Fri, 20 Dec 2019 06:43:57 -0800 (PST) MIME-Version: 1.0 References: <20191126145606.13626-1-aconole@redhat.com> <20191203211544.20285-1-aconole@redhat.com> In-Reply-To: From: David Marchand Date: Fri, 20 Dec 2019 15:43:46 +0100 Message-ID: To: Aaron Conole Cc: dev , Harry van Haaren , Bruce Richardson , Pavan Nikhilesh , Gage Eads , Thomas Monjalon , dpdk stable X-MC-Unique: jqo0-Sy3NXKeSEfNoLvYxQ-1 X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Subject: Re: [dpdk-stable] [PATCH v2] service: don't walk out of bounds when checking services X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 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 Sender: "stable" On Wed, Dec 4, 2019 at 9:34 AM David Marchand w= rote: > > On Wed, Dec 4, 2019 at 9:33 AM David Marchand = wrote: > > > > On Tue, Dec 3, 2019 at 10:15 PM Aaron Conole wrote= : > > > > > > The service_valid call is used without properly bounds checking the > > > input parameter. Almost all instances of the service_valid call are > > > inside a for() loop that prevents excessive walks, but some of the > > > public APIs don't bounds check and will pass invalid arguments. > > > > > > Prevent this by using SERVICE_GET_OR_ERR_RET where it makes sense, > > > and adding a bounds check to one service_valid() use. > > > > > > Fixes: 8d39d3e237c2 ("service: fix race in service on app lcore funct= ion") > > > Fixes: e9139a32f6e8 ("service: add function to run on app lcore") > > > Fixes: e30dd31847d2 ("service: add mechanism for quiescing") > Cc: stable@dpdk.org > > > > Signed-off-by: Aaron Conole > > > > Reviewed-by: David Marchand Applied, thanks. -- David Marchand