Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/external/cddl/osnet/dist/lib/libzfs/common libzfs: Zero DIOC...
details: https://anonhg.NetBSD.org/src/rev/fed1bbc005b6
branches: trunk
changeset: 1023158:fed1bbc005b6
user: riastradh <riastradh%NetBSD.org@localhost>
date: Sat Aug 28 10:47:45 2021 +0000
description:
libzfs: Zero DIOCLWEDGES input before ioctl.
Otherwise we ask the kernel to write over whatever random pointer was
in the stack garbage here, when all we wanted was to learn whether
dkwl_nwedges is zero or nonzero.
XXX pullup-9
diffstat:
external/cddl/osnet/dist/lib/libzfs/common/libzfs_import.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diffs (11 lines):
diff -r 51aaecd10f3e -r fed1bbc005b6 external/cddl/osnet/dist/lib/libzfs/common/libzfs_import.c
--- a/external/cddl/osnet/dist/lib/libzfs/common/libzfs_import.c Sat Aug 28 10:29:15 2021 +0000
+++ b/external/cddl/osnet/dist/lib/libzfs/common/libzfs_import.c Sat Aug 28 10:47:45 2021 +0000
@@ -1099,6 +1099,7 @@
off_t size;
/* skip devices with wedges */
+ memset(&dkwl, 0, sizeof(dkwl));
if (native_ioctl(fd, DIOCLWEDGES, &dkwl) == 0 &&
dkwl.dkwl_nwedges > 0) {
(void) close(fd);
Home |
Main Index |
Thread Index |
Old Index