diff mbox series

[v2] Check recvmmsg exists before entering fuzzy loop

Message ID 20190110095950.21689-1-rpalethorpe@suse.com
State Accepted
Headers show
Series [v2] Check recvmmsg exists before entering fuzzy loop | expand

Commit Message

Richard Palethorpe Jan. 10, 2019, 9:59 a.m. UTC
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(+)

Comments

Li Wang Jan. 11, 2019, 5:57 a.m. UTC | #1
On Thu, Jan 10, 2019 at 6:00 PM Richard Palethorpe <rpalethorpe@suse.com> wrote:
>
> 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>
Reviewed-by: Li Wang <liwang@redhat.com>
Cyril Hrubis Jan. 11, 2019, 11:58 a.m. UTC | #2
Hi!
Pushed, thanks.
diff mbox series

Patch

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);
 }