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 236DF424B4 for ; Sun, 29 Jan 2023 10:26:04 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1246040EDB; Sun, 29 Jan 2023 10:26:04 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id A7FE940ED4 for ; Sun, 29 Jan 2023 10:26:02 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1674984360; 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: in-reply-to:in-reply-to:references:references; bh=n7e4r8HV0pbp1Ovs5QFaXJ/TBY1Up324C1vqxqC7TGc=; b=NsUsxHYrSVLYgET1Y8A80ekactv8gMW4TzguRDtd/O0NaARp2OaklYgXFwifs19Cg7Eiwl hWoKhTINIubFiLt51XoLtXCG7fn0gP6Gqcem2NkYYZDACbieCRnFX1vU+aRWNKaaHTE4ii 5KCSU+VPOe1Hvp7yKOlBskZsRY1IV4w= Received: from mail-pf1-f199.google.com (mail-pf1-f199.google.com [209.85.210.199]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-663-LQSOzAbdMT-AUcbL3YpUIQ-1; Sun, 29 Jan 2023 04:25:58 -0500 X-MC-Unique: LQSOzAbdMT-AUcbL3YpUIQ-1 Received: by mail-pf1-f199.google.com with SMTP id z2-20020a626502000000b0059085684b50so4106400pfb.16 for ; Sun, 29 Jan 2023 01:25:58 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=n7e4r8HV0pbp1Ovs5QFaXJ/TBY1Up324C1vqxqC7TGc=; b=uX419fVn1yrG/FC5uuiqQDe/hyWVZUpfoMwaU344WMIhTeTJdAKzh+2UYXy946bY0S zxm3i2z3knP/FJ06CLAWhlu41B/ZD4KmgJwp1NvWZj+nVKCMsVaklZH51MaU6eU6bfXJ Aeoal4uKhSS3KtKMvvvyOFUn2tLvkZ5/KxONrePZi/IvN//v2FbfbIjS2EmdYm6ra6HE sch4x4r8XOtHvbVT2bx7d7EQ/5sJRB/+Bz9GZN8dreRYLs0nJm8fwg41DN0tX4jwnLTo Rq53rzBopf1aRW2SG1LzqwTVCB6CSevEqnBzoAvw2+O7QINhE0x2OJaq5aUD1C1hTJV5 aaTA== X-Gm-Message-State: AFqh2kqw2Rsk9KZswhMJMneXDHfYsDf8owT7OE9k2OLpYuTpDYBPGPwz KM50hUzJAJF05suKPy/CZyzl5xKSZwugL1o//52ifxFqgkWYyBZWKLPrS1AyWCsrcfFc217Rx0p A7YaTjQfBjD/XW4w/XiL6610= X-Received: by 2002:a05:6a00:f07:b0:577:62a8:f7a1 with SMTP id cr7-20020a056a000f0700b0057762a8f7a1mr5422134pfb.2.1674984357856; Sun, 29 Jan 2023 01:25:57 -0800 (PST) X-Google-Smtp-Source: AMrXdXtt2jFxjRfmWjb6zDkYOQXCGyhS5ukw1KOK/dNj26WwDO9NoJ733wl03jEADEO/QfcYC2jPDH/xr9I7ZTQ6CTE= X-Received: by 2002:a05:6a00:f07:b0:577:62a8:f7a1 with SMTP id cr7-20020a056a000f0700b0057762a8f7a1mr5422130pfb.2.1674984357573; Sun, 29 Jan 2023 01:25:57 -0800 (PST) MIME-Version: 1.0 References: <20230127165540.37863-1-maxime.coquelin@redhat.com> <20230127165540.37863-2-maxime.coquelin@redhat.com> In-Reply-To: <20230127165540.37863-2-maxime.coquelin@redhat.com> From: David Marchand Date: Sun, 29 Jan 2023 10:25:46 +0100 Message-ID: Subject: Re: [PATCH v2 1/2] vhost: fix possible FDs leak To: Maxime Coquelin Cc: dev@dpdk.org, chenbo.xia@intel.com, stable@dpdk.org X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" 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 Fri, Jan 27, 2023 at 5:55 PM Maxime Coquelin wrote: > > On failure, read_vhost_message() only closed the message > FDs if the header size was unexpected, but there are other > cases where it is required. For exemple in the case the > payload size read from the header is greater than the > expected maximum payload size. > > This patch fixes this by closing all messages FDs in all > error cases. > > Fixes: bf472259dde6 ("vhost: fix possible denial of service by leaking FDs") > Cc: stable@dpdk.org > > Signed-off-by: Maxime Coquelin Reviewed-by: David Marchand We mentionned offlist that the request type can be logged to help with debug. Do you intend to add this as a follow up patch? -- David Marchand