All of lore.kernel.org
 help / color / mirror / Atom feed
From: Richard Palethorpe <rpalethorpe@suse.com>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH v2] Check recvmmsg exists before entering fuzzy loop
Date: Thu, 10 Jan 2019 10:59:50 +0100	[thread overview]
Message-ID: <20190110095950.21689-1-rpalethorpe@suse.com> (raw)
In-Reply-To: <CAEemH2cRO5PytjrqvFjCnUji+XQ7KeaXua+DDzxOT7Eu3+Wd2A@mail.gmail.com>

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 <rpalethorpe@suse.com>
Reported-by: Li Wang <liwang@redhat.com>
---
 testcases/cve/cve-2016-7117.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/testcases/cve/cve-2016-7117.c b/testcases/cve/cve-2016-7117.c
index 6290af077..db62909b3 100644
--- a/testcases/cve/cve-2016-7117.c
+++ b/testcases/cve/cve-2016-7117.c
@@ -99,6 +99,8 @@ static void setup(void)
 {
 	fzsync_pair.min_samples = 10000;
 
+	tst_syscall(__NR_recvmmsg, 0, 0, 0, 0, 0);
+
 	tst_fzsync_pair_init(&fzsync_pair);
 }
 
-- 
2.19.1


  parent reply	other threads:[~2019-01-10  9:59 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-08 13:26 [LTP] [PATCH v2] fzsync: revoke thread_B when parent hit accidental break Li Wang
2019-01-08 13:48 ` Cyril Hrubis
2019-01-09  5:18   ` Li Wang
2019-01-09 11:06     ` Richard Palethorpe
2019-01-09 12:01       ` Cyril Hrubis
2019-01-09 13:32         ` [LTP] [PATCH] Check recvmmsg exists before entering fuzzy loop Richard Palethorpe
2019-01-10  3:39           ` Li Wang
2019-01-10  9:50             ` Richard Palethorpe
2019-01-10  9:59             ` Richard Palethorpe [this message]
2019-01-11  5:57               ` [LTP] [PATCH v2] " Li Wang
2019-01-11 11:58               ` Cyril Hrubis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190110095950.21689-1-rpalethorpe@suse.com \
    --to=rpalethorpe@suse.com \
    --cc=ltp@lists.linux.it \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.