From patchwork Wed Jan 9 13:32:05 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Palethorpe X-Patchwork-Id: 1022430 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=none (p=none dis=none) header.from=suse.com Received: from picard.linux.it (picard.linux.it [IPv6:2001:1418:10:5::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 43ZVRZ1jxhz9s7h for ; Thu, 10 Jan 2019 00:32:24 +1100 (AEDT) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id 7B039294A8E for ; Wed, 9 Jan 2019 14:32:21 +0100 (CET) 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 [217.194.8.5]) by picard.linux.it (Postfix) with ESMTP id 8875F294A74 for ; Wed, 9 Jan 2019 14:32:19 +0100 (CET) Received: from mx1.suse.de (mx2.suse.de [195.135.220.15]) (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 DFBA4600BAF for ; Wed, 9 Jan 2019 14:32:17 +0100 (CET) Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 8E901AEE3; Wed, 9 Jan 2019 13:32:16 +0000 (UTC) From: Richard Palethorpe To: ltp@lists.linux.it Date: Wed, 9 Jan 2019 14:32:05 +0100 Message-Id: <20190109133205.31061-1-rpalethorpe@suse.com> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20190109120129.GA19502@rei> References: MIME-Version: 1.0 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_PASS autolearn=disabled version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on in-5.smtp.seeweb.it Cc: Richard Palethorpe Subject: [LTP] [PATCH] Check recvmmsg exists before entering fuzzy loop 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: , Errors-To: ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it Sender: "ltp" Avoid thread B entering infinite loop if recvmmsg doesn't exist causing tst_brk to be called and thread A to make an ungraceful exit. A more general fix can be added to tst_fuzzy_sync as well, but will take longer to develop. Signed-off-by: Richard Palethorpe Reported-by: Li Wang --- testcases/cve/cve-2016-7117.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/testcases/cve/cve-2016-7117.c b/testcases/cve/cve-2016-7117.c index 6290af077..effab083d 100644 --- a/testcases/cve/cve-2016-7117.c +++ b/testcases/cve/cve-2016-7117.c @@ -99,6 +99,10 @@ static void setup(void) { fzsync_pair.min_samples = 10000; + tst_syscall(__NR_recvmmsg); + if (errno == ENOSYS) + tst_brk(TCONF, "recvmmsg not supported"); + tst_fzsync_pair_init(&fzsync_pair); }