On 06/27/2018 02:59 PM, Jesus Sanchez-Palencia wrote:
> From: Richard Cochran <rcoch...@linutronix.de>
> 
> This patch introduces SO_TXTIME. User space enables this option in
> order to pass a desired future transmit time in a CMSG when calling
> sendmsg(2). The argument to this socket option is a 6-bytes long struct
> defined as:
> 
> struct sock_txtime {
>       clockid_t       clockid;
>       u16             flags;
> };

Note that sizeof(struct sock_txtime) is 8, not 6, because of alignments.

This means that your implementation of getsockopt(... SO_TXTIME )
is probably leaking two bytes of kernel stack to user space.


Reply via email to