From patchwork Thu Apr 26 10:52:12 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Stancek X-Patchwork-Id: 904984 X-Patchwork-Delegate: jan.stancek@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=lists.linux.it (client-ip=2001:1418:10:5::2; helo=picard.linux.it; envelope-from=ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Received: from picard.linux.it (picard.linux.it [IPv6:2001:1418:10:5::2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 40Wv636j5Xz9rxx for ; Thu, 26 Apr 2018 20:52:27 +1000 (AEST) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id 55E833E6508 for ; Thu, 26 Apr 2018 12:52:22 +0200 (CEST) X-Original-To: ltp@lists.linux.it Delivered-To: ltp@picard.linux.it Received: from in-5.smtp.seeweb.it (in-5.smtp.seeweb.it [IPv6:2001:4b78:1:20::5]) by picard.linux.it (Postfix) with ESMTP id B9FBC3E6004 for ; Thu, 26 Apr 2018 12:52:19 +0200 (CEST) Received: from mx1.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by in-5.smtp.seeweb.it (Postfix) with ESMTPS id D48F3600F10 for ; Thu, 26 Apr 2018 12:52:18 +0200 (CEST) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id AF8CF406EA5E for ; Thu, 26 Apr 2018 10:52:16 +0000 (UTC) Received: from dustball.brq.redhat.com (unknown [10.43.17.9]) by smtp.corp.redhat.com (Postfix) with ESMTP id 50EDB2166BAD for ; Thu, 26 Apr 2018 10:52:15 +0000 (UTC) From: Jan Stancek To: ltp@lists.linux.it Date: Thu, 26 Apr 2018 12:52:12 +0200 Message-Id: X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.7]); Thu, 26 Apr 2018 10:52:16 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.7]); Thu, 26 Apr 2018 10:52:16 +0000 (UTC) for IP:'10.11.54.6' DOMAIN:'int-mx06.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'jstancek@redhat.com' RCPT:'' X-Virus-Scanned: clamav-milter 0.99.2 at in-5.smtp.seeweb.it X-Virus-Status: Clean X-Spam-Status: No, score=-0.0 required=7.0 tests=SPF_HELO_PASS,SPF_PASS autolearn=disabled version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on in-5.smtp.seeweb.it Subject: [LTP] [PATCH] cve-2017-16939: drop linux/xfrm.h include X-BeenThere: ltp@lists.linux.it X-Mailman-Version: 2.1.18 Precedence: list List-Id: Linux Test Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it Sender: "ltp" Mixing libc and linux headers can cause conflicts on some distros. Drop linux/xfrm.h include and add needed defines to a new lapi header. Signed-off-by: Jan Stancek Tested-by: Petr Vorel --- include/lapi/xfrm.h | 29 +++++++++++++++++++++++++++++ testcases/cve/cve-2017-16939.c | 2 +- 2 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 include/lapi/xfrm.h diff --git a/include/lapi/xfrm.h b/include/lapi/xfrm.h new file mode 100644 index 000000000000..013199b1a092 --- /dev/null +++ b/include/lapi/xfrm.h @@ -0,0 +1,29 @@ +/* + * Copyright (c) 2018 Linux Test Project + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + * + * This program is distributed in the hope that it would be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write the Free Software Foundation + */ + +#ifndef __XFRM_H__ +#define __XFRM_H__ + +#ifndef XFRMNLGRP_NONE +# define XFRMNLGRP_NONE 0 +#endif + +#ifndef XFRM_MSG_GETPOLICY +# define XFRM_MSG_GETPOLICY 21 +#endif + +#endif diff --git a/testcases/cve/cve-2017-16939.c b/testcases/cve/cve-2017-16939.c index 223ca834b8db..a4a38ba34375 100644 --- a/testcases/cve/cve-2017-16939.c +++ b/testcases/cve/cve-2017-16939.c @@ -30,8 +30,8 @@ #include #include #include -#include +#include "lapi/xfrm.h" #include "tst_test.h" #include "tst_res_flags.h" #include "tst_safe_macros.h"