[LTP] [PATCH 2/4] Test for CVE-2016-4997 on setsockopt

Richard Palethorpe rpalethorpe@suse.com
Mon Mar 27 18:08:12 CEST 2017


Hello Metan,

On Mon, 27 Mar 2017 17:34:40 +0200
"Cyril Hrubis" <chrubis@suse.cz> wrote:

", ret);
> > +	if (sizeof(long) > 4)
> > +		tst_res(TCONF,
> > +			"The original vulnerability was only present in 32-bit compat mode");  
> 
> Why do we issue the TCONF at the end of the test? Shouldn't this be
> something do in the test setup?

Setup makes more sense.

> 
> Also we have tst_kernel_bits() in the test library, so we can do
> something as:
> 
> if (tst_kernel_bits() == 32 || sizeof(long) > 4)
> 	tst_res(TCONF, "...");

OK, great.

> 
> > +}
> > +
> > +static struct tst_test test = {
> > +	.tid = "cve-2016-4997",
> > +	.min_kver = "2.6.32",
> > +	.test_all = run,
> > +	.needs_root = 1,
> > +};  
> 
> I also wonder if we should compile the test with -m32 by default, we
> whould have to add a configure test if compilation with -m32 works
> though.
> 

Yes, I think that is best, but passing -m32 to the test's make target does not
cause the LTP library to be compiled with -m32 so linking fails. I'm not sure
how to get it to build both binaries.

Thank you,
Richard.


More information about the ltp mailing list