From 21e0f45c7d73df6fe30c77ffcc9f81410e2ee369 Mon Sep 17 00:00:00 2001 From: Adhemerval Zanella Date: Mon, 27 Sep 2021 16:07:08 -0300 Subject: linux: Fix ancillary 64-bit time timestamp conversion (BZ #28349, BZ #28350) The __convert_scm_timestamps() only updates the control message last pointer for SOL_SOCKET type, so if the message control buffer contains multiple ancillary message types the converted timestamp one might overwrite a valid message. The test check if the extra ancillary space is correctly handled by recvmsg/recvmmsg, where if there is no extra space for the 64-bit time_t converted message the control buffer should be marked with MSG_TRUNC. It also check if recvmsg/recvmmsg handle correctly multiple ancillary data. Checked on x86_64-linux and on i686-linux-gnu on both 5.11 and 4.15 kernel. Co-authored-by: Fabian Vogt --- sysdeps/unix/sysv/linux/tst-socket-timestamp-time64.c | 1 + 1 file changed, 1 insertion(+) create mode 100644 sysdeps/unix/sysv/linux/tst-socket-timestamp-time64.c (limited to 'sysdeps/unix/sysv/linux/tst-socket-timestamp-time64.c') diff --git a/sysdeps/unix/sysv/linux/tst-socket-timestamp-time64.c b/sysdeps/unix/sysv/linux/tst-socket-timestamp-time64.c new file mode 100644 index 0000000000..ae424c2a70 --- /dev/null +++ b/sysdeps/unix/sysv/linux/tst-socket-timestamp-time64.c @@ -0,0 +1 @@ +#include "tst-socket-timestamp.c" -- cgit v1.2.3-70-g09d2