From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f66.google.com (mail-wm0-f66.google.com [74.125.82.66]) by dpdk.org (Postfix) with ESMTP id 126551DB3 for ; Mon, 30 Apr 2018 16:07:23 +0200 (CEST) Received: by mail-wm0-f66.google.com with SMTP id t11so13436621wmt.0 for ; Mon, 30 Apr 2018 07:07:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=7e6xyKaJYu8/G9Iwo7pOlIqOGINfwDt4ZXkyus6yWyE=; b=tTQe+J08IuNl+aeBlmUOs/0MhqNhtuyUO7LJQxfxCO9QTJVQUu8Sr8l92tvARdhrZG ExxMoFvSgw3Uay1SL9PdYdTzEq+gg6krauocLI+QKZe5S0DZoMZ3AMO4Va90AC9XkxyF /WreQb2RzUHT6VWmtucz+rwmDSgXk3QNOk6pfCPZ7GBC7XfwZi1dgw8XyJcbkKAzAb3A GTcnJmb5nK03TtCIuzi67zJCw9nRcKY7vkjtV4waMkUb4zk/CBv7LVdOUSFcbnRa6rOS EZf1/cM5C2OilHaRQvrS1XOOCMT1AxWtmgQ7MEwdudtYIs0dchIOjn7C5nxZXYhI5SpR pZgg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=7e6xyKaJYu8/G9Iwo7pOlIqOGINfwDt4ZXkyus6yWyE=; b=oz0b+kXG7MnHKFS5oBP0vW0VlTOJh6O/NxSfRdkxUA8BvW848gJU9YA6dV1OJcupcy FPkSP3n2aTQmBTc57tgAT6h3sz+3ws/WVIOAGsbVLmY1PCa8gTrFkWniqxGTOMuQBK+l Bh3fV9bi1U2JDhJwGpa6VPa6MKEkxqS3I6/wpPbySAi4v33aa4ALO/BC+VnQE4KnehES /QdXxGGOwVEDUrYOvY1NfljBUpLY+RYvqIvb0ao6XMBs6zKBFAqIlzG+X5i17bnsQJAF sezMBGVwu9IQxtAcYrePxAXA1YpCW6asxJdqBEHkP6/RjVjU/5RrIxf5gUZKnkNCH5Zd zVlg== X-Gm-Message-State: ALQs6tBq5XQqVhdUis6JFxcECVyPoyit/ht9N4WaerFWogtDK99Mbuk7 Jk8bsgFLSFBCiaSMSZtYzFQ= X-Google-Smtp-Source: AB8JxZpg1fphhylwlc4MIZ2y7Z0iBP/qhlO4AD7aAPaWME24V0GEA5wdoTAQRWqPsZgr7QbcVjamCA== X-Received: by 10.28.11.78 with SMTP id 75mr7193774wml.32.1525097243526; Mon, 30 Apr 2018 07:07:23 -0700 (PDT) Received: from localhost ([2a00:23c5:be9a:5200:ce4c:82c0:d567:ecbb]) by smtp.gmail.com with ESMTPSA id x81-v6sm9804310wrb.23.2018.04.30.07.07.22 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 30 Apr 2018 07:07:22 -0700 (PDT) From: luca.boccassi@gmail.com To: Tomasz Kulasek Cc: Pawel Wodkowski , Jianfeng Tan , Maxime Coquelin , dpdk stable Date: Mon, 30 Apr 2018 15:03:15 +0100 Message-Id: <20180430140606.4615-37-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.14.2 In-Reply-To: <20180430140606.4615-1-luca.boccassi@gmail.com> References: <20180430140606.4615-1-luca.boccassi@gmail.com> Subject: [dpdk-stable] patch 'vhost: check cmsg not null' has been queued to stable release 18.02.2 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: , X-List-Received-Date: Mon, 30 Apr 2018 14:07:24 -0000 Hi, FYI, your patch has been queued to stable release 18.02.2 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 05/02/18. So please shout if anyone has objections. Thanks. Luca Boccassi --- >>From 450d3ee5ddd2ad0e3334c73dd1b7ba7775fa11c1 Mon Sep 17 00:00:00 2001 From: Tomasz Kulasek Date: Fri, 9 Feb 2018 18:05:00 +0100 Subject: [PATCH] vhost: check cmsg not null [ upstream commit aa001111b002a05bf126c688d06146c092c0795a ] Fixes: 8f972312b8f4 ("vhost: support vhost-user") Signed-off-by: Pawel Wodkowski Signed-off-by: Tomasz Kulasek Reviewed-by: Jianfeng Tan Reviewed-by: Maxime Coquelin --- lib/librte_vhost/socket.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/librte_vhost/socket.c b/lib/librte_vhost/socket.c index 83befdced..8fd47a4d8 100644 --- a/lib/librte_vhost/socket.c +++ b/lib/librte_vhost/socket.c @@ -153,6 +153,11 @@ send_fd_message(int sockfd, char *buf, int buflen, int *fds, int fd_num) msgh.msg_control = control; msgh.msg_controllen = sizeof(control); cmsg = CMSG_FIRSTHDR(&msgh); + if (cmsg == NULL) { + RTE_LOG(ERR, VHOST_CONFIG, "cmsg == NULL\n"); + errno = EINVAL; + return -1; + } cmsg->cmsg_len = CMSG_LEN(fdsize); cmsg->cmsg_level = SOL_SOCKET; cmsg->cmsg_type = SCM_RIGHTS; -- 2.14.2