Re: [LTP] [PATCH v2] fsconfig: New case cover CVE-2022-0185

Cyril Hrubis
2023-02-09T14:25:56Z

Hi!
> > +static void run(void)
> > +{
> > + char *val = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA";
> > +
> > + for (unsigned int i = 0; i < 5000; i++)
> > + TEST(fsconfig(fd, FSCONFIG_SET_STRING, "\x00", val, 0));

Also as far as I understand the discussion fsconfig() returns EINVAL on
new enough kernels here, right? If that is the case we should also check
that the call fails properly from the v5.17 and newer.

--
Cyril Hrubis
chrubis@suse.cz