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 DDC70424B3; Sun, 29 Jan 2023 10:26:03 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0B01840ED6; Sun, 29 Jan 2023 10:26:03 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id 205FF40ED4 for ; Sun, 29 Jan 2023 10:26:01 +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-pg1-f199.google.com (mail-pg1-f199.google.com [209.85.215.199]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-518-8chJ076VPxGAIPUGcsh9-g-1; Sun, 29 Jan 2023 04:25:58 -0500 X-MC-Unique: 8chJ076VPxGAIPUGcsh9-g-1 Received: by mail-pg1-f199.google.com with SMTP id e8-20020a6558c8000000b004e2d5f7b1d4so1341025pgu.20 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=Vldw4zc218SBnZKQM6Z/vZtlKQUQquvBcZppeWLC1ya/IJPqUyQfjlK83GvMkG6klP eqOn8ZVl8T6AyTB233C57x4f6MzAMTdFCZCoGNbY3WyD9Up7TklQub06Eaiup7fpYczA JeDQDSIuqPwu2/fFisJ/5Jg2vUjVhxP8WVfOiZtqBSqil+D7Zr7qlyktT4kp4VcJHemL tKDdMs22XwKhSGSTd6ONDBSW4N9wYcOAzHa3gjOkHhSnu00sXlAHewrNEtnHW6hZHlfu zy7U+SNJZ6PNJNqjnkiXx1zfTQT8lHKQGbe3XOuiuzM9+jyNipD1ibZa7FW6uMII4Tpu k8XQ== X-Gm-Message-State: AFqh2krnPC+x2R9LYOLUzHoJUps0IvxIrPSDWzwxctpK/sIVPeFmmvuH IJnTPiSPT1lHjqD9Ef15QsBLZikuxoEPUyqCgcjjcwKewk5/XMocf2BksmNcJ2tBEYdLzNoMo64 tVPmAabbzbFwn2CSTHR0= X-Received: by 2002:a05:6a00:f07:b0:577:62a8:f7a1 with SMTP id cr7-20020a056a000f0700b0057762a8f7a1mr5422135pfb.2.1674984357877; 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: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-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