Re: [PATCH 7/15] sanitize AUDIT_MQ_SENDRECV

From: Al Viro
Date: Wed Dec 17 2008 - 03:03:30 EST


On Tue, Dec 16, 2008 at 11:56:56PM -0800, Andrew Morton wrote:
> > + if (copy_from_user(&ts, u_abs_timeout,
> > + sizeof(struct timespec)))
>
> Well that's odd. afacit timespec has different sizes on 32-bit and
> 64-bit userspace.
>
> But the old audit code did this copy too, and it presumably worked.

compat_mq_timedsend() et.al. essentially do copy_in_user() converting to
64bit and theh call sys_mq_...(). So you get kernel-native layout in
the log.

Similar for notification in compat_mq_notify(), etc.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/