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

Martin Doucha mdoucha@suse.cz
Tue Mar 3 12:21:30 CET 2020


(Resending because I forgot to CC the LTP mailing list in the original
message to Petr Vorel.)

On 3/3/20 11:47 AM, Petr Vorel wrote:
>> -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).

pthread_create() man page say "compile AND link with -pthread". ‾\_(ッ)_/‾

>> +	while (tst_fzsync_run_a(&fzsync_pair)) {
>> +		TEST(punch_clock(TFD_TIMER_ABSTIME | TFD_TIMER_CANCEL_ON_SET));
>> +
>> +		if (TST_RET == -1)
>> +			tst_res(TBROK | TTERRNO, TIMERFD_FLAGS " failed");
> Now this needs to be tst_res(TFAIL (person who merges this will do).
> 
>> +
>> +		if (TST_RET != 0)
>> +			tst_res(TBROK | TTERRNO, "Invalid " TIMERFD_FLAGS
>> +				" return value");
> The same here.

No, both should be tst_brk(). There's no point continuing the test if
setting the CANCEL_ON_SET flag fails. Sorry about the typo, I need more
coffee.

-- 
Martin Doucha   mdoucha@suse.cz
QA Engineer for Software Maintenance
SUSE LINUX, s.r.o.
CORSO IIa
Krizikova 148/34
186 00 Prague 8
Czech Republic


More information about the ltp mailing list