git: 2cab2d43b83b - main - syscalls: fix modspecific_t stack content leak
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 01 Jul 2023 18:40:13 UTC
The branch main has been updated by khng:
URL: https://cgit.FreeBSD.org/src/commit/?id=2cab2d43b83bddd44ecc1f267afb5e2725975ac7
commit 2cab2d43b83bddd44ecc1f267afb5e2725975ac7
Author: Ka Ho Ng <khng@FreeBSD.org>
AuthorDate: 2023-06-27 19:33:46 +0000
Commit: Ka Ho Ng <khng@FreeBSD.org>
CommitDate: 2023-07-01 18:38:11 +0000
syscalls: fix modspecific_t stack content leak
Zero-initialize the whole modspecific_t so that there would
not be kernel stack content leak in the unused part.
Sponsored by: Juniper Networks, Inc.
MFC after: 1 days
Differential Revision: https://reviews.freebsd.org/D40815
---
sys/kern/kern_syscalls.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sys/kern/kern_syscalls.c b/sys/kern/kern_syscalls.c
index a6e515fc0ce8..234e51cfd280 100644
--- a/sys/kern/kern_syscalls.c
+++ b/sys/kern/kern_syscalls.c
@@ -173,7 +173,7 @@ kern_syscall_module_handler(struct sysent *sysents, struct module *mod,
int what, void *arg)
{
struct syscall_module_data *data = arg;
- modspecific_t ms;
+ modspecific_t ms = { 0 };
int error;
switch (what) {