[LTP] [PATCH v4] Add a regression test for CVE-2017-1000380

Cyril Hrubis chrubis@suse.cz
Tue Jul 16 12:31:51 CEST 2019


Hi!
> > +static void setup(void)
> > +{
> > +       tst_fzsync_pair_init(&fzsync_pair);
> > +       tst_taint_init(TST_TAINT_W | TST_TAINT_D);
> > +       snd_fd = SAFE_OPEN("/dev/snd/timer",
> > +                       O_RDONLY|O_CREAT|O_NOCTTY|O_SYNC|O_LARGEFILE, 0);
> >
> 
> Should we check if the file exists before opening it?

Yes we should. We should add access("/dev/snd/timer", F_OK) to the test
setup.

> Otherwise, snd_timer01 failed as:
> 
> # ./snd_timer01
> tst_test.c:1100: INFO: Timeout per run is 0h 05m 00s
> safe_macros.c:225: BROK: snd_timer01.c:73: open(/dev/snd/timer,1052992,00)
> failed: ENOENT
> 
> # lsmod |grep -i snd
> 
> # grep -i snd /boot/config-4.18.0-107.el8.s390x
> 
> # ls /dev/snd/timer
> ls: cannot access '/dev/snd/timer': No such file or directory

I guess that there is no soundcard on mainframe :-).

-- 
Cyril Hrubis
chrubis@suse.cz


More information about the ltp mailing list