From a8d533d2c996e94aa0a0d4761a4c67df94bfe641 Mon Sep 17 00:00:00 2001 From: Ilja van Sprundel Date: Fri, 11 Oct 2019 22:36:14 +0200 Subject: [PATCH] clear message structure before filling it in This change clears the message structure before filling it in. This prevents uninitialized stack data from vfs leaking to a file system driver. --- minix/servers/vfs/request.c | 1 + 1 file changed, 1 insertion(+) diff --git a/minix/servers/vfs/request.c b/minix/servers/vfs/request.c index a7af02ba6..8419c7e55 100644 --- a/minix/servers/vfs/request.c +++ b/minix/servers/vfs/request.c @@ -1202,6 +1202,7 @@ int req_utime(endpoint_t fs_e, ino_t inode_nr, struct timespec * actimespec, assert(actimespec != NULL); assert(modtimespec != NULL); + memset(&m, 0, sizeof(m)); /* Fill in request message */ m.m_type = REQ_UTIME; m.m_vfs_fs_utime.inode = inode_nr;