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 2578DA0350 for ; Wed, 6 May 2020 15:22:57 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 0096C1D9E9; Wed, 6 May 2020 15:22:57 +0200 (CEST) Received: from us-smtp-delivery-1.mimecast.com (us-smtp-2.mimecast.com [205.139.110.61]) by dpdk.org (Postfix) with ESMTP id 8EB301D9C3 for ; Wed, 6 May 2020 15:22:54 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1588771373; 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=3R18gd4hbiV9Lavj+6LS5rZPVe4qSbzGXDNGrjRyfEg=; b=VRkI8dkTyJzvHXh/mTyBbx1xXnyTY+bdFGZQepxndieXqH11YeO2OVbdJsvDEeBk9fTlX1 oCjNiM4oftDZJg3UNSw+yG3unL4VNf/MPMwww2xmgoHG/bYQL/AtzERMHHnIyHJr2IepO7 uF/Ce3ToThJ77EF3iAhJsNZKMjyiOFE= Received: from mail-vs1-f69.google.com (mail-vs1-f69.google.com [209.85.217.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-390-ANfx3MGbPP6svYJ-9T68fA-1; Wed, 06 May 2020 09:22:52 -0400 X-MC-Unique: ANfx3MGbPP6svYJ-9T68fA-1 Received: by mail-vs1-f69.google.com with SMTP id s25so267936vso.16 for ; Wed, 06 May 2020 06:22:52 -0700 (PDT) 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=Arn78UDwzfWibc+BLKPvGFN7OvQtc3WR5vWM4skh2oY=; b=DCTXKTYFRa5c/VsCH+xXmsiabdgSaN7XPBeUc1/rPIOPYjBeMtSoVtOiBr0i4MmeZs Y+nJ7f55QXCdOC6ExU6ArLajU6Dg04V6ffHO2ysaVLwY41TSVdM0zOsQ4UF8UJgb2yKp CTHXVg3j5qhvIOzXAJxkCXXDaCc6exMtG3o31RyOF205CoDOpcYrqOCTfD2PXLFNCrpU d0BOsJhIPikbrCFqI/G+bjSBsY2FgFOYe8fZt6z1Q6EvcWX3X07VlA7VnS4TdHuLzZdT eA7w+TFaj5ohWYOfavvKBnFN4sRbwfwSMNShYP+jIsb+ZcoxAkjzJXx2Z3m5MfiQXCoK B0HQ== X-Gm-Message-State: AGi0PuZqpQfzVYgXrMugknB2zblWYn/Dk+2G7+OCzcTaXc1YOip1b5Rj p5Vec1UJumIw7YPTM91P+3zqy3dS1yzxGpVexx5y4H2mG6EuqR1yNghfDU8usGWYJtDH925Gl1P 4+Ha5N8Iyqr+T+y9vZxOV22I= X-Received: by 2002:a67:ff95:: with SMTP id v21mr7452861vsq.105.1588771371917; Wed, 06 May 2020 06:22:51 -0700 (PDT) X-Google-Smtp-Source: APiQypIitbq9JtGJH0+fxu4Lvj0LlSCEvfLeC9pcHSdnH1pEpXDf/i6tVHi8drxxWRIMEdiqJ3lPLGIepYyIx4/DbiY= X-Received: by 2002:a67:ff95:: with SMTP id v21mr7452829vsq.105.1588771371622; Wed, 06 May 2020 06:22:51 -0700 (PDT) MIME-Version: 1.0 References: <20200429131700.25294-1-olivier.matz@6wind.com> In-Reply-To: <20200429131700.25294-1-olivier.matz@6wind.com> From: David Marchand Date: Wed, 6 May 2020 15:22:40 +0200 Message-ID: To: Olivier Matz Cc: dev , dpdk stable X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Subject: Re: [dpdk-stable] [PATCH] kvargs: fix crash when parsing an invalid token on FreeBSD 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, Apr 29, 2020 at 3:17 PM Olivier Matz wrote= : > > The behavior of strtok_r() is not the same between GNU libc and FreeBSD > libc: in the first case, the context is set to "" when the last token is > returned, while in the second case it is set to NULL. > > On FreeBSD, the current code crashes because we are dereferencing a NULL > pointer (ctx1). Fix it by first checking if it is NULL. This works with > both GNU and FreeBSD libc. > > Fixes: ffcf831454a9 ("kvargs: fix buffer overflow when parsing list") > Cc: stable@dpdk.org > > Signed-off-by: Olivier Matz Tested-by: Zhimin Huang Applied, thanks. --=20 David Marchand