Re: [5.2 REGRESSION] Generic vDSO breaks seccomp-enabled userspace on i386

From: Kees Cook
Date: Tue Jul 23 2019 - 19:43:08 EST


On Wed, Jul 24, 2019 at 12:59:03AM +0200, Thomas Gleixner wrote:
> And as we have sys_clock_gettime64() exposed for 32bit anyway you need to
> deal with that in seccomp independently of the VDSO. It does not make sense
> to treat sys_clock_gettime() differently than sys_clock_gettime64(). They
> both expose the same information, but the latter is y2038 safe.

Okay, so combining Andy's ideas on aliasing and "more seccomp flags",
we could declare that clock_gettime64() is not filterable on 32-bit at
all without the magic SECCOMP_IGNORE_ALIASES flag or something. Then we
would alias clock_gettime64 to clock_gettime _before_ the first evaluation
(unless SECCOMP_IGNORE_ALIASES is set)?

(When was clock_gettime64() introduced? Is it too long ago to do this
"you can't filter it without a special flag" change?)

--
Kees Cook