vm_object: Fix a kernel memory disclosure via the vm_object list sysctl

Reported by:	Chris J-D <chris@accessvector.net>
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
This commit is contained in:
Mark Johnston 2023-01-16 10:53:59 -05:00
parent 8a9495517b
commit b050ee6c97

View File

@ -2523,7 +2523,7 @@ vm_object_list_handler(struct sysctl_req *req, bool swap_only)
count * 11 / 10));
}
kvo = malloc(sizeof(*kvo), M_TEMP, M_WAITOK);
kvo = malloc(sizeof(*kvo), M_TEMP, M_WAITOK | M_ZERO);
error = 0;
/*