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 4A700A04B5 for ; Wed, 4 Dec 2019 09:34:56 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 3781A1BE83; Wed, 4 Dec 2019 09:34:56 +0100 (CET) Received: from us-smtp-delivery-1.mimecast.com (us-smtp-1.mimecast.com [205.139.110.61]) by dpdk.org (Postfix) with ESMTP id 41BD11BE83 for ; Wed, 4 Dec 2019 09:34:54 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1575448493; 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=NpI1zB82b2EOtLRrWJbDpnNYARbK7WEoT/VdHLZwKE4=; b=c7Fc1H2gB8iuBnc+fM+qPPwjuz0kOENRpdwnLMcCTnJAW4nIMuzKweUK/yrcCFRxIhuwm8 jHuOqADOwUlLNh2/iX9aeWs8HaelNYmVHjPNRsRsnMYFDRsXM258rxpEc00Sc9wANxVCnd 70cX5KFCqxm8ElPiW0LXlnKVM2usdao= 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-332-O9n3NJDBOueXLj1FQE9fvg-1; Wed, 04 Dec 2019 03:34:50 -0500 Received: by mail-vk1-f199.google.com with SMTP id b2so785223vke.8 for ; Wed, 04 Dec 2019 00:34:50 -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=Ct2JQqjN0jAPkp7VMSaR75EpdjxuJfXsyHQ3jkVhy0E=; b=HSCBLkDYLB6rr9Ep1A+klpkwuND1LbLybNQmDCKPoTrBQTLAIattdbwb307bgMhhdz /f+b6vtq4/yjsR8fZOZxyQen9VYS5YaKyW32Q459kkGtxUX0H+OudWolwEE+vCwUwAsx Ap00BYvaQ5hwoaqsLzGvStLI6SYv7ZOKBoAOocrysiISaSZFhBQuTilNzZ+uJikzcWsJ vk6BD4B83vbwpyA4rIo2fTtfH95b+VSaaM9iIMFmaevR9BLwKwbAprpyns21Zl8QSr4T Vf9tZyPhhNqkgrSB7nGKuukeuNV2qsH9U8n8qwoKW+54eOVwCh6zFVbjdhMca3kg/ObN +01A== X-Gm-Message-State: APjAAAXE62XBQC5gBcDeH5FDei2DQgiQdenZiA6tCTgwcXkGdgxpQ7yI vXd47ckXpQXpheZjUZdg9mQs4fcMMwC/Zwcpp6dEFOqt2AjCpU9F7vvNOrAqJ9uyIKOyR0sX0gs VT00CWaSfLsK3HCNRcPWCHhA= X-Received: by 2002:a67:b303:: with SMTP id a3mr863831vsm.141.1575448490036; Wed, 04 Dec 2019 00:34:50 -0800 (PST) X-Google-Smtp-Source: APXvYqx6hRJSzNAP55zIlHsKezXTi6yhn21hT1orAcdihsZ8qDIrWFIvr/XXaeu5C6gsesSZopXhrQaOxJCH5RUZjnM= X-Received: by 2002:a67:b303:: with SMTP id a3mr863817vsm.141.1575448489698; Wed, 04 Dec 2019 00:34:49 -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: Wed, 4 Dec 2019 09:34:36 +0100 Message-ID: To: Aaron Conole Cc: dev , Harry van Haaren , Bruce Richardson , Pavan Nikhilesh , Gage Eads , Thomas Monjalon , dpdk stable X-MC-Unique: O9n3NJDBOueXLj1FQE9fvg-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:33 AM David Marchand w= rote: > > 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 functio= n") > > 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 --=20 David Marchand