[LTP] [PATCH v2] Add test for CVE 2017-10661

Petr Vorel pvorel@suse.cz
Tue Mar 3 12:02:50 CET 2020


> Hi Martin,

> > Signed-off-by: Martin Doucha <mdoucha@suse.cz>
> Reviewed-by: Petr Vorel <pvorel@suse.cz>

> > Changes since v1:
> > - typo fixes
> > - code style fixes
> > - move test from cve/ to kernel/syscall/timerfd/
> > - add test to cve runfile
> Thanks for fixing all Richie's comments.

> > +++ b/testcases/kernel/syscalls/timerfd/Makefile
> > @@ -20,6 +20,7 @@ top_srcdir		?= ../../../..

> >  include $(top_srcdir)/include/mk/testcases.mk

> > -LDLIBS			+= -lpthread -lrt
> > +timerfd_settime02:	CFLAGS	+= -pthread
> > +timerfd_settime02:	LDLIBS	+= -pthread -lrt
> Interesting, I thought -pthread wouldn't be needed to be in LDLIBS
> (enough to have it in CFLAGS), but old distros (CentOS 6 in our travis: gcc
> 4.4.7, glibc 2.12).

OK: it can be just this:
timerfd_settime02:	CFLAGS	+= -pthread
timerfd_settime02:	LDLIBS	+= -lrt

because failure in CentOS 6 is different:
timerfd01.c:36: undefined reference to `clock_gettime'
https://api.travis-ci.org/v3/job/657694167/log.txt

Obviously we need autotools check for it (trivial, I can do it before merge).

Kind regards,
Petr


More information about the ltp mailing list