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 359D1A04F3; Fri, 20 Dec 2019 15:44:01 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 192715681; Fri, 20 Dec 2019 15:44:01 +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 124132C19 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-ua1-f72.google.com (mail-ua1-f72.google.com [209.85.222.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-52-OgML5MKYPoWET7gIYde-bQ-1; Fri, 20 Dec 2019 09:43:58 -0500 Received: by mail-ua1-f72.google.com with SMTP id b18so841175uap.14 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=Pud2DOVX2RQVrNjV0IDyZ0Dnbt1L+NlqiRBy5K+K0c4xMcBttqMqOqLOyC1DOh/V9H QCb8M0E+Tyxff2nU7gd6AdXYbkowPKYfnwl+LTT/p2zGBt4wit2NSGw7cxjUJTz8Rmep uvm15X45VUv+M4q3HDveSmh5CCb77+sWEK+IImJk2k7Fu07Tu+vmcmMxjfBOwEJMbIAR LKT7k4LrWAkDb3fvurZByNL5bu6sh9CrWMA4uawC3v4hszWCAx9hP/BfJFrwA7fOmqHp NIq6mH3WDA5F/rqEWKYesCYbAbxOpPV+OGziPb5TuNDA4NEOVYUKgUlyPlIQkn3/NM/O gcxg== X-Gm-Message-State: APjAAAVgecUIVdtD21vFXfYOJpBXpAwbSOnDjXRMWwKIaM+NYUrBTWHb xQcsYn7659nKSJ9hKmNb9/kVitN1U4JZ3VUPpfIAG2Z9zsO9z45gy7zn6Y9lWlGQ/L+YKAKi4UO FyetR1bEkURtiei5u7jU= X-Received: by 2002:a67:b303:: with SMTP id a3mr8601429vsm.141.1576853037618; 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: OgML5MKYPoWET7gIYde-bQ-1 X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Subject: Re: [dpdk-dev] [PATCH v2] service: don't walk out of bounds when checking services X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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